/***************************************************************************
Copyright (C) 1999 Thomas Brattli (www.bratta.com - Visit for more great scripts)
This is a part of the DHTML intro from www.bratta.com/dhtml.
I've made it a stand-alone script so ppl can look at it and figure out how it
works and learn from it. I would prefer it if you didn't use this on your own page.
If you do however your free to do so as long as this copyright notice is intact
and the "DHTML intro by www.bratta.com" image stays on the page!
NOTE: I will not provide any "support" for this script. If you use it your
on your own.
****************************************************************************/
//Simple browsercheck.
var n = (document.layers) ? 1:0;
var ie = (document.all) ? 1:0;
/******************************************************************************
Making the cross-browser objects
******************************************************************************/
//Pageobject
function makePageCoords(){this.x2=(n)?innerWidth:document.body.offsetWidth;
this.y2=(n)?innerHeight:document.body.offsetHeight;
this.x50=this.x2/2; this.y50=this.y2/2;return this;}
//Cross-browser "div" object
function makeObj(obj,nest,x,y){
nest=(!nest) ? '':'document.'+nest+'.';
this.css=(n) ? eval(nest+'document.'+obj):eval('document.all.'+obj+'.style')
this.ref=n?this.css.document:document
this.clipIt=b_clipIt; this.clip=b_clip;
this.clipTo=b_clipTo; this.moveIt=b_moveIt;
this.obj = obj + "Object"; eval(this.obj + "=this")
return this
}
//Move function
function b_moveIt(x,y){this.x=x; this.y=y; this.css.left=this.x; this.css.top=this.y}
//clip functions
function b_clipTo(t,r,b,l){
if(n){this.css.clip.top=t;this.css.clip.right=r;this.css.clip.bottom=b;this.css.clip.left=l
}else{
this.css.clip="rect("+t+","+r+","+b+","+l+")";
}
}
function b_clipIt(tstop,rstop,bstop,lstop,step,fn){
if(!fn) fn=null; var clipval=new Array()
if(ie) {
clipval=this.css.clip;clipval=clipval.slice(5,clipval.length-1);
clipval=clipval.split(' ');for(var i=0;i<4;i++){clipval[i]=parseInt(clipval[i])}
}else{
clipval[0]=this.css.clip.top;clipval[1]=this.css.clip.right
clipval[2]=this.css.clip.bottom;clipval[3]=this.css.clip.left
}
if(!oIntro.ref.imgI) document.write('')
totantstep=Math.max(Math.max(Math.abs((tstop-clipval[0])/step),Math.abs((rstop-clipval[1])/step)),
Math.max(Math.abs((bstop-clipval[2])/step),Math.abs((lstop-clipval[3])/step)))
if(!this.clipactive)
this.clip(clipval[0],clipval[1],clipval[2],clipval[3],(tstop-clipval[0])/totantstep,
(rstop-clipval[1])/totantstep,(bstop-clipval[2])/totantstep,
(lstop-clipval[3])/totantstep,totantstep,0, fn)
}
function b_clip(tcurr,rcurr,bcurr,lcurr,tperstep,rperstep,bperstep,lperstep,totantstep,antstep, fn){
tcurr=tcurr+tperstep; rcurr=rcurr+rperstep
bcurr=bcurr+bperstep; lcurr=lcurr+lperstep
this.clipTo(tcurr,rcurr,bcurr,lcurr)
if(antstep
this.clipactive=true; antstep++
setTimeout(this.obj+".clip("+tcurr+","+rcurr+","+bcurr+","+lcurr+","+tperstep+","
+rperstep+","+bperstep+","+lperstep+","+totantstep+","+antstep+",'"+fn+"')",50)
}else{this.clipactive=false; eval(fn)}
}
/******************************************************************************
Clips the circle parts to make it look like they are "drawn" onto the screen
******************************************************************************/
function draw_circle(){
if(ie){ oCircleBottom.clipTo(0,0,100,0); oCircleTop.clipTo(0,400,100,400)}
oCircleBottom.clipIt(0,400,100,0,20,'oCircleTop.clipIt(0,1000,100,0,20)'); next(0)
}
/******************************************************************************
Animation for the "enter!" letters.
******************************************************************************/
//Path for the letters to follow, relative to page.x50 and page.y50
anim_0_x=new Array(-520,-515,-510,-490,-480,-470,-450,-440,-430,-420,-410,-398,-388,-375,-361,-346,-329,-311,-292,-272,-251,-230,-209,-187,-165,-142,-118,-94,-69,-44,-19,5,29,52,74,94,112,129,144,158,171,184,196,209,221,233,245,257,268,278,287,296,303,309,313,316,317,316,314,309,302,293,283,271,257,242,226,209,191,173,154,135,116,97,78,60,43,26,9,-8,-24,-41,-58,-75,-93,-112,-130,-148,-164,-180,-193,-204,-212,-218,-222,-224,-224,-222,-220,-216,-211,-206,-200,-193,-185,-177,-168,-155,-142,-127,-115,-95,-85,-70,-50,-40,-25,-10,0,4,7,10,14,16,20,26,30,35,37,41,45,47,51,56,60,63,66,71,75)
anim_0_y=new Array(-150,-160,-170,-180,-190,-200,-200,-205,-195,-185,-175,-165,-160,-155,-149,-143,-136,-130,-123,-118,-113,-109,-105,-102,-100,-98,-98,-97,-97,-98,-100,-102,-104,-107,-111,-116,-121,-126,-132,-137,-141,-145,-147,-148,-147,-144,-139,-133,-125,-116,-105,-93,-80,-66,-50,-34,-16,3,23,45,67,90,112,133,152,168,181,189,191,189,184,177,169,160,152,146,142,141,142,144,147,151,155,158,161,162,163,162,160,157,152,146,138,129,119,108,97,86,76,66,57,50,43,37,32,28,24,21,17,15,12,10,8,6,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
function next(num){
if(num
oEnter[0].moveIt(anim_0_x[num]+page.x50-35,anim_0_y[num]+page.y50-13)
oEnter[1].moveIt(anim_0_x[num+4]+page.x50-35,anim_0_y[num+4]+page.y50-13)
oEnter[2].moveIt(anim_0_x[num+8]+page.x50-35,anim_0_y[num+8]+page.y50-13)
oEnter[3].moveIt(anim_0_x[num+12]+page.x50-35,anim_0_y[num+12]+page.y50-13)
oEnter[4].moveIt(anim_0_x[num+16]+page.x50-35,anim_0_y[num+16]+page.y50-13)
oEnter[5].moveIt(anim_0_x[num+20]+page.x50-35,anim_0_y[num+20]+page.y50-13)
num++; setTimeout("next("+num+")",50)
}
}
function next2(){
location.href="여기에 다음 들어갈 곳 주소를 적는다"
}
/******************************************************************************
Inititiates the page, making cross-browser objects - starting "animation"
******************************************************************************/
function init(){
page=new makePageCoords()
oCircleBottom=new makeObj('divCircleBottom')
oCircleBottom.moveIt(page.x50-200,page.y50+2)
oCircleTop=new makeObj('divCircleTop')
oCircleTop.moveIt(page.x50-200,page.y50-42)
oIntro=new makeObj('divIntro')
oIntro.moveIt(page.x2-120,page.y2-50)
oIntro.css.visibility='visible'
oEnter=new Array()
for(i=0;i<=5;i++){oEnter[i]=new makeObj('divEnter'+i)}
draw_circle()
}
onload=init;