﻿// JScript File

 function visibleDiv(_d)
        {
            try{
            var _x = document.getElementById(_d);
            _x.style.display= _x.style.display=="none"?"block":"none";
            
            }
            catch(err){
             return;
             }
        }
          function visibleDivRatingMapa(_d)
        {
            try{
            var _x = document.getElementById(_d);
            if(_x.style.display=="none")
             {
                return;
             }
             else
             {
                 _x.style.display= _x.style.display=="none"?"block":"none";
             
             }
            }
            catch(err){
             return;
             }
        }
        function turnArrow(_d)
        {
            try{
            var _x = document.getElementById(_d);
            _x.className = _x.className =="bk_ayuda_pliega"?"bk_ayuda_despliega":"bk_ayuda_pliega";
            }
            catch(err){
            return;
            }
        }
        function returnListados()
        {        
            window.location = "Listados.aspx";
        }

        
        


function OcultaDivs()
{
    
        var elemento = document.getElementById('divTransparencia');
            var elementoDonde = document.getElementById('divFormulario');
            try{
                document.getElementById('bodyMaster').style.overflow = "scroll";               
                document.getElementById('divFormulario').style.height = "0px";
                document.getElementById('tblform').style.display = "none";            
                document.getElementById('divTransparencia').style.height = "0px";                
                elemento.style.visibility = 'hidden';
                elementoDonde.style.visibility = 'hidden';
                
            } catch(e){}
    visibleDivRatingMapa('tdMapa');
}

function MuestraResena()
    {
          
         var offsetTrail = document.getElementById('anComent');
            var offsetLeft = 0;
            var offsetTop = 0;
            while (offsetTrail) {
            offsetLeft += offsetTrail.offsetLeft;
            offsetTop += offsetTrail.offsetTop;
            offsetTrail = offsetTrail.offsetParent;
            }
            if (navigator.userAgent.indexOf("Mac") != -1 && typeof document.body.leftMargin != "undefined" && navigator.appName=="Microsoft Internet Explorer" ) {
            offsetLeft += parseInt(document.body.leftMargin);
            offsetTop += parseInt(document.body.topMargin);
            }
            window.scrollTo(offsetLeft,offsetTop)
            window.location.href = "#Comentario";
        document.getElementById('divCommet').style.display = "block";
    }
     function setLanguage(lang)
        {
            document.getElementById('languageSelector').value = lang;
            document.forms[0].submit();
        }
        function returnListados()
        {        
            window.location = "Listados.aspx";
        }
        
        
         function visibleDiv(_d)
        {
            try{
            var _x = document.getElementById(_d);
            _x.style.display= _x.style.display=="none"?"block":"none";
            }
            catch(err){
             return;
             }
        }
        

    
    function redirectMap(){
         mapa.click();
    }
    
    function goMap()
    {
        window.location.href = "#TblMapa";
    }
    function MuestraComments()
    {
         window.location.href = "#liscomentarios";
        
    }
    
    function popitup(url) 
    {
    
        if(url == "LlamaGratis.aspx")
        {
            var opciones="toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, width=570, height=305, top=85, left=140";
            window.open(url,"",opciones);
        }
        else
        {
            var opciones="toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width=250, height=310";
            window.open(url,"",opciones);
        }
	    
    }



