function activaSegundo( formulario, activar )
{
var cual;
var valor;
var texto;
var n;
with (document.forms[formulario])
{
if (activar == null)
{
cual = primerCombo[primerCombo.selectedIndex].value;
}
else {
cual = activar;
primerCombo.selectedIndex = activar;
}
segundoCombo.disabled = false;
n = segundoCombo.length;
for (var i = 0; i < n; ++i)
{
segundoCombo.remove(segundoCombo.options[i]);
}
if (cual != null && cual != '')
{
n = Dep[cual].length;
segundoCombo[0] = new Option('Seleccione una sucursal', '');
for (var i = 0; i < n; i++)
{
valor = cual + "-" + i;
texto = Dep[cual][i];
segundoCombo[segundoCombo.length] = new Option(texto, valor);
}
segundoCombo.focus();
}
else {
segundoCombo.disabled = true;
primerCombo.focus();
}
}
}
function inicioSesionFallido(){
var url = window.location.href;
var fin = url.length;
var qstring = url.substring((fin-7),fin);
if(qstring=="noLogin"){
document.getElementById("errorLogin").innerHTML = "Usuario y/o contraseña no válidos.
";
}
}
function submitForm(){
document.forms['loginEDUMEDVIH'].submit();
}
function cierraSesion(){
window.setTimeout("window.location = 'http://www.aserta.com.mx/portal/server.pt?open=space&name=Login&control=Login&doLogout=&clearsession=true&in_hi_userid=1&cached=true';",3000);
}
function oculta()
{
/*ESTA FUNCION OCULTA LOS DIV DESDE UN INICION AL HACER EL WINDOW.LOAD */
div = document.getElementById('DF y Zona Metropolitana');
div.style.display='none';
div = document.getElementById('Sureste');
div.style.display='none';
div = document.getElementById('Norte');
div.style.display='none';
div = document.getElementById('Occidente');
div.style.display='none';
}
function mues()
{
/* oCULTAMOS PRIMERO LOS DIV EXISTENTES PARA LIMPIAR LA PANTALLA Y SI EL USUARIO SELECIONA DE NUEVO NO SE MUESTRE TODO */
div = document.getElementById('DF y Zona Metropolitana');
div.style.display='none';
div = document.getElementById('Sureste');
div.style.display='none';
div = document.getElementById('Norte');
div.style.display='none';
div = document.getElementById('Occidente');
div.style.display='none';
var m=document.mi_formulario.mi_primer_combo.selectedIndex; /*Tomamos el index del elemento seleccionado */
var mostrar=document.mi_formulario.mi_primer_combo[m].text; /* En base al index que tomamos le pedimos el texto correspondiente*/
div = document.getElementById(mostrar); /*le decimos que pinte el div que capturamos en la variable mostrar */
if(mostrar=="Seleccione una zona"){}
else
{
div.style.display='block';
}
}
function doscls()
{
/*LIMPIANDO */
var m=document.mi_formulario.mi_primer_combo.selectedIndex; /*Tomamos el index del elemento seleccionado */
var mostrar=document.mi_formulario.mi_primer_combo[m].text; /* En base al index que tomamos le pedimos el texto correspondiente*/
div = document.getElementById(mostrar); /*le decimos que pinte el div que capturamos en la variable mostrar */
div.style.display='none';
dosmues();
}
function dosmues()
{
var m=document.mi_formulario.mi_primer_combo.selectedIndex; /*Tomamos el index del elemento seleccionado */
var mostrar=document.mi_formulario.mi_primer_combo[m].text; /* En base al index que tomamos le pedimos el texto correspondiente*/
/*vamos a ocultar todos los div que el usuario no selecciono */
var ma=document.mi_formulario.mi_segundo_campo.selectedIndex;/*Tomamos el index del elemento seleccionado en el segundo combo*/
var most=document.mi_formulario.mi_segundo_campo[ma].text;/* En base al index que tomamos le pedimos el texto correspondiente del segundo combo*/
var mst=document.mi_formulario.mi_segundo_campo.length; /*Obtenemos el tamaņo del combo */
/*var mrs=document.mi_formulario.mi_segundo_campo.options; /*No furula la opcion obtenemos el arreglo del formulario asi que lo asignaremos con un for */
/*pasamos los valores del combo a un arreglo*/
var ar = new Array();
var z=0;
var zr=1;
for(z=0;z