
	var ventana=null;
	window.defaultStatus="Bienvenido a: "+document.location.host;
	function abrir(theURL,winName,features,width,height) { //v2.0
		if(ventana!=null){
			if(!ventana.closed)
				 ventana.close();
		}

		x = (640 - width)/2, y = (480 - height)/2;
	    if (screen) {
		    y = (screen.availHeight - height)/2;
	        x = (screen.availWidth - width)/2;
	    }
		features=features+',screenX='+x+',screenY='+y+',top='+y+',left='+x

		ventana=window.open(theURL,winName,features);
	}

	function abrirV2(theURL,winName,features,width,height) { //v2.0
		x = (640 - width)/2, y = (480 - height)/2;
	    if (screen) {
		    y = (screen.availHeight - height)/2;
	        x = (screen.availWidth - width)/2;
	    }
		features=features+',screenX='+x+',screenY='+y+',top='+y+',left='+x

		winName=window.open(theURL,winName,features);
	}

	function cierraVentana(){
		if(ventana!=null){
			if(!ventana.closed)
				 ventana.close();
		}
		ventana=null;
	}
	function go(url){
		cierraVentana();
		location=url;
	}


function ocultar(){
	ocultarIE();
}

function ocultarNS(){
	parent.document.getElementById("col1").width="0%";
	parent.document.getElementById("tablatree").style.display="none";
	parent.document.getElementById("col2").width="100%";

     if(document.height<screen.availHeight) offset=screen.availHeight-document.height;
     else offset=50;

	parent.document.getElementById("basefrm").height=document.height+offset;
}
function ocultarIE(){
	parent.document.getElementById("col1").width='1';
	parent.document.getElementById("tablatree").style.display="none";
	parent.document.getElementById("col2").width='100%';
//		alert(parent.document.getElementById("basefrm").height)
     if(document.body.scrollHeight<screen.availHeight) offset=(screen.availHeight-document.body.scrollHeight);
     else offset=50;

	parent.document.getElementById("basefrm").height=document.body.scrollHeight+offset;
//		alert(parent.document.getElementById("basefrm").height)
}

function mostrar(){
parent.document.getElementById("col1").width="100%";
parent.document.getElementById("tablatree").style.display="";
parent.parent.frames['bot'].location='footer_home.jsp';
//parent.document.getElementById("col2").width="1";
//parent.document.getElementById("basefrm").height="1";
}

function autoResize(ancho,alto){
       x = (640 - ancho)/2, y = (480 - alto)/2;
       if (screen) {
           y = (screen.availHeight - alto)/2;
           x = (screen.availWidth - ancho)/2;
        }
        top.window.moveTo(x,y);
        if (document.all) {
                top.window.resizeTo(ancho,alto);
        }
        else if (document.layers||document.getElementById) {
                top.window.outerHeight = alto;
                top.window.outerWidth = ancho;
        }
}

