function Left(STRING,CHARACTER_COUNT){return STRING.substring(0,CHARACTER_COUNT);}function IsNumeric(strString)   //  check for valid numeric strings	   {   var strValidChars = "0123456789.";   var strChar;   var blnResult = true;   if (strString.length == 0) return false;   //  test strString consists of valid characters listed above   for (i = 0; i < strString.length && blnResult == true; i++)      {      strChar = strString.charAt(i);      if (strValidChars.indexOf(strChar) == -1)         {         blnResult = false;         }      }   return blnResult;   }   function dateRange(){//Set the value of the date range.dR = "&";MyForm = document.forms[0];if(MyForm.DateRange != null){if (MyForm.DateRange[0].checked){dR = "DateRange1&";}else if (MyForm.DateRange[1].checked){dR = "DateRange2&";}else if (MyForm.DateRange[2].checked){dR = "DateRange3&";}else if (MyForm.DateRange[3].checked){dR = "DateRange4&";		}	}	return dR}//End dateRangefunction colType(){//Collection TypeMyForm = document.forms[0];if (MyForm==null) MyForm=document.forms[0];cT = "";if(MyForm.ColType != null){if (MyForm.ColType[0].checked){cT = "collType1&";}else if (MyForm.ColType[1].checked){cT = "collType2&";}else if (MyForm.ColType[2].checked){cT = "collType3&";}}return cT//alert(cT)}//End Collection Typefunction dateS(){// has a specific date been specified? what is it?MyForm = document.forms[0];if (MyForm==null) MyForm=document.forms[0];if(MyForm.Don_YYYY != null){var yyyy = MyForm.Don_YYYY.selectedIndex;  // obtain the yearvar mm = MyForm.Don_MM.selectedIndex;  // obtain the monthvar dd = MyForm.Don_DD.selectedIndex; // obtain the dateif (yyyy == 0 || mm == 0 || dd== 0 ){return "";}else{yyyy = MyForm.Don_YYYY.options[MyForm.Don_YYYY.selectedIndex].text;  // obtain the yearmm = MyForm.Don_MM.options[MyForm.Don_MM.selectedIndex].value;  // obtain the monthdd = MyForm.Don_DD.options[MyForm.Don_DD.selectedIndex].text; // obtain the datedS = "DateSpecific"+yyyy+"-"+mm+"-"+dd+"&";}return dS;}elsereturn "";}function verPostal(){//currentObject = document._CVSE.usr1;currentObject = theField;var str = currentObject.value;str = str.toUpperCase();//// Does the string have a number in it?//var reg = new RegExp("[0-9]");if (reg.test(str)){reg = ("[A-Z][0-9][A-Z] [0-9][A-Z][0-9]");if (str.length>7)	displayValue(theField.name+"_Suggestions","inline", "Invalid Format. e.g K1K 1K1")else if (str.length >=3){	var len=str.length*5;	if (str.length>3) 		len-=4;	   reg = new RegExp(Left(reg, len));      if (reg.test(str)){   	displayValue(theField.name+"_Suggestions","none", "");   	return true   	}  else   	displayValue(theField.name+"_Suggestions","inline", "Invalid Format. e.g K1K 1K1")   	return false;   }  }else	//alert(str + " Is probably a city.")	return true;}// Position routinesfunction Pos(x,y){    this.x = x;    this.y = y;}function getAbsPos( el ){    var pos = new Pos(el.offsetLeft, el.offsetTop);    elParent = el.offsetParent;    while( elParent != null )    {        pos.x += elParent.offsetLeft;        pos.y += elParent.offsetTop;        elParent = elParent.offsetParent;    }	//alert("Left: " + pos.x + " Top: " + pos.y);    return pos;	}//********************************************* Parse the date out to the three date fields ********************************************//function parseDate(theDate){var nYear = theDate.substring(6,10);var nMonth = theDate.substring(0,2);var nDay = theDate.substring(3,5);//alert(nYear+"-"+nMonth+"-"+nDay)setDropDown(document.forms[0].Don_YYYY, nYear);setDropDown(document.forms[0].Don_MM, nMonth);setDropDown(document.forms[0].Don_DD, nDay);}function setDropDown(dropDown, value){	for (var x=0;x<dropDown.options.length;x++)		if (dropDown.options[x].text==value)			dropDown.selectedIndex=x;		else if (dropDown.options[x].value==value)			dropDown.selectedIndex=x;			}