// PARA USAR EL HIGHSLIDE EN FLASH
function Apartado(ntag) {
var objLink = parent.document.getElementById(ntag);
if (navigator.appName.indexOf("Internet Explorer") == -1)
	objLink.onclick();
	else
	objLink.click();

}

// VALIDACION DEL FORMULARIO DE REGISTRO
function ValidaLogin(elform){
var todok=true;
var msgerror='To access the restricted area is required to provide:\n\n';
if (elform.usuario.value==""){msgerror+=' - Your user name.\n';todok=false;}
if (elform.clave.value==""){msgerror+=' - Your password.\n';todok=false;}
if (!todok){alert(msgerror);return(false)} else {return(true)}
}

function ValidaEdad(elform){
var todok=true;
var msgerror='To access necessary\n\n';
if (elform.dia.value==""){msgerror+=' - Day.\n';todok=false;}
if (elform.mes.value==""){msgerror+=' - Month.\n';todok=false;}
if (elform.anio.value==""){msgerror+=' - Year.\n';todok=false;}
if (!todok){alert(msgerror);return(false)} else {return(true)}
}

// VALIDACION DEL FORMULARIO DE CONTACTO
function ValidarContacto(elform) {
var todok=true;
var msgerror='http://www.fiftypoundsgin.co.uk\n\n The required information is incomplete or contains errors:\n\n';
if (elform.nombre.value==""){msgerror+='* Field First Name is not valid. \n';todok=false;}
if (elform.apellidos.value==""){msgerror+='* Field Last Name is not valid. \n';todok=false;}
if (elform.email.value==""){msgerror+='* Field Email is not valid. \n';todok=false;}
if (elform.pais.value==""){msgerror+='* Field Country is not valid. \n';todok=false;}
if (elform.motivo.options.selectedIndex==0){msgerror+='* Field Reason for contacting is not valid. \n';todok=false;}
if (elform.comentario.value==""){msgerror+='* Field Comments is not valid. \n';todok=false;}
if (!todok){alert(msgerror);return(false)} else {return(true)}
}

//VENTANA SIN BORDES

function Ventana(url) {
  	x = (screen.width - 800) / 2;
	y = (screen.height - 530) / 2;
	window.open(url,"","tittlebar=no,location=no,directories=no,status=no,scrollbars=yes,toolbar=no,menubar=no,width=800,height=530" );
	window.moveTo(x, y); 
}	

// FUNCION PARA E-MAILS
function EmailHTML(usuario,dominio,ancla,clase){
var HTMLContent="";
 if(usuario!=undefined && dominio!=undefined){
  if (ancla!=undefined) { HTMLContent+="<a href=mailto:"+usuario+"@"+dominio; 
  HTMLContent+= (clase!=undefined) ? " class="+clase+">" : ">";}
  HTMLContent+= usuario+"@"+dominio;
  if (ancla!=undefined) { HTMLContent+="</a>"; }
  document.write(HTMLContent)
 }
}
