var on = new Array;
var active = null;
function menuOn(id) {
  if (active != null && active != id ) { 
    menuClose(active); 
  }
  on[id] = true;
  active = id;
}

function menuClose(id) {
  if (!on[id]) {
    hE(id,'','hide');
    on[id] = false;
  }
}

function menuCloseActive() {
  if (!on[active]) {
    hE(active,'','hide');
    on[active] = false;
  }
}

function menuOut(id) {
  on[id] = false;
  setTimeout("menuClose('" + id + "');",100);
}

//1k DHTML API
d=document;l=d.layers;op=navigator.userAgent.indexOf('Opera')!=-1;
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 sZ(e,z) {
  l?e.zIndex = z : e.style.zIndex=z;
}

function hE() { 
  var i,p,v,obj,args=hE.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=gE(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function swapBg() {
  if (document.layers) {
    sZ(gE('background2'), 3);
  }
  for(i=0;i<document.links.length;i++){
		document.links[i].onfocus=function() {if(this.blur)this.blur()}; 
	}
}
