묻고답하기

안녕하세요.
자바스크립트 소스에 관해서 질문이 생겨서 글을 올립니다.
좀 급한 거라서 내일 낮에 해결해야하는데ㅠㅠ

우선 스크립트가 두가지 들어가는 페이지를 만들고 있습니다.
한가지, 이미지가 2초정도마다 자연스럽게 변하는 스크립트를 넣었구요.
추가로 즐겨찾기 소스를 넣으려고 하는데
이게 자꾸 오류가 납니다.
제가 자바스크립트에 문외한이다보니ㅠㅠ
"'window.external'은 null이거나 개체가 아닙니다."
이렇게 오류가 뜹니다.
어디선가 저걸 지정해줘야할 것 같은데 알수가 없네요.
꼭꼭 해결해주시면 정말 감사할거에요.ㅠㅠ

즐겨찾기 소스------------------------------------------------------
<script language="JavaScript1.2">
var favoriteurl="http://"
var favoritetitle="홈페이지 제목"
function addfavorites(){
if (document.all)
window.external.AddFavorite(favoriteurl,favoritetitle)
}
</script>

이미지 서서히 변하는 소스----------------------------------------
<script type="text/javascript">

var fadeimages=new Array()
//이미지 경로를 지정해 준다.
fadeimages[0]=["img/1.gif", "", ""] //이미지만 넣는다.
fadeimages[1]=["img/2.gif", "", ""] //이미지와 클릭시 연결될 링크까지 넣는다.
fadeimages[2]=["img/3.gif", "", ""] //이미지와 클릭시 연결될 링크, 타켓까지 지정해 준다.
fadeimages[3]=["img/4.gif", "", ""] //이미지와 클릭시 연결될 링크, 타켓까지 지정해 준다.
fadeimages[4]=["img/5.gif", "", ""] //이미지와 클릭시 연결될 링크, 타켓까지 지정해 준다.
fadeimages[5]=["img/6.gif", "", ""] //이미지와 클릭시 연결될 링크, 타켓까지 지정해 준다.



var fadebgcolor="white"

////이 부분은 고치지 마세요./////////////

var fadearray=new Array()
var fadeclear=new Array()

var dom=(document.getElementById) //최신 dom 브라우저
var iebrowser=document.all

function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){
this.pausecheck=pause
this.mouseovercheck=0
this.delay=delay
this.degree=50 //초기 불투명도
this.curimageindex=0
this.nextimageindex=1
fadearray[fadearray.length]=this
this.slideshowid=fadearray.length-1
this.canvasbase="canvas"+this.slideshowid
this.curcanvas=this.canvasbase+"_0"
if (typeof displayorder!="undefined")
theimages.sort(function() {return 0.5 - Math.random();})
this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array() //처음 불러들이는 이미지들
for (p=0;p<theimages.length;p++){
this.postimages[p]=new Image()
this.postimages[p].src=theimages[p][0]
}

var fadewidth=fadewidth+this.imageborder*2
var fadeheight=fadeheight+this.imageborder*2

if (iebrowser&&dom||dom) //IE5이거나 최신 브라우저 일때 (즉, Firefox)
document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;-khtml-opacity:10;opacity:10;background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;background-color:'+fadebgcolor+'"></div></div>')
else
document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')

if (iebrowser&&dom||dom) //IE5이거나 최신 브라우저 일때 (즉, Firefox)
this.startit()
else{
this.curimageindex++
setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
}
}

function fadepic(obj){
if (obj.degree<100){
obj.degree+=10
if (obj.tempobj.filters&&obj.tempobj.filters[0]){
if (typeof obj.tempobj.filters[0].opacity=="number") // IE6+ 일 때
obj.tempobj.filters[0].opacity=obj.degree
else //IE5.5- 일 때
obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
}
else if (obj.tempobj.style.MozOpacity)
obj.tempobj.style.MozOpacity=obj.degree/101
else if (obj.tempobj.style.KhtmlOpacity)
obj.tempobj.style.KhtmlOpacity=obj.degree/100
}
else{
clearInterval(fadeclear[obj.slideshowid])
obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1"
obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
obj.populateslide(obj.tempobj, obj.nextimageindex)
obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
}
}

fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][1]!="") //이미지에 링크가 걸려있을 경우
slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
if (this.theimages[picindex][1]!="") //이미지에 링크가 걸려있을 경우
slideHTML+='</a>'
picobj.innerHTML=slideHTML
}


fadeshow.prototype.rotateimage=function(){
if (this.pausecheck==1) //마우스를 이미지위에 갖다댔을때 슬라이드쇼를 멈추게 한다.
var cacheobj=this
if (this.mouseovercheck==1)
setTimeout(function(){cacheobj.rotateimage()}, 100)
else if (iebrowser&&dom||dom){
this.resetit()
var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
crossobj.style.zIndex++
fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
}
else{
var ns4imgobj=document.images['defaultslide'+this.slideshowid]
ns4imgobj.src=this.postimages[this.curimageindex].src
}
this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
}

fadeshow.prototype.resetit=function(){
this.degree=10 // 불투명도. 100에 가까울수록 그림이 바로바로 바뀌는 듯한 효과가 있다. 즉, 서서히 변화하는 것같은 효과를 주려면 낮은 숫자로 하는 것이 좋다.
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
if (crossobj.filters&&crossobj.filters[0]){
if (typeof crossobj.filters[0].opacity=="number") // IE6+일 때
crossobj.filters(0).opacity=this.degree
else // IE5.5-일 때
crossobj.style.filter="alpha(opacity="+this.degree+")"
}
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this.degree/101
else if (crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=obj.degree/100
}


fadeshow.prototype.startit=function(){
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
this.populateslide(crossobj, this.curimageindex)
if (this.pausecheck==1){ //마우스를 갖다댔을 때 슬라이드쇼가 멈춰야 한다면..
var cacheobj=this
var crossobjcontainer=iebrowser? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)
crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
}
this.rotateimage()
}

</script>
글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
슬픈영혼 이미지에 링크걸기 -_-;; [2] 2007.08.10
김병진 target 에 관한 질문좀..  
이순신 웹서핑중 다운받은 멋진 인트로 fla파일에 덱스트를 제가원하는 덱스트로바꾸고싶은데요  
이순신 플래시고수님들 ~ fla 파일의 수정방법에관하여 [1] 2007.08.10
insideJS 홈페이지에 뜨는 공지사항 창에 대해서요  
전병철 급합니다...원프레임 질문드려요... [2] 2007.08.10
슬픈영혼 이미지 로딩에 관한 질문... [1] 2007.08.10
jooran 유동포워딩.  
강정구 홈페이지 버튼입니다.. 이게 무엇을 의미하는지요?  
배용국 배경음악 안멈추게 하려면??  
김강남 vbscript를 자바스크립트로 바꾸고 싶은데 이거 같은 경우는 어떻게 하나요?  
열라붕신덕꾸 랜덤으로 안나오는 배경음악 좀; [1] 2007.08.10
davira 즐겨찾기 소스에 관한 질문입니다. 꼭 부탁드립니다.ㅠㅠ  
정모아 스크롤바 따라다니는 메뉴에서요.  
최병관 홈페이지 처음주소로 다른 페이지가도 그대로 주소창이 똑같게 하려면? [1] 2007.08.10
송승한 모니터 해상도를 바꾸면...  
박형주 옥션에서 다른물품 보기 사진 아주 많이 나오게 하는거요!  
아린 페인트샵에서..  
f0key [ASP폼메일]CDO 및 DBMS(SQL)질문...--; [1] 2007.08.10
조민재 제발~ 도와 주세요. ㅠ,ㅠ;  
김세훈 다음과 같은 로그인 방식에 주로 쓰는 웹디자인 방법은? [2] 2007.08.10
마일드 이 글씨체가 무슨체인가요?? [1] 2007.08.10
루키아 .net도메인을 얻었는데.. [3] 2007.08.10
한대윤 최근게시물 갤러리가 안되는데염;;  
윤형섭 httpd.conf에 UserDir설정에 대하여.. [1] 2007.08.10
WalkTheLine 테이블 내에서 외부로그인 슬라이딩 효과.  
츈군 포토샵으로 로고를 만들었는데...  
우헤헤 파일을 못 받게 하기.. [2] 2007.08.10
김동철 기존의 배경 스킨을 다른 스킨으로 어떻게 바꾸나요? (왕초보)  
Sedin php 에서 Asc 정렬로 테이블 출력을 했는데.. [1] 2007.08.10