        var ServerPath = "";

        /*********************************************
        Setea cookies
        ******************/

        function setCookie(name, value, expires, path, domain, secure) {
             var curCookie = name + "=" + escape(value) +
             ((expires) ? "; expires=" + expires.toGMTString() : "") +
             ((path) ? "; path=" + path : "") +
             ((domain) ? "; domain=" + domain : "") +
             ((secure) ? "; secure" : "")
             document.cookie = curCookie
        }

        /*********************************************
        Abre por unica vez un popup en el Home
        ******************/

        function popUpHome(dirurl,largo,alto) {
                offset = document.cookie.indexOf('HomePagePopup')
                if (offset == "-1") {
                    newWindowHome = window.open(dirurl,'HomePopup','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width='+largo+',height='+alto+',left=125,top=150');
                    newWindowHome.focus();
                    setCookie('HomePagePopup', '1');
                }
        }

        /**********************************************
        Imprime un Artículo
        *******************/

        function ImpArt(url,SitioNombre) {

            var nav=navigator.appVersion;
            var alto = 450;
            var largo = 660;
            var where = (ServerPath?ServerPath:"../")+"chatran/popup/imprimirarticulo.php?url="+url+"&SitioNombre="+SitioNombre;
            if ((nav.indexOf("MSIE 5.")>-1 || nav.indexOf("MSIE 6.")>-1) && nav.indexOf("Windows")>1) {
                   showModalDialog(where,"","dialogHeight:"+alto+"px; dialogWidth: "+largo+"px; center: Yes; help: No; resizable: No; scrollbars: Yes; status: No");
                   //window.open(where,"foto","resizable=0,status=1,toolbars=1,scrollbars=yes,width="+largo+",height="+alto+",left=0,top=0,center=1")

            } else { window.open(where,"foto","resizable=0,status=0,scrollbars=yes,width="+largo+",height="+alto+",left=0,top=0,center=1")
                   }
        }

        /**********************************************
        Envíar una Artículo
        *******************/

        function EnvArt(url,SitioNombre) {
            var nav=navigator.appVersion;
            var alto = 250;
            var largo = 280;
            var where = (ServerPath?ServerPath:"../")+"chatran/popup/enviararticulo.php?url="+url+"&SitioNombre="+SitioNombre;
            if ((nav.indexOf("MSIE 5.")>-1 || nav.indexOf("MSIE 6.")>-1) && nav.indexOf("Windows")>1) {
                   //window.open(where,"foto","resizable=0,status=0,scrollbars=yes,width="+largo+",height="+alto+",left=0,top=0,center=1")
                   showModalDialog(where,"","dialogHeight:"+alto+"px; dialogWidth: "+largo+"px; center: Yes; help: No; resizable: No; scrollbars: Yes; status: No");
            } else { window.open(where,"foto","resizable=0,status=0,scrollbars=yes,width="+largo+",height="+alto+",left=0,top=0,center=1")
                   }
        }

        /**********************************************
        Abre un popup general
        *******************/

        function PopUp(url,nombre,largo,alto) {

              var nav=navigator.appVersion;
              if ((nav.indexOf("MSIE 5.")>-1 || nav.indexOf("MSIE 6.")>-1) && nav.indexOf("Windows")>1) {
                   showModalDialog(url,nombre,"dialogHeight:"+alto+"px; dialogWidth: "+largo+"px; center: Yes; help: No; resizable: No; scrollbars: Yes; status: No");
                   //window.open(where,"foto","resizable=0,status=0,scrollbars=yes,width="+largo+",height="+alto+",left=0,top=0,center=1")
              } else {
                   window.open(url,nombre,"resizable=0,status=0,scrollbars=yes,width="+largo+",height="+alto+",left=0,top=0,center=1")
              }
        }

        /**********************************************
        Abre el popup para ver las fotos ampliadas
        *******************/

        function VerFoto(alto,largo,img,Sitio,tam) {

              var alto = (screen.height<alto?screen.height-40:alto)+30;
              var largo = (screen.width<largo?screen.width:largo);
              var url = (ServerPath?ServerPath:"../")+"chatran/popup/verfoto.php?img="+img+"&Sitio="+Sitio+( tam ? "&tam="+tam : "" );

              PopUp(url,"foto",largo,alto);
        }

        /**********************************************
        Para hacer el efecto de botones sobre fondo
        *******************/

        var image = new Image();

        function precargar (imagen) {
        image.src = imagen;
        }

        function Ir(url)
        {
        location.href = url;
        }

        function _over(obj) {
        obj.style.cursor = 'hand';
        obj.background = image.src;
        }

        function _out(obj,orimag) {
        obj.background = orimag;
        }

        function _overcolor(obj,color) {
        obj.style.cursor = 'hand';
        obj.style.background = color;
        }

        function _outcolor(obj,color) {
        obj.style.background = (color?color:"");
        }

        function _cf (obj,clase) {
        obj.className = clase;
        }

        /**********************************************
        Variables fechas
        *******************/

        var weekdays=new Array(6);
        var months=new Array(11);
        var today=new Date();
        var month = today.getMonth();
        var date = today.getDate();
        var weekday = today.getDay();
        var year = today.getYear();

        if(year<=99){year=year+1900;}today=null;

        function galeria(foto,IdItem,SitioNombre,total) {

              var nav=navigator.appVersion;
              var where = (ServerPath?ServerPath:"../")+"dv/galeria.php?foto="+foto+"&IdItem="+IdItem+"&SitioNombre="+SitioNombre+"&total="+total;
              if ((nav.indexOf("MSIE 5.")>-1 || nav.indexOf("MSIE 6.")>-1) && nav.indexOf("Windows")>1)
              {
                   showModalDialog(where,"","dialogHeight: 460 px; dialogWidth: 755 px; center: Yes; help: No; resizable: No; scrollbars: Yes; status: No");
                 //     window.open(where,"foto","resizable=0,status=1,scrollbars=yes,width=755,height=460,left=0,top=0,center=1")

              }
              else
              {
                   window.open(where,"foto","resizable=0,status=0,scrollbars=yes,width=755,height=460,left=0,top=0,center=1")
              }
        }

        weekdays["0 1"] = "Domingo";    weekdays["0 2"] = "Sunday";
        weekdays["1 1"] = "Lunes";      weekdays["1 2"] = "Monday";
        weekdays["2 1"] = "Martes";     weekdays["2 2"] = "Tuesday";
        weekdays["3 1"] = "Miércoles";  weekdays["3 2"] = "Wednesday";
        weekdays["4 1"] = "Jueves";     weekdays["4 2"] = "Thursday";
        weekdays["5 1"] = "Viernes";    weekdays["5 2"] = "Friday";
        weekdays["6 1"] = "Sábado";     weekdays["6 2"] = "Saturday";

        months["0 1"]  = "Enero";       months["0 2"]  = "January";
        months["1 1"]  = "Febrero";     months["1 2"]  = "February";
        months["2 1"]  = "Marzo";       months["2 2"]  = "March";
        months["3 1"]  = "Abril";       months["3 2"]  = "April";
        months["4 1"]  = "Mayo";        months["4 2"]  = "May";
        months["5 1"]  = "Junio";       months["5 2"]  = "June";
        months["6 1"]  = "Julio";       months["6 2"]  = "July";
        months["7 1"]  = "Agosto";      months["7 2"]  = "August";
        months["8 1"]  = "Septiembre";  months["8 2"]  = "September";
        months["9 1"]  = "Octubre";     months["9 2"]  = "October";
        months["10 1"] = "Noviembre";   months["10 2"] = "November";
        months["11 1"] = "Diciembre";   months["11 2"] = "December";