<!--
function openPopDiapo(urlFile,fWidth,fHeight,alt){
	var posLeft = (screen.width - fWidth) / 2;
	var posTop = (screen.height - fHeight) / 2;
	fWindow = window.open(urlFile,"nUWindow","width="+fWidth+",height="+fHeight+",left="+posLeft+",top="+posTop+",scrollbars=no,toolbar=no,menubar=no,resizable=no");
	fWindow.focus();
}

function openPopFile(urlFile,fWidth,fHeight,alt){
	var posLeft = (screen.width - fWidth) / 2;
	var posTop = (screen.height - fHeight) / 2;
	fWindow = window.open(urlFile,"nUWindow","width="+fWidth+",height="+fHeight+",left="+posLeft+",top="+posTop+",scrollbars=yes,toolbar=no,menubar=yes,resizable=no");
	fWindow.focus();
}

function openPictureWindow(imageName,imageWidth,imageHeight,alt) {

	var posLeft = (screen.width - imageWidth) / 2;
	var posTop = (screen.height - imageHeight) / 2;

	nWindow = window.open("","nUWindow","width="+imageWidth+",height="+imageHeight+",left="+posLeft+",top="+posTop);
	nWindow.document.open();
	nWindow.document.write('<html><meta http-equiv="imagetoolbar" content="no"><title>'+alt+'</title><body bgcolor="#000000" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">'); 
	nWindow.document.write('<a href="javascript:self.close()"><img src="'+imageName+'" width="'+imageWidth+'" height="'+imageHeight+'" border="0" alt="'+alt+'"></a>'); 
	nWindow.document.write('</body></html>');
	nWindow.document.close();
	nWindow.focus();
}

function PreLoad(winURL) {LoadImg(winURL);setTimeout("Verifie()",10);}
function FinPreload(){document.getElementById("photo_preload").style.visibility = "hidden";document.getElementById("photo_box").style.visibility = "visible";}
function LoadImg(SrcImgPath){PreLoadImg=new Image();PreLoadImg.src=SrcImgPath;}
function Verifie() {var ok=1;if(!(PreLoadImg.complete)){ok=0;}if(ok){FinPreload();}else{setTimeout("Verifie()",10);}}

function openDiv(winURL, winWidth, winHeight, winFeatures, winLeft, winTop,titlePicture,locCat,popWidth,popHeight){ 
var d_winLeft = (document.body.clientWidth - winWidth-80) / 2; 
var d_winTop = 220;//(500 - winHeight) / 2;
titlePicture = replaceChars(titlePicture,"+"," ");
popURL = winURL;
if (locCat=="none"){winURL = "/data/photos/images/"+gloCat+"/"+replaceChars(winURL,"+","%20");}else{winURL = "/data/photos/images/"+replaceChars(locCat,"+","%20")+"/"+replaceChars(winURL,"+","%20");}

closeDIV();
document.navigate.categorie.style.visibility = "hidden"; 
document.getElementById("divPhoto").style.visibility = "hidden";
document.getElementById("photo_preload").style.top =  250 + "px";
document.getElementById("photo_preload").style.left = (document.body.clientWidth - winWidth-46) / 2 + "px";
document.getElementById("photo_preload").style.width = winWidth + "px";
document.getElementById("photo_preload").style.height = winHeight + "px";
document.getElementById("photo_preload").style.position = "absolute";
document.getElementById("photo_preload").style.visibility = "visible";
document.getElementById("photo_preload").innerHTML = "<table width=\"300\" border=\"0\" align=\"center\" bgcolor=\"#aaaaaa\" cellspacing=\"0\" style=\"border: solid 1px #aaaaaa\"><td align=\"left\" bgcolor=\"#aaaaaa\"><small><font color=\"#ffffff\">&nbsp;Chargement de l'image en cours...</font></small></td><td align=\"right\"><a href=\"javascript:closeDIV()\">X</a>&nbsp;</td><tr><td colspan=\"2\" align=\"center\" bgcolor=\"#000000\"><br><div align=\"center\"><font style=\"font-family: font-size:14px;color: red;\">Un instant svp...</font><br><img src=\"images/progbar.gif\" border=\"0\"><br>Chargement en cours...<br>("+titlePicture+")<br><br></div></td></tr></table>";
document.getElementById("photo_box").style.top = d_winTop + "px";
document.getElementById("photo_box").style.left = d_winLeft + "px";
document.getElementById("photo_box").style.width = winWidth + "px";
document.getElementById("photo_box").style.height = winHeight + "px";
document.getElementById("photo_box").style.position = "absolute";
PreLoad(winURL);
document.getElementById("photo_box").innerHTML = "<table width="+winWidth+" border=\"0\" align=\"center\" bgcolor=\"#aaaaaa\" cellspacing=\"0\" style=\"border: solid 1px #aaaaaa\"><td align=\"left\" bgcolor=\"#aaaaaa\">&nbsp;<a href='javascript:openPopWin(\""+popURL+"\","+popWidth+","+popHeight+",\"\",\"cen\",\"cen\",\""+titlePicture+"\",\"none\")'><small><font color=\"#AD010A\">"+titlePicture+"</font></small></a></td><td align=\"right\"><a href=\"javascript:closeDIV()\"><font color=\"#AD010A\">x</font></a>&nbsp;</td><tr><td colspan=\"2\"><a href=\"javascript:closeDIV()\"><img src=\""+winURL+"\" width="+(winWidth)+" height="+(winHeight)+" alt=\"Cliquer pour fermer cette image\" border=\"0\"></a></td></tr></table>";
} 

function closeDIV(){
document.getElementById("photo_preload").style.visibility = "hidden";
document.getElementById("photo_box").style.visibility = "hidden";
document.getElementById("divPhoto").style.visibility = "visible";
document.navigate.categorie.style.visibility = "visible";
}

var popWin = null ;   
var winCount = 0 ;
var winName = "popWin" ;
var clicEnCours = false;

function openPopWin(winURL, winWidth, winHeight, winFeatures, winLeft, winTop,titlePicture,locCat){ 
var d_winLeft = (screen.width - winWidth) / 2; 
var d_winTop = (screen.height - winHeight) / 2;
var alt = replaceChars(titlePicture,"+"," ");
winName = "popWin" + winCount++ ; 
if (locCat=="none"){winURL = "/data/photos/images/"+gloCat+"/"+replaceChars(winURL,"+","%20");}else{winURL = "/data/photos/images/"+replaceChars(locCat,"+","%20")+"/"+replaceChars(winURL,"+","%20");}
closePopWin();           
if (openPopWin.arguments.length >= 4){winFeatures = "," + winFeatures ;}else{winFeatures = "" ; } 
if (openPopWin.arguments.length == 6){
	winFeatures += getLocation(winWidth, winHeight, winLeft, winTop);}
else{winFeatures += getLocation(winWidth, winHeight, d_winLeft, d_winTop); 
popWin = window.open("",winName ,"width=" + winWidth + ",height=" + winHeight + winFeatures);
popWin.document.open();
popWin.document.write('<html>\n');
popWin.document.write('<head>\n');
popWin.document.write('<meta http-equiv="imagetoolbar" content="no">\n');
popWin.document.write('<title>'+alt+'</title>\n');
popWin.document.write('<script Language="JavaScript">\n');
popWin.document.write('function PreLoad() {LoadImg("'+winURL+'");setTimeout("Verifie()",10);}\n');
popWin.document.write('function FinPreload(){document.getElementById("instant").style.visibility = "hidden";document.getElementById("photo_box").style.visibility = "visible";}\n');
popWin.document.write('function LoadImg(SrcImgPath){PreLoadImg=new Image();PreLoadImg.src=SrcImgPath;}\n');
popWin.document.write('function Verifie() {var ok=1;if(!(PreLoadImg.complete)){ok=0;}if(ok){FinPreload();}else{setTimeout("Verifie()",10);}}\n');
popWin.document.write('</script>\n');
popWin.document.write('</head>\n');  
popWin.document.write('<body bgcolor="#000000" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onLoad="PreLoad()">\n'); //
popWin.document.write('<div id="photo_box" style="position:absolute; width:'+winWidth+'px; height:'+winHeight+'px ; z-index:1; visibility: hidden;"><a href="javascript:self.close()"><img src='+winURL+' width='+winWidth+' height='+winHeight+' alt="Cliquer pour fermer cette fenêtre" border="0"></a></div>\n')
popWin.document.write('<div id="instant" style="position:absolute; width:'+winWidth+'px; height:'+winHeight+'px ; z-index:2; visibility: visible;" align="center" valign="center">\n');
popWin.document.write('<table width="100%" height="100%"><tr><td bgcolor="#000000">\n');
popWin.document.write('<div align="center">\n');
popWin.document.write('<font style="font-family: Tahoma, Arial, Helvetica;font-size:14px;color: red;"><b>Un instant svp...</b></font>\n');
popWin.document.write('<br><img src="/photos/images/progbar.gif">\n');
popWin.document.write('<br><font style="font-family: Tahoma, Arial, Helvetica;font-size:13px;color: #ffffff;"><b>Chargement en cours...<br>('+alt+')</b></font>\n');
popWin.document.write('</div></td></tr></table></div>\n');
popWin.document.write('</body>\n');
popWin.document.write('</html>');
popWin.document.close();
popWin.focus();} 

} 

function msgStatus(txt){top.status=txt;}

function closePopWin(){     
if (navigator.appName != "Microsoft Internet Explorer"  
  || parseInt(navigator.appVersion) >=4)  
if(popWin != null) if(!popWin.closed) popWin.close()  
} 

function getLocation(winWidth, winHeight, winLeft, winTop){ 
var winLocation = "" 
if (winLeft < 0) 
winLeft = screen.width - winWidth + winLeft 
if (winTop < 0) 
winTop = screen.height - winHeight + winTop 
if (winTop == "cen") 
winTop = (screen.height - winHeight)/2 - 20 
if (winLeft == "cen") 
winLeft = (screen.width - winWidth)/2 
if (winLeft>0 & winTop>0) 
winLocation =  ",screenX=" + winLeft + ",left=" + winLeft     
			+ ",screenY=" + winTop + ",top=" + winTop 
else 
winLocation = "" 
return winLocation 
} 

function replaceChars(entry,out,add){
temp = "" + entry;
while (temp.indexOf(out)>-1){
pos= temp.indexOf(out);
temp = "" + (temp.substring(0, pos) + add + 
temp.substring((pos + out.length), temp.length));
}
return temp;
}

function changeCombo (formulaire){formulaire.submit();}

function writeCookie(nom, valeur){
var argv=writeCookie.arguments;
var argc=writeCookie.arguments.length;
var expires=(argc > 2) ? argv[2] : null;
var path=(argc > 3) ? argv[3] : null;
var domain=(argc > 4) ? argv[4] : null;
var secure=(argc > 5) ? argv[5] : false;
document.cookie=nom+"="+escape(valeur)+
((expires==null) ? "" : ("; expires="+expires.toGMTString()))+
((path==null) ? "" : ("; path="+path))+
((domain==null) ? "" : ("; domain="+domain))+
((secure==true) ? "; secure" : "");
}

function getCookieVal(offset){
var endstr=document.cookie.indexOf (";", offset);
if (endstr==-1) endstr=document.cookie.length;
return unescape(document.cookie.substring(offset, endstr)); 
}

function readCookie(nom){
var arg=nom+"=";
var alen=arg.length;
var clen=document.cookie.length;
var i=0;
while (i<clen)
{
var j=i+alen;
if (document.cookie.substring(i, j)==arg) return getCookieVal(j);
i=document.cookie.indexOf(" ",i)+1;
if (i==0) break;
}
return null; 
}

function changeCategorie(cateName){
document.frmChangeCategorie.categorie.value=replaceChars(cateName,'+',' ');
document.frmChangeCategorie.submit();
}

function ejs_nodroit(){return(false);}
-->
