function ChangeUsing(div,color) {
    if (div == "school") {
        document.images.schoolzone.src = "images/school-usingyourled-schoolzone-" + color + ".gif";
        document.images.countdown.src = "images/school-usingyourled-countdown-" + color + ".gif";
        document.images.birthday.src = "images/school-usingyourled-birthday-" + color + ".gif";
        document.images.sports.src = "images/school-usingyourled-sports-" + color + ".gif";
        document.images.sponsors.src = "images/school-usingyourled-sponsors-" + color + ".gif";
        document.images.serve.src = "images/school-usingyourled-serve-" + color + ".gif";
    } else if (div == "church") {
        document.images.inform.src = "images/church-usingyourled-inform-" + color + ".gif";
        document.images.invite.src = "images/church-usingyourled-invite-" + color + ".gif";
        document.images.identify.src = "images/church-usingyourled-identify-" + color + ".gif";
        document.images.event1.src = "images/church-usingyourled-event-" + color + ".gif";
        document.images.sponsors.src = "images/school-usingyourled-sponsors-" + color + ".gif";
        document.images.serve.src = "images/school-usingyourled-serve-" + color + ".gif";
    } else if (div == "military") {
        document.images.mwr.src = "images/military-usingyourled-mwr-" + color + ".gif";
        document.images.threat.src = "images/military-usingyourled-threat-" + color + ".gif";
        document.images.congrats.src = "images/military-usingyourled-congrats-" + color + ".gif";
        document.images.welcome.src = "images/military-usingyourled-welcome-" + color + ".gif";
        document.images.serve.src = "images/school-usingyourled-serve-" + color + ".gif";
    } else if (div == "municipal") {
        document.images.schoolzone.src = "images/school-usingyourled-schoolzone-" + color + ".gif";
        document.images.birthday.src = "images/school-usingyourled-birthday-" + color + ".gif";
        document.images.sports.src = "images/school-usingyourled-sports-" + color + ".gif";
        document.images.sponsors.src = "images/school-usingyourled-sponsors-" + color + ".gif";
        document.images.serve.src = "images/school-usingyourled-serve-" + color + ".gif";
     } else if (div == "university") {
        document.images.event.src = "images/university-usingyourled-event-" + color + ".gif";
        document.images.market.src = "images/university-usingyourled-market-" + color + ".gif";
        document.images.traffic.src = "images/university-usingyourled-traffic-" + color + ".gif";
        document.images.awards.src = "images/university-usingyourled-awards-" + color + ".gif";
        document.images.sports.src = "images/school-usingyourled-sports-" + color + ".gif";
        document.images.sponsors.src = "images/school-usingyourled-sponsors-" + color + ".gif";
     }
}

function ExpandContact(id) {
    document.getElementById(id).style.display = "inline";
    document.getElementById(id + '-link').style.display = "none";
}

function CloseContact(id) {
    document.getElementById(id).style.display = "none";
    document.getElementById(id + '-link').style.display = "inline";
}

function CheckState() {
    if (document.form.contact_state.value == "CA") {
        document.getElementById("county").style.display = "inline";
        document.getElementById("california").style.display = "inline";
        document.getElementById("texas").style.display = "none";
    } else if (document.form.contact_state.value == "TX") {
        document.getElementById("county").style.display = "inline";
        document.getElementById("texas").style.display = "inline";
        document.getElementById("california").style.display = "none";
    } else {
        document.getElementById("county").style.display = "none";
        document.getElementById("california").style.display = "none";
        document.getElementById("texas").style.display = "none";
    }
}

function CheckState2() {
    if (document.form.lease_state.value == "CA") {
        document.getElementById("county").style.display = "inline";
        document.getElementById("california").style.display = "inline";
        document.getElementById("texas").style.display = "none";
    } else if (document.form.lease_state.value == "TX") {
        document.getElementById("county").style.display = "inline";
        document.getElementById("texas").style.display = "inline";
        document.getElementById("california").style.display = "none";
    } else {
        document.getElementById("county").style.display = "none";
        document.getElementById("california").style.display = "none";
        document.getElementById("texas").style.display = "none";
    }
}

function ContactQuote() {
    if (document.URL.indexOf("quote") != -1) {
        document.getElementById('quoteinfo').style.display = "inline";
        document.getElementById('quoteinfo-link').style.display = "none";
    } else if (document.URL.indexOf("lifeway") != -1) {
        document.getElementById('quoteinfo').style.display = "inline";
        document.getElementById('quoteinfo-link').style.display = "none";
    }
    CheckState();
}

function FormVerify() {
    var message = "Please complete the following: ";
    if (document.form.contact_name.value=="") { message = message + "\n Your Name"; }
    if (document.form.contact_email.value=="") { message = message + "\n Email Address"; }
    if (document.form.contact_organization.value=="") { message = message + "\n Organization Name"; }
    if (document.form.contact_areacode.value=="" && document.form.contact_state.value!="International") { message = message + "\n Area Code"; }
    if (document.form.contact_phone.value=="") { message = message + "\n Phone Number"; }
    if (document.form.contact_address.value=="") { message = message + "\n Street Address"; }
    if (document.form.contact_city.value=="" && document.form.contact_state.value!="International") { message = message + "\n City"; }
    if (document.form.contact_state.value=="") { message = message + "\n State"; }
    if (document.form.contact_zip.value=="" && document.form.contact_state.value!="International") { message = message + "\n Zip Code"; }
    if (message == "Please complete the following: ") {
        document.form.submit();
    } else {
        alert(message);
        return false;
   }
}

function ChangeLeadsource(chosen, division) {
    var selbox = document.form.contact_leadsource;
    if (division == "none") { division = document.form.contact_division.value.toLowerCase(); }
    selbox.options.length = 0;
    if (chosen == "") { selbox.options[selbox.options.length] = new Option('-Please choose from above-','x5WEB - Not Specified'); }
    if (division == "church") {
        if (chosen == "search_engine") {
            selbox.options[selbox.options.length] = new Option('-Please Choose Search Engine-','15ENGN - Not Specified');
	    selbox.options[selbox.options.length] = new Option('AOL Search','15AOL - AOL Search');
	    selbox.options[selbox.options.length] = new Option('Ask.com','15ASK - Ask.com Search');
	    selbox.options[selbox.options.length] = new Option('Google','15GOOG - Google');
            selbox.options[selbox.options.length] = new Option('MSN Search','15MSN - MSN Search');
	    selbox.options[selbox.options.length] = new Option('Yahoo','15YAH - Yahoo');
	    selbox.options[selbox.options.length] = new Option('Other','15ENGN - Other');
        } else if (chosen == "link") {
	    selbox.options[selbox.options.length] = new Option('-Please Choose Site-','15LINK - Link not specified');
	    selbox.options[selbox.options.length] = new Option('BaptistLeaderSource.com','15BLS - BaptistLeaderSource.com');
	    selbox.options[selbox.options.length] = new Option('CatholicLeaderSource.com','15CLS - CatholicLeaderSource.com');
	    selbox.options[selbox.options.length] = new Option('ChristianityToday.com','15CTI - ChristianityToday.com');
	    selbox.options[selbox.options.length] = new Option('ChurchCentral.com','15CHCE - ChurchCentral.com');
	    selbox.options[selbox.options.length] = new Option('ChurchExecutive.com','15CHEX - ChurchExecutive.com');
	    selbox.options[selbox.options.length] = new Option('ChurchSignGenerator.com','15CSG - ChurchSignGenerator.com');
	    selbox.options[selbox.options.length] = new Option('ChurchWorldDirect.com (CWD)','15CWD - ChurchWorldDirect.com');
	    selbox.options[selbox.options.length] = new Option('CrossGuide.com','15CROW - CrossGuide.com');
	    selbox.options[selbox.options.length] = new Option('EpiscopalLeaderSource.com','15ELS - EpiscopalLeaderSource.com');
	    selbox.options[selbox.options.length] = new Option('FloridaBaptistWitness.com','15FBW - FloridaBaptistWitness.com');
	    selbox.options[selbox.options.length] = new Option('LutheranLeaderSource.com','15LLS - LutheranLeaderSource.com');
	    selbox.options[selbox.options.length] = new Option('MethodistLeaderSource.com','15MLS - MethodistLeaderSource.com');
	    selbox.options[selbox.options.length] = new Option('MinistryDiscounts.com','15MIDI - MinistryDiscounts.com');
	    selbox.options[selbox.options.length] = new Option('MinistryValuesGrowingChurches.com','15MVGC - MinistryValuesGrowingChurches.com');
	    selbox.options[selbox.options.length] = new Option('OneChurchSource.com','15OCS - OneChurchSource.com');
	    selbox.options[selbox.options.length] = new Option('OnlineChristianMall.com','15OCM - OnlineChristianMall.com');
	    selbox.options[selbox.options.length] = new Option('Outreach.com (SermonCentral.com)','15SERM - Outreach.com (SermonCentral.com)');
	    selbox.options[selbox.options.length] = new Option('Pastor & Church Leader Connection (NRM-INC.com)','15PCLC - Pastor & Church Leader Connection');
	    selbox.options[selbox.options.length] = new Option('PastorResources.com','15PR - PastorResources.com');
	    selbox.options[selbox.options.length] = new Option('PresbyterianLeaderSource.com','15PLS - PresbyterianLeaderSource.com');
	    selbox.options[selbox.options.length] = new Option('ReligiousProductNews.com','15RPN - ReligiousProductNews.com');
            selbox.options[selbox.options.length] = new Option('SignSearch.com - Local','15SSL - SignSearch.com - Local');
            selbox.options[selbox.options.length] = new Option('SignSearch.com - National','15SSN - SignSearch.com - National');
            selbox.options[selbox.options.length] = new Option('UltimateChurchSuppliersGuide.com','15UCSG - UltimateChurchSuppliersGuide.com');
	    selbox.options[selbox.options.length] = new Option('Other','15LINK - Other link');
        } else if (chosen == "card_deck") {
            selbox.options[selbox.options.length] = new Option('-Please Choose Publication or Card Deck-','11DECK - Publication or card deck not specified');
            selbox.options[selbox.options.length] = new Option('Church Executive','12CHEX - Church Executive');
            selbox.options[selbox.options.length] = new Option('Ministry Values Growing Churches Card Deck','11MVGC - Ministry Values Growing Churches Card Deck');
            selbox.options[selbox.options.length] = new Option('Pastors Information Card Deck','11PIC - Pastors Information Card Deck');
            selbox.options[selbox.options.length] = new Option('Pastor & Church Leader Connection Card Deck','11PCLC - Pastor & Church Leader Connection Card Deck');
            selbox.options[selbox.options.length] = new Option('Pastor Resources Card Deck','11PR - Pastor Resources Card Deck');
            selbox.options[selbox.options.length] = new Option('Worship Facilities Magazine','12WFM - Worship Facilities Magazine');
            selbox.options[selbox.options.length] = new Option('Your Church Magazine','12YCM - Your Church Magazine');
            selbox.options[selbox.options.length] = new Option('Other','11DECK - Other publication or card deck');
        } else if (chosen == "other") {
            selbox.options[selbox.options.length] = new Option('-Please type where below-','12OTHR - Not Specified');
        } else if (chosen == "email") {
            selbox.options[selbox.options.length] = new Option('-Please Choose One-','12OTHR - Not Specified');
            selbox.options[selbox.options.length] = new Option('Christianity Today','15CTIE - Christianity Today Email');
            selbox.options[selbox.options.length] = new Option('Church World Direct','15CWDE - Church World Direct Email');
      	    selbox.options[selbox.options.length] = new Option('Outreach.com (SermonCentral.com)','15OUTR - Outreach.com (SermonCentral.com)');
        } else if (chosen == "saw_sign") { 
            selbox.options[selbox.options.length] = new Option('Saw the website address on a sign','16SAWS - Saw Sign'); 
        }
    } else if (division == "school") {
        if (chosen == "search_engine") {
            selbox.options[selbox.options.length] = new Option('-Please Choose Search Engine-','25ENGN - Not Specified');
	    selbox.options[selbox.options.length] = new Option('AOL Search','25AOL - AOL Search');
	    selbox.options[selbox.options.length] = new Option('Ask.com','25ASK - Ask.com Search');
	    selbox.options[selbox.options.length] = new Option('Google','25GOOG - Google');
            selbox.options[selbox.options.length] = new Option('MSN Search','25MSN - MSN Search');
	    selbox.options[selbox.options.length] = new Option('Yahoo','25YAH - Yahoo');
	    selbox.options[selbox.options.length] = new Option('Other','25ENGN - Other');
        } else if (chosen == "link") {
	    selbox.options[selbox.options.length] = new Option('-Please Choose Site-','25LINK - Link not specified');
	    selbox.options[selbox.options.length] = new Option('Cherrydale.com','25CHER - Cherrydale.com');
	    selbox.options[selbox.options.length] = new Option('PTOToday.com','25PTO - PTOToday.com');
	    selbox.options[selbox.options.length] = new Option('SchoolFacilities.com','25SCHF - SchoolFacilities.com');
	    selbox.options[selbox.options.length] = new Option('SignSearch.com - Local','25SSL - SignSearch.com - Local');
            selbox.options[selbox.options.length] = new Option('SignSearch.com - National','25SSN - SignSearch.com - National');
	    selbox.options[selbox.options.length] = new Option('Other','25LINK - Other link');
        } else if (chosen == "card_deck") {
            selbox.options[selbox.options.length] = new Option('-Please Choose Publication or Card Deck-','21DECK - Publication or card deck not specified');
	    selbox.options[selbox.options.length] = new Option('PTO Today Card Deck','21PTO - PTO Today Card Deck');
	    selbox.options[selbox.options.length] = new Option('PTO Today Magazine','22PTO - PTO Today Magazine');
	    selbox.options[selbox.options.length] = new Option('Other','21DECK - Other publication or card deck');
        } else if (chosen == "other") {
	    selbox.options[selbox.options.length] = new Option('-Please type where below-','22OTHR - Not Specified');
        } else if (chosen == "saw_sign") {
            selbox.options[selbox.options.length] = new Option('Saw the website address on a sign','26SAWS - Saw Sign'); 
        }
    } else if (division == "university") {
        if (chosen == "search_engine") {
            selbox.options[selbox.options.length] = new Option('-Please Choose Search Engine-','25ENGN - Not Specified');
	    selbox.options[selbox.options.length] = new Option('AOL Search','25AOL - AOL Search');
	    selbox.options[selbox.options.length] = new Option('Ask.com','25ASK - Ask.com Search');
	    selbox.options[selbox.options.length] = new Option('Google','25GOOG - Google');
            selbox.options[selbox.options.length] = new Option('MSN Search','25MSN - MSN Search');
	    selbox.options[selbox.options.length] = new Option('Yahoo','25YAH - Yahoo');
	    selbox.options[selbox.options.length] = new Option('Other','25ENGN - Other');
        } else if (chosen == "link") {
	    selbox.options[selbox.options.length] = new Option('-Please Choose Site-','25LINK - Link not specified');
	    selbox.options[selbox.options.length] = new Option('Cherrydale.com','25CHER - Cherrydale.com');
	    selbox.options[selbox.options.length] = new Option('PTOToday.com','25PTO - PTOToday.com');
	    selbox.options[selbox.options.length] = new Option('SchoolFacilities.com','25SCHF - SchoolFacilities.com');
	    selbox.options[selbox.options.length] = new Option('SignSearch.com - Local','25SSL - SignSearch.com - Local');
            selbox.options[selbox.options.length] = new Option('SignSearch.com - National','25SSN - SignSearch.com - National');
	    selbox.options[selbox.options.length] = new Option('Other','25LINK - Other link');
        } else if (chosen == "card_deck") {
            selbox.options[selbox.options.length] = new Option('-Please Choose Publication or Card Deck-','21DECK - Publication or card deck not specified');
	    selbox.options[selbox.options.length] = new Option('PTO Today Card Deck','21PTO - PTO Today Card Deck');
    	    selbox.options[selbox.options.length] = new Option('PTO Today Magazine','22PTO - PTO Today Magazine');
	    selbox.options[selbox.options.length] = new Option('Other','21DECK - Other publication or card deck');
        } else if (chosen == "other") {
	    selbox.options[selbox.options.length] = new Option('-Please type where below-','22OTHR - Not Specified');
        } else if (chosen == "saw_sign") {
            selbox.options[selbox.options.length] = new Option('Saw the website address on a sign','26SAWS - Saw Sign');
        }
    } else if (division == "military") {
        if (chosen == "search_engine") {
            selbox.options[selbox.options.length] = new Option('-Please Choose Search Engine-','35ENGN - Not Specified');
	    selbox.options[selbox.options.length] = new Option('AOL Search','35AOL - AOL Search');
	    selbox.options[selbox.options.length] = new Option('Ask.com','35ASK - Ask.com Search');
	    selbox.options[selbox.options.length] = new Option('Google','35GOOG - Google');
            selbox.options[selbox.options.length] = new Option('MSN Search','35MSN - MSN Search');
	    selbox.options[selbox.options.length] = new Option('Yahoo','35YAH - Yahoo');
	    selbox.options[selbox.options.length] = new Option('Other','35ENGN - Other');
        } else if (chosen == "link") {
	    selbox.options[selbox.options.length] = new Option('-Please Choose Site-','35LINK - Link not specified');
  	    selbox.options[selbox.options.length] = new Option('DOD Buyers Guide','35DOD - DOD Buyers Guide');
	    selbox.options[selbox.options.length] = new Option('Federal Buyers Guide','35FLBG - Federal Buyers Guide');
	    selbox.options[selbox.options.length] = new Option('Gov-World.com','35GOVW - Gov-World.com');
	    selbox.options[selbox.options.length] = new Option('GSA-World.com','35GSAW - GSA-World.com');
	    selbox.options[selbox.options.length] = new Option('IMCEA.com (MWR Today)','35MWR - IMCEA.com (MWR Today)');
            selbox.options[selbox.options.length] = new Option('Legion.org','34AMLG - Legion.org');
	    selbox.options[selbox.options.length] = new Option('Other','35LINK - Other link');
        } else if (chosen == "card_deck") {
            selbox.options[selbox.options.length] = new Option('-Please Choose Publication or Card Deck-','31DECK - Publication or card deck not specified');
            selbox.options[selbox.options.length] = new Option('American Legion Catalog','34AMLG - American Legion Catalog');
            selbox.options[selbox.options.length] = new Option('Government Recreation & Fitness Magazine','32GRF - Government Recreation & Fitness Magazine');
            selbox.options[selbox.options.length] = new Option('Military Club & Hospitality','32MCH - Military Club & Hospitality');
            selbox.options[selbox.options.length] = new Option('MWR Today','32MWR - MWR Today');
            selbox.options[selbox.options.length] = new Option('Other','31DECK - Other publication or card deck');
        } else if (chosen == "other") {
            selbox.options[selbox.options.length] = new Option('-Please type where below-','32OTHR - Other');
        } else if (chosen == "saw_sign") {
            selbox.options[selbox.options.length] = new Option('Saw the website address on a sign','36SAWS - Saw Sign'); 
        }
    } else if (division == "municipal") {
        if (chosen == "search_engine") {
            selbox.options[selbox.options.length] = new Option('-Please Choose Search Engine-','45ENGN - Not Specified');
	    selbox.options[selbox.options.length] = new Option('AOL Search','45AOL - AOL Search');
	    selbox.options[selbox.options.length] = new Option('Ask.com','45ASK - Ask.com Search');
	    selbox.options[selbox.options.length] = new Option('Google','45GOOG - Google');
            selbox.options[selbox.options.length] = new Option('MSN Search','45MSN - MSN Search');
	    selbox.options[selbox.options.length] = new Option('Yahoo','45YAH - Yahoo');
	    selbox.options[selbox.options.length] = new Option('Other','45ENGN - Other');
	} else if (chosen == "link") {
            selbox.options[selbox.options.length] = new Option('-Please Choose Site-','45LINK - Link not specified');
	    selbox.options[selbox.options.length] = new Option('Other','45LINK - Other link');
	} else if (chosen == "card_deck") {
            selbox.options[selbox.options.length] = new Option('-Please Choose Publication or Card Deck-','41DECK - Publication or card deck not specified');
            selbox.options[selbox.options.length] = new Option('Other','41DECK - Other publication or card deck');
        } else if (chosen == "other") {
            selbox.options[selbox.options.length] = new Option('-Please type where below-','42OTHR - Other');
        } else if (chosen == "saw_sign") {
            selbox.options[selbox.options.length] = new Option('Saw the website address on a sign','46SAWS - Saw Sign');
        }
    }
}

function CSPopup(URL) {
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=550,height=400,left = 193,top = 132');");
}

function Popup(URL,height,width) {
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=" + width + ",height=" + height + ",left = 193,top = 132');");
}
