묻고답하기

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

우선 스크립트가 두가지 들어가는 페이지를 만들고 있습니다.
한가지, 이미지가 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 남기남
jjaekim 아파치 httpd.conf에서 alias 부분 설정 질문드립니다. [1] 2007.08.10
거니세상 홈페이지 스크롤바옆에 생기는 빈공같 없애는 방법 아시는분. [1] 2007.08.10
빙판위신사 포토샵 설치셋업중 오류 [2] 2007.08.10
몰라 php 게시판 질문입니다. 급해요 ㅜㅜ [1] 2007.08.10
구영탄 플래시화일 [5] 2007.08.10
이병휘 스크롤 메뉴 질문입니다. [2] 2007.08.10
지네진 iframe 설치방법에 대한 질문입니다. [1] 2007.08.10
노고산 mail 관련 질문 입니다. 꼭 바주십시요//^  
이재명 다음이나 네이버처럼 실시간 뉴스 만드는 방법이 궁금합니다.  
이영선 쇼핑몰 제작비에 관한 질문 ㅠㅠ [1] 2007.08.10
김소연 제로보드 연동 쇼핑몰 관련문의 입니다. [7] 2007.08.10
토우야 사랑비 BGM이 이상하게 작동합니다. [1] 2007.08.10
채영민 이미지에 딱 맞게 창을 뛰울려면 어떻게 해야 하나요?  
묘령 서버 2003설치시 질문(초보입니다ㅠㅠ)  
천하태평 주소 http://asdasdasd.com 으로 고정시키는 법좀 알려주세요 [2] 2007.08.10
천하태평 광고배너와 제로보트 포인트 연동 [1] 2007.08.10
천하태평 테이블과 이미지 빈틈없이 붙이기. [1] 2007.08.10
슬픈영혼 이미지에 링크걸기 -_-;; [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 즐겨찾기 소스에 관한 질문입니다. 꼭 부탁드립니다.ㅠㅠ