function ShowMessageBox(msg, focusElementId)
{
	
	/*if (document.getElementById)
	{
	var focusElementTxt = "";
	if (focusElementId && focusElementId !='')
		focusElementTxt = "document.getElementById('" + focusElementId + "').focus();";
		
		if (!document.getElementById("__ERRDIV_O"))
		{
		var DivHTML = "<DIV ID='__ERRDIV_O' STYLE='position:absolute; display:none; background-color:gray; z-index: 10000; opacity: .6; filter: alpha(opacity=60);'></DIV>\
					<DIV ID='__ERRDIV_I' style='width:500px;height: 120px;font-size:12px;text-align:center;position:absolute; display:none;z-index:10001; background-color:white;filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=5, OffY=5, Color=gray, Positive=true);'>\
					</DIV>";
		document.body.insertAdjacentHTML("beforeEnd", DivHTML);
		}
		
		var InnerDivContent = "<table width='100%' cellpadding='0' cellspacing='0' style='text-align:center'>\
			<tr><td style='height:20px;background-color:green;color:white;font-weight:bold;'>HIPUSA Message</td></tr>\
			<tr><td valign='center' style='height:100px;color:red;background-color:white;border:solid 1px black;'>" + msg + " \
			<BR/><BR/><INPUT type='button' ID='__ERRDIV_I_OKBTN' value='OK' style='height:20px;width:40px;font-weight:bold;' onBlur=\"if (document.getElementById('__ERRDIV_O').style.display != 'none') this.focus();\" onClick=\"" + focusElementTxt +  ";document.getElementById('__ERRDIV_O').style.display = 'none';document.getElementById('__ERRDIV_I').style.display = 'none'; \" /> \
			</td></tr></table>"
					
		var OuterDiv = document.getElementById("__ERRDIV_O");
		var InnerDiv = document.getElementById("__ERRDIV_I");		
				
		var scrollLeft = (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft);
			var scrollTop = (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop);
			var clientWidth = Math.max(document.body.scrollWidth,document.body.clientWidth);
			var clientHeight  = Math.max(document.body.scrollHeight,document.body.clientHeight);

			OuterDiv.style.left = scrollLeft+'px';
			OuterDiv.style.top = scrollTop+'px';
			OuterDiv.style.width = clientWidth+'px';
			OuterDiv.style.height = clientHeight+'px';
		
			InnerDiv.style.left = scrollLeft+((document.body.clientWidth- parseInt(InnerDiv.style.width,10))/2)+'px';
			InnerDiv.style.top = scrollTop+((document.body.clientHeight-parseInt(InnerDiv.style.height,10))/2)+'px';

			OuterDiv.style.display = '';
			InnerDiv.innerHTML = InnerDivContent;
			InnerDiv.style.display = '';
					
		 setTimeout("document.getElementById('__ERRDIV_I_OKBTN').focus()",10);
	}
	else
	{
	alert(msg);
	}*/
	
	alert(msg);
}
/*
Function to validate the login forms on the hipusa site. All login forms must have an 
input field for User ID and another one for Password named UserID and Password respectively
*/
function ValidateLogin(formObj)
{
	var strUserID	= formObj.UserID.value;
	var strPIN		= formObj.Password.value;

	if (strUserID == '' || !isValidString(strUserID, validUserID))
		{
		ShowMessageBox("Please enter a valid user ID.", formObj.UserID.id);
		formObj.UserID.focus();
		return false;
		}

	else if (strPIN == '' || !isValidString(strPIN, validPIN))
		{
		ShowMessageBox("Please enter a valid password.", formObj.Password.id);
		formObj.Password.focus();
		return false;
		}	
	return true;
}

/*
function to focus the user id field on load of the document

*/

function FocusUserID()
{
 var UserID = document.getElementById("UserID");
	if (UserID) UserID.focus();
}