// Support Script (49)
function PopulateWith(TheList, Items)
{
  var iCount = TheList.getCount();
  for (var i=0; i<iCount; i++)
    if (TheList.elementID)
      TheList.elementID.options[0] = null;
    else
      alert("bad or wrong DE for state population");

  i = 0;
  iCount = Items.length;
 	for (i=0; i<iCount; i++)
    TheList.addOption(Items[i], i, "");

  TheList.setSelectedByPosition(0);
}
// Support Script (50)
function ValidateDropDown()
{
  msg = "";
  var iPos = this.getSelectedPosition();
  if (iPos<=0)
  {
    msg = "Please make a selection."
  }

  return msg;
}
function document_onLoad() {
var i = 0;
s = new Array(51);
s[i++] = "--"
s[i++] = "AK"
s[i++] = "AL"
s[i++] = "AZ"
s[i++] = "AR"
s[i++] = "CA"
s[i++] = "CO"
s[i++] = "CT"
s[i++] = "DE"
s[i++] = "FL"
s[i++] = "GA"
s[i++] = "HI"
s[i++] = "ID"
s[i++] = "IL"
s[i++] = "IN"
s[i++] = "IA"
s[i++] = "KS"
s[i++] = "KY"
s[i++] = "LA"
s[i++] = "ME"
s[i++] = "MD"
s[i++] = "MA"
s[i++] = "MI"
s[i++] = "MN"
s[i++] = "MS"
s[i++] = "MO"
s[i++] = "MT"
s[i++] = "NE"
s[i++] = "NV"
s[i++] = "NH"
s[i++] = "NJ"
s[i++] = "NM"
s[i++] = "NY"
s[i++] = "NC"
s[i++] = "ND"
s[i++] = "OH"
s[i++] = "OK"
s[i++] = "OR"
s[i++] = "PA"
s[i++] = "RI"
s[i++] = "SC"
s[i++] = "SD"
s[i++] = "TN"
s[i++] = "TX"
s[i++] = "UT"
s[i++] = "VT"
s[i++] = "VA"
s[i++] = "WA"
s[i++] = "WV"
s[i++] = "WI"
s[i++] = "WY"

PopulateWith(List1, s);
List1.Validate=ValidateDropDown;
var i = 0;
s = new Array(51);
s[i++] = "--"
s[i++] = "AK"
s[i++] = "AL"
s[i++] = "AZ"
s[i++] = "AR"
s[i++] = "CA"
s[i++] = "CO"
s[i++] = "CT"
s[i++] = "DE"
s[i++] = "FL"
s[i++] = "GA"
s[i++] = "HI"
s[i++] = "ID"
s[i++] = "IL"
s[i++] = "IN"
s[i++] = "IA"
s[i++] = "KS"
s[i++] = "KY"
s[i++] = "LA"
s[i++] = "ME"
s[i++] = "MD"
s[i++] = "MA"
s[i++] = "MI"
s[i++] = "MN"
s[i++] = "MS"
s[i++] = "MO"
s[i++] = "MT"
s[i++] = "NE"
s[i++] = "NV"
s[i++] = "NH"
s[i++] = "NJ"
s[i++] = "NM"
s[i++] = "NY"
s[i++] = "NC"
s[i++] = "ND"
s[i++] = "OH"
s[i++] = "OK"
s[i++] = "OR"
s[i++] = "PA"
s[i++] = "RI"
s[i++] = "SC"
s[i++] = "SD"
s[i++] = "TN"
s[i++] = "TX"
s[i++] = "UT"
s[i++] = "VT"
s[i++] = "VA"
s[i++] = "WA"
s[i++] = "WV"
s[i++] = "WI"
s[i++] = "WY"

PopulateWith(ToState, s);
ToState.Validate=ValidateDropDown;
List1.focus();
 }
function List1__onBlur() {
ErrorMsg = this.Validate();
if (ErrorMsg != "")
{
  alert(ErrorMsg);
}
 }
function _List1__onBlur() { if (List1) return List1.onBlur(); }
function ToState__onBlur() {
ErrorMsg = this.Validate();
if (ErrorMsg != "")
{
  alert(ErrorMsg);
}
 }
function _ToState__onBlur() { if (ToState) return ToState.onBlur(); }
function FormButton1__onClick() {
// validate the form on this page.
var ErrorMsg = "";
if ("1" != "0")
{
	if (document.forms && document.forms[0])
	{
		FormDEs = document.forms[0];
		for (var iFormDE=0; iFormDE < FormDEs.length; iFormDE++)
		{
			DEName = FormDEs[iFormDE].name;
     
			if (DEName != "")
			{
				// make sure it is a legitimate form element
				if (typeof(eval("FormDEs." + DEName + ".type")) != "undefined" &&
								eval("FormDEs." + DEName + ".type") != "radio")
				{
					if (eval(DEName + ".Validate"))
					{
						msg = eval(DEName + ".Validate()");
						if (msg != "")
							ErrorMsg += "\n\n" + DEName + ":  " + msg;
					}
				}
			}
		}  // end for 
	}
}

if (ErrorMsg == "")
{
  if (document.forms && document.forms[0])
    document.forms[0].submit();
}
else
{
  alert("The form can not be submitted:" + ErrorMsg);
}
 }
function _FormButton1__onClick() { if (FormButton1) return FormButton1.onClick(); }

