// JavaScript Document


function formVerifyMain() {

var errorCopy = "";

var emailCopy = "";

var filter = /^.+@.+\..{2,3}$/;

var email = document.getElementById("email").value;

var verify = 0;



if(document.getElementById("termsCheckBox").checked) {


if(document.getElementById("name").value == "") {

errorCopy = "name";

}

else {


}

if(document.getElementById("phone").value == "") {

errorCopy = "phone";

}

else {


}

if(document.getElementById("email").value == "") {

errorCopy = "email";

}

else {

if (filter.test(email)) {

}

else {

emailCopy = "email";


}


}

if(document.getElementById("city").value == "") {

errorCopy = "city";

}

else {


}

if(document.getElementById("state").selectedIndex == 0) {

errorCopy = "state";

}

else {


}

if(document.getElementById("type").selectedIndex == 0) {

errorCopy = "type";

}

else {


}

if(errorCopy == "") {


}

else {

verify++;
alert("Please enter required fields");

}

if(emailCopy == "") {

}

else {

verify++;
alert("Please enter a valid email");

}

if(verify > 0) {

return false;

}

else {

//alert("Sorry, we are currently working on bringing you are a much more fast and secure process.  Due to this, we are momentarily unable to collect quote requests.  Please check back in a few days!");

return true;

}

}

else {

alert("Oops, Please don't forget to agree to our Terms of Service");

return false;

}

}




function formVerifyProfile() {

var errorCopy = "";

var emailCopy = "";

var filter = /^.+@.+\..{2,3}$/;

var email = document.getElementById("email").value;

var verify = 0;


if(document.getElementById("termsCheckBox").checked) {


if(document.getElementById("name").value == "") {

errorCopy = "name";

}

else {


}

if(document.getElementById("phone").value == "") {

errorCopy = "phone";

}

else {


}

if(document.getElementById("email").value == "") {

errorCopy = "email";

}

else {

if (filter.test(email)) {

}

else {

emailCopy = "email";


}


}

if(document.getElementById("city").value == "") {

errorCopy = "city";

}

else {


}

if(document.getElementById("state").selectedIndex == 0) {

errorCopy = "state";

}

else {


}

if(document.getElementById("type").selectedIndex == 0) {

errorCopy = "type";

}

else {


}

if(errorCopy == "") {


}

else {

verify++;
alert("Please enter required fields");

}

if(emailCopy == "") {

}

else {

verify++;
alert("Please enter a valid email");

}

if(verify > 0) {

return false;

}

else {

//alert("Sorry, we are currently working on bringing you are a much more fast and secure process.  Due to this, we are momentarily unable to collect quote requests.  Please check back in a few days!");

return true;

}


}

else {

alert("Oops, Please don't forget to agree to our Terms of Service");

return false;

}

}









function formVerifyContractorProfile() {

var errorCopy = "";

var emailCopy = "";

var filter = /^.+@.+\..{2,3}$/;

var email = document.getElementById("email").value;

var verify = 0;


if(document.getElementById("name").value == "") {

errorCopy = "name";

}

else {


}

if(document.getElementById("phone").value == "") {

errorCopy = "phone";

}

else {


}

if(document.getElementById("email").value == "") {

errorCopy = "email";

}

else {

if (filter.test(email)) {

}

else {

emailCopy = "email";


}


}

if(document.getElementById("city").value == "") {

errorCopy = "city";

}

else {


}

if(document.getElementById("state").selectedIndex == 0) {

errorCopy = "state";

}

else {


}

if(document.getElementById("type").selectedIndex == 0) {

errorCopy = "type";

}

else {


}

if(errorCopy == "") {


}

else {

verify++;
alert("Please enter required fields");

}

if(emailCopy == "") {

}

else {

verify++;
alert("Please enter a valid email");

}

if(verify > 0) {

return false;

}

else {

//alert("Sorry, we are currently working on bringing you are a much more fast and secure process.  Due to this, we are momentarily unable to collect quote requests.  Please check back in a few days!");

return true;

}


}








function formVerifyBusinessProfile() {

var errorCopy = "";

var emailCopy = "";

var filter = /^.+@.+\..{2,3}$/;

var email = document.getElementById("email").value;

var verify = 0;

if(document.getElementById("termsCheckBox").checked) {


if(document.getElementById("name").value == "") {

errorCopy = "name";

}

else {


}

if(document.getElementById("phone").value == "") {

errorCopy = "phone";

}

else {


}

if(document.getElementById("email").value == "") {

errorCopy = "email";

}

else {

if (filter.test(email)) {

}

else {

emailCopy = "email";


}


}

if(document.getElementById("city").value == "") {

errorCopy = "city";

}

else {


}

if(document.getElementById("state").selectedIndex == 0) {

errorCopy = "state";

}

else {


}

if(document.getElementById("address").value == "") {

errorCopy = "type";

}

else {


}

if(errorCopy == "") {


}

else {

verify++;
alert("Please enter required fields");

}

if(emailCopy == "") {

}

else {

verify++;
alert("Please enter a valid email");

}

if(verify > 0) {

return false;

}

else {

//alert("Sorry, we are currently working on bringing you are a much more fast and secure process.  Due to this, we are momentarily unable to collect quote requests.  Please check back in a few days!");

return true;

}


}

else {

alert("Oops, Please don't forget to agree to our Terms of Service");

return false;

}

}




function formVerifyBasicProfile() {

var errorCopy = "";

var emailCopy = "";

var filter = /^.+@.+\..{2,3}$/;

var email = document.getElementById("email").value;

var verify = 0;

if(document.getElementById("termsCheckBox").checked) {


if(document.getElementById("name").value == "") {

errorCopy = "name";

}

else {


}

if(document.getElementById("phone").value == "") {

errorCopy = "phone";

}

else {


}

if(document.getElementById("email").value == "") {

errorCopy = "email";

}

else {

if (filter.test(email)) {

}

else {

emailCopy = "email";


}


}

if(document.getElementById("city").value == "") {

errorCopy = "city";

}

else {


}

if(document.getElementById("state").selectedIndex == 0) {

errorCopy = "state";

}

else {


}

if(document.getElementById("address").value == "") {

errorCopy = "type";

}

else {


}

if(errorCopy == "") {


}

else {

verify++;
alert("Please enter required fields");

}

if(emailCopy == "") {

}

else {

verify++;
alert("Please enter a valid email");

}

if(verify > 0) {

return false;

}

else {

//alert("Sorry, we are currently working on bringing you are a much more fast and secure process.  Due to this, we are momentarily unable to collect quote requests.  Please check back in a few days!");

return true;

}


}



else {

alert("Oops, Please don't forget to agree to our Terms of Service");

return false;

}

}









function formVerifyContact() {

var errorCopy = "";

var emailCopy = "";

var filter = /^.+@.+\..{2,3}$/;

var email = document.getElementById("email").value;

var verify = 0;


if(document.getElementById("name").value == "") {

errorCopy = "name";

}

else {


}


if(document.getElementById("email").value == "") {

errorCopy = "email";

}

else {

if (filter.test(email)) {

}

else {

emailCopy = "email";


}


}

if(document.getElementById("subject").selectedIndex == 0) {

errorCopy = "subject";

}

else {


}


if(document.getElementById("comments").value == "") {

errorCopy = "comments";

}

else {


}


if(errorCopy == "") {


}


else {

verify++;
alert("Please enter required fields");

}

if(emailCopy == "") {

}

else {

verify++;
alert("Please enter a valid email");

}

if(verify > 0) {

return false;

}

else {

return true;

}

}



function homeSelect() {

if (document.getElementById("state").selectedIndex == 0) {

alert("Please select a state");

}

if (document.getElementById("state").selectedIndex == 1) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-alabama/";

}

if (document.getElementById("state").selectedIndex == 2) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-alaska/";

}

if (document.getElementById("state").selectedIndex == 3) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-arizona/";

}

if (document.getElementById("state").selectedIndex == 4) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-arkansas/";

}

if (document.getElementById("state").selectedIndex == 5) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-california/";

}

if (document.getElementById("state").selectedIndex == 6) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-colorado/";

}

if (document.getElementById("state").selectedIndex == 7) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-connecticut/";

}

if (document.getElementById("state").selectedIndex == 8) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-delaware/";

}

if (document.getElementById("state").selectedIndex == 9) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-florida/";

}

if (document.getElementById("state").selectedIndex == 10) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-georgia/";

}

if (document.getElementById("state").selectedIndex == 11) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-hawaii/";

}

if (document.getElementById("state").selectedIndex == 12) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-idaho/";

}

if (document.getElementById("state").selectedIndex == 13) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-illinois/";

}

if (document.getElementById("state").selectedIndex == 14) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-indiana/";

}

if (document.getElementById("state").selectedIndex == 15) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-iowa/";

}

if (document.getElementById("state").selectedIndex == 16) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-kansas/";

}

if (document.getElementById("state").selectedIndex == 17) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-kentucky/";

}

if (document.getElementById("state").selectedIndex == 18) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-louisiana/";

}

if (document.getElementById("state").selectedIndex == 19) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-maine/";

}

if (document.getElementById("state").selectedIndex == 20) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-maryland/";

}

if (document.getElementById("state").selectedIndex == 21) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-massachusetts/";

}

if (document.getElementById("state").selectedIndex == 22) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-michigan/";

}

if (document.getElementById("state").selectedIndex == 23) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-minnesota/";

}

if (document.getElementById("state").selectedIndex == 24) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-mississippi/";

}

if (document.getElementById("state").selectedIndex == 25) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-missouri/";

}

if (document.getElementById("state").selectedIndex == 26) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-nebraska/";

}

if (document.getElementById("state").selectedIndex == 27) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-nevada/";

}

if (document.getElementById("state").selectedIndex == 28) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-new-hampshire/";

}

if (document.getElementById("state").selectedIndex == 29) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-new-jersey/";

}

if (document.getElementById("state").selectedIndex == 30) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-new-mexico/";

}

if (document.getElementById("state").selectedIndex == 31) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-new-york/";

}

if (document.getElementById("state").selectedIndex == 32) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-north-carolina/";

}

if (document.getElementById("state").selectedIndex == 33) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-north-dakota/";

}

if (document.getElementById("state").selectedIndex == 34) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-ohio/";

}

if (document.getElementById("state").selectedIndex == 35) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-oklahoma/";

}

if (document.getElementById("state").selectedIndex == 36) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-oregon/";

}

if (document.getElementById("state").selectedIndex == 37) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-pennsylvania/";

}

if (document.getElementById("state").selectedIndex == 38) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-rhode-island/";

}

if (document.getElementById("state").selectedIndex == 39) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-south-carolina/";

}

if (document.getElementById("state").selectedIndex == 40) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-south-dakota/";

}

if (document.getElementById("state").selectedIndex == 41) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-tennessee/";

}

if (document.getElementById("state").selectedIndex == 42) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-texas/";

}

if (document.getElementById("state").selectedIndex == 43) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-utah/";

}

if (document.getElementById("state").selectedIndex == 44) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-vermont/";

}

if (document.getElementById("state").selectedIndex == 45) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-virginia/";

}

if (document.getElementById("state").selectedIndex == 46) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-washington/";

}

if (document.getElementById("state").selectedIndex == 47) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-washington-dc/";

}

if (document.getElementById("state").selectedIndex == 48) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-west-virginia/";

}

if (document.getElementById("state").selectedIndex == 49) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-wisconsin/";

}

if (document.getElementById("state").selectedIndex == 50) {

window.location.href = "http://www.remodelconnect.com/contractors/remodeling-contractors-wyoming/";

}

}




