// JavaScript Document

function newwin(url, name, opt)
{                     
	var nw = window.open(url,name, "width=400, height=200, scrollbars=1");
	nw.focus();
}

var mbW=250;var mbO=[],mbP=[],mbA,mbT,mbTf;function mbSet(m,c) {if (document.getElementById&&document.createElement) {	var m=document.getElementById(m);	m.className=c;	var e,f,i,j;	var e=m.firstChild;	while (e) {		if (e.tagName=='LI') {			var div=document.createElement('div');			while (e.firstChild) {				div.appendChild(e.firstChild);			}			e.appendChild(div);		}		e=e.nextSibling;	}	e=m.getElementsByTagName('a');	if (!mbTf) mbTf=new Function('mbHAT();');	for (i=0;i<e.length;i++) {		e[i].onmouseout=e[i].onblur=mbTf;	}	m=m.getElementsByTagName('ul');	for (i=0;i<m.length;i++) {		if (j=m[i].id) {			mbO[j]=m[i];			e=m[i].parentNode;			f=e.parentNode.getAttribute('id');			if (mbO[f]) {				mbP[j]=f;			}			f=new Function('mbS(\''+j+'\');');			e=e.getElementsByTagName('a');			for (c=0;c<e.length;c++) {				e[c].onmouseover=e[c].onfocus=f;			}			mbH(j);		}	}}}function mbHA() {	if (mbA) {		while (mbA) mbH(mbA);		mbHE('visible');	}}function mbHAT() {	if (!mbT) mbT=setTimeout('mbHA();', mbW);}function mbTC() {	if (mbT) {		clearTimeout(mbT);		mbT=null;	}}function mbS(m) {	mbTC();	if (mbA) while (mbA&&m!=mbA&&mbP[m]!=mbA) mbH(mbA);	else mbHE('hidden');	mbSH(m,'visible');	mbA=m;}function mbH(m) {	if (m==mbA) mbA=mbP[m];	mbSH(m,'hidden');	mbT=null;}function mbSH(m,v) {	mbO[m].parentNode.firstChild.className=v;	mbO[m].style.visibility=v;}function mbHE(v) {	mbHEV(v,document.getElementsByTagName('select'));}function mbHEV(v,e) {	for (var i=0;i<e.length;i++) e[i].style.visibility=v;}

/*var menuLayers = {
  timer: null,
  activeMenuID: null,
  offX: -50,   // horizontal offset 
  offY: 0,   // vertical offset 
  show: function(id, e, xX, yY) {
    var mnu = document.getElementById? document.getElementById(id): null;
    if (!mnu) return;
    this.activeMenuID = id;
    if ( mnu.onmouseout == null ) mnu.onmouseout = this.mouseoutCheck;
    if ( mnu.onmouseover == null ) mnu.onmouseover = this.clearTimer;
    viewport.getAll();
    this.position(mnu,e, xX, yY);
  },
  
  hide: function() {
    this.clearTimer();
    if (this.activeMenuID && document.getElementById) 
      this.timer = setTimeout("document.getElementById('"+menuLayers.activeMenuID+"').style.visibility = 'hidden'", 50);
  },
  
  position: function(mnu, e, xX, yY) {
    var x = e.pageX? e.pageX: e.clientX + viewport.scrollX;
    var y = e.pageY? e.pageY: e.clientY + viewport.scrollY;
    
    if ( x + mnu.offsetWidth + this.offX > viewport.width + viewport.scrollX )
      x = x - mnu.offsetWidth - this.offX;
    else x = x + this.offX;
  
    if ( y + mnu.offsetHeight + this.offY > viewport.height + viewport.scrollY )
      y = ( y - mnu.offsetHeight - this.offY > viewport.scrollY )? y - mnu.offsetHeight - this.offY : viewport.height + viewport.scrollY - mnu.offsetHeight;
    else y = y + this.offY;
    
    mnu.style.left = xX + "px"; mnu.style.top = yY + "px";
    this.timer = setTimeout("document.getElementById('" + menuLayers.activeMenuID + "').style.visibility = 'visible'", 50);
  },
  
  mouseoutCheck: function(e) {
    e = e? e: window.event;
    // is element moused into contained by menu? or is it menu (ul or li or a to menu div)?
    var mnu = document.getElementById(menuLayers.activeMenuID);
    var toEl = e.relatedTarget? e.relatedTarget: e.toElement;
    if ( mnu != toEl && !menuLayers.contained(toEl, mnu) ) menuLayers.hide();
  },
  
  // returns true of oNode is contained by oCont (container)
  contained: function(oNode, oCont) {
    if (!oNode) return; // in case alt-tab away while hovering (prevent error)
    while ( oNode = oNode.parentNode ) 
      if ( oNode == oCont ) return true;
    return false;
  },

  clearTimer: function() {
    if (menuLayers.timer) clearTimeout(menuLayers.timer);
  }
  
}*/