//==================================
//FICHIER de FONCTIONS JAVASCRIPT
//==================================

function PopupImage(img)
 { 
	titre="O'Tonic - Manifestations"; 
	w=open("",'image','width=250,height=200,toolbar=no,scrollbars=yes,resizable=no'); 
	w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE></HEAD>"); 
	w.document.write("<SCRIPT language=javascript>function checksize() { if (document.images[0].complete) { window.resizeTo(document.images[0].width+10,document.images[0].height+70); window.focus();} else { setTimeout('checksize()',250) } }</"+"SCRIPT>"); 
	w.document.write("<BODY onload='checksize()' onblur='window.close()' onclick='window.close()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0>");
	w.document.write("<TABLE width='40%' border='0' cellspacing='0' cellpadding='0' height='40%'><TR>");
	w.document.write("<TD valign='middle' align='center'><IMG src='"+img+"' border=0 alt='O'Tonic'>"); 
	w.document.write("</TD></TR></TABLE>");
	w.document.write("</BODY></HTML>"); 
	w.document.close(); 
}

// Fonction Javascript poour ouvrir une fenêtre Popup


function popupmodulo(url, name, x, y, top, left)
{
	window.open(url,name,'location=no,toolbar=no,directories=no,menubar=no,resizable=yes,scrollbars=yes,status=no,width='+x+',height='+y+',screenY='+top+',screenX='+left);
}

function PopupImageBis(img)
 { 
	titre="O'Tonic - Manifestations"; 
	w=open("",'image','width=750,height=523,screenY=150,screenX=400,toolbar=no,scrollbars=no,resizable=yes'); 
	w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE></HEAD>"); 
	w.document.write("<SCRIPT language=javascript>function checksize() { if (document.images[0].complete) { window.resizeTo(document.images[0].width+10,document.images[0].height+70); window.focus();} else { setTimeout('checksize()',250) } }</"+"SCRIPT>"); 
	w.document.write("<BODY onload='checksize()' onblur='window.close()' onclick='window.close()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0>");
	w.document.write("<TABLE width='40%' border='0' cellspacing='0' cellpadding='0' height='60%'><TR>");
	w.document.write("<TD valign='middle' align='center'><IMG src='"+img+"' border=0 alt='O'Tonic'>"); 
	w.document.write("</TD></TR></TABLE>");
	
	w.document.write("</BODY></HTML>"); 
	w.document.close(); 
}

var numImg=0;
var t; 
function AfficheDiapo()
{
	var obj;
	var objsrc;

	
	numImg++;
	if(numImg==30)
	{
		numImg=1;
	}
	objsrc="Images/nuit" + numImg + ".jpg";
		
	obj=document.getElementById("img_agrandie2");
		
	obj.src=objsrc;
	obj.width=640;		//522;
	obj.height=426;		//391;
		//obj.hspace=5;
		//obj.style.filter="revealTrans(Transition=2)";		//"blendTrans(duration=3)"		//revealTrans(Transition=2, Duration=0.35)";		//"alpha (opacity=50)"		//"revealTrans(Duration=3.3, Transition=21)";
	
	obj.style.border="4px ridge rgb(160,190,0)";
	
	t=setTimeout("AfficheDiapo()",2000);
	
};

var numImg11=0;
var z; 
function AfficheDiapo2011()
{
	var obj11;
	var objsrc11;

	
	numImg11++;
	if(numImg11==52)
	{
		numImg11=1;
	}
	objsrc11="Images/nuit2011-" + numImg11 + ".jpg";
		
	obj=document.getElementById("img_agrandie2");
		
	obj.src=objsrc11;
	obj.width=602;		//522;
	obj.height=400;		//391;
		//obj.hspace=5;
		//obj.style.filter="revealTrans(Transition=2)";		//"blendTrans(duration=3)"		//revealTrans(Transition=2, Duration=0.35)";		//"alpha (opacity=50)"		//"revealTrans(Duration=3.3, Transition=21)";
	
	obj.style.border="4px ridge rgb(160,190,0)";
	
	z=setTimeout("AfficheDiapo2011()",2000);
	
};
var diapoOn=false;
function LancerDiapo()
{
	if (diapoOn==false)
	{
		diapoOn=true;
		AfficheDiapo();
	}
};
var diapoOn11=false;
function LancerDiapo2011()
{
	if (diapoOn11==false)
	{
		diapoOn11=true;
		AfficheDiapo2011();
	}
};
function StopDiapo()
{
	diapoOn=false;
	clearTimeout(t);
}
function StopDiapo2011()
{
	diapoOn11=false;
	clearTimeout(t);
}
