function setHover(){  
LI = document.getElementById('menu').getElementsByTagName('li');
nLI = LI.length;  
for(i=0; i < nLI; i++){    
	LI[i].onmouseover = function(){      hover(this,'over');    }    
	LI[i].onmouseout = function(){      hover2(this,'out');    } 
 }
}








var cont=0;
var temp;
function hover(obj,typea){  
	if(document.all){ 
		//alert(typea);  
		UL = obj.getElementsByTagName('ul');    
		if(UL.length > 0){      
			sousMenu = UL[0].style;   
			
				if (cont==0){
					temp=sousMenu;
					cont=1;
				}
				sousMenu.display = 'inline';     
		}








	}
}








function hover2(obj,typea){  
	cont=0;
	if(document.all){ 
		//alert(typea);  
		UL = obj.getElementsByTagName('ul'); 
		
		
		   
		if(UL.length > 0){      
			sousMenu = UL[0].style;   
		
				
			sousMenu.display = 'none';  
  
		}








	}
}
















 /* function popupImageWindow(url,img_width,img_height) { 
    window.open(url,'popupImageWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=700,height=500,screenX=150,screenY=150,top=150,left=150');
  } 
*/


function popupImageWindow2(monImage, monTitre) { if (monTitre==null) monTitre=''; w = window.open('','chargement','width=10,height=10,resizable=yes'); w.document.write( "<html><head><title>"+monTitre+"</title>\n" );  w.document.write( "<script language='JavaScript'>\n");  w.document.write( "IE5=NN4=NN6=false;\n");  w.document.write( "if(document.all)IE5=true;\n");  w.document.write( "else if(document.getElementById)NN6=true;\n");  w.document.write( "else if(document.layers)NN4=true;\n");  w.document.write( "function autoSize() {\n");  w.document.write( "if(IE5) self.resizeTo(document.images[0].width+10,document.images[0].height+31)\n");  w.document.write( "else if(NN6) self.sizeToContent();\n"); w.document.write( "else window.resizeTo(document.images[0].width,document.images[0].height+20)\n");  w.document.write( "self.focus();\n");  w.document.write( "}\n</scri"); w.document.write( "pt>\n");  w.document.write( "</head><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 onLoad='javascript:autoSize();'>" ); w.document.write( "<a href='javascript:window.close();'><img src='"+monImage+"' border=0 alt='"+monTitre+"'></a>" );  w.document.write( "</body></html>" ); w.document.close();  }




/*window.onload=function (){
  setHover();
}*/








function affiche_photo(url,id){
//pos=FindPos(document.getElementById(id));
document.getElementById("conteneur_timbre").style.visibility='visible';
//document.getElementById("conteneur_timbre").style.left=pos['X']-200;
//document.getElementById("conteneur_timbre").style.top=pos['Y']-120;
document.getElementById("img_timbre").src='images/attente.gif';
document.getElementById("img_timbre").src=url;
}








function FindPos(AObject)
{
    var posX = 0, posY = 0;
    
    do
    {
        posX += AObject.offsetLeft;
        posY += AObject.offsetTop;
        AObject = AObject.offsetParent;
    }
    while( AObject != null );

    var pos = [];
    pos['X'] = posX;
    pos['Y'] = posY;
    
    return pos;
}








var vsubmit = 0;


function submit_ok(form) {
if (vsubmit == 0){ vsubmit++; form.submit();}
else { alert ('Patience, votre demande a bien été prise en compte...') ; return
false;}
}




function masque_photo(){
document.getElementById("conteneur_timbre").style.visibility='hidden';
document.getElementById("img_timbre").src='images/attente.gif';
}


var curSpan = '';
function showDesc(tagimgId,tagId,xtop,xleft){
	
	var x,y;
	if(curSpan)document.getElementById(curSpan).style.visibility='hidden';
	//if(document.all && document.all.item(tagId).innerText.length > 0){
		curSpan=tagId;
		pos=FindPos(document.getElementById(tagimgId));
		document.getElementById(tagId).style.left=pos['X']+'px';
		document.getElementById(tagId).style.top=pos['Y']+'px';


		document.getElementById(tagId).style.visibility='visible';
	//}
}
function hideDesc() {
	if(document.getElementById) if(curSpan)document.getElementById(curSpan).style.visibility='hidden';
	if(document.all) if(curSpan)document.getElementById(curSpan).style.visibility='hidden';
}

















