//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()
		}
		
window.onload = function() {
 	//aparition du flash de côté
 	var largeur = 0, hauteur = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
	  largeur = window.innerWidth;
	  }
	else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	  largeur = document.documentElement.clientWidth;
	  }
	else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
	  largeur = document.body.clientWidth;
	  }
	else {
	  largeur = -1;
	  }
	 if (largeur > 990) document.getElementById("suiteflash").style.display="block";

  	open_ext_link();
  	ecard_input();
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
// -- menu -->	
//sfHover = function() {

function sfHover() {
	var sfEls = document.getElementById("menu").getElementsByTagName("li");
	var lesSelects = document.getElementsByTagName('select');
	
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";


      for( var k=0 ; k < lesSelects.length ; k++)	{
            lesSelects[k].style.visibility ="hidden";
      }

		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");

      for( var k=0 ; k < lesSelects.length ; k++)	{
            lesSelects[k].style.visibility ="visible";
      }

		}
	}
}

    

// -- menu -->	
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;
			}
		}
	}
}

function mesure(_MesurePro, _page)
{
	scr_w = screen.width;
	scr_h = screen.height;
	color = screen.colorDepth;
	ref = escape(window.document.referrer);
	
	document.write("<IMG src='http://noeinteractive.stats-pro.com/stats/satvac/marqueur.pl/"+ "?page="+ _page+ "&n="+ Math.round (Math.random () * 1000000000000000)+ "&reso_w="+ scr_w+ "&reso_h="+ scr_h+ "&color="+ color+ "&referer="+ ref+"' border=0>");
}

function ecard_input(){
    var boutonsRadio = document.getElementsByTagName('input');
  	for( var j=0 ; j < boutonsRadio.length ; j++)	{
  		if(boutonsRadio[j].className == 'ecardBtnRadio')	{
  			 boutonsRadio[j].onclick = function()	{

          for( var k=0 ; k < boutonsRadio.length ; k++)	{
            boutonsRadio[k].parentNode.id="";
          }

    			this.parentNode.id="aaa";

  			}
  		}
    }

}

