묻고답하기

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

우선 스크립트가 두가지 들어가는 페이지를 만들고 있습니다.
한가지, 이미지가 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 남기남
깜상321 Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home1/hosting_users/bit66/www/index.html on line 67 [1] 2013.09.25 by KS
라피에르 유투브 삽입시 주소를 수정 문제 질문드립니다. [1] 2013.09.25 by KS
훈잉 안녕하세요. 구글검색.. [1] 2013.09.25 by 빛의바다
씸슨 초기설치후 메러메세지 출력, 404에러 [1] file 2013.09.25 by 컴매냐
rakiora 특정 리퍼러로 접속시 아이피 기록후 해당 리퍼 접속자 차단할수있게 할수없나요? [1] 2013.09.25 by 컴매냐
windowwindow 1,7 버전xe 사용중인데 왜 외부링크차단 이작동안되죠? [1] 2013.09.25 by 컴매냐
BST1 영어로 된 게시판을 사용하고 싶은데요  
좋은나무 게시판 xe_2010_gallery 리스트 출력 부분을 변경하는 방법 문의 file  
레인컴 메인 로그인은 안되는데, 서브페이지 로그인은 정상적입니다.  
alljoy 모바일에서 동영상 리사이즈 [1] file 2013.09.25 by 후아아아~
Summer xe_document_readed_log 테이블은 어떻게 해야 기록이 남나요? [1] 2013.09.25 by sejin7940
본체 동영상 재생 질문드립니다.멀티미디어 링크 [1] 2013.09.26 by simpleweb
BST1 제발 영어로된 게시판 사용하는 법 좀 알려주세요 [1] 2013.09.26 by simpleweb
윤경인924 링크게시판 사용을 어떻게 하나요? [1] 2013.09.26 by simpleweb
losta 제로보드 초짜가 질문드립니다ㅠㅠ [1] file 2013.09.26 by simpleweb
라피에르 유림스킨 게시글 클릭 후 타이틀 글자수 제한 방법이 궁금합니다. [1] 2013.09.26 by simpleweb
엔토이 XE마켓에서 판매하는 레이아웃 처럼 제작 할려면 어떤 툴이 있어야하나요? [3] 2013.09.26 by simpleweb
mcgomting 위젯을 박스 안에 넣는(?) 질문입니다. [1] 2013.09.26 by 오르막
아짱。 지식인 xe 글이 안보입니다  
강군군군 xe_quiz 설치 도와주세요! [2] 2013.09.26 by 강군군군
김군개놈 meta 추가 하고 싶은데 어떻게 해야 하나요? [1] file 2013.09.26 by 오르막
루안킴 FAQ 최근으로 뽑아오려면.. [1] 2013.09.26 by sejin7940
연습인생 계정 이전후 생긴 문제 글자 깨짐 현상 [1] file 2013.09.26 by sejin7940
제로초보2 특정위젯 비회원보기 금지방법좀요~ [3] 2013.09.26 by 딸꾹질
좋은나무 게시판 xe_2010_gallery 스킨의 페이징 오류 문의 [1] 2013.09.26 by 딸꾹질
mcgomting 상자 위젯의 스타일 지정 [2] 2013.09.26 by 큰성565
veam 디폴트 게시판 리스트 특정 카테고리만 출력 질문입니다. [1] 2013.09.26 by 딸꾹질
내꼴리는대로 제로보드 xe에서 게시판 업데이트.... [1] 2013.09.26 by 딸꾹질
Double'U' 이미지가 엑박으로 뜬다고 합니다. [1] 2013.09.26 by 딸꾹질
socialskyo (댓)글작성시 에디터 입력창 크기 자동조절이 기본으로 클릭되어 있게 할수 있을까요?