// JavaScript Document


//popup para la nota legal

function nota_legal() { 
		var url = 'http://www.plasbox.com/contenidos/aviso_legal.php'
		var width = 650; 
		var height = 450; 
		//var width = screen.availWidth; 
		//var height = screen.availHeight; 
		var izda= ((screen.availWidth-width)/2);
		var superior= ((screen.availHeight-height)/2);
		
		var specs = "fullscreen=no,left=" + izda +",top=" + superior +",screenX=0,screenY=0"; 
		specs += ",width=" + width + ",height=" + height; 
		specs += ",scrollbars=yes,toolbar=no,menubar=no"; 
		specs += ",status=no,location=no"; 
		specs += ",directories=no,resizable=no,alwaysRaised"; 
		//specs += ",innerHeight=" + height + ",innerWidth=" + width; 
		var Popup = window.open(url, 'notalegal', specs); 
		Popup.resizeTo(width,height);
		Popup.focus();
		//vete();
}

function nota_legal_en() { 
		var url = 'http://www.plasbox.com/contenidos/aviso_legal_en.php'
		var width = 650; 
		var height = 450; 
		//var width = screen.availWidth; 
		//var height = screen.availHeight; 
		var izda= ((screen.availWidth-width)/2);
		var superior= ((screen.availHeight-height)/2);
		
		var specs = "fullscreen=no,left=" + izda +",top=" + superior +",screenX=0,screenY=0"; 
		specs += ",width=" + width + ",height=" + height; 
		specs += ",scrollbars=yes,toolbar=no,menubar=no"; 
		specs += ",status=no,location=no"; 
		specs += ",directories=no,resizable=no,alwaysRaised"; 
		//specs += ",innerHeight=" + height + ",innerWidth=" + width; 
		var Popup = window.open(url, 'notalegal', specs); 
		Popup.resizeTo(width,height);
		Popup.focus();
		//vete();
}

function nota_legal_fr() { 
		var url = 'http://www.plasbox.com/contenidos/aviso_legal_fr.php'
		var width = 650; 
		var height = 450; 
		//var width = screen.availWidth; 
		//var height = screen.availHeight; 
		var izda= ((screen.availWidth-width)/2);
		var superior= ((screen.availHeight-height)/2);
		
		var specs = "fullscreen=no,left=" + izda +",top=" + superior +",screenX=0,screenY=0"; 
		specs += ",width=" + width + ",height=" + height; 
		specs += ",scrollbars=yes,toolbar=no,menubar=no"; 
		specs += ",status=no,location=no"; 
		specs += ",directories=no,resizable=no,alwaysRaised"; 
		//specs += ",innerHeight=" + height + ",innerWidth=" + width; 
		var Popup = window.open(url, 'notalegal', specs); 
		Popup.resizeTo(width,height);
		Popup.focus();
		//vete();
}


function nota_cat() { 
		var url = 'http://www.molivell.com/contenidos/aviso_legal_cat.php'
		var width = 650; 
		var height = 450; 
		//var width = screen.availWidth; 
		//var height = screen.availHeight; 
		var izda= ((screen.availWidth-width)/2);
		var superior= ((screen.availHeight-height)/2);
		
		var specs = "fullscreen=no,left=" + izda +",top=" + superior +",screenX=0,screenY=0"; 
		specs += ",width=" + width + ",height=" + height; 
		specs += ",scrollbars=yes,toolbar=no,menubar=no"; 
		specs += ",status=no,location=no"; 
		specs += ",directories=no,resizable=no,alwaysRaised"; 
		//specs += ",innerHeight=" + height + ",innerWidth=" + width; 
		var Popup = window.open(url, 'notalegal', specs); 
		Popup.resizeTo(width,height);
		Popup.focus();
		//vete();
}


//para el newsletter

function valida_envia(){
			
		valor=document.form2.email_news.value;
		  re=/^[_a-z0-9-]+(.[_a-z0-9-]+)*@[a-z0-9-]+(.[a-z0-9-]+)*(.[a-z]{2,3})$/
		
			if(document.form2.nombre.value.length==0){
			
				alert("Escriba su nombre.");
				   document.form2.nombre.focus()
		  
			}else if(!re.exec(valor))    {
		 
		//alert("La dirección de email  " + valor + " es incorrecta.");
		alert("La dirección de email  es incorrecta.");
		   document.form2.email_news.focus()
			   return 0;
		 
		} else {
		 
		
		//alert("Envio el email");
			document.form2.submit();
		 
		 
		}	
 
	 }
	 
	 
	 
	 
//para el formulario de pedido 

function valida_pedido(){
	
	
	if((document.form5.producto1.checked == false)
	&&(document.form5.producto2.checked == false)
	&&(document.form5.producto3.checked == false)
	&&(document.form5.producto4.checked == false)
	&&(document.form5.producto5.checked == false)
	&&(document.form5.producto6.checked == false))
	
	{
			alert("Seleccione un producto.");
			
	}else if(document.form5.nombre.value.length==0){
		
			alert("Escriba su nombre.");
			document.form5.nombre.focus()
	  
	}else if(document.form5.apellidos.value.length==0){
		
			alert("Escriba sus apellidos.");
			document.form5.apellidos.focus()
	  
	}else if(document.form5.elmail.value.length==0){
		
			alert("Escriba su email.");
			document.form5.elmail.focus()
	  
	}else if(document.form5.direccion.value.length==0){
		
			alert("Escriba su dirección.");
			document.form5.direccion.focus()
	  
	}else if(document.form5.cp.value.length==0){
		
			alert("Escriba su código postal.");
			document.form5.cp.focus()
	  
	}else if(document.form5.poblacion.value.length==0){
		
			alert("Escriba su población.");
			document.form5.poblacion.focus()
	  
	} else {
	 
			document.form5.submit();
	 
	 
	}	
 
 
} 


//para el formulario de consultora 

function valida_consultora(){

	
 if(document.form_trabajo.nombre.value.length==0){
		
			alert("Escriba su nombre.");
			document.form_trabajo.nombre.focus()
	  
	}else if(document.form_trabajo.apellidos.value.length==0){
		
			alert("Escriba sus apellidos.");
			document.form_trabajo.apellidos.focus()
	  
	}else if(document.form_trabajo.direccion.value.length==0){
		
			alert("Escriba su dirección.");
			document.form_trabajo.direccion.focus()
	  
	}else if(document.form_trabajo.cp.value.length==0){
		
			alert("Escriba su código postal.");
			document.form_trabajo.cp.focus()
	  
	}else if(document.form_trabajo.poblacion.value.length==0){
		
			alert("Escriba su población.");
			document.form_trabajo.poblacion.focus()
	  
	} else if(document.form_trabajo.profesion.value.length==0){
		
			alert("Escriba su profesión.");
			document.form_trabajo.profesion.focus()
	  
	} else {
	
	 
			document.form_trabajo.submit();
	 
	 
	}	
 
 
} 


