// Menu déroulant
header_menuON = function() {
	var sfEls = document.getElementById("header_menu").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" header_menuON";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" header_menuON\\b"), "");
		}
		
	}
}
if (window.attachEvent) window.attachEvent("onload", header_menuON);

// Ouverture Popup
var newWin = null;
function closeWin(){
if (newWin != null){
if(!newWin.closed)
newWin.close();
}
}
function popUp(strURL,strType,strHeight,strWidth) {
closeWin();
var strOptions="";
var top=(screen.height-strHeight)/2;     
var left=(screen.width-strWidth)/2;  
if (strType=="console") strOptions="resizable,height="+strHeight+",width="+strWidth;
if (strType=="fixed") strOptions="status,height="+strHeight+",width="+strWidth;
if (strType=="elastic") strOptions="toolbar,menubar,scrollbars,resizable,location,height="+strHeight+",width="+strWidth;
newWin = window.open(strURL, 'newWin', "top="+top+",left="+left+","+strOptions);
newWin.focus();
}

// Imprimer Page
function imprimer(){
if (!window.print){
alert("Un Navigateur 4.X est requis pour l'utilisation du bouton imprimer.")
return
}
window.print();
}

// Envoyer à un ami
function envoyer() {
chaine_mail = "mailto:?subject=Ciments Calcia : " + document.title;
chaine_mail += "&body=Je recommande cette page : %0A" + document.title; 
chaine_mail += "%0A consultable a l'adresse suivante : %0A" + location.href; 
location.href = chaine_mail;
} 

// Validation formulaire abonnement
function ValidateForm()
{
	if (document.forms["sabonner"].email.value == "")
	{
		alert("Le champ e-mail est obligatoire");
		return false;
	}
	return true;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
