	//	Print the Page
	function PrintPage()
	{
		parent.print();
	}

	function OpenNewWindow(sURL,sParams,Height,Width,status_yesno,sWindowName)
	{
		var myBars = "directories=no,location=no,menubar=no"; 
		myBars += ",titlebar=no,toolbar=no"; 
		var myOptions = "alwaysRaised=yes,resizable=yes,scrollbars=yes"; 
		var undefined; 
		
		//Was a default window height set?
		if (Height !="Default")
		{
			myOptions += ",HEIGHT=" + Height;
		}
		else
		{
			myOptions += ",HEIGHT=700";
		}
		
		if (status_yesno != "yes")
		{
			myBars += ",status=no";
		}
		else
		{
			myBars += ",status=yes";
		}
		
		//Was a default window width set?
		var WindowName = "NewWindow";
		
		if (Width !="Default")
		{
			myOptions += ",WIDTH=" + Width;
			WindowName = WindowName + Width;
		}
		else
		{
			myOptions += ",WIDTH=780";
		}
		myOptions += ",left=25,top=25";
		
		//Create your parameters string
		var myFeatures = myBars + "," + myOptions;

		//Append parameters to URL string
		if (sParams.length>0) 
		{
		sURL = sURL + "?" + sParams.replace(/[+]/g,"%2b");
		}
	
		//Open your new window using your dynamic parameters
		if (sWindowName == undefined)
		{
			window.open(sURL,WindowName,myFeatures); 
		}
		else 
		{
			if (sWindowName == '_blank')
			{
				window.open(sURL,'_blank',myFeatures); 
			}
			else 
			{
				window.open(sURL,sWindowName,myFeatures); 
			}
		}
	}

	//	Opens a new pop-up window for application
	//function OpenStormWin(URL) 
	//{
	//	aWindow = window.open(URL, "STORM","toolbar=no,width=775,HEIGHT=600,status=no,scrollbars=yes,resize=yes,menubar=no");
	//}
	
	//	Opens a new pop-up window for application
	function OpenWin(URL,WindowName) 
	{
		aWindow = window.open(URL, WindowName,"toolbar=no,HEIGHT=600,WIDTH=775,status=no,scrollbars=yes,resize=no,menubar=no");
	}
	
	//	Sets the focus to a specified page object.
	function SetFocus(ob)
	{
		document.getElementById(ob).focus();
	}

	//	Controls what button is activated when [Enter] is pressed in specified control.
	function DetectEnter(e, ob)
	{
			var nKey;
			if (e && e.which)
			{
				nKey = (e.which) ? e.which : event.keyCode
				if (nKey == 13)
				{
					document.getElementById(ob).click();
					return true;
				}
				else
				{
					return false;
				}
			}
			else if (window.event && window.event.keyCode)
			{
				nKey = window.event.keyCode;
				if (nKey == 13)
				{
					window.event.returnValue=false;
					document.getElementById(ob).click();
				}
			}
	}

	//	Suppresses the postback of the page if [Enter] key is pressed while in triggering object.
	//		Currently only works with IE (mdm)
	function SuppressEnter(e)
	{
		var nKey;
		if (e && e.which)
		{
			nKey = (e.which) ? e.which : event.keyCode
			if (nKey == 13)
			{
				//alert("Must Click Submit/Save Button!");
				return false;
			}
		}
		else if (window.event && window.event.keyCode)
		{
			nKey = window.event.keyCode;
			if (nKey == 13)
			{
				//alert("Required Data is missing!");
				window.event.returnValue=false;
			}
		}
	}

	function ValidateForAlphaCharacters(e)
	{
		var nKey;
		if (e && e.which)
		{
			nKey = (e.which) ? e.which : event.keyCode
			if ((nKey != 8) && (nKey != 9) && (nKey != 32) && (nKey != 46) && ((nKey < 16) || ((nKey > 20) && (nKey < 65)) || (nKey > 90)))
			{
				window.alert('This field can only contain alpha-character values!');
				return false;
			}
		}
		else if (window.event && window.event.keyCode)
		{
			nKey = window.event.keyCode;
			if ((nKey != 8) && (nKey != 9) && (nKey != 32) && (nKey != 46) && ((nKey < 16) || ((nKey > 20) && (nKey < 65)) || (nKey > 90)))
			{
				window.event.returnValue=false;
				window.alert('This field can only contain alpha-character values!');
			}
		}
	}

	function ValidateForNumerics(e)
	{
		var nKey;
		if (e && e.which)
		{
			nKey = (e.which) ? e.which : event.keyCode
			if ((nKey != 8) && (nKey != 9) && (nKey != 46) && ((nKey < 48) || ((nKey > 57) && (nKey < 96)) || (nKey > 105)))
			{
				window.alert('This field can only contain numeric values!');
				return false;
			}
			return true;
		}
		else if (window.event && window.event.keyCode)
		{
			nKey = window.event.keyCode;
			if ((nKey != 8) && (nKey != 9) && (nKey != 46) && ((nKey < 48) || ((nKey > 57) && (nKey < 96)) || (nKey > 105)))
			{
				window.alert('This field can only contain numeric values!');
				window.event.returnValue=false;
			}
			return true;
		}
	}

	function ValidateForAlphaNumerics(e)
	{
		var nKey;
		if (e && e.which)
		{
			nKey = (e.which) ? e.which : event.keyCode
			if ((nKey != 8) && (nKey != 9) && (nKey != 32) && (nKey != 46) && ((nKey < 16) || ((nKey > 20) && (nKey < 48)) || ((nKey > 57) && (nKey < 65)) || ((nKey > 90) && (nKey < 96)) || (nKey > 105)))
			{
				window.alert('This field can only contain alphanumeric values!');
				return false;
			}
		}
		else if (window.event && window.event.keyCode)
		{
			nKey = window.event.keyCode;
			if ((nKey != 8) && (nKey != 9) && (nKey != 32) && (nKey != 46) && ((nKey < 16) || ((nKey > 20) && (nKey < 48)) || ((nKey > 57) && (nKey < 65)) || ((nKey > 90) && (nKey < 96)) || (nKey > 105)))
			{
				window.event.returnValue=false;
				window.alert('This field can only contain alphanumeric values!');
			}
		}
	}
	
			
	function DisableBackSpace(e)
	{
		var key;
		var eType = e.type;
		
		if(window.event)
			key = window.event.keyCode; // IE
		else
			key = e.which; //FireFox
		
		if((key==8) && (eType != "text" && eType != "password" && eType != "textarea"))
			return false;
		else
			return true;
	}
