<!--
	function IsReal(data) 
	{
		var strValue = data;
		var strMatchExp = '[\\-]?[0-9]+.?[0-9]*';
	
		var arrMatch = strValue.match(strMatchExp)
		if ((arrMatch == null) || (arrMatch[0] != strValue))
			return isScientific(data);
		else
			return true;
	}
	
	function IsScientific(data)
	{
		var strValue = data;
		var strMatchExp = '[\\-]?[0-9]+(\\.[0-9]+)?[Ee][+-]([0-9]+)?';
	
		var arrMatch = strValue.match(strMatchExp)
		if ((arrMatch == null) || (arrMatch[0] != strValue))
			return false;
		else
			return true;
	}
	 
	function IsInteger(data, intMin, intMax) 
	{
		// First, make sure there are only numbers
		var strValue = data;
		var arrMatch = strValue.match('[\\-]?[0-9]+');
	
		if ((arrMatch == null) || (arrMatch[0] != strValue))
			return false;
	
		// Ensure valid range
		var intValue = parseInt(data, 10);
	
		if (intMin == null)		intMin = -2147483648;
		if (intMax == null)		intMax =  2147483647;
	
		if ((intValue > intMax) || (intValue < intMin))
			return false;
		else
			return true;
	}
	
	function IsPrecise(data, intPrecision)
	{
		var intWhereIsTheDot = data.indexOf('.') + 1;
		if ( ((data.length - intWhereIsTheDot) > intPrecision) && (intWhereIsTheDot != 0) )
			return false;
		else
			return true;
	}
	
	function IsDate(data)
	{
		// Make sure Date values are ok
		
		// first split into Month/Day/Year values  (must have 3 and only 3 sets of values)
		var arrDateParts = data.split('/');
		if (arrDateParts.length != 3)	return false;
	
		// parse the user values (make sure they are numbers)
		if (!IsInteger(arrDateParts[0], 1, 12))			return false;
		if (!IsInteger(arrDateParts[1], 1, 31))			return false;
		if (!IsInteger(arrDateParts[2], 1970, 2037))	return false;
	
		// parse the user values (make sure they are numbers)
		var intMonth = parseInt(arrDateParts[0],10);
		var intDay	 = parseInt(arrDateParts[1],10);
		var intYear	 = parseInt(arrDateParts[2],10);
	
		// did the user enter numbers?
		if ((!intMonth) || (intMonth < 0))	return false;
		if ((!intDay)	|| (intDay   < 0))	return false;
		if ((!intYear)	|| (intYear  < 0))	return false;
	
		// Check date by creating using values supplied and double-checking (let JavaScript do the work)
		// (in JS: the MONTH value is 0 based - go figure)
		intMonth--;
		var objDate = new Date(intYear, intMonth, intDay);
	
		// Do the date values match?
		if (intYear	 != objDate.getFullYear())	return false;
		if (intMonth != objDate.getMonth())		return false;
		if (intDay	 != objDate.getDate())		return false;
		if (intYear < 1970 || intYear > 2037)   return false;
	
		// must be a valid date
		return true;
	}
	
	function IsDateTime(data)
	{
		// Split into Date and Time values
		var arrDateTime = data.split(' ');
	
		if (arrDateTime.length != 3)		return false;
		var txtDate = arrDateTime[0];
		var txtTime = arrDateTime[1];
		var txtAMPM = arrDateTime[2].toUpperCase();
	
		// Make sure Month/Day values are ok
		if (!isDate(txtDate))
			return false;
	
		// first split into Hour:Minute:Second values  (must have 3 and only 3 sets of values)
		var arrTimeParts = txtTime.split(':');
		if (arrTimeParts.length != 3)		return false;
	
		// parse the values (make sure they are numbers)
		if (!isInteger(arrTimeParts[0], 0, 23))		return false;
		if (!isInteger(arrTimeParts[1], 0, 59))		return false;
		if (!isInteger(arrTimeParts[2], 0, 59))		return false;
	
		if ((txtAMPM != 'AM') && (txtAMPM != 'PM'))
			return false;
	
		return true;
	}
	
	function IsEmailAddress(data)
	{
		// define Regular Expressions
		
		//format:  email@company.com
		var rxpPattern1 = new RegExp('^([a-zA-Z0-9_\\.-])+@([a-zA-Z0-9_\\.-])+([a-zA-Z])+');
		//format:  name <email@company.com>
		var rxpPattern2 = new RegExp('^([\\s\\d\\w_\\.-])+[\\s]+[<]+([a-zA-Z0-9_\\.-])+@([a-zA-Z0-9_\\.-])+([a-zA-Z])+[>]+');
		//format:  "name" <email@company.com>
		var rxpPattern3 = new RegExp('^[\\"]([\\s\\d\\w_\\.-])+[\\"][\\s]+[<]+([a-zA-Z0-9_\\.-])+@([a-zA-Z0-9_\\.-])+([a-zA-Z])+[>]+');
		
		// test against valid address patterns
		if (!rxpPattern1.test(data) && !rxpPattern2.test(data) && !rxpPattern3.test(data))
			return false;
		else
			return true;
	}
	
	function SetCookie(cookieName, cookieValue, expires, path, domain, secure) 
	{
		document.cookie = escape(cookieName) + '=' + escape(cookieValue) 
							+ (expires ? '; EXPIRES=' + expires.toGMTString() : '')
							+ (path ? '; PATH=' + path : '')
							+ (domain ? '; DOMAIN=' + domain : '')
							+ (secure ? '; SECURE' : '');
	}
	
	function GetCookie(cookieName, defaultValue) 
	{
		var cookieValue = defaultValue;
		var posName = document.cookie.indexOf(escape(cookieName) + '=');
		if (posName != -1) 
		{
			var posValue = posName + (escape(cookieName) + '=').length;
			var endPos = document.cookie.indexOf(';', posValue);
			if (endPos != -1)
				cookieValue = unescape(document.cookie.substring(posValue, endPos));
			else
				cookieValue = unescape(document.cookie.substring(posValue));
		}
		return cookieValue;
	}
	
	function DateFromNow(intYears, intMonths, intDays)
	{
		var dteDate = new Date();
		dteDate.setFullYear(dteDate.getFullYear()+1);
		return dteDate;
	}
	
	
	function Popup(strURL, lngHeight, lngWidth, blnResizable, blnModal)
	{
		var strResizable = (blnResizable ? ',resizable' : '');
		var strModal = (blnModal ? 'modal=1' : 'modal=0');
		
		// Calculate Left and Top values to center new dialog
		var lngTop  = (screen.height - lngHeight) / 2;
		var lngLeft = (screen.width  - lngWidth)  / 2;
	
		if (false)
			showModalDialog(strURL, 'Promo_Win',
							'dialogHeight:'+lngHeight+'px;dialogWidth:'+lngWidth+'px;dialogTop:'+lngTop+'px;dialogLeft:'+lngLeft+'px;resizable:no;center:yes;help:no;');
		else
			return window.open(strURL, 'Promo_Win',
						'alwaysRaised,'+strModal+',height='+lngHeight+',width='+lngWidth+',top='+lngTop+',left='+lngLeft+strResizable);
	}
	
-->
