version=navigator.appVersion; 
dom=document.getElementById?1:0; 

ie5=(version.indexOf("MSIE 5")>-1 &&  dom)?1:0; 
ie6=(version.indexOf("MSIE 6")>-1 &&  dom)?1:0; 
ie4=(document.all && !dom)?1:0; 
ns5=(dom && parseInt(version) >= 5) ?1:0; 
ns4=(document.layers && !dom)?1:0;


function ocultarCapa(){
	if(ns5){
		document.getElementById("cargando").style.visibility='hidden';
		document.getElementById("web").style.visibility='visible';
	}
	else if(ns4){
		document.cargando.visibility='hidde';
		document.web.visibility='show';
	}
	else{
		document.all["cargando"].style.visibility='hidden';
		document.all["web"].style.visibility='visible';
	}
}

function mostrarContenidos(){
	if(ns5){
		document.getElementById("contenido").style.visibility='visible';
	}
	else if(ns4){
		document.contenido.visibility='show';
	}
	else{
		document.all["contenido"].style.visibility='visible';
	}
}

function corregirPNG(id,width,height,ruta){
	
	var arVersion = navigator.appVersion.split("MSIE")
	var version = parseFloat(arVersion[1])
   
	obj = document.getElementById(id);

	if ((version >= 5.5) && (version < 7) && (document.body.filters)){
		obj.innerHTML = "<span style=\"width:"+width+"px; height:"+height+"px;display:inline-block;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ruta+"', sizingMethod='scale');\"></span>";
	}else{
		obj.innerHTML = "<img src='"+ruta+"' width='"+width+"' height='"+height+"'>";
	}
}

function dibuja_flash(swf,width,height){
	document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='" + width + "' height='" + height + "'><param name='movie' value='" + swf + "'/><param name='quality' value='high'/><embed src='" + swf + "' quality='high' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='" + width + "' height='" + height + "'></embed></object>");
}

function asignafoto(ruta) {
	self.document.getElementById('fotico').src=ruta;
}
