/* ------------------------- GOTO ---------------------------------- */
function Go(gototo) { // ex : <td  onClick="Go('actualite');"> --> index2.php?goto=actualite
	var url = window.location.search;
	var pos = url.indexOf("=")+1;
	window.location.search = url.substring(0,pos)+gototo;
}

/* ------------------------- POP ---------------------------------- */
var PositionX = 100; var PositionY = 100; // Set the horizontal and vertical position for the popu
var defaultWidth  = 500; var defaultHeight = 500; // Set these value approximately 20 pixels greater than the size of the largest image to be used (needed for Netscape)
var AutoClose = true; // Set autoclose true to have the window close automatically - Set autoclose false to allow multiple popup windows
if (parseInt(navigator.appVersion.charAt(0))>=4){
	var isNN=(navigator.appName=="Netscape")?1:0;
	var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;
}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;

function PopImg(imageURL,imageTitle) {
	if (isNN){ var imgWin=window.open('about:blank','',optNN);}
	if (isIE){ var imgWin=window.open('about:blank','',optIE);}
	with (imgWin.document){
		writeln('<html><head><title>Loading...</title><style type="text/css">body{margin:0px;overflow:hidden;}</style>');writeln('<sc'+'ript type="text/javascript">');
		writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
		writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
		writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
		writeln('width=100-(document.body.clientWidth-document.images[0].width);');
		writeln('height=100-(document.body.clientHeight-document.images[0].height);');
		writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       
		writeln('window.innerWidth=document.images["George"].width;');writeln('window.innerHeight=document.images["George"].height;}}');
		writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
		if (!AutoClose) writeln('</head><body bgcolor="#000000" scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
		else writeln('</head><body bgcolor="#000000" scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close();" onClick="self.close();">');
		writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');
		close();		
	}
}
function popup(url, name, w, h) {
	var l = (screen.availWidth-10 - w) / 2;
	var t = (screen.availHeight-20 - h) / 2;
	features = "width="+w+",height="+h+",left="+l+",top="+t+",screenX="+l+",screenY="+t+",scrollbars=1,resizable=1,location=0,menubar=0,toolbar=0,status=1";
	window.open(url, name, features);
	if (parseInt(navigator.appVersion) >= 4) { name.window.focus(); }
}

/* ------------------------- Rollover ---------------------------------- */

function RollOver(img,lien){
document.images[img].src=lien;
}
function RollOver2(img,lien){
var num = img.substring(1,2);
var dhtml = document.getElementById("dhtml"+ num).style.display;
	if(dhtml!='block')
	document.images[img].src=lien;
}
function montre(id,rep){
	var smenuTaille = 7;
	var d = document.getElementById("dhtml" +id);
	if(d)
	{
		var currentDisplay = d.style.display;
		for (i=1; i<=smenuTaille; i++) 
		{
			if(document.getElementById("dhtml" + i)){ 
				document.getElementById("dhtml" + i).style.display = "none";
				document.getElementById("m" + i).src = "images/picts_"+rep+"/menu/m"+i+".gif";
			}
		}

		if( currentDisplay == "block" ){
			d.style.display = "none";	
		}else{
			d.style.display = "block";
			document.getElementById("m" + id).src = "images/picts_"+rep+"/menu/m"+id+"on.gif";
		}
	}
}
function Roll_Produit_on(id){
document.getElementById("visu" +id).className = 'visu_liste_prod_on';
document.getElementById("titre" +id).className = 'nom_produit_on';
}
function Roll_Produit_off(id){
document.getElementById("visu" +id).className = 'visu_liste_prod';
document.getElementById("titre" +id).className = 'nom_produit';
}
function Roll_Produit_on2(id){
document.getElementById("visu" +id).className = 'visu_liste_prod_on2';
document.getElementById("titre" +id).className = 'nom_produit_on2';
}
function Roll_Produit_off2(id){
document.getElementById("visu" +id).className = 'visu_liste_prod2';
document.getElementById("titre" +id).className = 'nom_produit2';
}