<!--
	/************************************************************************
	*   Pre-load Image
	************************************************************************/
	img1Clear = new Image();
	img1Clear.src = "/_System/Lib/Image/1clear.gif";


	/************************************************************************
	*   Function PopUp()
	*       Creates a new popup window
	*
	************************************************************************/
	function PopUp(pstrURL, pstrName, pintWidth, pintHeight, pblnScroll, pblnResize, pblnMenus, pblnStatus)
	{
		intLeftPosition = (screen.width) ? (screen.width/3) : 0;
		intTopPosition = (screen.height) ? (screen.height/3) : 0;		
		
		strSettings = 'width='+pintWidth+',height='+pintHeight+',top='+intTopPosition+',left='+intLeftPosition+'toolbar='+pblnMenus+',location='+pblnMenus+',directories='+pblnMenus+',status='+pblnStatus+',menubar='+pblnMenus+',scrollbars='+pblnScroll+',resizable='+pblnResize;
		objNewWindow = window.open(pstrURL, pstrName, strSettings);
		if(objNewWindow.window.focus)
		{
			objNewWindow.window.focus();
		}
	}

	/************************************************************************
	*   Function MakeNewWindow()
	*       Creates a new popup window
	*
	************************************************************************/
	function MakeNewWindow(strURL, intWidth, intHeight, blnResizeable, blnScrollbars) 
	{
		var strSettings;
	    var objNewWindow;
	    var intLeftPosition;
	    var intTopPosition;
	    
		intLeftPosition = (screen.width) ? (screen.width/3) : 0;
		intTopPosition = (screen.height) ? (screen.height/3) : 0;		
		
		strSettings = 'width='+pintWidth+',height='+pintHeight+',top='+intTopPosition+',left='+intLeftPosition+',toolbar='+pblnMenus+',location='+pblnMenus+',directories='+pblnMenus+',status='+pblnStatus+',menubar='+pblnMenus+',scrollbars='+pblnScroll+',resizable='+pblnResize;
		objNewWindow = window.open(pstrURL, pstrName, strSettings);

		if(objNewWindow.window.focus)
		{
			objNewWindow.window.focus();
		}
	}

	/************************************************************************
	*   Function mouseOver()
	*       changes graphics on a page during mouse events
	*
	************************************************************************/ 
	function mouseOver(strCurrentImage, strNewImage)
	{
		if (parseFloat(navigator.appVersion) >= 3.0)
		{
			document.images[strCurrentImage].src = strNewImage;
		}
	}


	/************************************************************************
	*   Function toggleView()
	*       toggles the Hide / Show style of an element on the page
	*
	************************************************************************/ 
	function toggleView(p_objElement)
	{
		if (document.getElementById(p_objElement).className == "SHOW")
		{
			document.getElementById(p_objElement).className = "HIDE";
		}
		else
		{
			document.getElementById(p_objElement).className = "SHOW"
		}
	} 


	/************************************************************************
	*   Variables: Validation
	*       Validation Masks for use throught the site
	*
	************************************************************************/
	var MASK_ALPHA               = /^([a-z]|[A-Z]|[0-9])+$/;
	var MASK_ALPHA_WITH_SPACES   = /^(\w|\s)+$/;
	var MASK_NUMERIC             = /^(\d)+$/;
	var MASK_NUMERIC_WITH_SPACES = /^(\d|\s)+$/;
	var MASK_DOMAINNAME          = /^([a-z]|[A-Z]|[0-9]|-|\.)+$/;
	var MASK_IPADDRESS           = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/;

	/************************************************************************
	*   Function isRequired()
	*       checks to make sure a value exists
	*
	************************************************************************/
	function isRequired(p_strValue)
	{
		if (p_strValue.length > 0 )
			return true;
		else
			return false;
	}

	/************************************************************************
	*   Function isIPAddress()
	*       checks for proper IP Address with regular expressions
	*
	************************************************************************/
	function isIPAddress(p_strIPValue, p_blnRequired)
	{
		var intCount;
		var blnContinue = true;
	    
		//Check to see if required
		if (p_blnRequired == true)
		{
			blnContinue = isRequired(p_strIPValue);
		}
	    
		//Check for proper format
		if (blnContinue == true) 
		{
			var astrIP = p_strIPValue.match(MASK_IPADDRESS);
			if (astrIP == null)
			{
				return false;
			} 
			else 
			{
				for (intCount = 0; intCount < 4; intCount++) 
				{
					if (astrIP[intCount+1] > 255) 
					{
						return false;
					}
				}
			}
		} 
		else 
		{
			return false;
		}
		return true;
	}

	/************************************************************************
	*   Function ValidateCheck()
	*       General Validate check using regular expressions
	*
	************************************************************************/
	function ValidateCheck(p_strValue, p_objMask, p_blnRequired)
	{
		var blnContinue = true;
	    
		//Check to see if required
		if (p_blnRequired == true)
		{
			blnContinue = isRequired(p_strValue);
		}
	    
		//Check for proper format
		if (blnContinue == true) 
		{
			var astrValue = p_strValue.match(p_objMask);
			if (astrValue == null)
			{
				return false;
			} 
		} 
		else 
		{
			return false;
		}
		return true;
	}
//-->
