// JavaScript Document var fomError = ""; var missingFlag = ""; var missingInfo = ""; function formcheck(fname,lname){ formError = ""; missingFlag = ""; missingInfo = ""; if(document.book.xofficeLoc.selectedIndex == "0"){ missingFlag = "Y"; missingInfo += "Please select a showroom near you in the drop down menu at the top of the form\n"; } if(document.book.firstname.value == ""){ missingFlag = "Y"; missingInfo += "First Name is Required\n"; } if(document.book.lastname.value == ""){ missingFlag = "Y"; missingInfo += "Last Name is Required\n"; } if(document.book.address.value == ""){ missingFlag = "Y"; missingInfo += "Address is Required\n"; } if(document.book.city.value == ""){ missingFlag = "Y"; missingInfo += "City is Required\n"; } if(document.book.zip.value == ""){ missingFlag = "Y"; missingInfo += "Zip Code is Required\n"; } if(document.book.firstname.value == ""){ missingFlag = "Y"; missingInfo += "First Name is Required\n"; } if(document.book.phone.value == "" && document.book.email.value == ""){ missingFlag = "Y"; missingInfo += "Either a phone number or email address is required (one or the other)\n"; } if(document.book.squarefeet.value == ""){ missingFlag = "Y"; missingInfo += "Indicate your desired square footage\n"; } //alert(fname+' '+lname); if(missingFlag == "Y"){ alert('Hello '+fname+' '+lname+',\n\tYou are missing some required fields:\n'+missingInfo); return false; } } // JavaScript Document arRecord = new Array() arRecord[1] = new Array() arRecord[1][1] = "" // Fields, although in our arRecord[1][2] = "" // example, are only strings, arRecord[1][3] = "" // can be numbers, URLS, filenames, etc. arRecord[1][4] = "" // In other words, they can contain arRecord[1][5] = "" // the data to be displayed, or they arRecord[1][6] = "" // can contain pointers // to other sources for the data. arRecord[2] = new Array() arRecord[2][1] = "" arRecord[2][2] = "" arRecord[2][3] = "" arRecord[2][4] = "" arRecord[2][5] = "" arRecord[2][6] = "" arRecord[3] = new Array() arRecord[3][1] = "" arRecord[3][2] = "" arRecord[3][3] = "" arRecord[3][4] = "" arRecord[3][5] = "" arRecord[3][6] = "" arRecord[4] = new Array() arRecord[4][1] = "" arRecord[4][2] = "" arRecord[4][3] = "" arRecord[4][4] = "" arRecord[4][5] = "" arRecord[4][6] = "" NS4 = (document.layers) ? 1 : 0; IE4 = (document.all) ? 1 : 0; ver4 = (NS4 || IE4) ? 1 : 0; var curRecord = 1; var maxRecords = arRecord.length-1; var maxFields = arRecord[1].length-1; function upDate() { if (document.images) { document.images["slidePic"].src="images/homepic00" + curRecord + ".jpg" }; if (!ver4) { return }; for (i=1; i<=maxFields; i++) { if (NS4) { whichEl = eval("document.elField" + i + ".document"); with (whichEl) { open(); write("" + arRecord[curRecord][i] + ""); close(); } } else { whichEl = eval("document.all.elField" + i); whichEl.innerHTML = "" + arRecord[curRecord][i] + ""; } } } function showNext() { curRecord = (curRecord < maxRecords) ? ++curRecord : 1; upDate(); } function showPrev() { curRecord = (curRecord > 1) ? --curRecord : maxRecords; upDate(); }