function mapa_escala2(){
var version = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
var winH2
var winW2
if (parseInt(navigator.appVersion)>3) { 
	if (navigator.appName=="Netscape") { 
		winW2 = window.innerWidth-40; 
		winH2 = window.innerHeight; 
	} 
	if (navigator.appName.indexOf("Microsoft")!=-1) { 
		winW2 = document.body.offsetWidth; 
		winH2 = document.body.offsetHeight; 
	} 
	if (version != null && Number(version[1]) <= 5.5) {
		winW2 = document.body.offsetWidth-40; 
	}
} 
	var ancho=winW2-230;
	var alto=ancho/1.55;
	if (document.getElementById('contenedorMapa')){	
		document.getElementById('contenedorMapa').style.width=ancho+'px';
		document.getElementById('contenedorMapa').style.height=alto+'px';
	}
	if (document.getElementById('BUSQUEDAPROX')){	
		document.getElementById('BUSQUEDAPROX').style.width=ancho+'px';
	}
	if (document.getElementById('RESULPROX')){
		document.getElementById('RESULPROX').style.width=ancho+'px';
	}
}

function capabusqueda(alto,muestra){
	if (document.getElementById('RESULPROX')){
		document.getElementById('RESULPROX').style.height=alto+'px';
		document.getElementById('RESULPROX').style.display=muestra;
	}
	var version = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
	if (parseInt(navigator.appVersion)>3) { 
		if (navigator.appName=="Netscape") { 
			winW = window.innerWidth-50; 
			winH = window.innerHeight; 
		} 
		if (navigator.appName.indexOf("Microsoft")!=-1) { 
			winW = document.body.offsetWidth; 
			winH = document.body.offsetHeight; 
		} 
		if (version != null && Number(version[1]) <= 5.5) {
			winW = document.body.offsetWidth-40; 
		}
	} 
	var ancho=winW-185;
	var alto=ancho/1.55;
	if (document.getElementById('RESULPROX')){
		document.getElementById('RESULPROX').style.width=ancho+'px';
	}
}

function recargar(){	
	var anchonuevo;
	if (parseInt(navigator.appVersion)>3) {
		var winW;
		var winH;
		if (navigator.appName=="Netscape") {
			winW = window.innerWidth - 50;
			winH = window.innerHeight;
		}
		if (navigator.appName=="Opera") {
			winH = document.body.clientHeight;
			winW = document.body.clientWidth;
		}
		if (navigator.appName.indexOf("Microsoft")!=-1) {
			winW = document.body.offsetWidth;
			winH = document.body.offsetHeight;
		}
	}
	anchonuevo = Math.round (winW - 185);
	if (anchura != anchonuevo)
	{
		//window.location.href = window.location;
		alert("recarga"); 
	}
}

if (!document.getElementById) {window.onresize = recargar;}

function pintaiframe() {
	if (document.getElementById('RESULPROX')){
		var anchura = parseInt(document.getElementById('RESULPROX').style.width);
		var altura = parseInt(document.getElementById('RESULPROX').style.height);
	}
	//alert(anchura);
	//alert(altura);
	if (document.getElementById('CARGA')){
		document.getElementById('CARGA').style.width=anchura-35+"px";
		//alert(document.getElementById('CARGA').src);
	    if(altura>0)
		 document.getElementById('CARGA').style.height=altura-10+"px";
		else
		 document.getElementById('CARGA').style.height=0+"px";
	 }
}

function pestanaon(id) {
	if (document.getElementById(id)){
		document.getElementById(id).className ='pestanaon';
	}
}

function pestanaoff(id) {
	if (document.getElementById(id)){
		document.getElementById(id).className ='pestanaoff';
	}
}

function navegacionsup(id1,id2,id3,id4){
	if (document.getElementById(id1)){
		document.getElementById(id1).className ='resaltado';
	}
	if (document.getElementById(id2)){
		document.getElementById(id2).className ='normal';
	}
	if (document.getElementById(id3)){
		document.getElementById(id3).className ='normal';
	}
	if (document.getElementById(id4)){
		document.getElementById(id4).className ='normal';
	}
}

function navegacionoff(id1,id2,id3,id4){
	if (document.getElementById(id1)){
		document.getElementById(id1).className ='normal';
	}
	if (document.getElementById(id2)){
		document.getElementById(id2).className ='normal';
	}
	if (document.getElementById(id3)){
		document.getElementById(id3).className ='normal';
	}
	if (document.getElementById(id4)){
		document.getElementById(id4).className ='normal';
	}
	//document.getElementById(id2).className ='normal';
	//document.getElementById(id3).className ='normal';
	//document.getElementById(id4).className ='normal';
}

function navegacion2sup(id1,id2){
	if (document.getElementById(id1)){
		document.getElementById(id1).className ='resaltado';
	}
	if (document.getElementById(id2)){
		document.getElementById(id2).className ='normal';
	}
	//document.getElementById(id1).className ='resaltado';
	//document.getElementById(id2).className ='normal';
}

function navegacion2off(id1,id2){
	if (document.getElementById(id1)){
		document.getElementById(id1).className ='normal';
	}
	if (document.getElementById(id2)){
		document.getElementById(id2).className ='normal';
	}
	//document.getElementById(id1).className ='normal';
	//document.getElementById(id2).className ='normal';
}

function navegacion3sup(id1,id2,id3){
	if (document.getElementById(id1)){
		document.getElementById(id1).className ='resaltado';
	}
	if (document.getElementById(id2)){
		document.getElementById(id2).className ='normal';
	}
	if (document.getElementById(id3)){
		document.getElementById(id3).className ='normal';
	}
	//document.getElementById(id1).className ='resaltado';
	//document.getElementById(id2).className ='normal';
	//document.getElementById(id3).className ='normal';
}

function navegacion3off(id1,id2,id3){
	if (document.getElementById(id1)){
		document.getElementById(id1).className ='normal';
	}
	if (document.getElementById(id2)){
		document.getElementById(id2).className ='normal';
	}
	if (document.getElementById(id3)){
		document.getElementById(id3).className ='normal';
	}
	//document.getElementById(id1).className ='normal';
	//document.getElementById(id2).className ='normal';
	//document.getElementById(id3).className ='normal';
}

