var CouleurMenuOver;
var CouleurMenuOut;
function SetMenuOver(oElement){
	//Positionnement au niveau des TD
	if(oElement.childNodes[0].nodeName == "TBODY"){ oElement = oElement.childNodes[0].childNodes[0]; } // pour ie
	else{ oElement = oElement.childNodes[1].childNodes[0]; } 														// pour ff
	var i =0;
	for(i;i<oElement.childNodes.length;i++){
		if(oElement.childNodes[i].nodeType == 1){ 				// Si c'est un noeud TD
			oElement.childNodes[i].onmouseover = function(){
				this.style.backgroundColor = CouleurMenuOver;
			}
			if(oElement.childNodes[i].style.backgroundColor == ""){
				oElement.childNodes[i].onmouseout = function(){
					this.style.backgroundColor = CouleurMenuOut;
				}
			}
			if(oElement.childNodes[i].headers){
				oElement.childNodes[i].onclick = function(){
					document.location.href = this.headers;
				}
			}
		}
	}
}
//Fonctions relatives à la photothèque :----------------------------
var FenetreImage = "";
function ImageViewer(thisPicture){
	if(FenetreImage != ""){
			FenetreImage.close();
	}
	var maNouvellePage="";
	maNouvellePage="<html><body><table width='100%' height='100%'><tr><td><div align='center'><img src='"+thisPicture+"' border='0' alt='' /></div></td></tr></table></body></html>";
	FenetreImage=window.open('','FenetreAide','toolbar=no,status=no,resizable=no,width=100,height=100');
	FenetreImage.document.write(maNouvellePage);
}
//
function SetBlock(IdBlock){
	var Block = document.getElementById(IdBlock);
	if(Block.style.display == 'none'){
		Block.style.display = 'block';
	}else{
		Block.style.display = 'none';
	}
}
function ChangeImage(Img){
		if(Img != ""){
		document.getElementById('ImgViewer').href = "javascript:ImageViewer('"+Img+"');";
		}else{
		document.getElementById('ImgViewer').href = "";
		}
		return false;
}
/* fonction pour le menu déroulant du listing entreprise */
function JumpTo(page,debut){
	var form = document.getElementById("recherche");
	form.action = page+"?debut="+debut;
	document.recherche.submit();
}
function SetSociete(ID,Nom){
		window.opener.document.getElementById("nom").value = Nom;
		window.opener.document.getElementById("ID").value = ID;
}