// JavaScript Document
	function muestra_oculta(id){
		if (document.getElementById){
			var el = document.getElementById(''+id+'');
			el.style.display = (el.style.display == 'none') ? 'block' : 'none';
		}
	}
	function abrir_ventana(el_url,mi_nombre, w, h,scroll) { 
		var winl = (screen.width - w) / 2; 
		var wint = (screen.height - h) / 2; 
			ancho_alto = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+'' 
			 ventan = window.open(el_url, mi_nombre, ancho_alto);
				if (parseInt(navigator.appVersion) >= 4) { ventan.window.focus(); } 
	}
	function buscar_web_mr(idmrs){
	  var buscar_mr=document.getElementById("txt_busca_mr").value;
	  if(!buscar_mr || buscar_mr=="BUSCADOR INTERNO"){
	  alert("NO HAY DATOS PARA BUSCAR");
	  document.getElementById("txt_busca_mr").focus();
	  return false;
	  }
	  document.location.replace("inicio.php?pagin=w_busqueda_mr&ac=i&id_p=1&buscar_mr="+buscar_mr+"&idmrs="+idmrs);
	}
	function enter_submit_b_mr(e,idmrs){
		var k=null;
		(e.keyCode) ? k=e.keyCode : k=e.which;
		if(k==13) buscar_web_mr(idmrs);
	}
	
	function adapIframe(nomIframe) {
		//document.getElementById("w_cuerpo").width = document.frames.prueba.document.body.offsetWidth + document.frames.prueba.document.body.scrollWidth;
		//document.getElementById("w_cuerpo").height = (document.frames.w_cuerpo.document.body.offsetHeight + document.frames.w_cuerpo.document.body.scrollHeight)/2  + 20;
		
		var miIframe=document.getElementById(""+nomIframe);
		var alturaPagina=miIframe.contentWindow.document.body.scrollHeight;
		if(alturaPagina<550){
		  alturaPagina=600;
		}
		miIframe.height=alturaPagina + 40;
	}
 function ag(link_w){
	 if(link_w){
	   parent.document.location.href=''+link_w+'';
	 }
 } 	
