//fonctions javascript
function PopUp2(URL,WIDTH,HEIGHT) {
	options="toolbar=no,location=no,directories=no,status=no,menubar=no,top=20,left=30, scrollbars=no,resizable=no,width=1,height=1"
	Box = window.open (URL,"Windows",options)
	Box.close()
	options="toolbar=no,location=no,directories=no,status=no,menubar=no,top=20,left=30, scrollbars=no,resizable=no,width="+WIDTH+",height="+HEIGHT
	Box = window.open (URL,"Windows",options)
	Box.focus();
}

function openWin(url, largeur, hauteur ,param, nom) {
	if(document.all) { 
			var x = (screen.width-largeur)/2;
			var y = (screen.height-hauteur)/2; 
	}else {
		 var x=100; var y=100; 
	}
	window.open(url,nom,param+(param!="" ? "," : "")+"width="+largeur+",height="+hauteur+",left="+x+",top="+y);
}
function PopLocalisation(URL,WIDTH,HEIGHT) {
	options="toolbar=no,location=no,directories=no,status=no,menubar=no,top=20,left=30, scrollbars=no,resizable=no,width=1,height=1"
	Box = window.open (URL,"Windows",options)
	Box.close()
	options="toolbar=no,location=no,directories=no,status=no,menubar=no,top=20,left=30, scrollbars=no,resizable=yes,width="+WIDTH+",height="+HEIGHT
	Box = window.open (URL,"Windows",options)
	Box.focus();
}
function PopRetour(URL){
	opener.focus();
	opener.location.href = URL;
	//self.close();
}
function eraseTxt (inputName) { 
	inputName.value="";
}
function openCalendar(url,param) {
	var x, y;
	if(document.all) { x = screen.width/2-200; y = screen.height/2-200; }
	else { x=100; height=100; }
	window.open(url,"eb",param+(param!="" ? "," : "")+"status=no,location=no,menubar=no,resizable=no,toolbar=no,scrolling=auto,left="+x+",top="+y);
} 

function PopUpRmc(URL,WIDTH,HEIGHT)
		{
			options="toolbar=no,location=no,directories=no,status=no,menubar=no,top=20,left=30, scrollbars=no,resizable=no,width=1,height=1"
			Box = window.open (URL,"Windows",options)
			Box.close()
			options="toolbar=no,location=no,directories=no,status=no,menubar=no,top=20,left=30, scrollbars=no,resizable=no,width="+WIDTH+",height="+HEIGHT
			Box = window.open (URL,"Windows",options)
			Box.focus()
		}
		
		
function popupcentree(page,largeur,hauteur,options) {     var top=(screen.height-hauteur)/2;     var left=(screen.width-largeur)/2;     window.open(page,"VoIP","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options); }  		
//---------------------------------------------
		
		
		
window.onload = function() {
  	open_ext_link();
  	menuTranslucide();
}

if (window.attachEvent) window.attachEvent("onload", sfHover);



function menuTranslucide() {

	    var LIs = document.getElementById("menu").getElementsByTagName("li");

      for (var k=0; k<LIs.length; k++) {
    		var ULs = LIs[k].getElementsByTagName("ul");

        for (var j=0; j<ULs.length; j++) {
        	ULs[j].style.filter = "alpha(opacity:"+75+")";
          ULs[j].style.MozOpacity = 75/100;
        	ULs[j].styleKHTMLOpacity = 75/100
        	ULs[j].style.opacity = 0.75;
        	
      	}
      }
}



function sfHover() {
	var sfEls = document.getElementById("menu").getElementsByTagName("li");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}


		
	}
}

    
function open_ext_link()
{
	var liens = document.getElementsByTagName('a');
	for( var i = 0 ; i < liens.length ; i++)
	{
		if(liens[i].className == 'lien_ext')
		{
			liens[i].onclick = function()
			{
				window.open(this.href);
				return false;
			}
		}
	}
}
