// JavaScript Document
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function photoSuivant (img,numproj,val,compteur)
{		
//alert(val);
	var tab_nom=val.split(',');
	var long=tab_nom.length-1;
		eval('b='+compteur);
		
		if(b==long)
		{
			eval(compteur+'=0;');
			eval('b='+compteur);
			document.images[img].src='image/'+numproj+'/image_min/'+tab_nom[b];
		}
		else
		{
		
			eval(compteur+'++;');
			eval('b='+compteur);
			document.images[img].src='image/'+numproj+'/image_min/'+tab_nom[b];
		}
}

//////////////////////////////////////////////
function photoPrecedent(img,numproj,val,compteur)
{
	var tab_nom=val.split(',');
	var long=tab_nom.length-1;
	eval('b='+compteur);
	
	
    	if(b<=0)
		{
			eval(compteur+'='+long+';');
			eval('b='+compteur);
			document.images[img].src='image/'+numproj+'/image_min/'+tab_nom[b];
		}
		else
		{
			eval(compteur+'--;');
			eval('b='+compteur);
			document.images[img].src='image/'+numproj+'/image_min/'+tab_nom[b];
		}
}
//////////////////////////////////////
function rollover (id)
{
	document.getElementById(id).style.background="url(image/survol-boutton.jpg)";
	document.getElementById(id).style.backgroundRepeat= "no-repeat";
}
//////////////////////////////////////
function rollout (id)
{
	//document.getElementById(id).style.background = "url(logo.gif) repeat-y";
	document.getElementById(id).style.background="url(image/bouton-simple.jpg)";
	document.getElementById(id).style.backgroundRepeat="no-repeat";
}
function changeSt(element, idbtn ,btn1, btn2)
{
		
		source=document.getElementById(idbtn).src.substring((document.getElementById(idbtn).src.lastIndexOf("/")+1),(document.getElementById(idbtn).src.length-4));
		if(source==btn1)
		{
		document.getElementById(element).style.cssText="display:none";
		document.getElementById(idbtn).src="image/"+btn2+".jpg";
		}
		else 
		{
		document.getElementById(element).style.cssText="display:block";
		document.getElementById(idbtn).src="image/"+btn1+".jpg";
		}
}
	///////////////////////////////
function PopupImage(img,dossier,compteur,val) 
{
	//alert(val);
	if(compteur!='')
	{
var tab_nom=val.split(',');
//eval('alert(tab_nom['+compteur+']);');
 w=open("",'image','weigth=toolbar=no,scrollbars=no,resizable=no, width=640, height=480');
eval(" w.document.write('<html><head></head><body style=\"margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px;\"><img src=\"image/'+dossier+'/image_min/'+tab_nom["+compteur+"]+'\" width=\"640\" height=\"480\"></body></html>');");
 w.document.close();
 }
 else
 {
w=open("",'image','weigth=toolbar=no,scrollbars=no,resizable=no, width=640, height=480');
w.document.write('<html><head></head><body style=\"margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px;\"><img src="image/'+dossier+'/image_min/'+img+'" width="640" height="480"></body></html>');
 w.document.close();
 
 }

} 
////////////////////////////////////////////////
function cz0(fich,h,w) { 
document.write("<object  classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" width=\""+w+"\" height=\""+h+"\" title=\"www.avercis.com\">")
document.write("<param name=\"movie\" value=\""+fich+"\">")
document.write("<param name=\"quality\" value=\"high\">")
document.write(" <param name=\"wmode\" value=\"opaque\">")
document.write("<embed src=\""+fich+"\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\""+w+"\" height=\""+h+"\" wmode=\"opaque\"></embed>")
document.write("</object>")
}
//////////////////////////////////////////////
function zoom_image (grand, dossier, image)
{
	document.images[grand].src="image/"+dossier+"/image_min/"+image+"";
}
////////////////////////////////////////////
function MM_goToURL() 
{ 
//v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}







