
function OpenWin(URL,width,height,nom)
{
	window.open(URL,nom,"toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width=" + width + ",height=" + height + ",resizable=no");
}

function OpenWin2(URL,width,height,nom)
{
	window.open(URL,nom,"toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width=" + width + ",height=" + height + ",resizable=yes");
}

function ShowDetailTeam(URL,width,height,nom)
{
	window.open(URL,nom,"toolbar=no,location=no,status=no,menubar=no,scrollbars=no,width=" + width + ",height=" + height + ",resizable=no");
}

function orderByDate(day,month,year)
{
	//var selectdate = year+""+month+""+day;
	document.searchByDate.bydate_day.value= day;
	document.searchByDate.bydate_month.value= month;
	document.searchByDate.bydate_year.value= year;
	//alert(selectdate);
}

function orderByMonth(month,year)
{

	document.searchByMonth.bymonth_month.value= month;
	document.searchByMonth.bymonth_year.value= year;
	//alert(selectdate);
}

function orderstartdate(month,year)
{
	document.searchBetweenMonth.start_month.value= month;
	document.searchBetweenMonth.start_year.value= year;	
	//alert(selectdate);
}

function orderenddate(month,year)
{
	document.searchBetweenMonth.end_month.value= month;
	document.searchBetweenMonth.end_year.value= year;
	//alert(selectdate);
}

//----------------------------------------------------------------------------------------------------------------------
// CENTRER LE POPUP DES IMAGES
//----------------------------------------------------------------------------------------------------------------------
function PopupCentrer(page,largeur,hauteur,options) {
  var top=(screen.height-hauteur)/2;
  var left=(screen.width-largeur)/2;
  window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
 }
 

//Image zoom in/out script- by javascriptkit.com
//Visit JavaScript Kit (http://www.javascriptkit.com) for script
//Credit must stay intact for use

var zoomfactor=0.10 //Enter factor (0.05=5%)

function zoomhelper(){
if (parseInt(whatcache.style.width)>10&&parseInt(whatcache.style.height)>10){
whatcache.style.width=parseInt(whatcache.style.width)+parseInt(whatcache.style.width)*zoomfactor*prefix
whatcache.style.height=parseInt(whatcache.style.height)+parseInt(whatcache.style.height)*zoomfactor*prefix
}
}

function zoom(originalW, originalH, what, state){
if (!document.all&&!document.getElementById)
return
whatcache=eval("document.images."+what)
prefix=(state=="in")? 1 : -1
if (whatcache.style.width==""||state=="restore"){
whatcache.style.width=originalW
whatcache.style.height=originalH
if (state=="restore")
return
}
else{
zoomhelper()
}
beginzoom=setInterval("zoomhelper()",100)
}

function clearzoom(){
if (window.beginzoom)
clearInterval(beginzoom)
}

//----------------------------------------------------------------------------------------------------------------------
// AFFICHE L'HEURE DANS LA STATUS BARRE
//----------------------------------------------------------------------------------------------------------------------
function AfficherInfo (Affichage) 
{
    window.status = Affichage;
}

function AfficherHeure () 
{
	d  = new Date ();
  
	heures = d.getHours ();
	minutes = d.getMinutes ();
	secondes = d.getSeconds ();
  
	if (minutes < 10)
	minutes = "0" + minutes;

	if (secondes < 10)
	secondes = "0" + secondes;

	AfficherInfo ("Bienvenue sur le site chapier. Il est exactement " + heures + ":" + minutes + ":" + secondes);

	setTimeout ("AfficherHeure ();", 1000);
}

/*
function clignotement()
{
	if (document.getElementById("blinking").style.display=="block")
	{
		document.getElementById("blinking").style.display="none";
	}
	else
	{
		document.getElementById("blinking").style.display="block";
	}
}
// mise en place de l appel régulier de la fonction toutes les 0.75 secondes
setInterval("clignotement()", 750); */