//-----------------------------------------------||
//HexaDecimalClock v1.1 [BETA VERSION]
//-----------------------------------------------||
//Copyleft BlueScreen 2002
//http://www.b-l-u-e-s-c-r-e-e-n.net
//b-l-u-e-s-c-r-e-e-n@b-l-u-e-s-c-r-e-e-n.net
//-----------------------------------------------||

//-----------------------------------------------||
//Prechargement des Images:
//-----------------------------------------------||

chaine = "images/";
verif = new Array();
verif=["","","","","",""]

function Souris(pos)
{
//Change l'etat de l'onglet de taille
changeLegende(2)
if (pos == 1) { document.oSmall.src = "images/small-.gif" } else { document.oSmall.src = "images/small.gif" }
if (pos == 2) { document.oMedium.src = "images/medium-.gif" } else { document.oMedium.src = "images/medium.gif" }
if (pos == 3) { document.oBig.src = "images/big-.gif" } else { document.oBig.src = "images/big.gif" }
if (pos == 4) { document.oFull.src = "images/full-.gif" } else { document.oFull.src = "images/full.gif" }
if (pos == 5) { document.oClose.src = "images/close-.gif"; changeLegende(3) } else { document.oClose.src = "images/close.gif" }
if (pos == 0) { document.oSmall.src = "images/small.gif";
		document.oMedium.src = "images/medium.gif"
		document.oBig.src = "images/big.gif"
		document.oFull.src = "images/full.gif"
		document.oClose.src = "images/close.gif"
		switch(tailleAct)
			{
			case 1: document.oSmall.src = "images/small-.gif"; break
			case 2: document.oMedium.src = "images/medium-.gif"; break
			case 3: document.oBig.src = "images/big-.gif"; break
			case 4: document.oFull.src = "images/full-.gif"; break
			}
		changeLegende(0)
	      }
}
function changeLegende(posL)
{
//change le texte de la legende
document.legende.src="images/load"+posL+".gif"
}
function popSmall()
{
if(tailleAct!=1)
	{
	window.open('../small/index.html','small','height=87,width=250')
	window.close()
	parent.parent.window.close()
	}
}
function popMedium()
{
if(tailleAct!=2)
	{
	window.open('../medium/index.html','medium','height=204,width=500')
	window.close()
	parent.parent.window.close()
	}
}
function popBig()
{
if(tailleAct!=3)
	{
	window.open('../big/','big','height=328,width=802')
	window.close()
	parent.parent.window.close()
	}
}
function popFull()
{
if(tailleAct!=4)
	{
	window.open('../full/index.html','full','fullscreen')
	window.close()
	parent.parent.window.close()
	}
}
function fermerFenetre()
{
window.close()
parent.parent.window.close()
}
function ouvrirSite()
{
hauteur = screen.height-100
largeur = screen.width-15
eval("window.open('../index.php','site','height="+hauteur+",width="+largeur+",left=0,top=0,location,toolbar')")
window.close()
parent.parent.window.close()
}
function preInit()
{
//fin du pre-chargement
Souris(0)
init()
}

function init()
{
//mise a jour de l heure

dat = new Date()
sec = dat.getSeconds()
minu = dat.getMinutes()
heur = dat.getHours()
temps = new Array();
eval('temps=['+heur+','+minu+','+sec+']')

if (sec<16) { sec1=0; sec2=sec; }
	else {
		  sec1 = Math.floor(sec/16)
		  sec2= sec % 16;
   		 }
if (minu<16) { min1=0; min2=minu; }
	else {
		  min1 = Math.floor(minu/16)
		  min2= minu % 16;
   		 }
if (heur<16) { heu1=0; heu2=heur; }
	else {
		  heu1 = Math.floor(heur/16)
		  heu2= heur % 16;
   		 }
actu = new Array();
eval('actu=['+heu1+','+heu2+','+min1+','+min2+','+sec1+','+sec2+']')

//eval('document.h2.src="images/'+actu[1]+'.gif"')
//eval('document.h1.src="images/'+actu[0]+'.gif"')
//eval('document.m2.src="images/'+actu[3]+'.gif"')
//eval('document.m1.src="images/'+actu[2]+'.gif"')
//eval('document.s2.src="images/'+actu[5]+'.gif"')
//eval('document.s1.src="images/'+actu[4]+'.gif"')

if (chaine+actu[0]+'.gif' != verif[0]) { document.h1.src=chaine+actu[0]+'.gif'; verif[0]=chaine+actu[0]+'.gif';}
if (chaine+actu[1]+'.gif' != verif[1]) { document.h2.src=chaine+actu[1]+'.gif'; verif[1]=chaine+actu[1]+'.gif';}
if (chaine+actu[2]+'.gif' != verif[2]) { document.m1.src=chaine+actu[2]+'.gif'; verif[2]=chaine+actu[2]+'.gif';}
if (chaine+actu[3]+'.gif' != verif[3]) { document.m2.src=chaine+actu[3]+'.gif'; verif[3]=chaine+actu[3]+'.gif';}
eval('document.s2.src="images/'+actu[5]+'.gif"')
eval('document.s1.src="images/'+actu[4]+'.gif"')








setTimeout('init()', 1000)

}

