function MM_reloadPage(init) {  //recharger fenetre si NN4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

// popup
var ff,ff3,ffa;
function WinPop(fname,w,h) {
  if (ff3==null || ff3.closed) ff3=window.open(fname,'AlbertlAstucieux','resizable=yes,scrollbars=yes,width='+w+',height='+h);
  else {
 	ff3.focus();
	ff3.resizeTo(w+12,h+36);
	ff3.location.href=fname;
  }
}
function WinPopa(fname,w,h) {
  if (ffa==null || ffa.closed) ffa=window.open(fname,'AlbertlAstucieux','resizable=yes,scrollbars=no,width='+w+',height='+h);
  else {
 	ffa.focus();
	ffa.resizeTo(w+12,h+36);
	ffa.location.href=fname;
  }
}
function wPop(fname,larg,haut) {
  if (ff==null || ff.closed)ff=window.open(fname,"","scrollbars=yes,resizable=yes,width="+larg+",height="+haut);
  else{
   ff.focus();
   ff.location.href=fname;
  }
}  
function findObj(theObj, theDoc)
{
	var p, i, foundObj;  
	if(!theDoc) theDoc = document;
	// cas des frames
	if( (p = theObj.indexOf("?")) > 0 && parent.frames.length){
		theDoc = parent.frames[theObj.substring(p+1)].document;
		theObj = theObj.substring(0,p);}
	// IE5 et 6, NN 6-7 et autres
	if(document.getElementById)
		foundObj = document.getElementById(theObj);
	// IE4
	else if(!(foundObj = theDoc[theObj]) && theDoc.all) // enlever else pour tester Document.all sous IE
		foundObj = theDoc.all[theObj];
	// cas des forms
	for (i=0; !foundObj && i < theDoc.forms.length; i++)
		foundObj = theDoc.forms[i][theObj];
	// NN4
	for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++)
		foundObj = findObj(theObj,theDoc.layers[i].document);
	return foundObj;
}
function showHideLayers()
{ 
  var i, visStr, obj, args = showHideLayers.arguments;
  for (i=0; i<(args.length-1); i+=2){
    if ((obj = findObj(args[i])) != null){
      visStr = args[i+1];
      if (obj.style){
        obj = obj.style;
        if(visStr == 'show') visStr = 'visible';
        else if(visStr == 'hide') visStr = 'hidden';}
      obj.visibility = visStr;}
  }
}
function showcalq(calque){
	var calq= new Array ("limage_img1","limage_img2","limage_img3","limage_img4","limage_img5","limage_img6")
	for(var i=0; i<calq.length; i++){
		visi=calq[i]==calque?'show':'hide';
	    if ((obj = findObj(calq[i])) != null){
	      	if (obj.style){
    	    	obj = obj.style;
				visi=calq[i]==calque?'visible':'hidden';}
			obj.visibility=visi;
		}
	}
}
function setLayerTop(calque,y)
{ 
	var obj;
	if ((obj = findObj(calque)) != null){
		if (obj.style) obj = obj.style;
		if (document.layers) obj.top=y;
		else obj.top = y+'px';
	}
}
var ffama;
function AmaLeg(fname){if (ffama==null || ffama.closed) ffama=window.open(fname,"","scrollbars=yes,resizable=yes,width=490,height=480");else{ffama.focus();ffama.location.href=fname;}}


