			
			function findPosX(obj)
			{
				var curleft = 0;
				if (obj.offsetParent)
				{
					while (obj.offsetParent)
					{
						curleft += obj.offsetLeft
						obj = obj.offsetParent;
					}
				}
				else if (obj.x)
					curleft += obj.x;
				return curleft;
			}

			function findPosY(obj)
			{
				var curtop = 0;
				if (obj.offsetParent)
				{
					while (obj.offsetParent)
					{
						curtop += obj.offsetTop;
						obj = obj.offsetParent;
					}
				}
				else if (obj.y)
					curtop += obj.y;
				return curtop;
			}

		/*************************************************************************
		  This code is from Dynamic Web Coding at http://www.dyn-web.com/
		  Copyright 2003 by Sharon Paine 
		  See Terms of Use at http://www.dyn-web.com/bus/terms.html
		  regarding conditions under which you may use this code.
		  This notice must be retained in the code as is!
		*************************************************************************/

		var navLayers = {
		  timer: null,
		  activeMenuID: null,

		  offX: -8, //-187,   // horizontal offset 
		  offY: -8, //-112,   // vertical offset 
		  show: function(id, actuatorId, e) {
		    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,actuatorId,e);
		  },

		  hide: function() {
		    this.clearTimer();
		    if (this.activeMenuID && document.getElementById) 
		      this.timer = setTimeout("document.getElementById('"+navLayers.activeMenuID+"').style.visibility = 'hidden'",500);
		  },

		  position: function(mnu, actuatorId, e) {
		    //var ex = e.pageX? e.pageX: e.clientX + viewport.scrollX;
		    //var ey = e.pageY? e.pageY: e.clientY + viewport.scrollY;

    		var actuator = document.getElementById(actuatorId);
			
		    var x = findPosX(actuator);
		    var y = findPosY(actuator) + actuator.offsetHeight;


		    //if ( x + mnu.offsetWidth + this.offX > viewport.width + viewport.scrollX )
		    //  x = x - mnu.offsetWidth - this.offX;
		    //else x = x + this.offX;
			
		    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;

		    y = y + this.offY;
            
			// *** SSK 20070118 *** //
			// kludge fix for offset of the mainwide div //
			
			var lL = document.getElementById? document.getElementById("mainwide"): null;
			if (!lL){
				alert("mainwide div not found in mp_nav.js")
				return;
			}
			x -= lL.offsetLeft;
			y -= lL.offsetTop;
			
			// **** END KLUDGE ;) ***** //

		    mnu.style.left = x + "px"; mnu.style.top = y + "px";
		    this.timer = setTimeout("document.getElementById('" + navLayers.activeMenuID + "').style.visibility = 'visible'",500);
		  },

		  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(navLayers.activeMenuID);
		    var toEl = e.relatedTarget? e.relatedTarget: e.toElement;
		    if ( mnu != toEl && !navLayers.contained(toEl, mnu) ) navLayers.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 (navLayers.timer) clearTimeout(navLayers.timer);
		  }

		}


var gLogin = {
	_verified: null,
	_target: null,
	show: function(obj){
		this._target = obj;
		this._target.style.cursor = 'default';
		this._panel = document.getElementById("login_panel");
		this._panel.style.visibility = 'visible';
	},
	
	hide: function(obj){
		this._panel.style.visibility = 'hidden';
		if(this._target){
			this._target.style.cursor = 'pointer';
		}
	}
	
	

}
