/*
Info bulle pour menu et actu
*/
function on(calque)
{ 
document.getElementById(calque).style.visibility = "visible";
}
function of(calque)
{
document.getElementById(calque).style.visibility = "hidden";
}


/* 
Fonction Spoiler
*/
function montrer_spoiler(value) {
var actual=document.getElementById(value).style.visibility;
if (actual=='visible') {
document.getElementById(value).style.visibility='hidden';
} else {
document.getElementById(value).style.visibility='visible';
}
}



/*
Fonction ajouter au favoris
*/
function favoris() { 
if ( navigator.appName != 'Microsoft Internet Explorer' ){ 
window.sidebar.addPanel("1cheval.com","http://www.1cheval.com/",""); 
      } 
      else { 
          window.external.AddFavorite("http://www.1cheval.com/","1cheval.com"); 
} 
}

/*
Fonction multiclass moteur de recherche
*/ 									   
function multiClass(eltId) {
	arrLinkId = new Array('_0','_1','_2');
	intNbLinkElt = new Number(arrLinkId.length);
	arrClassLink = new Array('current','ghost');
	strContent = new String()
	for (i=0; i<intNbLinkElt; i++) {
		strContent = "menu"+arrLinkId[i];
		if ( arrLinkId[i] == eltId ) {
			document.getElementById(arrLinkId[i]).className = arrClassLink[0];
			document.getElementById(strContent).className = 'on content';
		} else {
			document.getElementById(arrLinkId[i]).className = arrClassLink[1];
			document.getElementById(strContent).className = 'off content';
		}
	}	
}

/*
Fonction recherche
*/				 
function dosearch() {
var sf=document.searchform;
var submitto = sf.sengines.options[sf.sengines.selectedIndex].value + escape(sf.searchterms.value);
window.location.href = submitto;
return false;
}

var currenttime = '<? print date("F d, Y H:i:s", time())?>' //PHP method of getting server date

///////////Stop editting here/////////////////////////////////

var montharray=new Array()
var serverdate=new Date(currenttime)

function padlength(what){
var output=(what.toString().length==1)? "0"+what : what
return output
}

function displaytime(){
serverdate.setSeconds(serverdate.getSeconds()+1)
var datestring=montharray
var timestring=padlength(serverdate.getHours())+":"+padlength(serverdate.getMinutes())+":"+padlength(serverdate.getSeconds())
document.getElementById("servertime").innerHTML=datestring+" "+timestring
}

window.onload=function(){
setInterval("displaytime()", 1000)
}







