<!--
function lib_bwcheck(){ //Browsercheck (needed)
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.opera5=this.agent.indexOf("Opera 5")>-1
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
	this.ie7=(this.ver.indexOf("MSIE 7")>-1 && this.dom && !this.opera5)?1:0;
	this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6||this.ie7
	this.mac=this.agent.indexOf("Mac")>-1
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie7 ||this.ns6 || this.opera5)
	return this
}
var bw=new lib_bwcheck()


ejs_server_date = new Date(0,0,0,23, 41, 25)
ejs_server_heu = ejs_server_date.getHours();
ejs_server_min = ejs_server_date.getMinutes();
ejs_server_sec = ejs_server_date.getSeconds();

function ejs_server_calc()
{
if (ejs_server_sec < 10)
	ejs_server_sec = "0"+Math.round(ejs_server_sec);
else if(ejs_server_sec >= 60)
	{
	ejs_server_sec = "00";
	ejs_server_min++;
	}
if (ejs_server_min < 10)
	ejs_server_min = "0"+Math.round(ejs_server_min);
else if(ejs_server_min >= 60)
	{
	ejs_server_min = "00";
	ejs_server_heu++;
	}
if (ejs_server_heu < 10)
	ejs_server_heu = "0"+Math.round(ejs_server_heu);
else if(ejs_server_heu >= 24)
	{
	ejs_server_heu = "00";
	}
ejs_server_texte = ejs_server_heu + ":" + ejs_server_min + ":" + ejs_server_sec;
if (document.getElementById)
{
	document.getElementById("heure").innerHTML="/ "+ejs_server_texte;
}
ejs_server_sec++;
}
setInterval("ejs_server_calc()", 1000);

function zoomLoading(divName,imgName,w,h){	
		
	zoom = 'http://www.cestino.fr/images/z_'+imgName.substring(31,imgName.length);
	
	if (window.innerWidth) {
		var larg = window.innerWidth;
	}else if (document.body && document.body.offsetWidth){
		var larg = document.body.offsetWidth
	}
	if (window.innerHeight){
		var haut = window.innerHeight;
	}else if (document.body && document.body.offsetHeight) {
		var haut = document.body.offsetHeight;
	}
	//document.body.style.overflow = 'hidden';
	document.getElementById("divMasque").style.width = parseInt(larg)+'px';	
	document.getElementById("divMasque").style.height = parseInt(haut+150)+'px';
	document.getElementById("divZoom").style.width = parseInt(larg+82)+'px';
	document.getElementById("divZoom").style.height = parseInt(parseInt(haut))+'px';
	
	var zoomLeft = 1+'px';
	var zoomRight = parseInt(parseInt(larg)-1)+'px';
	var zoomTop = parseInt((parseInt(haut)/2)-20)+'px';
	var zoomHeight = document.getElementById("divZoom").style.height;
	
	document.getElementById("divMasque").style.display = '';	
	
	/*
	<div style="height:560px;width:471px;text-align:center">
	<DIV style="position:relative;width:70px;height:20px;left:185px"><A style="FONT-WEIGHT: bold; FONT-SIZE: 11px; COLOR: #000; FONT-FAMILY: Verdana; TEXT-DECORATION: none" onclick="document.getElementById('divMasque').style.display='none';document.getElementById('divZoom').style.display='none'" href="javascript:;">Fermer X</A></DIV>
	<div style="position:relative;height:83px;width:26px;top:240px;float:left"><img src="medias/previous.png" width="26" height="83" /></div>
	<img src="http://www.cestino.fr/images/z_tudorsubblack.jpg" width="415" height="533" style="float:left;border: #999999 2px solid" />
	<div style="position:relative;height:83px;width:26px;top:240px;float:left"><img src="medias/next.png" width="26" height="83" /></div>
	</div>
	*/
	divClose='<DIV style="position:relative;width:70px"><A style="FONT-WEIGHT: bold; FONT-SIZE: 11px; COLOR: #000; FONT-FAMILY: Verdana; TEXT-DECORATION: none" onclick="document.getElementById(\'divMasque\').style.display=\'none\';document.getElementById(\'divZoom\').style.display=\'none\'" href="javascript:;">Fermer X</A></DIV>';
	divPrevious='<div style="position:relative;height:83px;width:26px;top:240px;color:#000000;float:left;font-weight:bold;font-size:22px"><a href="javascript:;" style="text-decoration:none;color:#808080" onclick="navigate(\'-\')">';
	//if(!bw.bw) divPrevious+='<b><<</b>';
	divPrevious+='<img src="medias/previous.png" width="26" height="83" border="0" /></a></div>';
	divImage='<img src="'+zoom+'" name="zoomCurrent" width="415" height="533" style="position:relative;float:left;border: #999999 2px solid" />';
	
	divNext='<div style="position:relative;height:83px;width:26px;top:240px;color:#000000;float:left;font-weight:bold;font-size:22px"><a href="javascript:;" style="text-decoration:none;color:#808080" onclick="navigate(\'+\')">';
	//if(!bw.bw) divNext+='<b>>></b>';
	divNext+='<img src="medias/next.png" width="26" height="83" border="0" /></a></div>';
	
	document.getElementById("divZoom").innerHTML = "<div style='height:573px;width:471px;background-color:#dddddd;position:relative'>"+divClose+divPrevious+divImage+divNext+"</div>";
	document.getElementById("divZoom").style.display = '';	
}
function stopLoading(timeOut){
	setTimeout("document.body.style.overflow = 'auto'", timeOut);
	setTimeout("document.getElementById('divZoom').style.display = 'none';", timeOut); 
	setTimeout("document.getElementById('divMasque').style.display = 'none';", timeOut); 
}
function openWindowTool(maDiv){	
	if (window.innerWidth) {
		var larg = window.innerWidth;
	}else if (document.body && document.body.offsetWidth){
		var larg = document.body.offsetWidth
	}
	if (window.innerHeight){
		var haut = window.innerHeight;
	}else if (document.body && document.body.offsetHeight) {
		var haut = document.body.offsetHeight;
	}
	document.body.style.overflow = 'hidden';
	document.getElementById("divMasque").style.width = parseInt(larg)+'px';	
	document.getElementById("divMasque").style.height = parseInt(haut)+'px';
	document.getElementById(maDiv).style.width = parseInt(larg)+'px';	
	document.getElementById(maDiv).style.height = parseInt(parseInt(haut)-15)+'px';		
	document.getElementById("divMasque").style.display = '';	
	document.getElementById(maDiv).style.display = '';	
}
function closeWindowTool(maDiv){
	document.body.style.overflow = 'auto';
	document.getElementById(maDiv).style.display = 'none';
	document.getElementById('divMasque').style.display = 'none';
}

function navigate(sens)
{
	
	currImage = document.images['zoomCurrent'].src;

	

	if(document.getElementById('novig3'))
		objvig3=0;
	else 
		objvig3=1;
	if(document.getElementById('novig2'))
		objvig2=0;
	else 
		objvig2=1;
	
	if(document.getElementById('novig1'))
		objvig1=0;
	else
		objvig1=1;

	//alert(objvig1+'-'+objvig2);
	
	if(sens=='-')
	{
		switch(currImage)
		{
			case 'http://www.cestino.fr/images/z_'+document.images['principale'].src.substring(31,document.images['principale'].src.length):
			if(objvig3)
				document.images['zoomCurrent'].src = 'http://www.cestino.fr/images/z_'+document.images['vig3'].src.substring(32,document.images['vig3'].src.length);
			else if(!objvig3&&objvig2)
				document.images['zoomCurrent'].src = 'http://www.cestino.fr/images/z_'+document.images['vig2'].src.substring(32,document.images['vig2'].src.length);
			else if(!objvig3&&!objvig2&&objvig1)
				document.images['zoomCurrent'].src = 'http://www.cestino.fr/images/z_'+document.images['vig1'].src.substring(32,document.images['vig1'].src.length);
			break;
			
			case objvig3==1&&'http://www.cestino.fr/images/z_'+document.images['vig3'].src.substring(32,document.images['vig3'].src.length):
			if(objvig2)
				document.images['zoomCurrent'].src = 'http://www.cestino.fr/images/z_'+document.images['vig2'].src.substring(32,document.images['vig2'].src.length);
			else if(!objvig2&&objvig1)
				document.images['zoomCurrent'].src = 'http://www.cestino.fr/images/z_'+document.images['vig1'].src.substring(32,document.images['vig1'].src.length);
			break;
			
			case objvig2==1&&'http://www.cestino.fr/images/z_'+document.images['vig2'].src.substring(32,document.images['vig2'].src.length):
			if(objvig1)
				document.images['zoomCurrent'].src = 'http://www.cestino.fr/images/z_'+document.images['vig1'].src.substring(32,document.images['vig1'].src.length);
			else 
				document.images['zoomCurrent'].src = 'http://www.cestino.fr/images/z_'+document.images['principale'].src.substring(31,document.images['principale'].src.length);
			break;
			
			case objvig1==1&&'http://www.cestino.fr/images/z_'+document.images['vig1'].src.substring(32,document.images['vig1'].src.length):
				document.images['zoomCurrent'].src = 'http://www.cestino.fr/images/z_'+document.images['principale'].src.substring(31,document.images['principale'].src.length);			
			break;
		}
	}
	
	if(sens=='+')
	{
		switch(currImage)
		{
			case 'http://www.cestino.fr/images/z_'+document.images['principale'].src.substring(31,document.images['principale'].src.length):
			if(objvig1)
				document.images['zoomCurrent'].src = 'http://www.cestino.fr/images/z_'+document.images['vig1'].src.substring(32,document.images['vig1'].src.length);
			else if(!objvig1&&objvig2)
				document.images['zoomCurrent'].src = 'http://www.cestino.fr/images/z_'+document.images['vig2'].src.substring(32,document.images['vig2'].src.length);
			else if(!objvig1&&!objvig2&&objvig3)
				document.images['zoomCurrent'].src = 'http://www.cestino.fr/images/z_'+document.images['vig3'].src.substring(32,document.images['vig3'].src.length);
			break;
			
			case objvig1==1&&'http://www.cestino.fr/images/z_'+document.images['vig1'].src.substring(32,document.images['vig1'].src.length):
			if(objvig2)
				document.images['zoomCurrent'].src = 'http://www.cestino.fr/images/z_'+document.images['vig2'].src.substring(32,document.images['vig2'].src.length);
			else if(!objvig2&&objvig3)
				document.images['zoomCurrent'].src = 'http://www.cestino.fr/images/z_'+document.images['vig3'].src.substring(32,document.images['vig3'].src.length);
			else
				document.images['zoomCurrent'].src = 'http://www.cestino.fr/images/z_'+document.images['principale'].src.substring(31,document.images['principale'].src.length);
			break;
			
			case objvig2==1&&'http://www.cestino.fr/images/z_'+document.images['vig2'].src.substring(32,document.images['vig2'].src.length):
			if(objvig3)
				document.images['zoomCurrent'].src = 'http://www.cestino.fr/images/z_'+document.images['vig3'].src.substring(32,document.images['vig3'].src.length);
			else 
				document.images['zoomCurrent'].src = 'http://www.cestino.fr/images/z_'+document.images['principale'].src.substring(31,document.images['principale'].src.length);
			break;
			
			case objvig3==1&&'http://www.cestino.fr/images/z_'+document.images['vig3'].src.substring(32,document.images['vig3'].src.length):
			document.images['zoomCurrent'].src = 'http://www.cestino.fr/images/z_'+document.images['principale'].src.substring(31,document.images['principale'].src.length);
			break;	
			
		}
	}
	
}

function showDiv(message)
{
	
	if(document.getElementById('erreur').style.display=='none')
	{
		document.getElementById('erreur').style.display='block';
		document.getElementById('erreur').innerHTML = message;
	}

}


function showDivRetour()
{
	
	if(document.getElementById('Retour').style.display=='none')
	{
		document.getElementById('Retour').style.display='block';
	}
}

function hideDivRetour()
{
	
	if(document.getElementById('Retour').style.display=='block')
	{
		document.getElementById('Retour').style.display='none';
	}
}

function verification()
{
	var ok=true;
	mess='';
	
	if(document.form.nom.value=='')
	{
		ok=false;
		
	}
	if(document.form.prenom.value=='')
	{
		ok=false;
		
	}
	if(document.form.tel.value=='')
	{
		ok=false;
		
	}
	
	if(document.form.email.value=='')
	{
		ok=false;
	}
	
	if(ok) {
		document.form.error.value='';
	}
	else
	{
		document.form.error.value='Veuillez remplir tous les champs obligatoires.';	
	}
}

function roll(img_name1, img_src1)
{
   document.images[img_name1].src = img_src1;
}


//-->

