var Netscape, MSIE, Opera, Unknown;
var Win, Mac, Other;
var NetscapeVer, MSIEVer, OperaVer;
var Abox=0;
var myheight;
var mywidth;
var visibleX;
var visibleY;
var AnimationRunning=0;
var animation_timer;
var countdown_timer;
var display_odd;
var display_even;
var form_counter;
var form_miscinfo;
var preLoadTimerDefault=3500;
if ( ! prefixURL )
{
var prefixURL='';
}
rnd.today=new Date();
rnd.seed=rnd.today.getTime();
function rnd() {
rnd.seed = (rnd.seed*9301+49297) % 233280;
return rnd.seed/(233280.0);
};
function rand(number) {
return Math.ceil(rnd()*number);
};
function getWindowSize() {
myWidth = 0, myHeight = 0;       
if( typeof( window.innerWidth ) == 'number' ) {    
myWidth = window.innerWidth;   
myHeight = window.innerHeight;
} else {
if( document.documentElement &&
( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
myWidth = document.documentElement.clientWidth;
myHeight = document.documentElement.clientHeight;
} else {
if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
myWidth = document.body.clientWidth;
myHeight = document.body.clientHeight;
}
}
}
}     
function randVisibleXY(screenwidth,screenheight,innerpicwidth,innerpicheight,Xoff,Yoff,imageW,imageH)
{
var num=rand(4);
switch (num)
{
case 0: 
case 4:
visibleX=rand(screenwidth-imageW);
if (Yoff<=imageH )
visibleY=-1*rand(imageH/2);
else
visibleY=rand(Yoff);
break;
case 1: 
leftheight=screenheight-innerpicheight-Yoff;
if (leftheight<=imageH)
visibleY=screenheight-imageH-rand(imageH/2);
else
visibleY=Yoff+innerpicheight+rand(leftheight-imageH); 
visibleX=rand(screenwidth-imageW); break;
case 2: 
visibleX=rand(Xoff);visibleY=rand(screenheight-imageH); break;
case 3: 
leftwidth=screenwidth-innerpicwidth-Xoff;
if (leftwidth<=imageW )
visibleX=screenwidth-imageW-rand(imageW/2);
else
visibleX=Xoff+innerpicwidth+rand(leftwidth-imageW);
visibleY=rand(screenheight-imageH); 
if (debug>3) debugLog("leftwidth="+leftwidth+" imageW="+imageW+" screenwidth="+screenwidth+" innerpicwidth="+innerpicwidth+" Xoff="+Xoff);
break;
}
if (debug>3) debugLog("randVisibleXY: "+num+" visibleX="+visibleX+" visibleY="+visibleY);
}
function setCookie(name, value, expires, path, domain, secure) {
var curCookie = name + "=" + escape(value) +
((expires) ? "; expires=" + expires.toGMTString() : "") +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
((secure) ? "; secure" : "");
document.cookie = curCookie;
}
function internal_getCookie(name) {
var dc = document.cookie;
var prefix = name + "=";
var begin = dc.indexOf("; " + prefix);
var retcook;
if (begin == -1) {
begin = dc.indexOf(prefix);
if (begin != 0) return null;
} else
begin += 2;
var end = document.cookie.indexOf(";", begin);
if (end == -1)
end = dc.length;
retcook=unescape(dc.substring(begin + prefix.length, end));
return( retcook );
}
function getCookie(name) {
myCookie=internal_getCookie(name);
if ( name == "taal" )
{  
switch ( myCookie )
{
case "N":  
break;
case "E":  
break;
default:   myCookie="E";
}
}
return(myCookie)
}
function deleteCookie(name, path, domain) {
if (getCookie(name)) {
document.cookie = name + "=" + 
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
"; expires=Thu, 01-Jan-70 00:00:01 GMT";
}
}
function copyarray( from, to  )
{  
for (i in from)
{  
to[i]=from[i];
}
}
myAdminMode=getCookie("myAdminMode");
function clickIE() {if (document.all) {alert(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {alert(message);return false;}}}
if ( myAdminMode != 1 )
{
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false")
}
debug=getCookie("myDebug");
if ( debug > 0 )
{
debugWindow=window.open("","DebugWindow","toolbar=no,status=no, scrollbars=yes,resizable=yes,copyhistory=yes,width=400,height=300")
debugLog("Debug enabled level: "+debug);
}
function debugLog( log )
{  
debugWindow.document.write( log + "<BR>"); 
}
function debugCodeLog( code )
{  
debugWindow.document.write("<TEXTAREA COLS=60 ROWS=4>"+ code + "</TEXTAREA><BR>");
}
Netscape = navigator.appName == "Netscape";
MSIE = navigator.appName == "Microsoft Internet Explorer";
Opera = navigator.userAgent.indexOf("Opera") > -1;
Unknown = !(Netscape || MSIE || Opera);
Win = navigator.userAgent.indexOf("Win") > -1;
Mac = navigator.userAgent.indexOf("Mac") > -1;
Other = !(Win || Mac);
if(Netscape) {
browserType="Netscape";
NetscapeVer = parseFloat(navigator.appVersion);
browserVer=NetscapeVer;
}
else if(MSIE) {
browserType="IE";
n = navigator.userAgent;
MSIEVer = n.substr(n.indexOf("MSIE ")+("MSIE ").length, 4);
MSIEVer = parseFloat(MSIEVer); 
browserVer=MSIEVer;
if(Opera) {
browserType="Opera";
OperaVer = n.substr(n.indexOf("Opera ")+("Opera ").length, 4);
OperaVer = parseFloat(OperaVer);
browserVer=OperaVer;
}
}
else
{
browserType="unknown";
browserVer="unknown";
}
function playsound( embedname )
{
soundfunc="play()";
execstring="document." + embedname + "." + soundfunc ;
if (debug > 0) debugCodeLog( execstring );
eval( execstring );
}
function stopsound( embedname )
{
soundfunc="stop()";
execstring="document." + embedname + "." + soundfunc ;
if (debug>0) debugCodeLog( execstring );
eval( execstring );
}
function randomsound( embedname, mintimefromnow, maxtimefromnow, duration)
{
myrandom=Math.floor( Math.random() * 100 );
delta=maxtimefromnow-mintimefromnow;
randomdelta=Math.floor(myrandom*delta/100);
nextsounddelay=mintimefromnow+randomdelta;
playsound ( embedname );
setTimeout("stopsound  (\"" +embedname+"\")", duration);
setTimeout("randomsound(\"" +embedname+"\","+ mintimefromnow +","+maxtimefromnow+","+duration+")", nextsounddelay);
}
function music_handling()
{
if ( debug>0 ) debugLog( "entering music_handling" );
if ( Netscape )
{
}
if ( MSIE && (self.document.initsong.readyState != "complete"  ))
{
alert("Please wait for loading the music "+Abox+" "+self.document.initsong.readyState+"\n"+self.document.initsong.name+"\n"+document.initsong.name);
Abox++;
setTimeout("music_handling()", 20000 );
}
else
{
playsound( "initsong" );
setTimeout("playsound (\"basesong\")" , 10000 );
setTimeout("stopsound (\"initsong\")" , 25000 );
setTimeout("randomsound(\"initsong\", 20000,40000,6000)", 35000);
}
}
function write_it(text,id)
{       
if (document.getElementById)
{
x = document.getElementById(id);
x.innerHTML = '';
x.innerHTML = text;
}
else if (document.all)
{
x = document.all[id];
x.innerHTML = text;
}
else if (document.layers)
{
alert("Sorry, your browser is not compatible with this website!");
}
}
var currentImage=new Image();
var my_i=1;
var resultstring;
function showimagesizes()
{
if ( my_i> 1 )
resultstring=resultstring+" W:"+currentImage.width+" H:"+currentImage.height;
clearTimeout(animation_timer)
if (my_i >= image_data.length) {  currentImage.onload=null; alert( resultstring); return;}	
showtype=image_data[my_i][0];
if ( (showtype != 4) && (showtype != 5) )
{
resultstring=resultstring+'\n'+my_i+" "+image_data[my_i][1]
currentImage.onload=showimagesizes;
currentImage.src = image_data[my_i][1];
my_i++;
}
else
{
resultstring=resultstring+'\n'+my_i+" Skipped "+image_data[my_i][0];
my_i++;
showimagesizes();
}
}
function loadimage( i_image , imagecounter )
{
if ( debug>0 ) debugLog( "entering loadimage" );
if (i_image >= image_data.length) { alert("Error, out of boundary.\nTrying to continue."); i_image=1 }	
if ( imagecounter % 2 == 1 )
image_spec="image_display_odd";
else
image_spec="image_display_even";
if (  i_image == -1 )
{  
duration=-1;
if ( taal == "N" )
form_miscinfo="Einde";
if ( taal == "E" )
form_miscinfo="The End";
form_counter="";
showtype=-1;  
}
else
{  
showtype=image_data[i_image][0];
form_miscinfo="";
duration=14000;
form_counter=""+i_image+"/"+ (image_data.length-1);
}
if ( taal == "N" )
settxt="set van ";
if ( taal == "E" )
settxt="set of ";
if (debug>0) debugWindow.document.write("ImgNum:"+ i_image+" Showtype: "+ showtype+"<BR>" );
switch( showtype )
{
case 0 : 
curImageWidth=image_data[i_image][5];
curImageHeight=image_data[i_image][6];
if ( image_data[i_image][4] == -1 )
myheight=(curImageHeight*image_data[i_image][2]-10);
else
myheight=curImageHeight;
mywidth=curImageWidth;
myapplet="<CENTER>";
myapplet=myapplet+"<applet codebase=\"applets/lake\" code=\"lake.class\" width="+curImageWidth+" height="+myheight+"><param name=\"image\" value=\"/"+image_data[i_image][1]+"\">";
myapplet=myapplet+"<param name=\"underwater\" value=\"true\"><param name=speed value="+image_data[i_image][3]+"><param name=horizon value="+image_data[i_image][4]+">\n";
myapplet=myapplet+"<param name=\"rocking\" value=\"false\">\n";
myapplet=myapplet+"<param name=\"hRef\" value=\"vote.html\">\n";
myapplet=myapplet+"<param name=\"target\" value=\"_new\">\n";
myapplet=myapplet+"</applet></CENTER>\n";
if ( debug>0 ) { debugLog("Spec: "+image_spec); debugCodeLog( myapplet )  }
write_it( myapplet, image_spec );
break;
case 1 : 
curImageWidth=image_data[i_image][5];
curImageHeight=image_data[i_image][6];
if ( image_data[i_image][4] == -1 )
myheight=(curImageHeight*image_data[i_image][2]-10);
else 
myheight=curImageHeight;
mywidth=curImageWidth;
myapplet="<CENTER>";
myapplet=myapplet+"<applet codebase=\"applets/lake\" code=\"lake.class\" width="+curImageWidth+" height="+myheight+"><param name=\"image\" value=\"/"+image_data[i_image][1]+"\"><param name=speed value="+image_data[i_image][3]+"><param name=horizon value="+image_data[i_image][4]+">\n";
myapplet=myapplet+"<param name=\"rocking\" value=\"false\">\n";
myapplet=myapplet+"<param name=\"hRef\" value=\"vote.html\">\n";
myapplet=myapplet+"<param name=\"target\" value=\"_new\">\n";
myapplet=myapplet+"</applet></CENTER>\n";
if ( debug>0 ) {  debugLog("Spec: "+image_spec); debugCodeLog( myapplet )  }
write_it( myapplet, image_spec );
break;
case 2 : 
myhtml="<BR><CENTER><img src=\""+image_data[i_image][1]+"\" border=0></CENTER>";
mywidth=0;myheight=0;
if ( debug>0 ) {  debugLog("Spec: "+image_spec); debugCodeLog( myhtml )  }
write_it(myhtml,image_spec);
break;
case 3 : 
curImageWidth=image_data[i_image][2];
curImageHeight=image_data[i_image][3];
mywidth=curImageWidth;
myheight=curImageHeight;
myapplet="<CENTER><applet codebase=\"applets/weather\" code=\"weather.class\" archive=\"weather.jar\" height="+curImageHeight+" width="+curImageWidth+">\n";
myapplet=myapplet+"<param name=\"credits\" value=\"Applet by Anfy Team (www.anfyteam.com)\">\n";
myapplet=myapplet+"<param name=\"regcode\" value=\"no\">\n";
myapplet=myapplet+"<param name=\"reglink\" value=\"no\">\n";
myapplet=myapplet+"<param name=\"regnewframe\" value=\"no\">\n";
myapplet=myapplet+"<param name=\"regframename\" value=\"_blank\">\n";
myapplet=myapplet+"<param name=\"res\" value=\"1\">\n";
myapplet=myapplet+"<param name=\"statusmsg\" value=\"Weather applet\">\n";
myapplet=myapplet+"<param name=\"bgimage\" value=\""+image_data[i_image][1]+"\">\n";
myapplet=myapplet+"<param name=\"priority\" value=\"3\">\n";
myapplet=myapplet+"<param name=\"MinSYNC\" value=\"10\">\n";
myapplet=myapplet+"<param name=\"memdelay\" value=\"1000\">\n";
myapplet=myapplet+"<param name=\"overimg\" value=\"no\">\n";
myapplet=myapplet+"<param name=\"overimgX\" value=\"0\">\n";
myapplet=myapplet+"<param name=\"overimgY\" value=\"0\">\n";
myapplet=myapplet+"<param name=\"fogon\" value=\"no\">\n";
myapplet=myapplet+"<param name=\"rainon\" value=\"yes\">\n";
myapplet=myapplet+"<param name=\"lightningon\" value=\"yes\">\n";
myapplet=myapplet+"<param name=\"fogon\" value=\"no\">\n";
myapplet=myapplet+"<param name=\"fogstrength\" value=\"8\">\n";
myapplet=myapplet+"<param name=\"fogmin\" value=\"0\">\n";
myapplet=myapplet+"<param name=\"fogmax\" value=\"0\">\n";
myapplet=myapplet+"<param name=\"fogmult\" value=\"256\">\n";
myapplet=myapplet+"<param name=\"fogdirection\" value=\"right\">\n";
myapplet=myapplet+"<param name=\"fogspeed\" value=\"2\">\n";
myapplet=myapplet+"<param name=\"foginteraction\" value=\"no\">\n";
myapplet=myapplet+"<param name=\"rainstrength\" value=\"150\">\n";
myapplet=myapplet+"<param name=\"raindropsnumber\" value=\"0\">\n";
myapplet=myapplet+"<param name=\"raincolor1\" value=\"ffddaa\">\n";
myapplet=myapplet+"<param name=\"raincolor2\" value=\"aaddff\">\n";
myapplet=myapplet+"<param name=\"rainspeed\" value=\"4\">\n";
myapplet=myapplet+"<param name=\"raindifspeed\" value=\"8\">\n";
myapplet=myapplet+"<param name=\"raininteraction\" value=\"no\">\n";
myapplet=myapplet+"<param name=\"lightningstrength\" value=\"8\">\n";
myapplet=myapplet+"<param name=\"lightningminstrenght\" value=\"4\">\n";
myapplet=myapplet+"<param name=\"lightningmaxstrength\" value=\"10\">\n";
myapplet=myapplet+"<param name=\"lightningymax\" value=\"225\">\n";
myapplet=myapplet+"<param name=\"lightningbright\" value=\"8\">\n";
myapplet=myapplet+"<param name=\"lmindirchange\" value=\"10\">\n";
myapplet=myapplet+"<param name=\"lmaxdirchange\" value=\"9000\">\n";
myapplet=myapplet+"<param name=\"lbranchvalue\" value=\"200\">\n";
myapplet=myapplet+"<param name=\"lgrminnumber\" value=\"1\">\n";
myapplet=myapplet+"<param name=\"lgrmaxnumber\" value=\"7\">\n";
myapplet=myapplet+"<param name=\"lgroupsmindelay\" value=\"50\">\n";
myapplet=myapplet+"<param name=\"lgroupsmaxdelay\" value=\"200\">\n";
myapplet=myapplet+"</applet></CENTER>\n";
if ( debug>0 ) {  debugLog("Spec: "+image_spec); debugCodeLog( myapplet )  }
write_it(myapplet,image_spec);
duration=duration*2;
break;
case 4 : 
tempdata=new Array();
copyarray(image_data[i_image],tempdata);
getridof=tempdata.shift();
imagecategory=tempdata.shift();
switch ( imagecategory )
{
case 1 : 
duration=6000;
myheight=384; mywidth=500;
break;
case 2 : 
duration=6000;
myheight=500; mywidth=384;
break;
case 3 : 
duration=9000;
myheight=500; mywidth=500;
break;
}
form_miscinfo=settxt+tempdata.length;
myapplet="<CENTER><applet codebase=\"applets/CFade\" archive=\"AnFade.jar\" code=\"AnFade.class\" height="+myheight+" width="+mywidth+">\n";
myapplet=myapplet+"<param name=\"credits\" value=\"Applet by Fabio Ciucci (www.anfyteam.com)\">\n";
myapplet=myapplet+"<param name=\"speed\" value=\"8\">\n";
myapplet=myapplet+"<param name=\"pause\" value=\"1500\">\n";
myapplet=myapplet+"<param name=\"progressivefade\" value=\"YES\">\n";
myapplet=myapplet+"<param name=\"overimg\" value=\"NO\">\n";
myapplet=myapplet+"<param name=\"overimgX\" value=\"0\">\n";
myapplet=myapplet+"<param name=\"overimgY\" value=\"0\">\n";
myapplet=myapplet+"<param name=\"regcode\" value=\"NO\">\n";
myapplet=myapplet+"<param name=\"regnewframe\" value=\"NO\">\n";
myapplet=myapplet+"<param name=\"regframename\" value=\"_blank\">\n";
myapplet=myapplet+"<param name=\"memdelay\" value=\"1000\">\n";
myapplet=myapplet+"<param name=\"priority\" value=\"3\">\n";
myapplet=myapplet+"<param name=\"MinSYNC\" value=\"20\">\n";
myapplet=myapplet+"<param name=\"res\" value=\"1\">\n";
for (count=1 ; count< tempdata.length; count++ )
{
myapplet=myapplet+"<param name=\"image"+count+"\" value=\""+tempdata[count]+"\">\n";
myapplet=myapplet+"<param name=\"link"+count+"\" value=\"NO\">\n";
}
myapplet=myapplet+"</applet></CENTER>";
if ( debug>0 ) {  debugLog("Spec: "+image_spec); debugCodeLog( myapplet )  }
write_it(myapplet,image_spec);
duration=duration*tempdata.length;
break;
case 5 : 
myheight=500; mywidth=650;
var alleffects = new Array( "burnfxmod", "pixelfxmod", "pixel2fxmod", "pixel3fxmod", "burnfxmod", "zoomfxmod", "origamifxmod", "blackholefxmod", "unseenwindsfxmod", "rotatefxmod", "shatterfxmod", "brushfxmod", "hbombfxmod", "liquidfxmod" );
tempdata=new Array();
copyarray(image_data[i_image],tempdata);
getridof=tempdata.shift();
effectnum=tempdata.shift();
var effects = new Array();
if ( effectnum == 99 )
{  
copyarray(alleffects,effects);
}
else
{  
for ( count=1; count<=effectnum; count++)
{
effectid=tempdata.shift();
if ( effectid >= alleffects.length )
{
alert("EffectId too large ("+effectid+">="+alleffects.length);
return;
}
else
{   
effects.push( alleffects[effectid] );
}
}
}
form_miscinfo=settxt+tempdata.length;
myapplet="<CENTER><applet codebase=\"applets/photoalbum\" code=\"photoalbum.class\" height="+myheight+" width="+mywidth+">\n";
myapplet=myapplet+"<param name=\"developer\" value=\"Demicron (www.demicron.se)\">\n";
myapplet=myapplet+"<param name=\"userinterface\" value=\"standardui\">\n";
myapplet=myapplet+"<param name=\"standardui.maincolor\" value=\"000000\">\n";
myapplet=myapplet+"<param name=\"standardui.usepausebutton\" value=\"no\">\n";
myapplet=myapplet+"<param name=\"standardui.innerborderwidth\" value=\"0\">\n";
myapplet=myapplet+"<param name=\"standardui.middleborderwidth\" value=\"0\">\n";
myapplet=myapplet+"<param name=\"standardui.outerborderwidth\" value=\"0\">\n";
myapplet=myapplet+"<param name=\"transtime\" value=\"8000\">\n";
myapplet=myapplet+"<param name=\"timeout\" value=\"0\">\n";
myapplet=myapplet+"<param name=\"pause\" value=\"2000\">\n";
myapplet=myapplet+"<param name=\"minframenr\" value=\"150\">\n";
myapplet=myapplet+"<param name=\"bgcolor\" value=\"000000\">\n";
duration=10500; 
for (count=0; count< effects.length; count++)
{  
myapplet=myapplet+"<param name=\"fxmod"+count+"\" value=\""+effects[count]+"\">\n";
}
for (count=0 ; count< tempdata.length; count++ )
{  
myapplet=myapplet+"<param name=\"image"+count+"\" value=\"../../"+tempdata[count]+"\">\n";
}
myapplet=myapplet+"</applet></CENTER>";
if ( debug>0 ) {  debugLog("Spec: "+image_spec); debugCodeLog( myapplet )  }
write_it(myapplet, image_spec);
duration=duration*tempdata.length*1.25;
break;
case 6 : 
mywidth=image_data[i_image][2];
myheight=image_data[i_image][3];
myapplet="<center><applet codebase=\"applets/huerot\" code=\"huerot.class\" height="+myheight+" width="+mywidth+">\n";
myapplet=myapplet+"<param name=\"credits\" value=\"Applet by Fabio Ciucci (www.anfiteatro.it/java.html)\">\n";
myapplet=myapplet+"<param name=\"regcode\" value=\"dream-world.nl\">\n";
myapplet=myapplet+"<param name=\"regnewframe\" value=\"NO\">\n";
myapplet=myapplet+"<param name=\"regframename\" value=\"_blank\">\n";
myapplet=myapplet+"<param name=\"statusmsg\" value=\"x\">\n";
myapplet=myapplet+"<param name=\"res\" value=\"1\">\n";
myapplet=myapplet+"<param name=\"image\" value=\"/"+image_data[i_image][1]+"\">\n";
myapplet=myapplet+"<param name=\"hueshift\" value=\"100\">\n";
myapplet=myapplet+"<param name=\"textscroll\" value=\"NO\">\n";
myapplet=myapplet+"<param name=\"memdelay\" value=\"1000\">\n";
myapplet=myapplet+"<param name=\"priority\" value=\"3\">\n";
myapplet=myapplet+"<param name=\"MinSYNC\" value=\"10\">\n";
myapplet=myapplet+"</applet></center>";
if ( debug>0 ) {  debugLog("Spec: "+image_spec); debugCodeLog( myapplet )  }
write_it(myapplet,image_spec);
duration=duration*1.5;
break;
case 7 : 
mywidth=image_data[i_image][3];
myheight=image_data[i_image][4];
myapplet="<center><applet codebase=\"applets/snow\" code=\"snow.class\" height="+myheight+" width="+mywidth+">\n";
myapplet=myapplet+"<param name=\"image\" value=\"/"+image_data[i_image][1]+"\">\n";
myapplet=myapplet+"<param name=\"strength\" value=\""+image_data[i_image][2]+"\">\n";
myapplet=myapplet+"<param name=\"href\" value=\"#\">\n";
myapplet=myapplet+"</applet></center>";
if ( debug>0 ) {  debugLog("Spec: "+image_spec); debugCodeLog( myapplet )  }
write_it(myapplet,image_spec);
break;
case 8 : 
mywidth=image_data[i_image][2];
myheight=image_data[i_image][3];
myapplet="<center><applet codebase=\"applets/AnSnow\" archive=\"ansnow.jar\" code=\"ansnow.class\" height="+myheight+" width="+mywidth+">\n";
myapplet=myapplet+"<param name=\"credits\" value=\"Applet by Fabio Ciucci (www.anfyteam.com)\">\n";
myapplet=myapplet+"<param name=\"regcode\" value=\"dream-world.nl\">\n";
myapplet=myapplet+"<param name=\"reglink\" value=\"NO\">\n";
myapplet=myapplet+"<param name=\"regnewframe\" value=\"NO\">\n";
myapplet=myapplet+"<param name=\"regframename\" value=\"_blank\">\n";
myapplet=myapplet+"<param name=\"statusmsg\" value=\"x\">\n";
myapplet=myapplet+"<param name=\"flakes1\" value=\""+image_data[i_image][4]+"\">\n";
myapplet=myapplet+"<param name=\"flakes2\" value=\""+image_data[i_image][5]+"\">\n";
myapplet=myapplet+"<param name=\"flakes3\" value=\""+image_data[i_image][6]+"\">\n";
myapplet=myapplet+"<param name=\"flakes4\" value=\""+image_data[i_image][7]+"\">\n";
myapplet=myapplet+"<param name=\"windmax\" value=\""+image_data[i_image][8]+"\">\n";
myapplet=myapplet+"<param name=\"windvariation\" value=\""+image_data[i_image][9]+"\">\n";
myapplet=myapplet+"<param name=\"speed\" value=\""+image_data[i_image][10]+"\">\n";
myapplet=myapplet+"<param name=\"backimage\" value=\""+image_data[i_image][1]+"\">\n";
myapplet=myapplet+"<param name=\"bgcolor\" value=\"000133\">\n";
myapplet=myapplet+"<param name=\"overtext\" value=\"NO\">\n";
myapplet=myapplet+"<param name=\"overimg\" value=\"NO\">\n";
myapplet=myapplet+"<param name=\"overimgX\" value=\"0\">\n";
myapplet=myapplet+"<param name=\"overimgY\" value=\"0\">\n";
myapplet=myapplet+"<param name=\"memdelay\" value=\"1000\">\n";
myapplet=myapplet+"<param name=\"priority\" value=\"3\">\n";
myapplet=myapplet+"<param name=\"MinSYNC\" value=\"10\">\n";
myapplet=myapplet+"</applet></center>";
if ( debug>0 ) {  debugLog("Spec: "+image_spec); debugCodeLog( myapplet )  }
write_it(myapplet,image_spec);
break;
}
if ( debug>0 ) debugLog( "leaving loadimage" );
return(duration);
}
var imageIndex=1; 
var imageShowCount=1; 
var nextDuration; 
var preLoadStatus=0 ; 
function countdowntime()
{
document.myform.countdown.value=document.myform.countdown.value - 1;
if ( document.myform.countdown.value > 0 )
countdown_timer=setTimeout("countdowntime()",1000);
else
clearTimeout( countdown_timer );
}
function switchimage()
{		
if ( debug>0 ) { debugLog("Entering switchimage. PreLoadStatus="+preLoadStatus+" ImageShowCount="+imageShowCount); }
if ( preLoadStatus == 1 )
{
alert("preLoad not ready yet");
return;
}
preLoadStatus=1;
display_odd=document.getElementsByName( "image_display_odd" );
display_even=document.getElementsByName( "image_display_even" );
if (debug>0) { debugLog(" display_odd="+display_odd+" display_even="+display_even); }
clearTimeout(animation_timer)
clearTimeout(countdown_timer)
if ( imageShowCount % 2 == 1 )
{
write_it( "<BR>", "image_display_even" );
display_even[0].style.visibility="hidden";
display_odd[0].style.visibility="visible";
}
else
{
write_it( "<BR>", "image_display_odd" );
display_odd[0].style.visibility="hidden";
display_even[0].style.visibility="visible";
}
document.myform.counter.value=form_counter; 
document.myform.miscinfo.value=form_miscinfo;
document.myform.countdown.value=Math.round( nextDuration/1000 );
if ( nextDuration > 0 )
{ 
animation_timer=setTimeout("switchimage()",nextDuration)	
countdown_timer=setTimeout("countdowntime()",1050);
preloadNextImage();
}
else
{
document.location="the_end.html"
}
preLoadStatus=0;
}
function starteffects()
{
showimage();
music_handling();
}
function showimage()
{
if ( debug>0 ) debugLog( "entering showimage" );
if (imageIndex>= image_data.length)
{  
imageIndex=-1
}	
currentDuration=loadimage(imageIndex,imageShowCount);
document.myform.counter.value=form_counter; 
document.myform.miscinfo.value=form_miscinfo;
document.myform.countdown.value=Math.round( currentDuration/1000 );
animation_timer=setTimeout("switchimage()",currentDuration);
countdown_timer=setTimeout("countdowntime()",1000);
preLoadTimer=preLoadTimerDefault;
if ( currentDuration < preLoadTimer )
preLoadTimer=currentDuration/2;
preload_timer=setTimeout("preloadNextImage()",preLoadTimer);
if ( debug>0 ) debugLog( "leaving showimage" );
}
function preloadNextImage()
{
if ( debug>0 ) debugLog( "Entering preload" );
if ( debug>0 ) 
{
debugLog( "#applets detected: " +document.applets.length);
for ( aplc=0; aplc< document.applets.length; aplc++)
debugLog( aplc+" "+ document.applets[aplc].isActive() +" "+ document.applets[aplc].getCodeBase()  );
}
imageIndex++;
imageShowCount++;
if (imageIndex>= image_data.length)
{  
imageIndex=-1
}	
nextDuration=loadimage(imageIndex,imageShowCount);
if ( debug>0 ) debugLog( "Leaving preload" );
}
function OneStat_Tag()
{
var CONTENTSECTION= "";
var CUSTOMDATA= "";
var osp_URL= document.URL;
var osp_Title= document.title;
function A(B, C)
{
W+="&"+B+"="+escape(C);
}
var t = new Date();
A( "tz", t.getTimezoneOffset());
A( "ch", t.getHours());
A( "ti", typeof(osp_Title)== "string" ? osp_Title : document.title);
A( "url", typeof(osp_URL)== "string" ? osp_URL : document.URL);
A( "rf", parent==self ? window.document.referrer : top.document.referrer);
A( "js", "Yes");
A( "ul", navigator.appName=="Netscape" ? navigator.language : navigator.userLanguage);
if(typeof(screen)=="object")
{
A( "sr", screen.width+"x"+screen.height);
A( "cd", screen.colorDepth);
A( "jo", navigator.javaEnabled()?"Yes":"No");
}
A( "section", typeof(CONTENTSECTION)== "string" ? CONTENTSECTION : "");
A( "custom", typeof(CUSTOMDATA)== "string" ? CUSTOMDATA : "");
if( W.length>2048 && navigator.userAgent.indexOf('MSIE')>=0)
W= W.substring( 0, 2043)+"&tu=1";
}
function display_counter(locid)
{
dontcountmyself=getCookie("dontCountMySelf");
if (locid == 0)
document.write("<div id=\"mycounter\">");
if (locid == 1)
document.write("<div id=\"mycounter1\">");
if (locid == 2)
document.write("<div id=\"mycounter2\">");
else
document.write("</div>");
}
function rest_of_page()
{
document.write("<DIV ID=\"picstatus\">");
document.write("<FORM name=\"myform\">");
document.write("<input type=text name=\"counter\" class=\"myform\" size=8 value=\"loading\"><BR>");
document.write("<input type=text name=\"miscinfo\" class=\"myform\" size=8 value=\"\"><BR>");
document.write("<input type=text name=\"countdown\" class=\"myform\" size=8 value=\"\">");
if ( myAdminMode == 1 )
{
document.write("<BR><A HREF=\"javascript:switchimage();\">NEXT</A><BR>");
document.write("<BR><A HREF=\"javascript:showimagesizes();\">INFO</A><BR>");
}
document.write("</FORM></DIV><div id=\"image_display_odd\" name=\"image_display_odd\" style=\"position:absolute;top:60px;width:710px;left:70px;z-index:3;visibility:visible\"></div><div id=\"image_display_even\" name=\"image_display_even\" style=\"position:absolute;top:60px;width:710px;left:70px;z-index:3;visibility:hidden\"></div>");
display_counter(0);
}
function blockCoords(toX,toY,fromX,fromY,relX,steps,stepsize,stepcount,anihandle,anitype)
{  
var Xdelta=fromX-toX;
this.toX=toX;
this.toY=toY;
this.fromX=fromX;
this.fromY=fromY;
this.steps=steps;
this.stepSize=stepsize;
this.stepCount=stepcount;
this.animationStatus=anihandle;
this.animationType=anitype; 
if ( Math.abs(Xdelta)<3 )
{  
this.relX=0;
this.relY=relX;
}
else
{  
this.relX=relX; 
this.relY=0;
} 
}   
function animate()
{
AnimationRunning=1;
continueAnimation=0;
for( blockCount=0;blockCount<theObj.length;blockCount++)
{
anistatus=blockCoordsArray[blockCount].animationStatus;
if ( anistatus != 9 )
{
stepcount=blockCoordsArray[blockCount].stepCount;
steps=blockCoordsArray[blockCount].steps;
if ( stepcount >= 0 )
{ 
if ( stepcount == 0 )
theObj[blockCount].style.visibility="visible"; 
stepsize=blockCoordsArray[blockCount].stepSize;
toX=blockCoordsArray[blockCount].toX;
toY=blockCoordsArray[blockCount].toY;
fromX=blockCoordsArray[blockCount].fromX;
fromY=blockCoordsArray[blockCount].fromY;
relX=blockCoordsArray[blockCount].relX;
relY=blockCoordsArray[blockCount].relY;
aniType=blockCoordsArray[blockCount].animationType;
if ( aniType == 0 )
{ 
if ( relY==0 ) 
{
rc=(fromY-toY)/(fromX-toX);
yOffset=-1*(rc*toX-toY);
deltaX=toX-fromX;
newX=Math.round( (stepcount* deltaX)/steps +fromX);
newY=Math.round( rc * newX + yOffset);
blockCoordsArray[blockCount].relX=relX+stepsize;
}
if ( relX==0 ) 
{
newX=fromX;
deltaY=toY-fromY;
newY=Math.round( (stepcount * deltaY)/steps +fromY);
blockCoordsArray[blockCount].relY=relY+stepsize;
}
}
if ( aniType == 1 )
{ 
if ( relY==0 ) 
{
rc=(fromY-toY)/(fromX-toX);
yOffset=-1*(rc*toX-toY);
deltaX=toX-fromX;
newX=Math.round( Math.log(relX)/Math.log(10) * deltaX +fromX);
newY=Math.round( rc * newX + yOffset);
blockCoordsArray[blockCount].relX=relX+stepsize;
}
if ( relX==0 ) 
{
newX=fromX;
deltaY=toY-fromY;
newY=Math.round( Math.log(relY)/Math.log(10) * deltaY +fromY);
blockCoordsArray[blockCount].relY=relY+stepsize;
}
}
if ( aniType == 2 )
{ 
xdir=-2+rand(4);
ydir=-2+rand(4);
if (stepcount==0)
{
newX=fromX+xdir;
newY=fromY+ydir; 
}
else
{
newX=relX+xdir;
newY=relY+ydir;
}
blockCoordsArray[blockCount].relY=newY;
blockCoordsArray[blockCount].relX=newX;
blockCoordsArray[blockCount].toY=newY;
blockCoordsArray[blockCount].toX=newX;
}
theObj[blockCount].style.left=newX;
theObj[blockCount].style.top=newY;
} 
blockCoordsArray[blockCount].stepCount=++stepcount;
if ( stepcount <= steps )
continueAnimation=1; 
else
{
blockCoordsArray[blockCount].animationStatus=9; 
if ( anistatus == 1 )  
{
animate_ready( blockCount);
}
}
} 
} 
if ( continueAnimation == 1 )
setTimeout("animate()",50);
else
{
AnimationRunning=0;
}
}
