// navegando.net - javascript auxiliary functions
// (c) 2002 3cubes.com; aplcaciones y consultoria, s.a. de c.v.
// $Header: /var/cvs/navegando/apache/docs/js/navegando.js,v 1.4 2003/08/26 15:31:10 arturo Exp $

function popup(name,url,width,height) {
	win = window.open(url,name,'width='+width+',height='+height+',menu=0,status=0,scrollbar=1,scrollbars=1,scroll=1');
	win.focus();
}

function mailPopup(url) {
	return popup('mail', url, 640, 480);
}

function addSidebar(url) {
	if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function")) {
		window.sidebar.addPanel ("Navegando.net","http://navegando.net/app/sidebar/mozilla","");
	} else {
		alert("This page is enhanced for use with Mozilla.  Click OK to download");
		window.location.href="http://www.mozilla.org/";
	}
	return true;
}

// 1k DHTML API
d=document;l=(d.layers)?1:0;op=navigator.userAgent.toLowerCase().indexOf('opera')!=-1;ie=navigator.userAgent.toLowerCase().indexOf('msie')!=-1;lh=new Array();
function gE(e,f){if(l){f=(f)?f:self;var V=f.document.layers;if(V[e])return V[e];for(var W=0;W<V.length;)t=gE(e,V[W++]);return t;}if(d.all)return d.all[e];return d.getElementById(e);}
function sE(e){if(l)e.visibility='show';else e.style.visibility='visible';}
function hE(e){if(l)e.visibility='hide';else e.style.visibility='hidden';}
function sZ(e,z){if(l)e.zIndex=z;else e.style.zIndex=z;}
function sX(e,x){if(l)e.left=x;else if(op)e.style.pixelLeft=x;else e.style.left=x;}
function sY(e,y){if(l)e.top=y;else if(op)e.style.pixelTop=y;else e.style.top=y;}
function sW(e,w){if(l)e.clip.width=w;else if(op)e.style.pixelWidth=w;else e.style.width=w;} 
function sH(e,h){if(l)e.clip.height=h;else if(op)e.style.pixelHeight=h;else e.style.height=h;}
function sC(e,t,r,b,x){if(l){X=e.clip;X.top=t;X.right=r;X.bottom=b;X.left=x;}else e.style.clip='rect('+t+' '+r+' '+b+' '+x+')';}
function wH(e,h){if(l){Y=e.document;Y.write(h);Y.close();}if(e.innerHTML)e.innerHTML=h;}
function sH2(e,h){if(l)e.clip.height=h;else if(op)e.style.pixelHeight=h;else {e.style.height=h; if(e.style.overflow=='hidden')e.style.overflow='visible';else e.style.overflow='hidden'}}
function tH(id){ var e = gE("menu"+id); if(lh[id]) { sE(e); sH2(e,''); lh[id]=0; if(ie) e.style.height="1"; } else { hE(e); sH2(e,"0px"); lh[id]=1; } }
function sM(id) { var e = gE("menu"+id); if(ie) e.style.height="1"; }
function ttH(id) { tH(id); tH("Show"+id); tH("Hide"+id); }
