document.bgColor='#00AAFF'; function headerMove() { if ( ie ) { document.all.header.style.top=document.body.scrollTop; } if ( ns ) { var theHeader=document.getElementById("header"); theHeader.style.top=self.pageYOffset; } setTimeout("headerMove();", 10); } headerMove(); document.write(""); coverUp.style.width=document.body.clientWidth; coverUp.style.height=document.body.clientHeight; fadeCount=100; fadeSlow=false; function fadeIn() { fadeCount=(fadeSlow==false)? fadeCount-3:fadeCount-1.5; coverUp.style.filter="Alpha(Opacity="+fadeCount+")"; if (fadeCount>0) { setTimeout("fadeIn();", 10); } else { finishTransition(); } } function slideRight() { coverUp.style.width=(parseInt(coverUp.style.width) 0 ) { setTimeout("slideRight();", 10); } else { finishTransition(); } } function slideLeft() { coverUp.style.width=(parseInt(coverUp.style.width) 0 ) { setTimeout("slideLeft();", 10); } else { finishTransition(); } } function slideDown() { coverUp.style.height=(parseInt(coverUp.style.height) 0 ) { setTimeout("slideDown();", 10); } else { finishTransition(); } } function slideUp() { coverUp.style.height=(parseInt(coverUp.style.height) 0 ) { setTimeout("slideUp();", 10); } else { finishTransition(); } } function centreXIn() { slideLeft(); slideRight(); slideXMove=Math.round(slideXMove/2); } function centreYIn() { slideUp(); slideDown(); slideYMove=Math.round(slideYMove/2); } function boxIn() { centreXIn(); centreYIn(); } function cornerTopRight() { slideRight(); slideUp(); } function cornerTopLeft() { slideLeft(); slideUp(); } function cornerBottomRight() { slideRight(); slideDown(); } function cornerBottomLeft() { slideLeft(); slideDown(); } function cornerCentreTop() { centreXIn(); slideUp(); } function cornerCentreBottom() { centreXIn(); slideDown(); } function cornerCentreLeft() { centreYIn(); slideLeft(); } function cornerCentreRight() { centreYIn(); slideRight(); } transComplete=false; function finishTransition() { if (transComplete==false) { transComplete=true; coverUp.style.zIndex=-1000; startSlide(); }} function onloadFunc() { loadingCover.style.left=-10000; loadingCover.style.top=-10000; coverUp.style.width=document.body.clientWidth; coverUp.style.height=document.body.clientHeight; slideXMove=Math.round(parseInt(coverUp.style.width)/100); slideYMove=Math.round(parseInt(coverUp.style.height)/100); var transTypes=new Array; transTypes[0]=new Array; // Basic transTypes[1]=new Array; // Centre or Box In transTypes[2]=new Array; // Corner or centre piece transTypes[0][0]="slideLeft();"; transTypes[0][1]="slideRight();"; transTypes[0][2]="slideUp();"; // Each of these have a 1 in 15 chance transTypes[0][3]="slideDown();"; transTypes[0][4]="fadeIn();"; transTypes[1][0]="centreXIn();"; transTypes[1][1]="centreYIn();"; // Each of these have a 1 in 9 chance transTypes[1][2]="boxIn();"; transTypes[2][0]="cornerTopRight();"; transTypes[2][1]="cornerTopLeft();"; transTypes[2][2]="cornerBottomRight();"; transTypes[2][3]="cornerBottomLeft();"; // Each of these have a 1 in 24 chance transTypes[2][4]="cornerCentreTop();"; transTypes[2][5]="cornerCentreBottom();"; transTypes[2][6]="cornerCentreLeft();"; transTypes[2][7]="cornerCentreRight();"; var ranNum1=Math.round(Math.random()*2); // The number which decides the category will be 0, 1, or 2 if (ranNum1!=0) { ranNumFade=Math.round(Math.random()*4); if ((ranNumFade==0) || (ranNumFade==1)) { fadeIn(); fadeSlow=true; } } // If not a basic transition, give a 2 in 5 probability of fading accompanying the other transition. if (ranNum1==0) { ranNum2=Math.round(Math.random()*4); } // If we are going to activate the first category, number for the function will be 0, 1, 2, 3, or 4 if (ranNum1==1) { ranNum2=Math.round(Math.random()*2); } // If we are going to activate the second category, number for the function will be 0, 1, or 2 if (ranNum1==2) { ranNum2=Math.round(Math.random()*7); } // If we are going to activate the third category, number for the function will be 0, 1, 2, 3, 4, 5, 6, or 7 eval(transTypes[ranNum1][ranNum2]); // Decide which function to use, use the appropriate random numbers for each parametre // 27 Possible Transitions in total. } window.onload=onloadFunc;