//########### DETECCIÓN DEL NAVEGADOR Y POP UP
IE = navigator.appName=="Microsoft Internet Explorer";
NS = navigator.appName=="Netscape";
bVer = parseInt(navigator.appVersion);
var radval = 0;
var newWin=null;

//########### POP
function popup(loc, name, width, height, scroll) {
	if (scroll == 'yes'){
	scroll = 'yes';
	}
	else
	{
	scroll = 'no';
	}
        var _params = "width="+width+",height="+height+",resizable=no, scrollbars="+scroll+",status=no";

        // CENTER ON BROWSERS WHICH SUPPORT JSCRIPT 1.2
        if (bVer >= 4) {
                 _left = ( (screen.width-width) >>1 );
                 _top = ( (screen.height-height) >>1 );
        } else {
                 _left = ( (800-width) >>1 );
                 _top = ( (600-height) >>1 );
        }

        if (IE) _params += ",top=" + _top + ",left=" + _left;
        else if (NS) _params += ",screenX=" + _left + ",screenY=" + _top;
        
		newWin = window.open(loc, name, _params);
        if ( newWin!=null && !(IE && bVer<5) )
        newWin.focus(); // MSIE4 DOESN'T FOCUS WINDOWS
}

//########### VALIDAR BUSQUEDAS
function ValidarBusqueda(buscar) {
  checkResult = true;
  if (buscar.palabra.value.length==0) {
     alert('Debe de escribir una palabra (s)');
     buscar.palabra.focus();
     return (false);
  }
  return (true);
}

function ValidarBusqueda2(buscar2) {
  checkResult = true;
  if (buscar2.palabra.value.length==0) {
     alert('Debe de escribir una palabra (s)');
     buscar2.palabra.focus();
     return (false);
  }
  return (true);
}

//########### VALIDAR CONSOLA
function ValidarConsola(theForm3)
{
  if (theForm3.login.value == "")
  {
    alert("Debe de escribir su Login");
    theForm3.login.focus();
    return (false);
  }
  if (theForm3.password.value == "")
  {
    alert("Debe de escribir su Password");
    theForm3.password.focus();
    return (false);
  }
  return (true);
}

//########### VALIDAR REGISTRO
function ValidarRegistro(registro)
{
  if (registro.nombre.value == "")
  {
    alert("Debe de escribir el Nombre y Apellidos del Representante");
    registro.nombre.focus();
    return (false);
  }
  if (registro.nombre_repsentado.value == "")
  {
    alert("Debe de escribir el Nombre y Apellidos del Representado");
    registro.nombre_repsentado.focus();
    return (false);
  }
  if (registro.direccion.value == "")
  {
    alert("Debe de escribir su Dirección");
    registro.direccion.focus();
    return (false);
  }
  if (registro.telefono.value == "")
  {
    alert("Debe de escribir su Teléfono");
    registro.telefono.focus();
    return (false);
  }
  return (true);
}

//########### EFECTO DE BARRA
function onOver(src,clrOver) {
 if (!src.contains(event.fromElement)) {
  src.style.cursor = 'hand';
  src.bgColor = clrOver;
        }
  }
function onOut(src,clrIn) {
        if (!src.contains(event.toElement)) {
     src.style.cursor = 'default';
     src.bgColor = clrIn;
        }
  }
  
//########### BARRA DEL NAVEGADOR
var message = 'Fundación "Autismo Venezuela"';
statuss();
function statuss()
    {
    window.status = message;
    //timerID = setTimeout("statuss()", 25);
}
function dynAnimation() {}
function clickSwapImg() {}

//########### BANNER
function banner(){
	popupmain( '/ad/liga/default.htm', 'POLITICAS', 499, 570, 'no');
}

//########### ERICK EL EXPLORADOR
function explorador(){
	popup( 'images/33/', 'EXPLORADOR', 670, 550, 'yes');
}

//########### POLITICAS DE PRIVACIDAD
function politicas(){
	popup( '/politicas/politica_privacidad.asp', 'POLITICAS', 500, 550, 'yes');
}

//########### ACCESESIBILIDAD
function accesibilidad(){
	popup( '/politicas/accesibilidad.asp', 'ACCESESIBILIDAD', 500, 550, 'yes');
}