// JavaScript Document


// Abrir ventana nueva
function ventana(url,ancho,alto){

  derecha=(screen.width-ancho)/2;

  arriba=(screen.height-alto)/2;

  string="toolbar=0,scrollbars=0,location=0,statusbar=0,titlebar=0,menubar=0,resizable=0,width="+ancho+",height="+alto+",left="+derecha+",top="+arriba+"";

  fin=window.open(url,"window3",string);

}
function noticia(url,ancho,alto){

  derecha=(screen.width-ancho)/2;

  arriba=(screen.height-alto)/2;

  string="toolbar=0,scrollbars=yes,location=0,statusbar=0,titlebar=0,menubar=0,resizable=0,width="+ancho+",height="+alto+",left="+derecha+",top="+arriba+"";

  fin=window.open(url,"window3",string);

}
function aviso(url,ancho,alto){

  derecha=(screen.width-ancho)/2;

  arriba=(screen.height-alto)/2;

  string="toolbar=0,scrollbars=1,location=0,statusbar=0,titlebar=0,menubar=0,resizable=0,width="+ancho+",height="+alto+",left="+derecha+",top="+arriba+"";

  fin=window.open(url,"window3",string);

}

function xantar()
{
ventana=window.open('../xantar/index.htm','','width=640,height=230,top=230,left=150')
}

// Comprobar email



function enviar(){
	if (document.f1.nombre.value.length==0){
		document.f1.nombre.focus();
		return 0;
	}
	if (document.f1.apellidos.value.length==0){
		document.f1.apellidos.focus();
		return 0;
	}
	if (document.f1.mensaje.value.length==0){
		document.f1.mensaje.focus();
		return 0;
	}
	
	if (document.f1.provincia.value.length==0){
		document.f1.provincia.focus();
		return 0;
	}
	if (document.f1.producto.value.length==0){
		document.f1.producto.focus();
		return 0;
	}
	if (document.f1.email.value.length==0){
		document.f1.email.focus();
		return 0;
	}
	document.f1.submit();
}
