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 PopWindowC(chercheur)
{
window.open('contacto.php?chercheur='+chercheur,'Personaliced','width=620,height=300,menubar=no,scrollbars=no,toolbar=no,location=no,directories=no,resizable=no,top=100,left=100');
}

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

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_jumpMenuGo(selName,targ,restore){ //v3.0
  var selObj = MM_findObj(selName); if (selObj) MM_jumpMenu(targ,selObj,restore);
}

function UpdateQty(cantidad,itemId)
{
	newQty=document.getElementById(cantidad).value;
	document.location.href ="my_cart.php?action=update_item&id="+itemId+"&qty="+newQty;
}

function validar(formulario) {
	
	if (formulario.nombre.value=="") {
    alert("Este campo es requerido \"Nombre \".");
    formulario.nombre.focus();
    return (false);
    }
	if ((formulario.email.value.indexOf ('@', 0) == -1)||(formulario.email.value.length < 5)) {
    alert("Escriba una dirección de correo válida en el campo \"Email\".");
    return (false);
  	}	
		
	if (formulario.direccion.value=="") {
    alert("Este campo es requerido \"Direccion \".");
    formulario.direccion.focus();
    return (false);
    }
	
		
	if (formulario.cp.value=="") {
    alert("Este campo es requerido \"Codigo Postal \".");
    formulario.cp.focus();
    return (false);
    }
	

  return (true);

}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}


