<!--
/**************************************************************************
Name:         Web.js
Version:      10/16/2006 - 12/02/2006
Author(s):    John L. Whiteman
Dependencies: N/A
Description:

handleFormError()
msg()
showError()
showHelpLink()
**************************************************************************/
var Web={
	objPopUp:null,
	/**********************************************************************
	**********************************************************************/
	handleFormError:function(msg, 
	                         formObject) {
		Web.showError(msg);

		formObject.focus();
	
		return(false);
	},
	/**********************************************************************
	**********************************************************************/
	hideHelpLink:function() {

		if (Web.objPopUp == null) return;

		Web.objPopUp.style.visibility = 'hidden';

		Web.objPopUp = null;

		return;
	},
	/**********************************************************************
	**********************************************************************/
	msg:function(token) {

		alert("Web: " + token);
	},
	/**********************************************************************
	**********************************************************************/
	showError:function(msg) {

		alert("Error: " + msg);

		return;
	},
	/**********************************************************************
	**********************************************************************/
	showHelpLink:function(event, 
		                  msg) {

		objPopTrig = document.getElementById(event);

		Web.objPopUp = document.getElementById("helplinkid");
	
		xPos = objPopTrig.offsetLeft + 50;
	
		yPos = objPopTrig.offsetTop + objPopTrig.offsetHeight + 5;
	
		if (xPos + Web.objPopUp.offsetWidth > document.body.clientWidth) 
			xPos = xPos - Web.objPopUp.offsetWidth;
	
		if (yPos + Web.objPopUp.offsetHeight > document.body.clientHeight) 
			yPos = yPos - Web.objPopUp.offsetHeight - objPopTrig.offsetHeight;
	
		Web.objPopUp.style.left = xPos + 'px';
	
		Web.objPopUp.style.top = yPos + 'px';
	
		Web.objPopUp.style.visibility = 'visible';

		Web.objPopUp.innerHTML = msg;

		return;
	}
}
/**************************************************************************
**************************************************************************/
//-->