function chk(){

var d, ts, bs

if (getNav2().indexOf('Internet Explorer')!=-1) {

    d = document.getElementById("tbppal")
    ts = d.offsetTop-4
    bs = 4
    d.style.height = document.documentElement.clientHeight - ts - bs
    
    document.getElementById("cab_content").style.height = document.documentElement.clientHeight - ts - bs - 140
}        
}

function menuOver(obj) {

    obj.className = 'a_menu_derecho_over'
    
}

function menuOut(obj) {

    obj.className = 'a_menu_derecho_out'

}

function menuOverM(obj) {

    obj.style.color = 'black'
    obj.style.textDecoration = 'underline'
    
}

function menuOutM(obj) {

    obj.style.color = ''
    obj.style.textDecoration = ''

}

function menuOverA(obj) {

    obj.style.color = 'darkred'
    
}

function menuOutA(obj) {

    obj.style.color = 'black'

}

function formatModelLink() {

    for ( var i = 0 ; i < document.all.length ; i++ ) {

        if ( document.all[i].className == 'modelClassLink' ) {
            document.all[i].onmouseover = function () { menuOverM(this) }
            document.all[i].onmouseout = function () { menuOutM(this) }
        }
    }    

}

function formatMenuRight() {

if (getNav2().indexOf('Internet Explorer')!=-1) {

    for ( var i = 0 ; i < document.all.length ; i++ ) {

        if ( document.all[i].id.substr (0,10) == 'link_right' ) {
            document.all[i].onmouseover = function () { menuOver(this) }
            document.all[i].onmouseout = function () { menuOut(this) }
        }

        if ( document.all[i].id.substr (0,13) == 'ancla_negrita' ) {
            document.all[i].onmouseover = function () { menuOverA(this) }
            document.all[i].onmouseout = function () { menuOutA(this) }
        }
        
    }


    chk (); 
}else{
    document.getElementById("tbppal").width = 1024
    document.getElementById("table_top").width = 1024
    document.getElementById("cab_content").noWrap = ""
    document.getElementById("menu_der").noWrap = ""
    document.getElementById("sep_content_menu").width = 400
    document.getElementById("tb_1").width = 800
    document.getElementById("tb_menu").width = 170
}

}

function getNav2() {
	var a = navigator.appVersion.split(';')
	var version = ''

	for (var i=0;i<a.length;i++) {	
		if (a[i].substr(1,4)=='MSIE') version = ' ' + a[i].substring(6)
}

return navigator.appName + version
}

function gcl() {

    google.load("maps", "2");

    google.setOnLoadCallback(function() {
        if (google.loader.ClientLocation) {
            var cl = google.loader.ClientLocation;
            $.ajax({
                url: "guarda_gcl.asp",
                data: "city=" + cl.address.city + "&region=" + cl.address.region + "&country=" + cl.address.country
            })
        }
    });

}