function favoris() {
if ( navigator.appName != 'Microsoft Internet Explorer' ) { 
window.sidebar.addPanel("Monde du Bio","http://www.mondebio.co.uk",""); } else { window.external.AddFavorite("http://www.mondebio.com","Monde du Bio"); }
}

function jumpMenu(targ,selObj,restore){ 
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function switchMenu(obj)
{
var el = document.getElementById(obj);
if(el.style.display != "block")
{
el.style.display = "block";
}
else
{
el.style.display = "none";
}
}

navHover = function() {
	var lis = document.getElementById("navmenu").getElementsByTagName("LI");
	for (var i=0; i<lis.length; i++) {
		lis[i].onmouseover=function() {
			this.className+=" iehover";
		}
		lis[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" iehover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", navHover);

function multiClass(eltId) {
	arrLinkId = new Array('_0','_1','_2','_3');
	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';
		}
	}	
}

function chkrech()
{
if (document.search.rech.value.length<3)
{
alert("La recherche doit comporter 3 cacteres au minimum");
return false;
}
return true;
}

function file(fichier)
     {
     if(window.XMLHttpRequest) // FIREFOX
          xhr_object = new XMLHttpRequest();
     else if(window.ActiveXObject) // IE
          xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
     else
          return(false);
     xhr_object.open("GET", fichier, false);
     xhr_object.send(null);
     if(xhr_object.readyState == 4) return(xhr_object.responseText);
     else return(false);
     }

function reset_val(el,s){
if(el.value==s){
el.value="";
} }



function chksign()
{

if (document.signin.email.value.indexOf("@",0)<0) 
{
alert("Enter a valid email please");
return false;
}
if (document.signin.pass.value.length <2)
{
alert("Entrez votre passe svp");
return false;
}
return true;
}

function chkcontact()
{

if (document.contact.email.value.indexOf("@",0)<0) 
{
alert("Entrez un email valide svp");
return false;
}
if (document.contact.message.value.length <2)
{
alert("Entrez votre message svp");
return false;
}
return true;
}

function chksign()
{
if (document.signin.email.value.indexOf("@",0)<0) 
{
alert("Entrez un email valide svp");
return false;
}
if (document.signin.nom.value.length <2)
{
alert("Entrez votre nom svp");
return false;
}
if (document.signin.passe.value.length <4)
{
alert("Votre mot de passe doit comporter 4 caracteres au minimum");
return false;
}
if (document.signin.adresse1.value.length <2)
{
alert("Entrez votre adresse svp");
return false;
}
if ((document.signin.passe.value)!=(document.signin.passe2.value))
{
alert("Les mots de passe ne correspondent pas, confirmez votre mot de passe");
return false;
}

if (document.signin.cp.value.length <2)
{
alert("Entrez votre code postal svp");
return false;
}
if (document.signin.ville.value.length <2)
{
alert("Entrez votre ville postal svp");
return false;
}
if (document.signin.ville.value.length <2)
{
alert("Selectionnez votre pays svp");
return false;
}
return true;
}

function checkRadio(element) { 

    document.getElementById(element).checked = true; 
  } 

function checkOnKeyPressNum(){
        return checkOnKeyPressValid('0123456789 ');
}


