			function validatechk(ck){
				if(!ck.checked){
					alert("You must check the box.");
					ck.focus();
					return false;
				}
				return true;
			}
			
						
			function validate3Fields(field1, field2, field3){
				if(field1.value.length==0){
					alert("The First Name field is required.");
					field1.focus();
					return false;
				}
				//if(field1.value.indexOf(" ")!=-1){	//commented out 6/3/06
					//alert("The First Name field must not have a space.");
				if(field1.value.indexOf(" ")==0){	//changed to this 6/3/06
					alert("The First Name field must not begin with a space.");
					field1.focus();
					return false;
				}
				if(field2.value.length==0){
					alert("The Last Name field is required.");
					field2.focus();
					return false;
				}
				//if(field2.value.indexOf(" ")!=-1){	//commented out 6/3/06
					//alert("The Last Name field must not have a space.");
				if(field2.value.indexOf(" ")==0){	//changed to this 6/3/06
					alert("The Last Name field must not begin with a space.");
					field2.focus();
					return false;
				}
				if(field3.value.length==0){
					alert("The Password field is required.");
					field3.focus();
					return false;
				}
				if(field3.value.indexOf(" ")!=-1){
					alert("The Password field must not have a space.");
					field3.focus();
					return false;
				}
				return true;
			}
			
			
			function validateFields(field1, field2){
				if(field1.value.length==0){
					alert("The User Name field is required.");
					field1.focus();
					return false;
				}
				if(field1.value.indexOf(" ")!=-1){
					alert("The User Name field must not have a space.");
					field1.focus();
					return false;
				}
				if(field2.value.length==0){
					alert("The Password field is required.");
					field2.focus();
					return false;
				}
				if(field2.value.indexOf(" ")!=-1){
					alert("The Password field must not have a space.");
					field2.focus();
					return false;
				}
				return true;
			}
					
		
			function disableTextBySelect(slctbox, tx){
				var num = slctbox.selectedIndex;
				if(num==0){
					if(tx.disabled){
						tx.disabled = (!tx.disabled);
						tx.value = "Type in New Location Name Here";
					}
				}	
				else{
					if(tx.disabled){}
					else{
						tx.value = "";
						tx.disabled = (!tx.disabled);
					}
				}
			}
			
			
			function validateByArray(fieldArray, nameArray){
				var num = fieldArray.length;
				for(i=0; i<num; i++){
					var fname = nameArray[i];
					var txfield = fieldArray[i];
					if(txfield.disabled){}
					else{
						if(txfield.value.length==0){
							alert("The "+fname+" field is required.");
							txfield.focus();
							return false;
						}
						if(txfield.value.indexOf(" ")==0){
							alert("The "+fname+" field must not begin with a space.");
							txfield.focus();
							return false;
						}
					}
				}
				return true;
			}
			
			
			function validateTx(slctbox, tx){
				var num = slctbox.selectedIndex;
				var itemnum = slctbox.length;
				if(num==0){
					if(tx.value=="Type in New Location Name Here"){
							alert("The Location Name field is required.");
							tx.focus();
							return false;
					}
					if(tx.value.length==0){
							alert("The Location Name field is required.");
							tx.focus();
							return false;
					}
					if(tx.value.indexOf(" ")==0){
							alert("The Location Name field must not begin with a space.");
							tx.focus();
							return false;
					}
				}
				if((tx.value.length!=0)&&(tx.value!="Type in New Location Name Here")){
					var txval = tx.value.toLowerCase();
					for(var i=1; i<itemnum; i++){
						var itemtext = slctbox.options[i].text.toLowerCase();
						if(txval==itemtext){
							alert("The Location Name already exists.");
							tx.focus();
							return false;
						}
					}
				}
				return true;
			}
			
			function validateDetail(slctbox, tx){
				var itemnum = slctbox.length;
				if(tx.value.length!=0){
					var txval = tx.value.toLowerCase();
					for(var i=1; i<itemnum; i++){
						var itemtext = slctbox.options[i].text.toLowerCase();
						if(txval==itemtext){
							alert("The Detail title already exists.");
							tx.focus();
							return false;
						}
					}
				}
				return true;
			}
			
			function validateMoDate(rd, pos, tx){
				if(rd[pos].checked){
					if(tx.value.length==0){
							alert("The Monthly Dates field is required.");
							tx.focus();
							return false;
					}
					if(tx.value.indexOf(" ")==0){
							alert("The Monthly Dates field must not begin with a space.");
							tx.focus();
							return false;
					}
				}
				return true;
			}
			
			function validateStDate(rd, pos1, pos2, pos3, pos4, slct1, slct2){
				if(rd[pos1].checked){
					if(slct1.selectedIndex==0){
						alert("Select Start Date.");
						slct1.focus();
						return false;
					}
				}
				else if((rd[pos2].checked)||(rd[pos3].checked)||(rd[pos4].checked)){
					if(slct2.selectedIndex==0){
						alert("Select Start Date.");
						slct2.focus();
						return false;
					}
				}
				return true;
			}
			
			function validateExDate(rd, pos1, slct1){
				if(rd[pos1].checked){
					if(slct1.selectedIndex==0){
						alert("Select Exception Date.");
						slct1.focus();
						return false;
					}
				}
				
				return true;
			}
			
			function validateDateSB(slct1){
				if(slct1.selectedIndex==0){
						alert("Select Date.");
						slct1.focus();
						return false;
				}
				return true;
			}
			
			function validateChkbox(rd, pos, chk){
				var num = chk.length;
				if(rd[pos].checked){
					var flag = "off";
					for(var i=0; i<num; i++){
						if(chk[i].checked){
							flag = "on";
							break;
						}
					}
					if(flag=="off"){
						alert("You didn't check any day, but it's required.");
						return false;
					}
				}
				return true;
			}
			
			function validateAtOnce(txArray, nmArray, sb1, tx1, rd, pos1, tx2, pos2, sb2, sb3, pos3, chk1, pos4, chk2){
								
				return (validateByArray(txArray, nmArray)&&validateTx(sb1, tx1)&&validateMoDate(rd, pos1, tx2)&&validateStDate(rd, pos2, sb2, sb3)&&validateChkbox(rd, pos3, chk1)&&validateChkbox(rd, pos4, chk2));
					
			}
			
				
			var src1="../graphics/original_btn_01.gif";
			var src2="../graphics/original_btn_02.gif";
			var src3="../graphics/experiment_btn_01.gif";
			var src4="../graphics/experiment_btn_02.gif";
			var db1="original";
			var db2="experiment";
			
			var btn = new Array(2);
			var frm = new Array(4);
			var testArray = new Array(2);
			
			
			//var locArray = new Array();
			
			function setArray(){
				
				btn[0]=document.btn1;
				btn[1]=document.btn2;
			
				
				frm[0]=document.form1;
				frm[1]=document.form2;
				frm[2]=document.form3;
				frm[3]=document.form4;
			}	
			
			
			//Alert box with comment relating date validation.
			//This function is used in 'dateValid' function.
			function dayalert(dfield){
				alert("No such date! The Date field must be corrected.");
				dfield.focus();
				
			}
				
			/*If date is not appropreate in general and for NBA season, an alert box will show up.
			* Unless user corrects the entry to appropreate date, never advanced to next page.
			* This function uses 'dayalert' function in it.
			*/	
			function dateValid(mofield, dayfield){
				var month = mofield.value;
				var day = dayfield.value;
				if((day<1)||(day>31)){
					dayalert(dayfield);
					return false;
				}
				/*
				if((month==10)&&(day<29)){
					alert("The Date field must be corrected. NBA season didn't start yet on that date!");
					dayfield.focus();
					return false;
				}
				*/
				if((month==2)&&(day==29)){
					alert("No February 29 this year! The Date field must be corrected.");
					dayfield.focus();
					return false;
				}	
				if(((month==11)&&(day>30))||((month==2)&&(day>29))||((month==4)&&(day>30))){
					dayalert(dayfield);
					return false;
				}	
				
				return true;		
			}
			
			
			//Changed on Aug.14 2003
			//Allows to modify past event or exception if this month
			function changeYearBox(molist, daylist, yearField){
				var checkDate = new Date();
				var thismo = checkDate.getMonth() + 1;
				var thisday = checkDate.getDate();
				var thisyear = checkDate.getFullYear();
				var nextyear = thisyear + 1;
				var mo = molist.options[molist.selectedIndex].value;
				var theday = daylist.options[daylist.selectedIndex].value;
				//if((mo<thismo)||((mo==thismo)&&(theday<thisday))){
				if(mo<thismo){
					if(yearField.value!=nextyear){
						yearField.value=nextyear;
					}
				}
				//if((mo>thismo)||((mo==thismo)&&(theday>=thisday))){
				if(mo>=thismo){
					if(yearField.value!=thisyear){
						yearField.value=thisyear;
					}
				}
				if((mo==0)&&(theday==0)){
					yearField.value="N/A";
					//molist.selectedIndex=0;
					//daylist.selectedIndex=0;
				}
				if(mo==0){
					daylist.selectedIndex=0;
					yearField.value="N/A";
				}
			}
			
			//Changed on Aug.14 2003 
			function changeYearBoxOld(molist, daylist, yearField){
				var checkDate = new Date();
				var thismo = checkDate.getMonth() + 1;
				var thisday = checkDate.getDate();
				var thisyear = checkDate.getFullYear();
				var nextyear = thisyear + 1;
				var mo = molist.options[molist.selectedIndex].value;
				var theday = daylist.options[daylist.selectedIndex].value;
				if((mo<thismo)||((mo==thismo)&&(theday<thisday))){
					if(yearField.value!=nextyear){
						yearField.value=nextyear;
					}
				}
				if((mo>thismo)||((mo==thismo)&&(theday>=thisday))){
					if(yearField.value!=thisyear){
						yearField.value=thisyear;
					}
				}
				if((mo==0)&&(theday==0)){
					yearField.value="N/A";
					//molist.selectedIndex=0;
					//daylist.selectedIndex=0;
				}
				if(mo==0){
					daylist.selectedIndex=0;
					yearField.value="N/A";
				}
			}
			
			function dateAlert(molist, daylist, yearbox){
				var mo = molist.options[molist.selectedIndex].value;
				var theday = daylist.options[daylist.selectedIndex].value;
				var theyear = yearbox.value;
				var yearId = theyear%4;
				if(mo==2){
					if((yearId==0)&&(theday>29)||(yearId!=0)&&(theday>28)){
						alert("No such date in Feb, please change entry");
						daylist.selectedIndex=0;
					}
				}
				if((mo==4)||(mo==6)||(mo==9)||(mo==11)){
					if(theday>30){
						alert("No such date, please change entry");
						daylist.selectedIndex=0;
					}
				}
			}	
			
			
			function daylistAlert(molist, daylist, yearbox){
				var mo = molist.options[molist.selectedIndex].value;
				var theday = daylist.options[daylist.selectedIndex].value;
				var theyear = yearbox.value;
				var yearId = theyear%4;
				if(mo==0){
					alert("Select month first, please");
					daylist.selectedIndex=0;
				}
				dateAlert(molist, daylist, yearbox);
			}	
			
			
			//Changed on Aug.14 2003
			//Instead of alert box, change year automatically to next, or appropreate year
			function checkStEn(yearboxSt, yearboxEn, molistSt, molistEn, daylistSt, daylistEn){
				var theyearSt = yearboxSt.value;
				var theyearEn = yearboxEn.value;
				var moSt = molistSt.options[molistSt.selectedIndex].value;
				var moEn = molistEn.options[molistEn.selectedIndex].value;
				var daySt = daylistSt.options[daylistSt.selectedIndex].value;
				var dayEn = daylistEn.options[daylistEn.selectedIndex].value;
				//if((theyearEn!=0)&&(theyearSt>theyearEn)){
					//alert("End Year shouldn't be before Start Year");
					//molistEn.selectedIndex=0;
					//daylistEn.selectedIndex=0;
					//yearboxEn.value="N/A";
					//yearboxEn.value=theyearSt;
				//}
				if((moEn!=0)&&(moSt>moEn)){
					//alert("End Month shouldn't be before Start Month");
					//molistEn.selectedIndex=0;
					//yearboxEn.value="N/A";
					//daylistEn.selectedIndex=0;
					yearboxEn.value=parseInt(theyearSt)+1;
				}
				else if((moSt==moEn)&&(dayEn!=0)&&(daySt>dayEn)){
					//alert("End Date shouldn't be before Start Date");
					//daylistEn.selectedIndex=0;
					yearboxEn.value=parseInt(theyearSt)+1;
					
				}
				else{
					yearboxEn.value=theyearSt;
				}
			}
			
			//Changed on Aug.14 2003
			function checkStEnOld(yearboxSt, yearboxEn, molistSt, molistEn, daylistSt, daylistEn){
				var theyearSt = yearboxSt.value;
				var theyearEn = yearboxEn.value;
				var moSt = molistSt.options[molistSt.selectedIndex].value;
				var moEn = molistEn.options[molistEn.selectedIndex].value;
				var daySt = daylistSt.options[daylistSt.selectedIndex].value;
				var dayEn = daylistEn.options[daylistEn.selectedIndex].value;
				if((theyearEn!=0)&&(theyearSt>theyearEn)){
					alert("End Year shouldn't be before Start Year");
					molistEn.selectedIndex=0;
					daylistEn.selectedIndex=0;
					yearboxEn.value="N/A";
				}
				if((theyearSt==theyearEn)&&(moEn!=0)&&(moSt>moEn)){
					alert("End Month shouldn't be before Start Month");
					molistEn.selectedIndex=0;
					yearboxEn.value="N/A";
					daylistEn.selectedIndex=0;
				}
				if((theyearSt==theyearEn)&&(moSt==moEn)&&(dayEn!=0)&&(daySt>dayEn)){
					alert("End Date shouldn't be before Start Date");
					daylistEn.selectedIndex=0;
					
				}
			}
				
				
			/*This function eliminates a team selected in list1 from list2.
			* Thus users won't have the choice to select same team in list1 and list2.
			*/
			function teamvs(list1, list2){
				
				var flag="before";
				for(var i=0; i<list1.options.length; i++){
					if(list1.options[i].selected){
						flag="after";
					}
					else if(flag=="before"){
						list2.options[i].text=list1.options[i].text;
						list2.options[i].value=list1.options[i].value;
					}
					else{
						list2.options[i-1].text=list1.options[i].text;
						list2.options[i-1].value=list1.options[i].value;
					}
				}	
			}
			
			
			function validation(field1){
				if(field1.value.length==0){
					alert("The Date field must not be empty.");
					field1.focus();
					return false;
				}
				if(field1.value.indexOf(" ")!=-1){
					alert("The Date field must not begin with a space.");
					field1.focus();
					return false;
				}
				return true;
				
			}
			
			
			/*If a required field is not filled, an alert box shows up.
			* Unless all required fields are filled, never advance to next page.
			*/
			function validate(field1, field2, field3, field4){
				if(field1.value.length==0){
					alert("The Month field must not be empty.");
					field1.focus();
					return false;
				}
				if(field1.value.indexOf(" ")!=-1){
					alert("The Month field must not begin with a space.");
					field1.focus();
					return false;
				}
				if(field2.value.length==0){
					alert("The Day field must not be empty.");
					field2.focus();
					return false;
				}
				if(field2.value.indexOf(" ")!=-1){
					alert("The Day field must not begin with a space.");
					field2.focus();
					return false;
				}
				if(field3.value.length==0){
					alert("The Year field must not be empty.");
					field3.focus();
					return false;
				}
				if(field3.value.indexOf(" ")!=-1){
					alert("The Year field must not begin with a space.");
					field3.focus();
					return false;
				}
				if(field4.value.length==0){
					alert("The Company Name field must not be empty.");
					field4.focus();
					return false;
				}
				if(field4.value.indexOf(" ")==0){ //can have space part of name
					alert("The Company Name field must not begin with a space.");
					field4.focus();
					return false;
				}
					return true;
				
			}

			
			function dataChoice(btnVar, frmVar, srcVar1, srcVar2, dbChoice){
				btnVar[0].src=srcVar1;
				btnVar[1].src=srcVar2;
				for(i=0; i<frmVar.length; i++){
					frmVar[i].db.value=dbChoice;
				}
				
			}	
					
			function dataChoice1(){
				document.btn1.src="../graphics/original_btn_01.gif";
				document.btn2.src="../graphics/experiment_btn_02.gif";
				document.form1.db.value="original";
				document.form2.db.value="original";
				document.form3.db.value="original";
				document.form4.db.value="original";
			}
			
			function dataChoice2(){
				document.btn1.src="../graphics/original_btn_02.gif";
				document.btn2.src="../graphics/experiment_btn_01.gif";
				document.form1.db.value="experiment";
				document.form2.db.value="experiment";
				document.form3.db.value="experiment";
				document.form4.db.value="experiment";
			}	
			
			function confirmDelete(hrefStr){
				//confirm("Are you sure you want to delete the data?");
				if(confirm("Are you sure you want to delete the data?")){
					location.href=hrefStr;
					//hrefStr = "addForm.php?choice=delete&evid="
					//"addForm.php?evid="+idVar+"&choice="+deleteVar;
				}
			}
			
			function disableAndAble(objElement){
				objElement.disabled = (!objElement.disabled)
			}
			
			function disableAndAble2Radio(objElement1, objElement2){
				if(objElement1.disabled){
					objElement1.disabled = (!objElement1.disabled)
				}
				if(objElement2.disabled){
				}
				else{
					objElement2.disabled = (!objElement2.disabled)
					objElement2.value = ""
				}
			}
			
			function disable2Radio(objElement1, objElement2){
				if(objElement1.disabled){
				}
				else{
					objElement1.disabled = (!objElement1.disabled)
					objElement1.value = ""
				}
				if(objElement2.disabled){
				}
				else{
					objElement2.disabled = (!objElement2.disabled)
					objElement2.value = ""
				} 
			}
			
			function disableRadio(objElement){
				if(objElement.disabled){
				}
				else{
					objElement.disabled = (!objElement.disabled)
					objElement.value = ""
				}	
			}
			
			function ableDate(moObj, dayObj, yearObj){
				var theDate = new Date()
				var mo = [theDate.getMonth()+1]
				var theDay = [theDate.getDate()]
				var theYear = [theDate.getFullYear()]
				if(moObj.disabled){
					moObj.disabled=(!moObj.disabled)
					moObj.selectedIndex=mo
				}
				if(dayObj.disabled){
					dayObj.disabled=(!dayObj.disabled)
					dayObj.selectedIndex=theDay
				}
				if(yearObj.disabled){
					yearObj.disabled=(!yearObj.disabled)
					yearObj.value=theYear
				}
			}
			
			function ableDateSt(moObj, dayObj, yearObj){
				var theDate = new Date()
				var mo = [theDate.getMonth()+1]
				var theDay = [theDate.getDate()]
				var theYear = [theDate.getFullYear()]
				if(moObj.disabled){
					moObj.disabled=(!moObj.disabled)
					moObj.selectedIndex=mo
				}
				if(dayObj.disabled){
					dayObj.disabled=(!dayObj.disabled)
					dayObj.selectedIndex=theDay
				}
				if(yearObj.disabled){
					yearObj.disabled=(!yearObj.disabled)
					yearObj.value=theYear
				}
			}
			
			function ableDateEn(moObj, dayObj, yearObj){
				
				if(moObj.disabled){
					moObj.disabled=(!moObj.disabled)
					moObj.selectedIndex=0
				}
				if(dayObj.disabled){
					dayObj.disabled=(!dayObj.disabled)
					dayObj.selectedIndex=0
				}
				if(yearObj.disabled){
					yearObj.disabled=(!yearObj.disabled)
					yearObj.value="N/A"
				}
			}
			
			function disableDate(moObj, dayObj, yearObj){
				if(moObj.disabled){}
				else{
					moObj.disabled = (!moObj.disabled)
					dayObj.disabled = (!dayObj.disabled)
					yearObj.disabled = (!yearObj.disabled)
					yearObj.value = "N/A"
					moObj.selectedIndex = 0
					dayObj.selectedIndex = 0
				}	
			}
			
			function frozenSelect(selectObj){
				if(selectObj.disabled){
					selectObj.selectedIndex = 0
					selectObj.options[0].frozenStatus
					//selectObj.options[0].selected = selectObj.options[0].frozenStatus
					/*
					for(i=0; i<selectObj.options.length; i++){
						selectObj.options[i].selected = selectObj.options[i].frozenStatus
					}
					*/
				}
				
			}
			
			function ableChecksOld(ck1, ck2, ck3){
				if(ck1.disabled){
					ck1.disabled = (!ck1.disabled)
				}
				if(ck2.disabled){
					ck2.disabled = (!ck2.disabled)
				}
				if(ck3.disabled){
					ck3.disabled = (!ck3.disabled)
				}
			}
			
			function disableChecksOld(check1, check2, check3){
				if(check1.disabled){}
				else{
					if(check1.checked){
						check1.checked = (!check1.checked)
					}
					check1.disabled = (!check1.disabled)
				}
				if(check2.disabled){}
				else{
					if(check2.checked){
						check2.checked = (!check2.checked)
					}
					check2.disabled = (!check2.disabled)
				}
				if(check3.disabled){}
				else{	
					if(check3.checked){
						check3.checked = (!check3.checked)
					}
					check3.disabled = (!check3.disabled)
				}
			}
			
			function ableChecks(ckArray){
				var num = ckArray.length
				for(i=0; i<num; i++){
					if(ckArray[i].disabled){
						ckArray[i].disabled = (!ckArray[i].disabled)
					}
				}
			}
			
			function disableChecks(checkArray){
				var num = checkArray.length
				for(i=0; i<num; i++){
					if(checkArray[i].disabled){}
					else{
						if(checkArray[i].checked){
							checkArray[i].checked = (!checkArray[i].checked)
						}
						checkArray[i].disabled = (!checkArray[i].disabled)
					}
				}
				
			}
			
			function ableRadios(radioArray){
				var num = radioArray.length
				for(i=0; i<num; i++){
					if(radioArray[i].disabled){
						radioArray[i].disabled = (!radioArray[i].disabled)
						
					}
				}
				radioArray[0].checked = (!radioArray[0].checked)
			}
			
			function disableRadios(radioArray){
				var num = radioArray.length
				for(i=0; i<num; i++){
					if(radioArray[i].disabled){}
					else{
						if(radioArray[i].checked){
							radioArray[i].checked = (!radioArray[i].checked)
						}
						radioArray[i].disabled = (!radioArray[i].disabled)
					}
				}
				
			}
			
			function ableTextbox(textbox){
				if(textbox.disabled){
					textbox.disabled = (!textbox.disabled)
				}
			}
			
			function disableTextbox(textbox){
				if(textbox.disabled){}
				else{
					textbox.value=""
					textbox.disabled = (!textbox.disabled)
				}
			}
			
			//started creating for onload, choose a radio button
			//however, the radio button selection doesn't remain
			//shows and quickly disappers
			function selectRadio(radioBtn, num){
				radioBtn[num].checked
			}
			
			//started creating for onload, disable by radio choice
			//however, doesn't detect which radio was selected
			function disableByRadio(radioBtn, mo, dayObj, yObj, cks, num){
				//radioBtn[num].checked
				
				if(radioBtn[0].checked){
					disableDate(mo, dayObj, yObj)
				}
				
				if(radioBtn[1].checked){
					disableChecks(cks)
				}
				
			}
			
			/*		
			function location(valArray){
				this.id = valArray[0];
				this.name = valArray[1];
				this.street = valArray[2];
				this.city = valArray[3];
				this.state = valArray[4];
				this.zip = valArray[5];
			}*/
			
			function loc(id, name, street, city, state, zip){
				this.id = id;
				this.name = name;
				this.street = street;
				this.city = city;
				this.state = state;
				this.zip = zip;
			}
				
			function setLocArray(id, name, street, city, state, zip){
				var size = locArray.length;
				locArray[size] = new loc(id, name, street, city, state, zip);
				
			}	
			
			function setLocArrayOld(valArray){
				var size = valArray.length;
				for(i=0; i<size; i++){
					locArray[i] = new location(valArray[i]);
				}
			}	
			
			function setTextBySelectTest(selectBox, element1, element2){
				var num = selectBox.selectedIndex;
				element1.value = locArray[num].street1;
				element2.value = locArray[num].city;
			}
			
			function setTextByDetSelect(selectBox, element){
				var num = selectBox.selectedIndex;
				if(num==0){
					element.value="";
					
				}
				else{
					var pos = num-1;
					element.value = detArray[pos].detcontent;
				}
			}
			
			function setTextBySelect(selectBox, element1, element2, element3, element4, element5, element6){
				var num = selectBox.selectedIndex;
				
				if(num==0){
					element1.value="";
					element2.value="";
					element3.value="";
					element4.value="";
					element5.value="";
					element6.value="";
				}
				else{
					var pos = num-1;
					element1.value = locArray[pos].street1;
					element2.value = locArray[pos].street2;
					element3.value = locArray[pos].city;
					element4.value = locArray[pos].state;
					element5.value = locArray[pos].zip;
					element6.value = locArray[pos].phone;
				}
			}
				
			function selectTest(element){
				element.value = locArray[1].theName;
			}
			
			function intTest(int1, int2){
				if(int1>int2){
					alert(int1+" is bigger than "+int2);
					location="testJs.php";
				}
				else if(int2>int1){
					alert(int2+" is bigger than "+int1);
					location="testJs.php";
				}
				else{
					alert("They are same size");
					location="testJs.php";
				}
			}
			
			function valueTest(select1, select2){
				var val1 = select1.options[select1.selectedIndex].value;
				var val2 = select2.options[select2.selectedIndex].value;
				intTest(val1, val2);
			}	
			
			
		var planArrayText = new Array();
		var planArrayVal = new Array();
		var planArrayFlag = new Array();
		
		planArrayText[0] = "Home Standard";
		planArrayText[1] = "Home Plus";
		planArrayText[2] = "Business Standard";
		planArrayText[3] = "Business Plus";
		planArrayVal[0] = "19.9";
		planArrayVal[1] = "39.9";
		planArrayVal[2] = "50";
		planArrayVal[3] = "100";
		planArrayFlag[0] = "off";
		planArrayFlag[1] = "off";
		planArrayFlag[2] = "on";
		planArrayFlag[3] = "on";
		
		var homeArrayText = new Array();
		var homeArrayVal = new Array();
		var busArrayText = new Array();
		var busArrayVal = new Array();
		var storeArrayText = new Array();
		var storeArrayVal = new Array();
		
		homeArrayText[0] = "3 months";
		homeArrayText[1] = "6 months";
		homeArrayText[2] = "9 months";
		homeArrayText[3] = "12 months";
		homeArrayVal[0] = "3";
		homeArrayVal[1] = "6";
		homeArrayVal[2] = "9";
		homeArrayVal[3] = "12";
		
		busArrayText[0] = "9 months";
		busArrayText[1] = "12 months";
		busArrayVal[0] = "9";
		busArrayVal[1] = "12";
		
		function selectConst(list1, list2){
			// for netscape to not show empty select box, 
			// maximum number of options must be prepared first in HTML
			list2.options.length = 0;
			var choice = list1.selectedIndex;
			
			if((choice==0)||(choice==1)){
				storeArrayText = homeArrayText;
				storeArrayVal = homeArrayVal;
				
			}
			else{
				storeArrayText = busArrayText;
				storeArrayVal = busArrayVal;
			}	
			
			var num = storeArrayText.length;
			for(var i=0; i<num; i++){
				list2.options[i] = new Option(storeArrayText[i], storeArrayVal[i]);
			}
			
			list2.options[0].selected = true; // need this line for netscape
			
			
			/*
			list1.options[choice].selected = true;
			
			if(navigator.appName=="Netscape"){
				history.go(0);
			}
			*/
			
			/*		
			var num = planArrayText.length;
			for(var i=0; i<num; i++){
				if((choice!=0)&&(choice!=1)){
					list2.options[i].text = planArrayText[i];
					list2.options[i].value = planArrayVal[i];
				}
				else if(planArrayFlag[i]!="off"){
					list2.options[i].text = planArrayText[i];
					list2.options[i].value = planArrayVal[i];
				}
				else{
					list2.options[i].text = "N/A";
					list2.options[i].value = "0";
				}
			}	
			*/
		}
			
