function showNext() { document.getElementById("nextFormPart").style.display = ""; document.getElementById("prevFormPart").style.display = "none"; } function mw_ValidateForm(validation, validateto) { var isFormValid = true; mw_HideBalloon(validateto); for (i = 0; i < validation.length && i <= validateto; i++) { var field = validation[i][0]; var fieldObj = document.getElementById(field); var isRequired = validation[i][1]; var regExString = validation[i][2]; var errorMessage = validation[i][3]; var theForm = document.forms[0]; if (fieldObj.type == "checkbox") { if (isRequired) { if (fieldObj.checked == false) { mw_ShowBalloon(GetLeft(fieldObj), GetTop(fieldObj), errorMessage); fieldObj.focus(); return false; } } } if (!fieldObj.disabled) { if (isRequired) { if (fieldObj.value == "") { // field is required and empty show error mw_ShowBalloon(GetLeft(fieldObj), GetTop(fieldObj), errorMessage); fieldObj.focus(); return false; } } if (fieldObj.value != "" && regExString != "") { var valid = true; //alert(regExString); eval('valid = ' + regExString.replace('[value]', fieldObj.value).replace('\\', '\\\\')); if (!valid) { mw_ShowBalloon(GetLeft(fieldObj), GetTop(fieldObj), errorMessage); fieldObj.focus(); return false; } } } } return true; } function mw_ShowBalloon(x, y, message) { var balloon = document.getElementById('balloon'); var balloontext = document.getElementById('balloontext'); var balloontable = document.getElementById('balloontable'); balloontext.innerHTML = message; balloon.style.visibility = "visible"; var leftTmp = x - 110; leftTmp = leftTmp + 'px'; balloon.style.left = leftTmp; var topTmp = y - balloontable.clientHeight + 5; topTmp = topTmp + 'px'; balloon.style.top = topTmp; HideDropDowns(x - 110, y - balloontable.clientHeight + 5, balloontable.clientWidth, balloontable.clientHeight); } function mw_HideBalloon() { var balloon = document.getElementById('balloon'); balloon.style.visibility = "hidden"; ShowDropDowns(); } function GetLeft(eElement) { if (!eElement && this) // if argument is invalid { // (not specified, is null or is 0) eElement = this; // and function is a method } // identify the element as the method owner var DL_bIE = document.all ? true : false; // initialize var to identify IE var nLeftPos = eElement.offsetLeft; // initialize var to store calculations var eParElement = eElement.offsetParent; // identify first offset parent element while (eParElement != null) { // move up through element hierarchy if (DL_bIE) // if browser is IE, then... { if (eParElement.tagName == "TD") // if parent a table cell, then... { nLeftPos += eParElement.clientLeft; // append cell border width to calcs } } else // if browser is Gecko, then... { if (eParElement.tagName == "TABLE") // if parent is a table, then... { // get its border as a number var nParBorder = parseInt(eParElement.border); if (isNaN(nParBorder)) // if no valid border attribute, then... { // check the table's frame attribute var nParFrame = eParElement.getAttribute('frame'); if (nParFrame != null) // if frame has ANY value, then... { nLeftPos += 1; // append one pixel to counter } } else if (nParBorder > 0) // if a border width is specified, then... { nLeftPos += nParBorder; // append the border width to counter } } } nLeftPos += eParElement.offsetLeft; // append left offset of parent eParElement = eParElement.offsetParent; // and move up the element hierarchy } // until no more offset parents exist return nLeftPos; // return the number calculated } function GetTop(eElement) { if (!eElement && this) // if argument is invalid { // (not specified, is null or is 0) eElement = this; // and function is a method } // identify the element as the method owner var DL_bIE = document.all ? true : false; // initialize var to identify IE var nTopPos = eElement.offsetTop; // initialize var to store calculations var eParElement = eElement.offsetParent; // identify first offset parent element while (eParElement != null) { // move up through element hierarchy if (DL_bIE) // if browser is IE, then... { if (eParElement.tagName == "TD") // if parent a table cell, then... { nTopPos += eParElement.clientTop; // append cell border width to calcs } } else // if browser is Gecko, then... { if (eParElement.tagName == "TABLE") // if parent is a table, then... { // get its border as a number var nParBorder = parseInt(eParElement.border); if (isNaN(nParBorder)) // if no valid border attribute, then... { // check the table's frame attribute var nParFrame = eParElement.getAttribute('frame'); if (nParFrame != null) // if frame has ANY value, then... { nTopPos += 1; // append one pixel to counter } } else if (nParBorder > 0) // if a border width is specified, then... { nTopPos += nParBorder; // append the border width to counter } } } nTopPos += eParElement.offsetTop; // append top offset of parent eParElement = eParElement.offsetParent; // and move up the element hierarchy } // until no more offset parents exist return nTopPos; // return the number calculated } function IsDate(pValue) { // check to make sure that at least the characters // are in the right place var regEx = new RegExp("^(\\d{1,2}/\\d{1,2}/\\d{4})$", "i"); if (regEx.exec(pValue) == null) { return false; } // parse out the different date parts var year = new Number(pValue.substr(pValue.lastIndexOf('/') + 1, 4)); var day = new Number(pValue.substring(pValue.indexOf('/') + 1, pValue.lastIndexOf('/'))); var month = new Number(pValue.substr(pValue, pValue.indexOf('/'))); // do a quick data range check if (!(month > 0 && month < 13)) { return false; } if (!(day > 0 && day < 32)) { return false; } if (year > 2500) { return false; } if (year >= 1900 && year < 2000) { year -= 1900 } // month argument must be in the range 1 - 12 month = month - 1; // javascript month range : 0- 11 var tempDate = new Date(year, month, day); if ((tempDate.getYear() == year) && (month == tempDate.getMonth()) && (day == tempDate.getDate())) { return true; } else { return false; } } function RegExCheck(pValue, pRegExp) { var regEx = new RegExp("^(" + pRegExp + ")$", "i"); if (regEx.exec(pValue) == null) { return false; } return true; } function IsPassword(pValue) { if (pValue.length < 7) return false; var haslowerletter = true; var hasupperletter = true; var hasnumber = true; var regEx = new RegExp("[a-z]+"); if (regEx.exec(pValue) == null) { haslowerletter = false; } regEx = new RegExp("[A-Z]+"); if (regEx.exec(pValue) == null) { hasupperletter = false; } regEx = new RegExp("\\d+", "i"); if (regEx.exec(pValue) == null) { hasnumber = false; } if ((haslowerletter && hasupperletter) || (haslowerletter && hasnumber) || (hasupperletter && hasnumber)) { return true; } return false; } function HideDropDowns(bleft, btop, bwidth, bheight) { // the height & width of the dropdowns on the form must be set for this to work var theForm = document.forms[0] for (i = 0; i < theForm.elements.length; i++) { if (theForm.elements[i].type == "select-one") { var ddl = document.getElementById(theForm.elements[i].id); var ddleft = GetLeft(ddl); var ddtop = GetTop(ddl); if ((bleft + bwidth < ddleft) || (btop + bheight < ddtop + 6) || (bleft > ddleft + ddl.style.posWidth) || (btop > ddtop + ddl.style.posHeight)) { ddl.style.visibility = "visible"; } else { ddl.style.visibility = "hidden"; } } } } function ShowDropDowns() { var theForm = document.forms[0] for (i = 0; i < theForm.elements.length; i++) { if (theForm.elements[i].type == "select-one") { var ddl = document.getElementById(theForm.elements[i].id); ddl.style.visibility = "visible"; } } } function mw_OnFormChange(validateto, step) { var validation; var isFormValid; var queryString; var hostname; validation = new Array( new Array("mw_txtFirstName", true, "RegExCheck('[value]','[a-zA-Z0-9\\s]{2,50}')", "First name is required."), new Array("mw_txtLastName", true, "RegExCheck('[value]','[a-zA-Z0-9\\s]{2,50}')", "Last name is required."), new Array("mw_txtEmailAddress", true, "RegExCheck('[value]','[a-zA-Z0-9._\-]+[@]\([a-zA-Z0-9\-]+[.])+[a-zA-Z0-9._\-]+')", "A valid email address is required."), new Array("mw_txtAddress1", true, "", "Address is required."), new Array("mw_txtCity", true, "RegExCheck('[value]','[a-zA-Z0-9\\s]{3,50}')", "City name is required."), new Array("mw_ddlState", true, "", "State is required."), new Array("mw_txtZipCode", true, "", "A postal code is required."), new Array("mw_txtHomePhoneArea", true, "RegExCheck('[value]','[2-9]\\d{2}')", "A valid home phone area code is required."), new Array("mw_txtHomePhonePrefix", true, "RegExCheck('[value]','\\d{3}')", "A valid home phone prefix is required."), new Array("mw_txtHomePhoneSuffix", true, "RegExCheck('[value]','\\d{4}')", "A valid home phone suffix is required.")); isFormValid = mw_ValidateForm(validation, validateto); if (isFormValid && step == 1) { return true; } if (isFormValid && step == 2) { hostname = "http://stage.flooringleadgen.com/ccaformsubmit.ashx?" + BuildQueryString(); window.location.href = hostname; } return false; } function BuildQueryString() { var queryString = ''; var formElements; var encodeString; var theForm = document.forms[0]; formElements = new Array("mw_txtFirstName", "mw_txtLastName", "mw_txtEmailAddress", "mw_txtAddress1", "mw_txtAddress2", "mw_txtCity", "mw_ddlState", "mw_txtZipCode", "mw_txtHomePhoneArea", "mw_txtHomePhonePrefix", "mw_txtHomePhoneSuffix", "mw_rbContactAm", "mw_rbContactPm", "mw_ddlNumberOfRooms", "mw_chkFloorHardwood", "mw_chkFloorLaminate", "mw_chkFloorCleaningServices", "mw_chkFloorTile", "mw_chkFloorVinyl", "mw_chkFloorInstallationServices", "mw_chkFloorCarpet", "mw_chkFloorAreaRugs","mw_chkFloorRefinishing", "mw_ddlTimeFrame", "mw_rbPremeasureWeekday", "mw_rbPremeasureWeekend", "mw_rbPremeasureAm", "mw_rbPremeasurePm", "mw_txtComments", "location_id", "redirect", "type", "storebrand", "marketinglevel", "mw_rbHaveBeenToStoreYes", "mw_rbHaveBeenToStoreNo", "mw_rbHaveOrderPendingYes", "mw_rbHaveOrderPendingNo"); for (i = 0; i < formElements.length; i++) { var field = formElements[i]; var fieldObj = document.getElementById(field); if(fieldObj) { if (fieldObj.name == "redirect") { // redirect url should be encoded queryString += fieldObj.name + "=" + encodeURIComponent(fieldObj.value) + "&" } else if (fieldObj.name == "marketinglevel" && (typeof leadsourcetracking_webcom != 'undefined')) { // marketing level override from third party if (leadsourcetracking_webcom.marketingLevel == "organic") queryString += fieldObj.name + "=unknown&"; else queryString += fieldObj.name + "=" + leadsourcetracking_webcom.marketingLevel + "&"; } else if ((fieldObj.type == "checkbox") || (fieldObj.type == "radio")) { if (fieldObj.checked == true) queryString += fieldObj.name + "=" + fieldObj.value + "&"; } else { // all other fields queryString += fieldObj.name + "=" + fieldObj.value + "&"; } } } return queryString; } function disableButton() { window.setTimeout('disableAfterTimeout()', 0); } function disableAfterTimeout() { document.all('ImageButton2').disabled = true; } function rollSubmit() { if (mw_OnFormChange(10)) { disableButton(); document.all('ImageButton1').src = rollImage.src; alert('true'); return true; } else { alert('false'); return false; } } function showBalloon2(message) { var balloon = document.getElementById('balloon'); var ballontext = document.getElementById('balloontext'); var balloontable = document.getElementById('balloontable'); var x = GetLeft(document.getElementById('ddlBDay')) var y = GetTop(document.getElementById('ddlBDay')) balloontext.innerHTML = message; balloon.style.visibility = "visible"; balloon.style.left = x - 110; balloon.style.top = y - balloontable.clientHeight + 5; } var isNN = (navigator.appName.indexOf("Netscape") != -1); function autoTab(input, len, e) { var keyCode = (isNN) ? e.which : e.keyCode; var filter = (isNN) ? [0, 8, 9] : [0, 8, 9, 16, 17, 18, 37, 38, 39, 40, 46]; if (input.value.length >= len && !containsElement(filter, keyCode)) { input.value = input.value.slice(0, len); input.form[(getIndex(input) + 1) % input.form.length].focus(); } function containsElement(arr, ele) { var found = false, index = 0; while (!found && index < arr.length) if (arr[index] == ele) found = true; else index++; return found; } function getIndex(input) { var index = -1, i = 0, found = false; while (i < input.form.length && index == -1) if (input.form[i] == input) index = i; else i++; return index; } return true; }document.write('

Apply for Credit

Our special financing programs through GE Money make it easy for you to turn your dreams of a new floor into a reality without emptying your bank account or tying up your bank card lines! Fill out an application today or visit us and ask about our Special Financing programs.

*required

First Name*
Last Name*
E-Mail*
Address*
City*
State/Province*
Zip/Postal Code*
Phone*
Have you been in the store within last 30 days?
Yes    No
Do you have an order pending with the store?
Yes    No
Additional Comments or Questions
 
 

Flooring America – Disclaimer
Supplying the information above may result in a Flooring America representative contacting you via phone and/or email.

Click here to complete the GE Money application.

');