function gotonewpage(what) {
  value = what.options[what.selectedIndex].value;
  if (value == "") return;
  window.location.href = value;
}
var winhandle = null;
function popUp(aURL, aWidth, aHeight) {
  if ((winhandle != null) && (! winhandle.closed)){
    winhandle.resizeTo(aWidth, aHeight);
    winhandle.location.replace(aURL);
  }
  else
  {
    winhandle=window.open(aURL, "imagewin", 'width=' + eval(aWidth) + ',height=' + eval(aHeight) + ',resizable');
  }
  winhandle.focus();
}



//swf/
function swf(varurl,width,height)

{
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="' + width + '"  height="' + height + '">\n'); 
document.write(' <param name="movie" value="' + varurl + '">\n'); 
document.write('<param name="wmode" value="transparent">\n'); 
document.write(' <param name="quality" value="high">\n'); 
document.write(' <embed src="' + varurl + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + width + '"  height="' + height + '" wmode="transparent"></embed></object>\n');
document.write('</object>\n');
}

function lg(lg){
 var fname = window.location.toString();
 var StrExp = (fname.substring((fname.lastIndexOf(".aspx")-2),(fname.lastIndexOf(".aspx")+5)));
 fname = fname.replace(StrExp,(''+lg+'.aspx'));
 window.location = fname;
 return false;
}



// Image alatoire homepage
function afficheBanner(){
	var startNo=Math.floor(Math.random()*4)
		compteur=startNo;
	document.write('<img src="/img/banner/banner_page_'+ compteur +'.jpg" width="760" height="110">');
}

function afficheBanner_HP(){
	var startNo=Math.floor(Math.random()*5)
		compteur=startNo;
	document.write('<img src="/img/banner/banner_home_'+ compteur +'.jpg" width="760" height="142">');
}

/**langues***/
function lg(lg){
 var fname = window.location.toString();
 var StrExp = (fname.substring((fname.lastIndexOf(".aspx")-2),(fname.lastIndexOf(".aspx")+5)));
 fname = fname.replace(StrExp,(''+lg+'.aspx'));
 window.location = fname;
 return false;
}
function compte_a_rebours(){
datedujour = new Date();
date_even = new Date(2010, 6, 8, 19,00,00); //janv =0 > decemb =11
date1=datedujour.getTime();
date2=date_even.getTime();
nbrej= date2-date1;
nbrej= Math.round((Math.round(nbrej)/1000)/60/60/24);
document.write("Il reste <span class=rouge_bold>"+nbrej+" jours</span> avant le <span class=rouge_bold>8 juillet 2010</span>");
}
function compte_a_rebours_en(){
datedujour = new Date();
date_even = new Date(2010, 6, 8, 19,00,00); //janv =0 > decemb =11
date1=datedujour.getTime();
date2=date_even.getTime();
nbrej= date2-date1;
nbrej= Math.round((Math.round(nbrej)/1000)/60/60/24);
document.write("Still <span class=rouge_bold>"+nbrej+" days</span> before <span class=rouge_bold>July 8th, 2010</span>");
}

/********* PopUP *********/

function PopWin(pg,nm,wi,he,sc,rz) {

var w=window.open(''+pg+'',''+nm+'','width='+wi+',height='+he+',scrollbars='+sc+',resizable='+rz+',top=204,left=200');
	//if (w.blur) w.focus();
	 w.focus();
}

//div blocking
// init blockingCount in page onload, for example :
// initBlocking(3) // when using three divs (number1,number2,number3)
var supported = (document.getElementById || document.all);
if (supported) {
	var shown = new Array();
}
function initBlocking(blockingCount)
{
	if (supported) {
		for (var i=0;i<blockingCount;i++) {
			shown[i+1] = false;
		}
	}
}
function blocking(i) {
  if (!supported) {
    alert('This menu does not work in your browser.');
    return;
  }

  for(var x=1;x<shown.length;x++)
  {
	  current = (x==i) ? 'block' : 'none';
	  shown[i] = (shown[i]) ? false : true;
	  if (document.getElementById) {
	    document.getElementById('number'+x).style.display = current;
	  }
	  else if (document.all) {
	    document.all['number'+x].style.display = current;
	  }
  }
  window.scrollTo(0,0)

}







