if (top.location != self.location)
{
    top.location = "http://www.pueblecitos.com";
}
window.status="www.pueblecitos.com - Guía de pueblos pequeños de España";
 
function pasaEncima(nombre)
{
    nombre.readOnly=true;
    nombre.style.backgroundColor="#C0E75A";
    nombre.style.border="2px inset";
    nombre.style.cursor="hand";
}
function saleEncima(nombre)
{
    nombre.style.backgroundColor="#92EAF3";
    nombre.style.border="2px outset";
}
function pulsado(nombre)
{
    location=nombre.id;
}	
 
var ruta="";
function pasar(formul) //pasa el email a la página recomendar.htm
{
    if (validaEmail(email.value))
    {
        destino=ruta+"recomendar.htm";
        destino=destino+"?email="+email.value;
        reco=window.open(destino,'recomendar','height=550,width=430,scrollbars=yes,left=18,top=18,resizable=yes');
        reco.focus();
    }
    else
    {
        alert("Dirección de correo errónea."+"\nPor favor, verifícala.");
    }
}
 
function validaEmail(email)
{
    invalidChars=" /:,;";
    if (email=="")
    {
        return false;
    }
    for (i=0; i<invalidChars.length; i++)
    {
        badChar=invalidChars.charAt(i);
        if (email.indexOf(badChar,0)>-1)
        {
            return false;
        }
    }
    atPos=email.indexOf("@",1);
    if (atPos==-1)
    {
        return false;
    }
    if (email.indexOf("@",atPos+1)>-1)
    {
        return false;
    }
    periodPos=email.indexOf(".",atPos)
    if (periodPos==-1)
    {
        return false;
    }
    if (periodPos+3>email.length)
    {
        return false;
    }
    return true;
}
function enviarRecomendar(formul)
{
    if (!validaEmail(formul.Recomendar_a.value))
    {
        alert("Dirección de correo errónea."+"\nPor favor, verifícala.");
        formul.Recomendar_a.focus();
        formul.Recomendar_a.select();
        return false;
    }
    return true;
}
 
var bus="Netscape";
var encontr=false;
 
for (x=0; x<=(navigator.appName).length - bus.length; x++)
{
    subcadena=(navigator.appName).substring(x, x+bus.length);
    if (subcadena==bus)
    {
        encontr=true;
    }
}
 
function programa_tv()
{
    ocultar_tv();
    div_programa_tv.style.visibility='visible';
}
function ocultar_tv()
{
    div_programa_tv.style.visibility='hidden';
}

function escribe()
{
    var dir1 = "ilto:info";
    var dir2 = String.fromCharCode(64);
    var dir3 = "pueblecit";
    var dir4 = "ma" + dir1 + dir2 + dir3 + "os.c" + "om";
    document.location.href = dir4;
}

