function AutoComplete() {
//  retrieves available values for window.document.forms[0] fields from "UserInfo" cookie

var chip = null;
var loop = 0;

chip = getSubCookie("UserInfo", "UserName");
if((chip != null) && (chip != "") && (window.document.forms[0].UserName != null))
	window.document.forms[0].UserName.value = chip;

chip = getSubCookie("UserInfo", "JobTitle");
if((chip != null) && (chip != "") && (window.document.forms[0].JobTitle != null))
	window.document.forms[0].JobTitle.value = chip;

chip = getSubCookie("UserInfo", "email");
if((chip != null) && (chip != "") && (window.document.forms[0].email != null))
	window.document.forms[0].email.value = chip;

chip = getSubCookie("UserInfo", "Company");
if((chip != null) && (chip != "") && (window.document.forms[0].Company != null))
	window.document.forms[0].Company.value = chip;

chip = getSubCookie("UserInfo", "Address");
if((chip != null) && (chip != "") && (window.document.forms[0].Address != null))
	window.document.forms[0].Address.value = chip;

chip = getSubCookie("UserInfo", "City");
if((chip != null) && (chip != "") && (window.document.forms[0].City != null))
	window.document.forms[0].City.value = chip;

chip = getSubCookie("UserInfo", "State");
if((chip != null) && (chip != "") && (window.document.forms[0].State != null))
	window.document.forms[0].State.value = chip;

chip = getSubCookie("UserInfo", "Zip");
if((chip != null) && (chip != "") && (window.document.forms[0].Zip != null))
	window.document.forms[0].Zip.value = chip;

chip = getSubCookie("UserInfo", "Country");
if((chip != null) && (chip != "") && (window.document.forms[0].Country != null))
	window.document.forms[0].Country.value = chip;

chip = getSubCookie("UserInfo", "Phone");
if((chip != null) && (chip != "") && (window.document.forms[0].Phone != null))
	window.document.forms[0].Phone.value = chip;

chip = getSubCookie("UserInfo", "Fax");
if((chip != null) && (chip != "") && (window.document.forms[0].Fax != null))
	window.document.forms[0].Fax.value = chip;

chip = getSubCookie("UserInfo", "Machine_ID");
if((chip != null) && (chip != "") && (window.document.forms[0].Machine_ID != null))
	window.document.forms[0].Machine_ID.value = chip;

if(window.document.forms[0].Key_SN != null) {
  chip = getSubCookie("UserInfo", "Key_SN");
  if((chip != null) && (chip != ""))
    window.document.forms[0].Key_SN.value = chip;
	else {
		window.document.forms[0].Key_SN.readOnly = false;
		window.document.forms[0].Key_SN.maxLength = 4;
	}
}

if(window.document.forms[0].version != null) {
  chip = getSubCookie("UserInfo", "version");
	if((chip != null) && (chip != ""))
		window.document.forms[0].version.value = chip;
  else window.document.forms[0].version.readOnly = false;
}

chip = getSubCookie("UserInfo", "OS");
if((chip != null) && (chip != "") && (window.document.forms[0].OS != null)) {
	for (loop=0; loop < window.document.forms[0].OS.options.length; loop++) {
		if(chip == window.document.forms[0].OS.options[loop].text)
			window.document.forms[0].OS.selectedIndex = loop;
	}
}

chip = getSubCookie("UserInfo", "ACQ_driver");
if((chip != null) && (chip != "") && (window.document.forms[0].ACQ_driver != null)) {
	for (loop=0; loop < window.document.forms[0].ACQ_driver.options.length; loop++) {
		if(chip == window.document.forms[0].ACQ_driver.options[loop].text)
			window.document.forms[0].ACQ_driver.selectedIndex = loop;
	}
}

chip = getSubCookie("UserInfo", "Shifter");
if((chip != null) && (chip != "") && (window.document.forms[0].Shifter != null))
	window.document.forms[0].Shifter.value = chip;

chip = getSubCookie("UserInfo", "FG_driver");
if((chip != null) && (chip != "") && (window.document.forms[0].FG_driver != null)) {
	for (loop=0; loop < window.document.forms[0].FG_driver.options.length; loop++) {
		if(chip == window.document.forms[0].FG_driver.options[loop].text)
			window.document.forms[0].FG_driver.selectedIndex = loop;
	}
}

chip = getSubCookie("UserInfo", "Camera");
if((chip != null) && (chip != "") && (window.document.forms[0].Camera != null))
	window.document.forms[0].Camera.value = chip;

chip = getSubCookie("UserInfo", "Interferometer");
if((chip != null) && (chip != "") && (window.document.forms[0].Interferometer != null))
	window.document.forms[0].Interferometer.value = chip;

chip = getSubCookie("UserInfo", "Authorization_Code");
if((chip != null) && (chip != "") && (window.document.forms[0].Authorization_Code != null))
	window.document.forms[0].Authorization_Code.value = chip;

chip = getSubCookie("UserInfo", "Registration_Comments");
if((chip != null) && (chip != "") && (window.document.forms[0].Registration_Comments != null))
	window.document.forms[0].Registration_Comments.value = chip;

/*
chip = getSubCookie("UserInfo", "conduit");
if((chip != null) && (chip != "") && (window.document.forms[0].conduit != null)) {
	for (loop=0; loop < window.document.forms[0].conduit.options.length; loop++) {
		if(chip == window.document.forms[0].conduit.options[loop].text)
			window.document.forms[0].conduit.selectedIndex = loop;
	}
}
*/

chip = getSubCookie("UserInfo", "referrer");
if((chip != null) && (chip != "") && (window.document.forms[0].referrer != null))
	window.document.forms[0].referrer.value = chip;

}
