// cycles through all the checkboxes in a form// retrieves their checked status from document.cookie// checks or unchecks accordinglyfunction setCheckbox() {	for (var x=0; x<document.theform.elements.length; x++) {	box=document.theform.elements[x].name	isOn=getChip("ssc",box);		if (isOn=="1" && document.theform[box]) {		document.theform[box].checked=true		imgName=box.substring(0,box.indexOf("check"));		checkThis(imgName)	}		}	}// cycles through all the radiobutton groups in a form// retrieves their checked status from document.cookie// checks or unchecks accordinglyfunction setRadios() {	for (var x=0; x<=document.theform.elements.length; x++) {	radio=getChip("ssd",page+"radio"+x);	whichradio=page+"radio"+x;		if (radio!=null && radio!="" && radio!="undefined" && document.theform[whichradio][radio]){		document.theform[whichradio][radio].checked=true;		}	}}// cycles through all the textfields in a form// retrieves their value from cookie, then sets their value accordinglyfunction setText() {	for (var x=0; x<=document.theform.elements.length; x++) {	whichtext=document.theform.elements[x]	if (whichtext) whichtext=whichtext.name;	text=getChip("ssd",whichtext);			if (text!=null && text!="" && document.theform[whichtext]){		document.theform[whichtext].value=text;		}	}}// cycles through all buttons of a radiobutton group// and returns the value (if any) of the checked button;function getRadioValue(radioGroup) {	for (var i = 0; i < radioGroup.length; i++) {		if (radioGroup[i].checked) {		return radioGroup[i].value		}       	}	return ""}//sets the selected radiobutton to document.cookiefunction radioCheck(whichbutton) {		selection=[getRadioValue(document.theform[whichbutton])];if (savethis=="no") setChip("depositradios",whichbutton,selection);else setChip("depositradios",whichbutton,selection,exp);}//sets the selected textbox to document.cookiefunction textCheck(name,value) {setChip("ssd",name,value);}//sets the selected textbox to document.cookiefunction promoCheck(name,value) {setChip("ssp",name,value);}
