﻿    var marginbottom;
    var timercasa;
    var i_snow=0;
    var timersnow;
    var navidad=0;
    var i_casa=-1;
    var timerbann1;
    var i_scrobann1=1;
    var img1scrobann1="Imagenes/Scroll1Titulo1.gif";
    var img2scrobann1="Imagenes/Scroll1Titulo2.gif";
    var img3scrobann1="Imagenes/Scroll1Titulo3.gif";
    var timerbann2;
    var i_scrobann2=1;
    var img1scrobann2="Imagenes/Scroll2Titulo1.gif";
    var img2scrobann2="Imagenes/Scroll2Titulo2.gif";
    var img3scrobann2="Imagenes/Scroll2Titulo3.gif";

 
  
    function menu_onclick() {
           return true;
    }
  
    function HandleInicio() {
        initate();
        iniccasa();
        inicbann1();
        inicbann2();
    }
  
    function HandleOnClose() {
    }
        
    function TituLetLet(obj, iens, tipjava)
    {
        color1 = "white"; // Color original del texto
        color2 = "lightgray"; // El color del efecto
        fontsize = "4"; // Tamaño del texto en pixeles
        speed = 50; // Velocidad del texto en milisegundos 1000 milisegundos = 1 segundo
        i = 0;
        
        setInterval("changeCharColor('"+obj+"','"+iens+"')", speed);
    }
    
    
    function changeCharColor(textccc,edisp)
    {
        if (navigator.appName == "Netscape") {
            obj = edisp + "ns"
            document.getElementById(obj).document.write("<center><font color=" + color1 + ">");
            for (var j = 0; j < textccc.length; j++) {
                if(j == i) {
                    document.getElementById(obj).document.write("<font color=" + color2 + ">" + textccc.charAt(i) + "</font>");
                }
                else {
                    document.getElementById(obj).document.write(textccc.charAt(j));
                }
            }
            document.getElementById(obj).document.write('</font></font></center>');
            document.getElementById(obj).document.close();
        }
        if (navigator.appName == "Microsoft Internet Explorer") {
                        obj = edisp + "ie"
            str = "<center><font color=" + color1 + ">";
            for (var j = 0; j < textccc.length; j++) {
                if( j == i) {
                    str += "<font color=" + color2 + ">" + textccc.charAt(i) + "</font>";
                }
                else {
                    str += textccc.charAt(j);
                }
            }
            str += "</font></font></center>";
            //a.innerHTML = str;
            document.getElementById(obj).innerHTML = str;
        }
        (i == textccc.length) ? i=0 : i++; // Volvemos a la primera letra
    }
    
     function TituLetEsc(objle,iensle)
    {
        tID = 0;
        i_esc = 0;
        spd = 100; // velocidad de escritura
        
        tID = setInterval("typeDiving('"+objle+"','"+iensle+"')", spd);       
    }
    
 function typeDiving(textdiv,ediv)
    {
        if(i_esc > textdiv.length)
        {
            i_esc = 0
           // clearTimeout(tID);
        }
        else {
            msg = textdiv.substring(0,i_esc);
            if (navigator.appName == "Netscape") {
                objd = ediv+"ns"
                if (document.getElementById(objd) != null) {
                    document.getElementById(objd).document.write('<font color="white">' + msg + '</font>');
                    document.getElementById(objd).document.close();
                } 
            }
            if (navigator.appName == "Microsoft Internet Explorer") {
                obj = ediv+"ie"
                document.getElementById(obj).innerHTML = '<strong><font color="white">'+msg+'</font></strong>';
            }
            i_esc++;
        }
        
        
    }
    
        function randommaker(range) { 
        rand=Math.floor(range*Math.random())
        return rand
    }

    function initate() {
        if (navidad==1) { 
            if (document.all) { 
                marginbottom = 665  //screen.height  document.body.clientHeight
                var thissnow = eval("document.all.snow"+i_snow+".style")
                thissnow.posLeft=(i_snow*40)//-50
                if (thissnow.posLeft>screen.width-30)
                {
                    thissnow.posLeft=screen.width-30
                }
                if (thissnow.posLeft<10)
                {
                    thissnow.posLeft=10
                }
                thissnow.posTop=randommaker(marginbottom*2)-marginbottom
                if (thissnow.posTop>marginbottom-10)
                {
                    thissnow.posTop=marginbottom-10
                }
                if (thissnow.posTop<10)
                {
                    thissnow.posTop=10
                }
                if (i_snow >=24)
                {
                    i_snow=0
                    clearTimeout(timersnow)
                    movesnow()
                }
                else {
                    i_snow++
                    initate()
                } 
            }
        }
    }

    function movesnow()
    {
        if (document.all) { 
            for (isnow=0;isnow<=24;isnow++) {
                var tempcapo = "snow"+isnow //cambio de "i" a "isnow"
                var thissnow = eval("document.all.snow"+isnow+".style")
                var rand=Math.floor(24*Math.random())

               thissnow.posLeft+=rand-12
               thissnow.posTop+=rand
   
                if (thissnow.posTop>=marginbottom)
                {
                    thissnow.posTop=0 //-150
                }
            }
            timersnow=setTimeout("movesnow()",100)
        }
    }
    
    function iniccasa() {
       if (i_casa>-2 && i_casa<=9){
        if (i_casa<0){borrcasa(1)}
           var thiscasa = eval("document.all.imagmovi"+i_casa)
           i_casa=i_casa+1
           thiscasa.style.visibility="visible"
            timercasa=setTimeout("iniccasa()",1000)
       }
       else {
        if (i_casa==-2){borrcasa(1)}
        else
            {timercasa=setTimeout("borrcasa(0)",10000)}}
       }
                
  function borrcasa(borcas) {
    for (icasa=0;icasa<=9;icasa++){
       var thiscasa = eval("document.all.imagmovi"+icasa)
       thiscasa.style.visibility="hidden"
    }
    i_casa=0
    if(borcas==0){
    timercasa=setTimeout("iniccasa()",1000)}
  }
  
function inicbann1() {
    timerbann1=setTimeout("doTrans1()",7500)
    }
  
function doTrans1() {
    oImg=document.getElementById("oImg1")
//    imgObj1.filters[0].apply();
    switch(i_scrobann1){
        case 1:
            i_scrobann1=2;
            oImg.src=img2scrobann1;
            break
        case 2:
            i_scrobann1=3;
            oImg.src=img3scrobann1;
            break
        default:
            i_scrobann1=1;
            oImg.src=img1scrobann1;
    }
//    imgObj1.filters[0].play();
    inicbann1()
    }
    
function inicbann2() {
    timerbann2=setTimeout("doTrans2()",2500)
    }
  
function doTrans2() {
    oImg=document.getElementById("oImg2")
//    imgObj2.filters[0].apply();
    switch(i_scrobann2){
        case 1:
            i_scrobann2=2;
            oImg.src=img2scrobann2;
            break
        case 2:
            i_scrobann2=3;
            oImg.src=img3scrobann2;
            break
        default:
            i_scrobann2=1;
            oImg.src=img1scrobann2;
    }
//    imgObj2.filters[0].play();
    inicbann2()
    }

function Permut (flag,img) {
        //--inicia efecto rollover simple-->
        if (document.images) {
            if (document.images[img].permloaded) {
                if (flag==1) document.images[img].src = document.images[img].perm.src
                else document.images[img].src = document.images[img].perm.oldsrc
                }
            }
        }
function preloadPermut (img,adresse) {
   if (document.images) {
        img.onload = null;
        img.perm = new Image ();
        img.perm.oldsrc = img.src;
        img.perm.src = adresse;
        img.permloaded = true;
        //-- termina rollover simple ... continua llamado en body -->
           }
        }

    function PoneScroll () {
        switch (document.getElementById("ctl00_label_modu").innerHTML) {
            case "CENAN":

            	document.body.style.background = 'background-image: url(Imagenes/LogoEmprdisminuido.gif)'
            	mensdisp0 = "Vigila en TIEMPO REAL el movimiento de tus rastreadores";
                mensdisp1 = "Utiliza la ANIMACIÓN del mapa para recrear las rutas que siguieron los rastreadores";
                mensdisp2 = "Rastrea personas, objetos o vehículos, tenemos equipos específicos para cada uno de ellos";
                mensdisp3 = "Crea tu propio espacio privado con tus rastreadores y decide a quiénes les otorgas permisos para entrar";
                mensdisp4 = "Monitorea lo que hacen tus usuarios y decide si autorizas o cancelas permisos para ver tus rastreadores";
                mensdisp5 = "Si eres ADMINISTRADOR utiliza el modo privacidad para que solamente los ADMINISTRADORES te puedan ver";
                mensdisp6 = "Recibe (tu y tu gente de confianza) SMS'S y/o email de los eventos que decidas monitorear (PANICO, ALARMA, VELOCIDAD, etc...)";
                mensdisp7 = "Opera el sistema desde la PC en Internet, SMARTPHONE o por SMS (puedes ver los mapas)";
                mensdisp8 = "Recibe por SMS y/o email lo que hacen tus usuarios con el PANEL DE CONTROL y entérate de TODO lo que tus usuarios le piden a los rastreadores";
                mensdisp9 = "Revisa nuestros vídeos de ejemplo en el botón de VIDEOS YOUTUBE";
                break;
            case "MVCAN":
            	document.body.style.background = 'background-image: url(Imagenes/LogoEmprdisminuido.gif)'
            	mensdisp0 = "Vigila en TIEMPO REAL el movimiento de tus rastreadores";
                mensdisp1 = "Utiliza la ANIMACIÓN del mapa para recrear las rutas que siguieron los rastreadores";
                mensdisp2 = "Rastrea personas, objetos o vehículos, tenemos equipos específicos para cada uno de ellos";
                mensdisp3 = "Crea tu propio espacio privado con tus rastreadores y decide a quiénes les otorgas permisos para entrar";
                mensdisp4 = "Monitorea lo que hacen tus usuarios y decide si autorizas o cancelas permisos para ver tus rastreadores";
                mensdisp5 = "Si eres ADMINISTRADOR utiliza el modo privacidad para que solamente los ADMINISTRADORES te puedan ver";
                mensdisp6 = "Recibe (tu y tu gente de confianza) SMS'S y/o email de los eventos que decidas monitorear (PANICO, ALARMA, VELOCIDAD, etc...)";
                mensdisp7 = "Opera el sistema desde la PC en Internet, SMARTPHONE o por SMS (puedes ver los mapas)";
                mensdisp8 = "Recibe por SMS y/o email lo que hacen tus usuarios con el PANEL DE CONTROL y entérate de TODO lo que tus usuarios le piden a los rastreadores";
                mensdisp9 = "Revisa nuestros vídeos de ejemplo en el botón de VIDEOS YOUTUBE";
                break;
            case "TAXPL":
            	document.body.style.background = 'background-image: url(Imagenes/taxpl_disminuido.gif)'
            	mensdisp0 = "Los taxistas de Playa de Carmen estamos comprometidos con la calidad";
                mensdisp1 = "El turista regresa cuando se le trata bien";
                mensdisp2 = "Estar al día en las cuotas nos permite mejorar el sindicato";
                mensdisp3 = "El sindicato está comprometido con la honestidad y el servicio a la comunidad de taxistas";
                mensdisp4 = "";
                mensdisp5 = "";
                mensdisp6 = "";
                mensdisp7 = "";
                mensdisp8 = "";
                mensdisp9 = "";
                break;
            case "TAXCC":
            	document.body.style.background = 'background-image: url(Imagenes/logoempr_disminuido_taxcc.gif)'
            	mensdisp0 = "Los taxistas de Cancún estamos comprometidos con la calidad";
                mensdisp1 = "El turista regresa cuando se le trata bien";
                mensdisp2 = "Estar al día en las cuotas nos permite mejorar el sindicato";
                mensdisp3 = "El sindicato está comprometido con la honestidad y el servicio a la comunidad de taxistas";
                mensdisp4 = "";
                mensdisp5 = "";
                mensdisp6 = "";
                mensdisp7 = "";
                mensdisp8 = "";
                mensdisp9 = "";
                break;
            case "MOVIS":
            	document.body.style.background = 'background-image: url(Imagenes/movis_logo_disminuido.gif)'
            	mensdisp0 = "Con Movistar vigila en TIEMPO REAL el movimiento de tus rastreadores";
                mensdisp1 = "Con Movistar utiliza la ANIMACIÓN del mapa para recrear las rutas que siguieron los rastreadores";
                mensdisp2 = "Con Movistar rastrea personas, objetos o vehículos, tenemos equipos específicos para cada uno de ellos";
                mensdisp3 = "Con Movistar crea tu propio espacio privado con tus rastreadores y decide a quiénes les otorgas permisos para entrar";
                mensdisp4 = "Con Movistar monitorea lo que hacen tus usuarios y decide si autorizas o cancelas permisos para ver tus rastreadores";
                mensdisp5 = "Con Movistar si eres ADMINISTRADOR utiliza el modo privacidad para que solamente los ADMINISTRADORES te puedan ver";
                mensdisp6 = "Con Movistar recibe (tu y tu gente de confianza) SMS'S y/o email de los eventos que decidas monitorear (PANICO, ALARMA, VELOCIDAD, etc...)";
                mensdisp7 = "Con Movistar opera el sistema desde la PC en Internet, SMARTPHONE o por SMS (puedes ver los mapas)";
                mensdisp8 = "Con Movistar recibe por SMS y/o email lo que hacen tus usuarios con el PANEL DE CONTROL y entérate de TODO lo que tus usuarios le piden a los rastreadores";
                mensdisp9 = "Revisa nuestros vídeos de ejemplo en el botón de VIDEOS YOUTUBE";
                break;

        }

        document.write('<marquee id="iescroller" onMouseOver="this.stop();" onMouseOut="this.start();" direction="up" width="100%" height="100%" scrollamount="2" scrolldelay="50" class="textscro">');
        document.write('<font size="5" face="Verdana">')
        if (mensdisp0 != "") {
            document.write('<Div align="center"><p class="sombreado">'+mensdisp0+'</p></div><br>');
            }
        if (mensdisp1 != "") {
            document.write('<Div align="center"><p class="sombreado">'+mensdisp1+'</p></div><br>');
            }
        if (mensdisp2 != "") {
            document.write('<Div align="center"><p class="sombreado">'+mensdisp2+'</p></div><br>');
            }
        if (mensdisp3 != "") {
            document.write('<Div align="center"><p class="sombreado">'+mensdisp3+'</p></div><br>');
            }
        if (mensdisp4 != "") {
            document.write('<Div align="center"><p class="sombreado">'+mensdisp4+'</p></div><br>');
            }
        if (mensdisp5 != "") {
            document.write('<Div align="center"><p class="sombreado">'+mensdisp5+'</p></div><br>');
            }
        if (mensdisp6 != "") {
            document.write('<Div align="center"><p class="sombreado">'+mensdisp6+'</p></div><br>');
            }
        if (mensdisp7 != "") {
            document.write('<Div align="center"><p class="sombreado">'+mensdisp7+'</p></div><br>');
            }
        if (mensdisp8 != "") {
            document.write('<Div align="center"><p class="sombreado">'+mensdisp8+'</p></div><br>');
            }
        if (mensdisp9 != "") {
            document.write('<Div align="center"><p class="sombreado">'+mensdisp9+'</p></div><br>');
            }
        document.write('</font>');
        document.write('</marquee>');
        }



///funciones del menu
addEventIE6(window,'load',inicializarEventos,false);

function inicializarEventos()
{
  var enlaces=document.getElementsByTagName('ul');
  for(f=0;f<enlaces.length;f++)
  {
    addEventIE6(enlaces[f],'click',presionBoton,false);
  }
}

function desactivar()
{
 var enlaces=document.getElementsByTagName('ul');
  for(f=0;f<enlaces.length;f++)
  {
    if (enlaces[f].parentNode.getAttribute('id')=='')
      enlaces[f].style.display='none';
  }
}

function presionBoton(e)
{
    desactivar();
    var ref=window.event.srcElement;
    ///ref.parentNode.childNodes[2].style.display='block';
}

function addEventIE6(elemento,nomevento,funcion,captura)
{
  if (elemento.attachEvent)
  {
    elemento.attachEvent('on'+nomevento,funcion);
    return true;
  }
  else  
    return false;
}

 function inic_scroll() {
  var nombusuamast = mastnombusua()

        var imagmovi0 = document.getElementById('imagmov0');
        var imagmovi1 = document.getElementById('imagmov1');
        var imagmovi2 = document.getElementById('imagmov2');
        var imagmovi3 = document.getElementById('imagmov3');
        var imagmovi4 = document.getElementById('imagmov4');
        var imagmovi5 = document.getElementById('imagmov5');
        var imagmovi6 = document.getElementById('imagmov6');
        var imagmovi7 = document.getElementById('imagmov7');
        var imagmovi8 = document.getElementById('imagmov8');
        var imagmovi9 = document.getElementById('imagmov9');
        var imagfranquicias = document.getElementById('imagfranquicias');
        var imgofertas = document.getElementById('imgofertas');
        var mensusualogn = document.getElementById('mensusualogn');

        if (nombusuamast.length > 0) {
            document.getElementById('ctl00_Panl1').style.background = '';
            imagmovi0.src = '';
            imagmovi1.src = '';
            imagmovi2.src = '';
            imagmovi3.src = '';
            imagmovi4.src = '';

            imagmovi5.src = '';
            imagmovi6.src = '';
            imagmovi7.src = '';
            imagmovi8.src = '';
            imagmovi9.src = '';
            imagfranquicias.src='';
            imgofertas.src='';
            
            imagmovi0.style.visibility='hidden';
            imagmovi1.style.visibility='hidden';
            imagmovi2.style.visibility='hidden';
            imagmovi3.style.visibility='hidden';
            imagmovi4.style.visibility='hidden';

            imagmovi5.style.visibility='hidden';
            imagmovi6.style.visibility='hidden';
            imagmovi7.style.visibility='hidden';
            imagmovi8.style.visibility='hidden';
            imagmovi9.style.visibility='hidden';
            
            imagfranquicias.style.visibility='hidden';
            imgofertas.style.visibility='hidden';

            switch (document.getElementById("ctl00_label_modu").innerHTML) {
                case "CENAN":
                	mensusualogn.innerHTML = 'Bienvenido a Central de Angeles';
                    break;
                case "MVCAN":
                	mensusualogn.innerHTML = 'Bienvenido a Flotillas Central de Angeles';
                    break;
                case "TAXPL":
                	mensusualogn.innerHTML = 'Bienvenido al Sistema de Rastreo del Sindicato de Taxistas de Playa del Carmen';
                    break;
                case "TAXCC":
                    mensusualogn.innerHTML = 'Bienvenido al Sistema de Rastreo de Taxistas de Cancún';
                    break;
                case "MOVIS":
                    mensusualogn.innerHTML = 'Bienvenido a la Central de Ángeles de Movistar';
                    break;
            }

        } else {

            document.getElementById('ctl00_Panl1').style.background = "background-image: url('imagenes/imagmast.gif') no-repeat";

            switch (document.getElementById("ctl00_label_modu").innerHTML) 
            {
                case "CENAN":
                    imagmovi0.src = 'imagenes/imagmovi.gif';
                    imagmovi1.src = 'imagenes/imagmovi.gif';
                    imagmovi2.src = 'imagenes/imagmovi.gif';
                    imagmovi3.src = 'imagenes/imagmovi.gif';
                    imagmovi4.src = 'imagenes/imagmovi.gif';

                    imagmovi5.src = 'imagenes/imagmovi.gif';
                    imagmovi6.src = 'imagenes/imagmovi.gif';
                    imagmovi7.src = 'imagenes/imagmovi.gif';
                    imagmovi8.src = 'imagenes/imagmovi.gif';
                    imagmovi9.src = 'imagenes/imagmovi.gif';
                    imgofertas.src='imagenes/oferta.gif';
                    imagfranquicias.src='imagenes/franquicias-disponibles-ani.gif';


                    break;
                case "MVCAN":
                    imagmovi0.src = 'imagenes/imagmovi.gif';
                    imagmovi1.src = 'imagenes/imagmovi.gif';
                    imagmovi2.src = 'imagenes/imagmovi.gif';
                    imagmovi3.src = 'imagenes/imagmovi.gif';
                    imagmovi4.src = 'imagenes/imagmovi.gif';

                    imagmovi5.src = 'imagenes/imagmovi.gif';
                    imagmovi6.src = 'imagenes/imagmovi.gif';
                    imagmovi7.src = 'imagenes/imagmovi.gif';
                    imagmovi8.src = 'imagenes/imagmovi.gif';
                    imagmovi9.src = 'imagenes/imagmovi.gif';
                    imgofertas.src='imagenes/oferta.gif';
                    imagfranquicias.src='imagenes/franquicias-disponibles-ani.gif';


                    break;
                case "TAXPL":
                    imagmovi0.src = 'imagenes/imagmovitaxpl.gif';
                    imagmovi1.src = 'imagenes/imagmovitaxpl.gif';
                    imagmovi2.src = 'imagenes/imagmovitaxpl.gif';
                    imagmovi3.src = 'imagenes/imagmovitaxpl.gif';
                    imagmovi4.src = 'imagenes/imagmovitaxpl.gif';

                    imagmovi5.src = 'imagenes/imagmovitaxpl.gif';
                    imagmovi6.src = 'imagenes/imagmovitaxpl.gif';
                    imagmovi7.src = 'imagenes/imagmovitaxpl.gif';
                    imagmovi8.src = 'imagenes/imagmovitaxpl.gif';
                    imagmovi9.src = 'imagenes/imagmovitaxpl.gif';
                    imgofertas.src='imagenes/oferta-blanco.gif';
                    imagfranquicias.src='imagenes/franquicias-blanco.gif';


                    break;
                case "TAXCC":
                    imagmovi0.src = 'imagenes/coche_taxcc.gif';
                    imagmovi1.src = 'imagenes/coche_taxcc.gif';
                    imagmovi2.src = 'imagenes/coche_taxcc.gif';
                    imagmovi3.src = 'imagenes/coche_taxcc.gif';
                    imagmovi4.src = 'imagenes/coche_taxcc.gif';

                    imagmovi5.src = 'imagenes/coche_taxcc.gif';
                    imagmovi6.src = 'imagenes/coche_taxcc.gif';
                    imagmovi7.src = 'imagenes/coche_taxcc.gif';
                    imagmovi8.src = 'imagenes/coche_taxcc.gif';
                    imagmovi9.src = 'imagenes/coche_taxcc.gif';
                    imgofertas.src = 'imagenes/oferta-blanco.gif';
                    imagfranquicias.src = 'imagenes/franquicias-blanco.gif';


                    break;
                case "MOVIS":
                    imagmovi0.src = 'imagenes/imagmovi_movis.gif';
                    imagmovi1.src = 'imagenes/imagmovi_movis.gif';
                    imagmovi2.src = 'imagenes/imagmovi_movis.gif';
                    imagmovi3.src = 'imagenes/imagmovi_movis.gif';
                    imagmovi4.src = 'imagenes/imagmovi_movis.gif';

                    imagmovi5.src = 'imagenes/imagmovi_movis.gif';
                    imagmovi6.src = 'imagenes/imagmovi_movis.gif';
                    imagmovi7.src = 'imagenes/imagmovi_movis.gif';
                    imagmovi8.src = 'imagenes/imagmovi_movis.gif';
                    imagmovi9.src = 'imagenes/imagmovi_movis.gif';
                    imgofertas.src='imagenes/oferta_MOVIS.gif';
                    imagfranquicias.src='imagenes/franquicias-blanco.gif';

                    break;
            }

            imagmovi0.style.visibility='visible';
            imagfranquicias.style.visibility='visible';
            imgofertas.style.visibility='visible';

            mensusualogn.innerHTML = '';
        }

        var agt = navigator.userAgent.toLowerCase();
        var is_ie = (agt.indexOf("msie") != -1);
        if (!is_ie) {
            document.getElementById("paginaweb").style.visibility = 'hidden';
        }

       PoneScroll();
 
    }

    function inic_pais() {
        switch (document.getElementById("ctl00_label_modu").innerHTML) {
        case "CENAN":
            document.title = 'Central de Angeles';

            document.getElementById("imgn_logoempr").src = "imagenes/logoempr.gif"
            document.getElementById("imgn_logoempr").alt = "Central de Angeles"
            document.getElementById("href_logoempr").href = "http://www.centraldeangeles.com/";

            document.getElementById("href_ligas_01").href = "http://maps.google.com/maps?hl=en&tab=wl";
            document.getElementById("ctl00_ligas_01").src = "Imagenes/Googlemaps.gif";
            document.getElementById("ctl00_ligas_01").alt = "Google Maps";

            document.getElementById("href_ligas_02").href = "http://earth.google.com/";
            document.getElementById("ctl00_ligas_02").src = "Imagenes/Googleearth.gif";
            document.getElementById("ctl00_ligas_02").alt = "Google Earth";

            document.getElementById("href_ligas_03").href = "http://www.adobe.com/products/acrobat/readstep2.html";
            document.getElementById("ctl00_ligas_03").src = "Imagenes/Adobereader.gif";
            document.getElementById("ctl00_ligas_03").alt = "Adobe Reader";

            document.getElementById("href_ligas_04").href = "http://www.df.gob.mx/";
            document.getElementById("ctl00_ligas_04").src = "Imagenes/DFGob.gif";
            document.getElementById("ctl00_ligas_04").alt = "Gobierno del DF";

            document.getElementById("href_ligas_05").href = "http://www.edomex.gob.mx";
            document.getElementById("ctl00_ligas_05").src = "Imagenes/EDOMEXGob.gif";
            document.getElementById("ctl00_ligas_05").alt = "Gobierno del Edo. de México";

            document.getElementById("href_ligas_06").href = "http://www.locatel.df.gob.mx/";
            document.getElementById("ctl00_ligas_06").src = "Imagenes/locatel.gif";
            document.getElementById("ctl00_ligas_06").alt = "Locatel";

            document.getElementById("href_ligas_07").href = "http://www.ssp.gob.mx";
            document.getElementById("ctl00_ligas_07").src = "Imagenes/ssp.gif";
            document.getElementById("ctl00_ligas_07").alt = "SSP Federal";

            document.getElementById("href_ligas_08").href = "http://portal.ssp.df.gob.mx/Portal/Contactanos/";
            document.getElementById("ctl00_ligas_08").src = "Imagenes/sspdf.gif";
            document.getElementById("ctl00_ligas_08").alt = "SSP DF";
            break;
        case "MVCAN":
            document.title = 'Flotillas Central de Angeles';

            document.getElementById("imgn_logoempr").src = "imagenes/logoempr.gif"
            document.getElementById("imgn_logoempr").alt = "Flotillas Central de Angeles"
            document.getElementById("href_logoempr").href = "http://www.flotillas.centraldeangeles.com/";

            document.getElementById("href_ligas_01").href = "http://maps.google.com/maps?hl=en&tab=wl";
            document.getElementById("ctl00_ligas_01").src = "Imagenes/Googlemaps.gif";
            document.getElementById("ctl00_ligas_01").alt = "Google Maps";

            document.getElementById("href_ligas_02").href = "http://earth.google.com/";
            document.getElementById("ctl00_ligas_02").src = "Imagenes/Googleearth.gif";
            document.getElementById("ctl00_ligas_02").alt = "Google Earth";

            document.getElementById("href_ligas_03").href = "http://www.adobe.com/products/acrobat/readstep2.html";
            document.getElementById("ctl00_ligas_03").src = "Imagenes/Adobereader.gif";
            document.getElementById("ctl00_ligas_03").alt = "Adobe Reader";

            document.getElementById("href_ligas_04").href = "http://www.df.gob.mx/";
            document.getElementById("ctl00_ligas_04").src = "Imagenes/DFGob.gif";
            document.getElementById("ctl00_ligas_04").alt = "Gobierno del DF";

            document.getElementById("href_ligas_05").href = "http://www.edomex.gob.mx";
            document.getElementById("ctl00_ligas_05").src = "Imagenes/EDOMEXGob.gif";
            document.getElementById("ctl00_ligas_05").alt = "Gobierno del Edo. de México";

            document.getElementById("href_ligas_06").href = "http://www.locatel.df.gob.mx/";
            document.getElementById("ctl00_ligas_06").src = "Imagenes/locatel.gif";
            document.getElementById("ctl00_ligas_06").alt = "Locatel";

            document.getElementById("href_ligas_07").href = "http://www.ssp.gob.mx";
            document.getElementById("ctl00_ligas_07").src = "Imagenes/ssp.gif";
            document.getElementById("ctl00_ligas_07").alt = "SSP Federal";

            document.getElementById("href_ligas_08").href = "http://portal.ssp.df.gob.mx/Portal/Contactanos/";
            document.getElementById("ctl00_ligas_08").src = "Imagenes/sspdf.gif";
            document.getElementById("ctl00_ligas_08").alt = "SSP DF";
            break;
        case "TAXPL":
            document.title = 'Sindicato de Taxistas de Playa del Carmen';

            document.getElementById("imgn_logoempr").src = "imagenes/taxpl_logo.gif"
            document.getElementById("imgn_logoempr").alt = "Sindicato de Taxistas de Playa del Carmen"
            document.getElementById("href_logoempr").href = "http://www.centraldeangeles.com/default_taxpl.aspx";

            document.getElementById("href_ligas_01").href = "http://www.qroo.gob.mx/qroo/index.php";
            document.getElementById("ctl00_ligas_01").src = "Imagenes/quintana_roo_logo.gif";
            document.getElementById("ctl00_ligas_01").alt = "Gobierno de Quintana Roo";

            document.getElementById("href_ligas_02").href = "http://www.solidaridad.gob.mx/";
            document.getElementById("ctl00_ligas_02").src = "Imagenes/solidaridad_logo.gif";
            document.getElementById("ctl00_ligas_02").alt = "Ayuntamiento de Solidaridad";

            document.getElementById("href_ligas_03").href = "http://www.cancun.gob.mx/cancun/index.php";
            document.getElementById("ctl00_ligas_03").src = "Imagenes/cancun_logo.gif";
            document.getElementById("ctl00_ligas_03").alt = "Ayuntamiento de Cancún";

            document.getElementById("href_ligas_04").href = "http://www.df.gob.mx/";
            document.getElementById("ctl00_ligas_04").src = "Imagenes/DFGob.gif";
            document.getElementById("ctl00_ligas_04").alt = "Gobierno del DF";

            document.getElementById("href_ligas_05").href = "http://www.edomex.gob.mx";
            document.getElementById("ctl00_ligas_05").src = "Imagenes/EDOMEXGob.gif";
            document.getElementById("ctl00_ligas_05").alt = "Gobierno del Edo. de México";

            document.getElementById("href_ligas_06").href = "http://www.locatel.df.gob.mx/";
            document.getElementById("ctl00_ligas_06").src = "Imagenes/locatel.gif";
            document.getElementById("ctl00_ligas_06").alt = "Locatel";

            document.getElementById("href_ligas_07").href = "http://www.ssp.gob.mx";
            document.getElementById("ctl00_ligas_07").src = "Imagenes/ssp.gif";
            document.getElementById("ctl00_ligas_07").alt = "SSP Federal";

            document.getElementById("href_ligas_08").href = "http://portal.ssp.df.gob.mx/Portal/Contactanos/";
            document.getElementById("ctl00_ligas_08").src = "Imagenes/sspdf.gif";
            document.getElementById("ctl00_ligas_08").alt = "SSP DF";
            break;
        case "TAXCC":
            document.title = 'Taxistas de Cancún';

            document.getElementById("imgn_logoempr").src = "imagenes/logologoempr_taxcc.gif"
            document.getElementById("imgn_logoempr").alt = "Taxistas de Cancún"
            document.getElementById("href_logoempr").href = "http://www.centraldeangeles.com/default_taxcc.aspx";

            document.getElementById("href_ligas_01").href = "http://www.qroo.gob.mx/qroo/index.php";
            document.getElementById("ctl00_ligas_01").src = "Imagenes/quintana_roo_logo.gif";
            document.getElementById("ctl00_ligas_01").alt = "Gobierno de Quintana Roo";

            document.getElementById("href_ligas_02").href = "http://www.solidaridad.gob.mx/";
            document.getElementById("ctl00_ligas_02").src = "Imagenes/solidaridad_logo.gif";
            document.getElementById("ctl00_ligas_02").alt = "Ayuntamiento de Solidaridad";

            document.getElementById("href_ligas_03").href = "http://www.cancun.gob.mx/cancun/index.php";
            document.getElementById("ctl00_ligas_03").src = "Imagenes/cancun_logo.gif";
            document.getElementById("ctl00_ligas_03").alt = "Ayuntamiento de Cancún";

            document.getElementById("href_ligas_04").href = "http://www.df.gob.mx/";
            document.getElementById("ctl00_ligas_04").src = "Imagenes/DFGob.gif";
            document.getElementById("ctl00_ligas_04").alt = "Gobierno del DF";

            document.getElementById("href_ligas_05").href = "http://www.edomex.gob.mx";
            document.getElementById("ctl00_ligas_05").src = "Imagenes/EDOMEXGob.gif";
            document.getElementById("ctl00_ligas_05").alt = "Gobierno del Edo. de México";

            document.getElementById("href_ligas_06").href = "http://www.locatel.df.gob.mx/";
            document.getElementById("ctl00_ligas_06").src = "Imagenes/locatel.gif";
            document.getElementById("ctl00_ligas_06").alt = "Locatel";

            document.getElementById("href_ligas_07").href = "http://www.ssp.gob.mx";
            document.getElementById("ctl00_ligas_07").src = "Imagenes/ssp.gif";
            document.getElementById("ctl00_ligas_07").alt = "SSP Federal";

            document.getElementById("href_ligas_08").href = "http://portal.ssp.df.gob.mx/Portal/Contactanos/";
            document.getElementById("ctl00_ligas_08").src = "Imagenes/sspdf.gif";
            document.getElementById("ctl00_ligas_08").alt = "SSP DF";
            break;
        case "MOVIS":
            document.title = 'Central de Angeles de Movistar';

            document.getElementById("imgn_logoempr").src = "imagenes/movis_logo.gif"
            document.getElementById("imgn_logoempr").alt = "Central de Angeles de Movistar"
            document.getElementById("href_logoempr").href = "http://www.centraldeangeles.com/default_MOVIS.aspx";

            document.getElementById("href_ligas_01").href = "http://maps.google.com/maps?hl=en&tab=wl";
            document.getElementById("ctl00_ligas_01").src = "Imagenes/Googlemaps.gif";
            document.getElementById("ctl00_ligas_01").alt = "Google Maps";

            document.getElementById("href_ligas_02").href = "http://earth.google.com/";
            document.getElementById("ctl00_ligas_02").src = "Imagenes/Googleearth.gif";
            document.getElementById("ctl00_ligas_02").alt = "Google Earth";

            document.getElementById("href_ligas_03").href = "http://www.adobe.com/products/acrobat/readstep2.html";
            document.getElementById("ctl00_ligas_03").src = "Imagenes/Adobereader.gif";
            document.getElementById("ctl00_ligas_03").alt = "Adobe Reader";

            document.getElementById("href_ligas_04").href = "http://www.df.gob.mx/";
            document.getElementById("ctl00_ligas_04").src = "Imagenes/DFGob.gif";
            document.getElementById("ctl00_ligas_04").alt = "Gobierno del DF";

            document.getElementById("href_ligas_05").href = "http://www.edomex.gob.mx";
            document.getElementById("ctl00_ligas_05").src = "Imagenes/EDOMEXGob.gif";
            document.getElementById("ctl00_ligas_05").alt = "Gobierno del Edo. de México";

            document.getElementById("href_ligas_06").href = "http://www.locatel.df.gob.mx/";
            document.getElementById("ctl00_ligas_06").src = "Imagenes/locatel.gif";
            document.getElementById("ctl00_ligas_06").alt = "Locatel";

            document.getElementById("href_ligas_07").href = "http://www.ssp.gob.mx";
            document.getElementById("ctl00_ligas_07").src = "Imagenes/ssp.gif";
            document.getElementById("ctl00_ligas_07").alt = "SSP Federal";

            document.getElementById("href_ligas_08").href = "http://portal.ssp.df.gob.mx/Portal/Contactanos/";
            document.getElementById("ctl00_ligas_08").src = "Imagenes/sspdf.gif";
            document.getElementById("ctl00_ligas_08").alt = "SSP DF";
            break;
    }
        document.getElementById("ctl00_ligas_01").style.visibility = 'visible';
        document.getElementById("ctl00_ligas_02").style.visibility = 'visible';
        document.getElementById("ctl00_ligas_03").style.visibility = 'visible';
        document.getElementById("ctl00_ligas_04").style.visibility = 'visible';
        document.getElementById("ctl00_ligas_05").style.visibility = 'visible';
        document.getElementById("ctl00_ligas_06").style.visibility = 'visible';
        document.getElementById("ctl00_ligas_07").style.visibility = 'visible';
        document.getElementById("ctl00_ligas_08").style.visibility = 'visible';
    }

    function inic_baner() {
        var nombusuamast = mastnombusua();
        if (nombusuamast.length > 0) {
            var divpanel1 = document.getElementById('ctl00_Panl1');
            divpanel1.style.background = '';
            switch (document.getElementById("ctl00_label_modu").innerHTML) 
            {
            case "CENAN":
                TituLetEsc("Bienvenido: " + nombusuamast + " a Central de Angeles", "mensaje");
                break;
            case "MVCAN":
                TituLetEsc("Bienvenido: " + nombusuamast + " a Flotillas Central de Angeles", "mensaje");
                break;
            case "TAXPL":
                TituLetEsc("Bienvenido: " + nombusuamast + " al Sindicato de Taxistas de Playa del Carmen", "mensaje");
                break;
            case "TAXCC":
                TituLetEsc("Bienvenido: " + nombusuamast + " al sitio de Taxistas de Cancún", "mensaje");
                break;
            case "MOVIS":
                TituLetEsc("Bienvenido: " + nombusuamast + " al sitio de Central de Ángeles de Movistar", "mensaje");
                break;
        }
        } else {
            switch (document.getElementById("ctl00_label_modu").innerHTML) {
                case "CENAN":
                    TituLetEsc("El rastreador debe ser operado por ti mismo para que no pierdas privacidad ni te pongas en situación de riesgo.            ", "mensaje");
                    break;
                case "MVCAN":
                    TituLetEsc("En flotillas el rastreador debe ser operado por ti mismo para que no pierdas privacidad ni te pongas en situación de riesgo.            ", "mensaje");
                    break;
                case "TAXPL":
                    TituLetEsc("En la modernización del sindicato estamos comprometidos.            ", "mensaje");
                    break;
                case "TAXCC":
                    TituLetEsc("En la modernización los Taxistas de Cancún estamos comprometidos.            ", "mensaje");
                    break;
                case "MOVIS":
                    TituLetEsc("Movistar te cuida a ti y a tu patrimonio.            ", "mensaje");
                    break;
            }
        }
    }
    //fin de funciones del menu

    //Esta función busca el nombre del usuario del asp net
    function mastnombusua() {
        if (document.getElementById("ctl00_MasterLoginView_MasterLoginName") == null) {
            return '';
        } else {
            return document.getElementById("ctl00_MasterLoginView_MasterLoginName").innerHTML;
        }
    }


    function ContarCaracteres(txt) {
        Nobjeto = BuscaObjeto('TotaCaracters')
        objeto = document.getElementById(Nobjeto);
        objeto.value = (150 - txt.value.length)
    }

    function checkTextAreaMaxLength(textBox, e, length) {
        var mLen = textBox["MaxLength"];
        var te = textBox;
        if (null == mLen)
            mLen = length;

        var maxLength = parseInt(mLen);
        if (!checkSpecialKeys(e)) {
            if (textBox.value.length > maxLength - 1) {
                if (window.event)
                    e.returnValue = false;
                else
                    e.preventDefault();
            }
        }
    }

    function quitaacentos(t) {
        á = "a"; é = "e"; í = "i"; ó = "o"; ú = "u"; ñ = "n"; ä = "a"; ë = "e"; ï = "i"; ö = "o"; ü = "u"; Á = "A"; É = "E"; Í = "I"; Ó = "O"; Ú = "U"; Ñ = "N"; Ä = "A"; Ë = "E"; Ï = "I"; Ö = "O"; Ü = "U"
        acentos = /[áéíóúñäëïöüÁÉÍÓÚÑÄËÏÖÜ]/g;
        return t.replace(acentos,
        function($1) {
            return eval($1)
        }
        )
    }

    function Reem_acentos(textbox) {
        textbox.value = quitaacentos(textbox.value);
        var texto = textbox.value;
        textbox.value = texto.replace("'", "");
    }

    function checkSpecialKeys(e) {
        if (e.keyCode != 8 && e.keyCode != 46 && e.keyCode != 37 && e.keyCode != 38 && e.keyCode != 39 && e.keyCode != 40)
            return false;
        else
            return true;
    }  
