//Muestra capas compatible IE 5,6  y NS 6,7
function mostrar(nombreCapa){ 
document.getElementById(nombreCapa).style.visibility="visible"; 
} 

//Oculta capas compatible IE 5,6  y NS 6,7
function ocultar(nombreCapa){ 
document.getElementById(nombreCapa).style.visibility="hidden"; 
} 

//Precarga imágenes
function precarga(){ // v2005-03-14
    var argv=precarga.arguments;
    var argc=precarga.arguments.length

    for(var i=0; i<argc; i++){
        var tmp=new Image;
        tmp.src=argv[i];
    }
}

function compactarVentana(){
		//window.toolbar.visible = false;
		window.menubar.visible = 'no';
		window.personalbar.visible=false;
		window.scrollbars.visible = false;
	}
function ensancharVentana(){
			window.resizeBy(100, 0); 
}

//Funciones para el ajuste de medidas a la resolución de pantalla basadas en un 
//diseño de resolución de pantalla de 1024 x 768
function ajustaAncho(ancho){
	return ancho * screen.width * 0.98 / 1024;
	
	}
	
function ajustaAlto(alto){
	return alto * screen.height * 0.98 / 768;
	
	}
	
function ajustaFlash(id){
	var ancho_ajustado = ajustaAncho(document.getElementById(id).width);
	var alto_ajustado = ajustaAlto(document.getElementById(id).height);
		
	document.getElementById(id).width = ancho_ajustado
	document.getElementById(id).SetVariable("width", ancho_ajustado);
	document.getElementById(id).height = alto_ajustado;
	document.getElementById(id).SetVariable("height", alto_ajustado);
	
	
	
	}
	
	
/*
Crea variables JavaScript con las variables recibidas y devuelve un array cuyos elementos
son del tipo nombre=valor
*/

function get2Vars(){
	cadVariables = location.search.substring(1,location.search.length);
	arrVariables = cadVariables.split("&");
	if (arrVariables.length){
		for (i=0; i<arrVariables.length; i++) {
		  arrVariableActual = arrVariables[i].split("=");
		  if (isNaN(parseFloat(arrVariableActual[1])))
			alert(eval(arrVariableActual[0]+"='"+unescape(arrVariableActual[1])+"';"));
		  else
			eval(arrVariableActual[0]+"="+arrVariableActual[1]+";");
		}
	}
	else arrVariables = 0;
	
	return arrVariables;
}
	
