<!--
	var intCRLFPosition;
	if (is.ns6up){
		var strCRLF	= String.fromCharCode(10);
	}
	else{
		var strCRLF	= String.fromCharCode(13, 10);
	}
	function hasSpaces(istrUserEntry){
	// Checks if contains embedded spaces
		for (var i = 0; i < istrUserEntry.length; i++){
			if (istrUserEntry.charAt(i) == ' '){
				return true;
			}
		}
		return false;
	}
	function stripSpaces(istrUserEntry){
	// Strips string of spaces
		var strStrippedEntry = '';
		for (var i = 0; i < istrUserEntry.length; i++){
			if (!(istrUserEntry.charAt(i) == ' ')){
				strStrippedEntry += istrUserEntry.charAt(i);
			}
		}
		return strStrippedEntry;
	}
	function trimSpaces(istrUserEntry){
	// Trims leading/trailing spaces
		var strStrippedEntry	= istrUserEntry;
		var strSpace					= " ";
		var intSpacePosition, strTempEntry;
		// Strip initial spaces
		do{
			intSpacePosition = strStrippedEntry.indexOf(strSpace);
			if (intSpacePosition == 0){
				strStrippedEntry = strStrippedEntry.substring(strSpace.length);
			}
		}while (intSpacePosition == 0);
		// Strip trailing spaces
		do{
			intSpacePosition = strStrippedEntry.lastIndexOf(strSpace);
			if ((intSpacePosition != -1) && ((strStrippedEntry.length - intSpacePosition) == strSpace.length)){
				strTempEntry			= strStrippedEntry;
				strStrippedEntry	= strStrippedEntry.substring(0, intSpacePosition);
			}
		}while ((intSpacePosition != -1) && ((strTempEntry.length - intSpacePosition) == strSpace.length));
		return strStrippedEntry;
	}
	function stripEmptyCRLFs(istrUserEntry){
	// Strips empty carriage-return/line-feeds
		var strStrippedEntry	= istrUserEntry;
		var strCRLFx2					= strCRLF + strCRLF;
		// Strip initial empty CRLFs
		do{
			intCRLFPosition = strStrippedEntry.indexOf(strCRLF);
			if (intCRLFPosition == 0){
				strStrippedEntry = strStrippedEntry.substring(strCRLF.length);
			}
		}while (intCRLFPosition == 0);
		// Strip remaining empty CRLFs
		do{
			intCRLFPosition = strStrippedEntry.indexOf(strCRLFx2);
			if (intCRLFPosition != -1){
				strStrippedEntry = 
					strStrippedEntry.substring(0, intCRLFPosition) + 
					strStrippedEntry.substring(intCRLFPosition + (strCRLFx2.length / 2));
			}
		}while (intCRLFPosition != -1);
		// Strip trailing empty CRLF
		intCRLFPosition = strStrippedEntry.lastIndexOf(strCRLF);
		if ((intCRLFPosition != -1) && ((strStrippedEntry.length - intCRLFPosition) == strCRLF.length)){
			strStrippedEntry = strStrippedEntry.substring(0, intCRLFPosition);
		}
		return strStrippedEntry;
	}
	function isBlank(istrUserEntry){
	// Validates input string is not blank
		for (var i = 0; i < istrUserEntry.length; i++){
			var strChar = istrUserEntry.charAt(i);
			if ((strChar != ' ') && (strChar != '\n') && (strChar != '')){return false;}
		}
		return true;
	}
	function isEmpty(istrUserEntry){
	// Validates input string is not empty
		if ((istrUserEntry == null) || (istrUserEntry == "") || (isBlank(istrUserEntry))){return true;}
		return false;
	}
	function isValidLength(istrUserEntry){
	// Validates input string has length of 11.
		if (isNaN(istrUserEntry)){
			if (istrUserEntry.substring(1).length <= 11){
				return true;
			}
			else{
				if (hasInitialZero(istrUserEntry)){
					return true;
				}
			}
		}
		else{
			if (istrUserEntry.length <= 11){
				return true;
			}
			else{
				if (hasInitialZero(istrUserEntry)){
					return true;
				}
			}
		}
		return false;
	}
	function isNumber(istrUserEntry){
	// Validates input string is all digits or is all digits after the initial character.
		if (isNaN(istrUserEntry)){
			if (isNaN(istrUserEntry.substring(1))){return false;}
			else{
				if (isAllZeros(istrUserEntry.substring(1))){return false;}
				return true;
			}
		}
		return true;
	}
	function isAllZeros(istrUserEntry){
		for (var i = 0; i < istrUserEntry.length; i++){
			if (istrUserEntry.charAt(i) != "0"){return false;}
		} 
		return true;
	}
	function hasInitialZero(istrUserEntry){
		if ((istrUserEntry.charAt(0) == "0") && (istrUserEntry.length == 12)){
			return true;
		}
		return false;
	}
	function hasInitialAlpha(istrUserEntry){
	// Validates input string has an initial alpha, if relevant.
		var strPattern = /[a-zA-Z]{1}/;
		if (isNaN(istrUserEntry)){
			if (istrUserEntry.match(strPattern) == null){return false;}
			return true;
		}
		return true;
	}
	function validateEntryTotal(istrUserEntry){
		var strMsg = "";
		if (isEmpty(istrUserEntry)){
			strMsg += "Please enter at least one Tracking Number.\n\n";
		}
		else{
			intCRLFPosition = istrUserEntry.indexOf(strCRLF);
			for (var i = 0; intCRLFPosition != -1; i++){
				istrUserEntry = istrUserEntry.substring(intCRLFPosition + strCRLF.length);
				intCRLFPosition = istrUserEntry.indexOf(strCRLF);
			}
			if (i >= 25){
				strMsg += "Only 25 Tracking Numbers may be entered at a time.\n";
			}
		}
		return strMsg;
	}
	function validateNumbers(istrUserEntry){
		var strThisNbr;
		var strMsg				= "";

		for (var i = 0; istrUserEntry.length > 0; i++){
			intCRLFPosition	= istrUserEntry.indexOf(strCRLF);
			if (intCRLFPosition != -1){
				strThisNbr			= istrUserEntry.substring(0, intCRLFPosition);
				istrUserEntry		= istrUserEntry.substring(intCRLFPosition + strCRLF.length);
			}
			else{
				strThisNbr			= istrUserEntry;
				istrUserEntry		= "";
			}
			if (!(isValidLength(strThisNbr)) || !(isNumber(strThisNbr)) || (isAllZeros(strThisNbr)) || !(hasInitialAlpha(strThisNbr.substring(0, 1)))){
				if (strMsg == ""){
					strMsg += "The following Tracking Number(s) are not valid:\n";
				}
				strMsg += "  # " + strThisNbr + "\n";
			}
		}
		return strMsg;
	}
	function validateEntries(){
	// High-level validation function
		var strErrMsg				= "";
		var objForm					= document.frmTrackByNbr;
		var strTrackNbrs		= stripEmptyCRLFs(stripSpaces(objForm.txtTrackNbrs.value));

		strErrMsg += validateEntryTotal(strTrackNbrs);
		if (isEmpty(strErrMsg)){
			strErrMsg += validateNumbers(strTrackNbrs);
		}

		// Show errors and return false
		if (!isEmpty(strErrMsg)){
			alert(strErrMsg);
			objForm.txtTrackNbrs.focus();
			return false;
		}
		// No errors
		else {return true;}
	}
	function submitTrackRequest(){
	// High-level submit function
		if (validateEntries()){
			document.frmTrackByNbr.submit();
		}
	}
//-->
