묻고답하기

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

우선 스크립트가 두가지 들어가는 페이지를 만들고 있습니다.
한가지, 이미지가 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>