﻿var ERROR_DISPLAY = 'ALERT';
var SERVICE_TYPE = 'Moving';
var INITIAL_SERVICE = '1001'
var PARTNER = '';
var SUB_PARTNER = '';

var fromStateID = '';
var tType = '';
var Service = '';
var FromCity = '';
var FromState = '';
var FromPostal = '';
var FromCountry = '';
var FromCountryName = '';
var ToState = '';
var ToCountry = '';
var ToCountryName = '';
var Size = '';
var PropertyZip = '';
var LoanPurpose = '';
var CreditRating = '';
var PropertyType = '';
var InsuranceZipCode = '';
var InsuranceType = '';
var HomeImprovementZipCode = '';
var HomeImprovementCategory = '';
var HomeImprovementService = '';

function Init() {
    InitilizeDdlState('ddlMovingToState');
    InitilizeDdlState('ddlAutoToState');
    InitilizeDdlCountry('ddlMovingFromCountry');
    InitilizeDdlCountry('ddlMovingToCountry');
    InitilizeDdlHomeImprovementCategory('ddlHomeImprovementCategory');
    ServiceType_change(SERVICE_TYPE);

	$.ajax({
            type: "POST"
            , contentType: "application/json; charset=utf-8"
            , url: appPath + "WebServices/AJAXHelper.asmx/GetStateIDOfZipCode"
            , data: "{ zip : '00000' }"
            , dataType: "json"
        });
}

function ClearFromZip() {
    fromStateID = '';
}

function SHElement(el, dis) {
    el = document.getElementById(el);
    if (el != null) {
        el.style.display = dis;
    }
}

function GetStateIDFromZip(el) {
    el = document.getElementById(el);    
    if (el != null) {
        var s;
        $.ajax({
            async: false
            , type: "POST"
            , contentType: "application/json; charset=utf-8"
            , url: appPath + "WebServices/AJAXHelper.asmx/GetStateIDOfZipCode"
            , data: "{ zip : '" + el.value + "' }"
            , dataType: "json"
            , success: function(msg) {
                s = msg.d;
            }
            , error: function(XMLHttpRequest, textStatus, errorThrown) {
                alert('error');
            }
        });

        if (s != null) {
            return s;
        }
    }

    return '';
}

function ServiceType_change(selectedValue) {
    SERVICE_TYPE = selectedValue;
    switch (selectedValue) {
        case ('Moving'):
            SHElement('divMoving', 'block');
            SHElement('divStorage', 'none');
            SHElement('divMortgage', 'none');
            SHElement('divInsurance', 'none');
            SHElement('divHomeImprovement', 'none');
            SHElement('divAuto', 'none');
            break;
        case ('Storage'):
            SHElement('divMoving', 'none');
            SHElement('divStorage', 'block');
            SHElement('divMortgage', 'none');
            SHElement('divInsurance', 'none');
            SHElement('divHomeImprovement', 'none');
            SHElement('divAuto', 'none');
            break;
        case ('Mortgage'):
            SHElement('divMoving', 'none');
            SHElement('divStorage', 'none');
            SHElement('divMortgage', 'block');
            SHElement('divInsurance', 'none');
            SHElement('divHomeImprovement', 'none');
            SHElement('divAuto', 'none');
            break;
        case ('Insurance'):
            SHElement('divMoving', 'none');
            SHElement('divStorage', 'none');
            SHElement('divMortgage', 'none');
            SHElement('divInsurance', 'block');
            SHElement('divHomeImprovement', 'none');
            SHElement('divAuto', 'none');
            break;
        case ('Home Improvement'):
            SHElement('divMoving', 'none');
            SHElement('divStorage', 'none');
            SHElement('divMortgage', 'none');
            SHElement('divInsurance', 'none');
            SHElement('divHomeImprovement', 'block');
            SHElement('divAuto', 'none');
            break;
        case ('Auto Transport'):
            SHElement('divMoving', 'none');
            SHElement('divStorage', 'none');
            SHElement('divMortgage', 'none');
            SHElement('divInsurance', 'none');
            SHElement('divHomeImprovement', 'none');
            SHElement('divAuto', 'block');
            break;
    }
}

function MovingTypeChange(value) {
    switch (value) {
        case ('1001'):
            SHElement('trMovingZipCode', 'block');
            SHElement('trMovingToState', 'block');
            SHElement('trMovingFromCountry', 'none');
            SHElement('trMovingToCountry', 'none');
            break;
        case ('1013'):
            SHElement('trMovingZipCode', 'block');
            SHElement('trMovingToState', 'block');
            SHElement('trMovingFromCountry', 'none');
            SHElement('trMovingToCountry', 'none');
            break;
        case ('1000'):
            SHElement('trMovingZipCode', 'none');
            SHElement('trMovingToState', 'none');
            SHElement('trMovingFromCountry', 'block');
            SHElement('trMovingToCountry', 'block');
            break;
    }
}

function GetMovingService(ddl) {
    ddl = document.getElementById(ddl);
    if (ddl != null) {
        var val = ddl.value;
        if (val != '1013' && val != '1000') {

            if (fromStateID == '') {
                fromStateID = GetStateIDFromZip('txtMovingZipCode');
            }

            var ddlTo = document.getElementById('ddlMovingToState');

            if (ddlTo != null) {
                val = fromStateID == ddlTo.value ? '1012' : '1001';
            }
        }

        return val;
    }

    return '1001';
}

function GetValue(el) {
    el = document.getElementById(el);
    if (el != null
        && !(el.type == 'select-one' && el.selectedIndex == 0)) {
        return el.value;
    }

    return '';
}

function GetText(el) {
    el = document.getElementById(el);
    if (el != null && el.options != null && el.options.length > 0 && el.selectedIndex != 0) {
        return el.options[el.selectedIndex].innerHTML;
    }

    return '';
}

function SubmitForm() {
    var destination = '/Results.aspx';
    var queryString = '';

    if (Validate()) {
        switch (SERVICE_TYPE) {
            case 'Moving':

                var ms = GetMovingService('ddlMovingType');
                if (ms == '') {
                    ms = '1001';
                }

                queryString += "?Type=Moving";
                queryString += "&Service=" + GetMovingService('ddlMovingType');
                queryString += ms != '1000' && GetValue('txtMovingZipCode') != '' ? "&FromPostal=" + GetValue('txtMovingZipCode') : '';
                queryString += ms == '1000' && GetValue('ddlMovingFromCountry') != '' ? "&FromCountry=" + GetValue('ddlMovingFromCountry') : '&FromCountry=1';
                queryString += ms == '1000' && GetText('ddlMovingFromCountry') != '' ? "&FromCountryName=" + GetText('ddlMovingFromCountry') : '';
                queryString += ms != '1000' && GetValue('ddlMovingToState') != '' ? "&ToState=" + GetValue('ddlMovingToState') : '';
                queryString += ms == '1000' && GetValue('ddlMovingToCountry') != '' ? "&ToCountry=" + GetValue('ddlMovingToCountry') : '&ToCountry=1';
                queryString += ms == '1000' && GetText('ddlMovingToCountry') != '' ? "&ToCountryName=" + GetText('ddlMovingToCountry') : '';
                queryString += GetValue('ddlMovingSize') != '' ? "&Size=" + GetValue('ddlMovingSize') : '';
                break;
            case 'Storage':
                queryString += "?Type=Storage";
                if (typeof (INITIAL_STORAGE) != 'undefined' && INITIAL_STORAGE > 0)
                    queryString += "&Service=" + INITIAL_STORAGE;
                else
                    queryString += "&Service=1010";
                queryString += "&FromPostal=" + GetValue('txtStorageZipCode');
                break;
            case 'Mortgage':
                queryString += "?Type=Mortgage";
                queryString += "&PropertyZip=" + GetValue('txtMortgagePropertyZip');
                queryString += "&LoanPurpose=" + GetValue('ddlMortgageLoanPurpose');
                queryString += "&CreditRating=" + GetValue('ddlMortgageCreditRating');
                queryString += "&PropertyType=" + GetValue('ddlMortgagePropertyType');

                destination = '/MortgageQuoteForm.aspx';
                break;
            case 'Insurance':
                queryString += "?Type=Insurance";
                queryString += "&InsuranceZipCode=" + GetValue('txtInsuranceZipCode');
                queryString += "&InsuranceType=" + GetValue('ddlInsuranceType');

                break;
            case 'Home Improvement':
                queryString += "?Type=HomeImprovement";
                queryString += "&HomeImprovementZipCode=" + GetValue('txtHomeImprovementZipCode');
                queryString += "&HomeImprovementCategory=" + GetValue('ddlHomeImprovementCategory');
                queryString += "&HomeImprovementService=" + GetValue('ddlHomeImprovementService');

                break;
            case 'Auto Transport':
                queryString += "?Type=Moving";
                queryString += "&Service=1002";
                queryString += GetValue('txtAutoZipCode') != '' ? "&FromPostal=" + GetValue('txtAutoZipCode') : '';
                queryString += '&FromCountry=1';
                queryString += GetValue('ddlAutoToState') != '' ? "&ToState=" + GetValue('ddlAutoToState') : '';
                queryString += '&ToCountry=1';
                queryString += GetValue('ddlMovingSize') != '' ? "&Size=" + GetValue('ddlMovingSize') : '';
                break;
        }

        if (destination != '' && queryString != '') {
            queryString += PARTNER != '' ? "&Partner=" + PARTNER : '';
            queryString += SUB_PARTNER != '' ? "&Sub_Partner=" + SUB_PARTNER : '';
            window.location.href = destination + queryString;
        }
    }
}

function ValidateFields(el, sp, val, err) {
    el = document.getElementById(el);
    sp = document.getElementById(sp);

    if (el != null && sp != null) {
        sp.className = 'validfields';
        if (el.value == val) {
            sp.className = 'invalidfields';
            return err;
        }
    }

    return '';
}

function ValidateZipCode(el, sp, req, inv) {
    el = document.getElementById(el);
    sp = document.getElementById(sp);

    if (el != null && sp != null) {
        sp.className = 'validfields';
        if (el.value == '') {
            sp.className = 'invalidfields';
            return req;
        }
        else {
            if (!el.value.match(/^\d\d\d\d\d$/)) {
                sp.className = 'invalidfields';
                return inv;
            }
        }
    }

    return '';
}

function ValidateZipState(zip, to, err) {
    to = document.getElementById(to);

    if (to != null) {

        if (fromStateID == '') {
            fromStateID = GetStateIDFromZip(zip);
        }

        if (fromStateID == to.value) {
            return err;
        }
    }

    return '';
}

function Validate() {
    var Errors = '';

    switch (SERVICE_TYPE) {
        case 'Moving':
            var ddl = document.getElementById('ddlMovingType');

            if (ddl != null) {
                switch (ddl.value) {
                    case '1000':
                        Errors += ValidateFields('ddlMovingFromCountry', 'spnMovingFromCountry', '0', 'From Country - Required\n\r');
                        Errors += ValidateFields('ddlMovingToCountry', 'spnMovingToCountry', '0', 'To Country - Required\n\r');
                        Errors += ValidateFields('ddlMovingSize', 'spnMovingSize', '0000', 'Moving Size - Required\n\r');

                        break;

                    default:
                        Errors += ValidateZipCode('txtMovingZipCode', 'spnMovingZipCode', 'From ZipCode - Required\n\r', 'From ZipCode - Invalid\n\r');
                        Errors += ValidateFields('ddlMovingToState', 'spnMovingToState', '-1', 'To State - Required\n\r');
                        Errors += ValidateFields('ddlMovingSize', 'spnMovingSize', '0000', 'Moving Size - Required\n\r');

                        if (ddl.value == '1013') {
                            Errors += ValidateZipState('txtMovingZipCode', 'ddlMovingToState', 'U-Load is not available within the same state');
                        }

                        break;
                }
            }

            break;
        case 'Storage':
            //Errors += ValidateFields('ddlStorageType', 'spnStorageType', '0', 'Storage Type - Required\n\r');
            Errors += ValidateZipCode('txtStorageZipCode', 'spnStorageZipCode', 'Storage ZipCode - required\n\r', 'Storage ZipCode - Invalid\n\r');
            break;
        case 'Mortgage':
            Errors += ValidateZipCode('txtMortgagePropertyZip', 'spnMortgagePropertyZip', 'Property Zip - Required\n\r', 'Property Zip - Invalid\n\r');
            Errors += ValidateFields('ddlMortgageLoanPurpose', 'spnMortgageLoanPurpose', '0', 'Loan Purpose - Required\n\r');
            Errors += ValidateFields('ddlMortgageCreditRating', 'spnMortgageCreditRating', '0', 'Credit Rating - Required\n\r');
            Errors += ValidateFields('ddlMortgagePropertyType', 'spnMortgagePropertyType', '0', 'Property Type - Required\n\r');
            break;
        case 'Insurance':
            Errors += ValidateZipCode('txtInsuranceZipCode', 'spnInsuranceZipCode', 'Insurance ZipCode - Required\n\r', 'Insurance ZipCode - Invalid\n\r');
            Errors += ValidateFields('ddlInsuranceType', 'spnInsuranceType', '0', 'Insurance Type - Required\n\r');

            break;
        case 'Home Improvement':
            Errors += ValidateZipCode('txtHomeImprovementZipCode', 'spnHomeImprovementZipCode', 'Zip Code - Required\n\r', 'Zip Code - Invalid\n\r');
            Errors += ValidateFields('ddlHomeImprovementCategory', 'spnHomeImprovementCategory', '0', 'Category - Required\n\r');
            Errors += ValidateFields('ddlHomeImprovementService', 'spnHomeImprovementService', '0', 'Service - Required\n\r');

            break;
        case 'Auto Transport':
            Errors += ValidateZipCode('txtAutoZipCode', 'spnAutoZipCode', 'From ZipCode - Required\n\r', 'From ZipCode - Invalid\n\r');
            Errors += ValidateFields('ddlAutoToState', 'spnAutoToState', '-1', 'To State - Required\n\r');
            Errors += ValidateZipState('txtAutoZipCode', 'ddlAutoToState', 'Moving a Car is not available within the same state');

            break;
    }

    if (Errors != '') {
        if (ERROR_DISPLAY == 'ALERT') {
            alert(Errors);
        }
        else {
            SHElement('spnErrors', 'block');
        }
        return false;
    }
    else {
        SHElement('spnErrors', 'none');
        return true;
    }
}

var stateIdArray = new Array(-1, 4, 3, 6, 5, 7, 8, 9, 11, 10, 12, 13, 14, 15, 17, 18, 19, 16, 20, 21, 22, 25, 24, 23, 26, 27, 29, 28, 30, 33, 37, 34, 35, 36, 38, 31, 32, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 52, 51, 50, 53, 55, 54, 56);
var stateNameArray = new Array("Select a state", "Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado", "Connecticut", "Delaware", "District of Columbia", "Florida", "Georgia", "Guam", "Hawaii", "Idaho", "Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana", "Maine", "Maryland", "Massachusetts", "Michigan", "Minnesota", "Mississippi", "Missouri", "Montana", "Nebraska", "Nevada", "New Hampshire", "New Jersey", "New Mexico", "New York", "North Carolina", "North Dakota", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Puerto Rico", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas", "Utah", "Vermont", "Virgin Islands", "Virginia", "Washington", "West Virginia", "Wisconsin", "Wyoming");
function InitilizeDdlState(objId) {
    document.getElementById(objId).options.length = 0;
    for (var i = 0; i < stateIdArray.length; i++) {
        var anOptionA = new Option(stateNameArray[i], stateIdArray[i]);
        document.getElementById(objId).options.add(anOptionA);
    }
}

var countryIdArray = new Array(0, 1, 67746, 67747, 67748, 67749, 67750, 67751, 67752, 67753, 67754, 67755, 67756, 67757, 67758, 67759, 67760, 67761, 67762, 67763, 67764, 67765, 67766, 67767, 67768, 67769, 67770, 67771, 67772, 67773, 67774, 67775, 67776, 67777, 67778, 67779, 67780, 67781, 67782, 67783, 2, 67784, 67785, 67786, 67787, 67788, 67789, 67790, 67791, 67792, 67793, 67794, 67795, 67796, 67797, 67798, 67799, 67801, 67802, 67803, 67804, 67805, 67806, 67807, 67808, 67809, 67810, 67811, 67812, 67813, 67814, 67815, 67816, 67817, 67818, 67819, 67820, 67821, 67822, 67823, 67824, 67825, 67826, 67827, 67828, 67829, 67830, 67831, 67832, 67833, 67834, 67835, 67836, 67837, 67838, 67839, 67840, 67841, 67842, 67843, 67844, 67845, 67846, 67847, 67848, 67849, 67851, 67852, 67853, 67854, 67855, 67856, 67857, 67858, 67859, 67860, 67861, 67862, 67863, 67864, 67865, 67866, 67867, 67868, 67869, 67870, 67871, 67872, 67873, 67874, 67875, 67876, 67877, 67878, 67879, 67880, 67881, 67882, 67883, 67884, 67885, 67886, 67887, 67888, 67889, 67890, 67891, 67892, 67893, 67894, 67895, 67896, 67897, 67898, 67899, 67900, 67901, 67902, 67903, 67904, 67905, 67906, 67907, 67908, 67909, 67910, 67911, 67912, 67913, 67914, 67915, 67916, 67917, 67918, 67919, 67920, 67921, 67922, 67923, 67924, 67925, 67926, 67927, 67928, 67929, 67930, 67931, 67932, 67933, 67934, 67935, 67936, 67937, 67938, 67939, 67940, 67941, 67942, 67943, 67944, 67945, 67946, 67947, 67948, 67949, 67950, 67951, 67952, 67953, 67954, 67955, 67956, 67957, 67958, 67959, 67960, 67961, 67962, 67963, 67964, 67965, 67966, 67967, 67968, 67969, 67970, 67971, 1, 67972, 67973, 67974, 67975, 67976, 67977, 67978, 67979, 67980, 67981, 67982, 67983, 67984, 67985, 67986);
var countryNameArray = new Array("Select a country", "United States of America", "Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia-Herzegovina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", "British Virgin Islands", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burma", "Burundi", "Cameroon", "Canada", "Canton And Enderbury Is.", "Cape Verde", "Cayman Islands", "Central African Rep.", "Chad", "Chile", "China", "Christmas Island", "Cocos (keeling) Island", "Colombia", "Comoros", "Congo", "Cook Islands", "Costa Rica", "Cote D'ivoire", "Croatia", "Cyprus", "Czech Republic", "Czechoslovakia", "Democratic Kampuchea", "Democratic Yemen", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "Dronning Maud Island", "East Timor", "Ecuador", "Egypt", "El Salvador", "England", "Equatorial Guinea", "Estonia", "Ethiopia", "Faeroe Islands", "Falkland Islands-Malvinas", "Fiji", "Finland", "France", "French Guiana", "French Polynesia", "French Southern Terr", "Gabon", "Gambia", "Georgia", "Germany", "Ghana", "Gibraltar", "Greece", "Greenland", "Grenada", "Guadaloupe", "Guam", "Guatemala", "Guinea", "Guinea-Bissau", "Guyana", "Haiti", "Heard and Mcdonald Is.", "Honduras", "Hong Kong", "Hungary", "Iceland", "India", "Indonesia", "Iraq", "Ireland", "Israel", "Italy", "Jamaica", "Japan", "Johnston Island", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Kuwait", "Kyrgyzstan", "Laos", "Latvia", "Lebanon", "Lesotho", "Liberia", "Libya", "Liechtenstein", "Lithuania", "Luxembourg", "Macau", "Macedonia", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Martinique", "Mauritania", "Mauritius", "Mexico", "Midway Islands", "Moldova", "Monaco", "Mongolia", "Montserrat", "Morocco", "Mozambique", "Namibia", "Nauru", "Nepal", "Netherlands", "Netherlands Antilles", "Neutral Zone", "New Caledonia", "New Zealand", "Nicaragua", "Niger", "Nigeria", "Niue", "Norfolk Island", "North Korea", "Norway", "Oman", "Pacific Is. Trust Terr.", "Pakistan", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Pitcairn Islands", "Poland", "Portugal", "Puerto Rico", "Qatar", "Reunion", "Romania", "Russia", "Rwanda", "Samoa", "San Marino", "Sao Tome and Principe", "Saudi Arabia", "Scotland", "Senegal", "Seychelles", "Sierra Leone", "Singapore", "Slovakia", "Slovenia", "Solomon Islands", "Somalia", "South Africa", "South Korea", "Spain", "Sri Lanka", "St. Helena", "St. Kitts-Nevis-Anguilla", "St. Lucia", "St. Pierre Et Miquelon", "St. Vincent and The Grenadines", "Sudan", "Suriname", "Svalbard and Jan Mayen Is.", "Swaziland", "Sweden", "Switzerland", "Syria", "Taiwan", "Tajikistan", "Tanzania", "Thailand", "Togo", "Tokelau", "Tonga", "Trinidad And Tobago", "Tunisia", "Turkey", "Turkmenistan", "Turks And Caicos Is.", "Tuvalu", "U.S. Pacific Islands", "U.S. Virgin Islands", "Uganda", "Ukraine", "United Arab Emirates", "United Kingdom", "United States of America", "Uruguay", "Uzbekistan", "Vanuatu", "Vatican City State", "Venezuela", "Vietnam", "Wake Island", "Wales", "Wallis and Futuna Is.", "Western Sahara", "Yemen Arab Republic", "Yugoslavia", "Zaire", "Zambia", "Zimbabwe");
function InitilizeDdlCountry(objId) {
    document.getElementById(objId).options.length = 0;
    for (var i = 0; i < countryIdArray.length; i++) {
        var anOptionA = new Option(countryNameArray[i], countryIdArray[i]);
        document.getElementById(objId).options.add(anOptionA);
    }
}

var hiCategoryIdArray = new Array(341, 3422, 342, 343, 344, 3430, 3424, 345, 346, 347, 348, 3425, 3432, 349, 3428, 3410, 3427, 3431, 3411, 3426, 3412, 3413, 3429, 3414, 3415, 3416, 3417, 3418, 3419, 3423, 3420, 3421);
var hiCategoryNameArray = new Array('Additions & Remodeling', 'Appliances', 'Architectural Design & Engineering', 'Bathroom Remodeling', 'Carpentry & Woodwork', 'Cleaning Services', 'Closets & Storage', 'Concrete & Masonry', 'Countertops', 'Custom Home', 'Decks, Fences & Porches', 'Decorators & Interior Designers', 'Demoltion & Disposal', 'Electrical', 'Fireplaces', 'Flooring Hardwood/Laminate', 'Garages, Doors & Openers', 'Green Projects', 'Heating & Cooling', 'Home Electronics, Wiring & Computers', 'Kitchen Remodeling', 'Landscaping', 'Mold Remediation/Water Damage', 'Painting Interior/Exterior', 'Plumbing', 'Roofing & Gutters', 'Siding Installation', 'Small Projects & Repairs', 'Sunrooms', 'Swimming Pools, Spas & Saunas', 'Tile', 'Window & Doors');
var hi_341_IdArray = new Array(2001, 2002, 2003, 2004, 2005, 2006, 2007, 2192, 2008, 2009, 2010, 2011, 2012);
var hi_341_NameArray = new Array('Additions - Major', 'Additions - Minor', 'Basement Remodeling', 'Bath Remodeling - Major', 'Excavation', 'Framing', 'Kitchen Remodeling - Major', 'Minor Remodels - Carpentry Framing', 'Remodeling - Major', 'Remodeling - Minor', 'Special Finishes', 'Sunrooms', 'Walls');
var hi_3422_IdArray = new Array(2180, 2181, 2182);
var hi_3422_NameArray = new Array('Appliance Installation', 'Appliance Refinish', 'Appliance Repair & Service');
var hi_342_IdArray = new Array(2013, 2014);
var hi_342_NameArray = new Array('Architectural Plans & Design', 'Engineering Services');
var hi_343_IdArray = new Array(2004, 2016, 2017, 2018, 2019, 2006, 2021, 2191, 2192, 2008, 2009, 2024);
var hi_343_NameArray = new Array('Bath Remodeling - Major', 'Bath Remodeling - Minor', 'Cabinet - Install', 'Cabinet - Refacing', 'Countertops', 'Framing', 'Hot Tubs and Spas', 'Minor Remodels - Carpentry Countertops', 'Minor Remodels - Carpentry Framing', 'Remodeling - Major', 'Remodeling - Minor', 'Water Heaters');
var hi_344_IdArray = new Array(2025, 2026, 2027, 2028, 2029);
var hi_344_NameArray = new Array('Carpentry - Interior Woodwork', 'General Carpentry', 'Remodel - Cabinet', 'Remodel - Closets', 'Remodel - Framing');
var hi_3430_IdArray = new Array(2133, 2209, 2210, 2156, 2163);
var hi_3430_NameArray = new Array('Debris Hauling', 'Exterior Cleaning', 'Maid Services', 'Power Washing', 'Window Cleaning');
var hi_3424_IdArray = new Array(2187, 2019, 2006, 2188, 2189, 2190, 2191, 2192);
var hi_3424_NameArray = new Array('Carpentry', 'Countertops', 'Framing', 'Minor Remodels - Cabinets', 'Minor Remodels - Carpentry Cabinets', 'Minor Remodels - Carpentry Closets', 'Minor Remodels - Carpentry Countertops', 'Minor Remodels - Carpentry Framing');
var hi_345_IdArray = new Array(2030, 2031, 2032, 2033, 2034, 2035, 2036, 2037, 2038, 2039, 2040, 2041);
var hi_345_NameArray = new Array('Brick Work', 'Chimney Cleaning', 'Concrete - Foundation/Walls', 'Concrete - Removal', 'Concrete - Repairs', 'Concrete - Stamped/Color', 'Marble & Granite', 'Masonry/Stone Work', 'Retaining Walls', 'Stucco/Texture - Exterior', 'Stucco/Texture - Interior', 'Swimming Pools');
var hi_346_IdArray = new Array(2042, 2043, 2006, 2007, 2046, 2036, 2192, 2048, 2008, 2009);
var hi_346_NameArray = new Array('Countertops - Install', 'Countertops - Repair', 'Framing', 'Kitchen Remodeling - Major', 'Kitchen Remodeling - Minor', 'Marble & Granite', 'Minor Remodels - Carpentry Framing', 'Outdoor Kitchens', 'Remodeling - Major', 'Remodeling - Minor');
var hi_347_IdArray = new Array(2051, 2052, 2053, 2006, 2192);
var hi_347_NameArray = new Array('Architects', 'Custom Home - with lot', 'Custom Home - without lot', 'Framing', 'Minor Remodels - Carpentry Framing');
var hi_348_IdArray = new Array(2055, 2086, 2056, 2057, 2058, 2059, 2060, 2061, 2062, 2063);
var hi_348_NameArray = new Array('Arbors/Trelis/Patio Covers', 'Arbors/Trellis/Patio Covers', 'Deck - New', 'Deck - Repair/Modification', 'Deck Cleaning/Treatment', 'Fence - Chainlink', 'Fence - Repair', 'Fence - Vinyl', 'Fence - Wood', 'Hot Tubs');
var hi_3425_IdArray = new Array(2193, 2194, 2195);
var hi_3425_NameArray = new Array('Designer Window Treatments', 'Interior Designers', 'Lighting Design');
var hi_3432_IdArray = new Array(2133, 2216);
var hi_3432_NameArray = new Array('Debris Hauling', 'Demoltion & Disposal');
var hi_349_IdArray = new Array(2064, 2065, 2066, 2067, 2068, 2063, 2070, 2071);
var hi_349_NameArray = new Array('Computers, Cables & Networks', 'Electrical - Install', 'Electrical - Repairs', 'Home Media Systems', 'Home Security/Alarms', 'Hot Tubs', 'Low Voltage Wiring', 'Solar Panels');
var hi_3428_IdArray = new Array(2031, 2204);
var hi_3428_NameArray = new Array('Chimney Cleaning', 'Fireplaces');
var hi_3410_IdArray = new Array(2072, 2073, 2074, 2075, 2076);
var hi_3410_NameArray = new Array('Flooring - Hardwood Install', 'Flooring - Hardwood Refinishing', 'Flooring - Laminate', 'Flooring - Sub-flooring', 'Flooring - Vinyl/Laminate');
var hi_3427_IdArray = new Array(2200, 2201, 2202);
var hi_3427_NameArray = new Array('Doors, Garage - Sliding Glass', 'Garage Door Openers', 'Patios, Walkways & Steps');
var hi_3431_IdArray = new Array(2213, 2071);
var hi_3431_NameArray = new Array('High Efficiency Lighting', 'Solar Panels');
var hi_3411_IdArray = new Array(2077, 2078, 2079, 2080, 2081, 2082, 2024);
var hi_3411_NameArray = new Array('Air Conditioning', 'Boiler & Radiators', 'Fans', 'HVAC - Install', 'HVAC - Servicing', 'Solar Power', 'Water Heaters');
var hi_3426_IdArray = new Array(2064, 2067, 2068, 2070);
var hi_3426_NameArray = new Array('Computers, Cables & Networks', 'Home Media Systems', 'Home Security/Alarms', 'Low Voltage Wiring');
var hi_3412_IdArray = new Array(2017, 2085);
var hi_3412_NameArray = new Array('Cabinet - Install', 'Cabinet - Refinishing');
var hi_3413_IdArray = new Array(2055, 2086, 2035, 2056, 2089, 2065, 2091, 2063, 2093, 2094, 2038, 2071, 2097, 2041, 2099);
var hi_3413_NameArray = new Array('Arbors/Trelis/Patio Covers', 'Arbors/Trellis/Patio Covers', 'Concrete - Stamped/Color', 'Deck - New', 'Drainage', 'Electrical - Install', 'Gazebos', 'Hot Tubs', 'Landscaping - Design/Install', 'Landscaping - Maintenance', 'Retaining Walls', 'Solar Panels', 'Sprinklers - Install/Design', 'Swimming Pools', 'Tiles - Exterior');
var hi_3429_IdArray = new Array(2205, 2206, 2207);
var hi_3429_NameArray = new Array('Environmental Services', 'Mold Remediation', 'Water Damage');
var hi_3414_IdArray = new Array(2100, 2101, 2102, 2103, 2104, 2040, 2106);
var hi_3414_NameArray = new Array('Drywall/Sheetrock - Install', 'Drywall/Sheetrock - Repairs', 'Painting - Exterior', 'Painting - Interior', 'Painting - Minor', 'Stucco/Texture - Interior', 'Wallpaper - Install/Repairs');
var hi_3415_IdArray = new Array(2107, 2063, 2109, 2110, 2111, 2071);
var hi_3415_NameArray = new Array('Faucets, Fixtures and Pipes', 'Hot Tubs', 'Plumbing - Install', 'Plumbing - Servicing', 'Septic, Sewer & Water Mains', 'Solar Panels');
var hi_3416_IdArray = new Array(2113, 2114, 2115, 2116, 2117, 2118, 2119, 2071);
var hi_3416_NameArray = new Array('Celings', 'Gutters - Install', 'Roofing - Cedar Shake', 'Roofing - Composite', 'Roofing - Metal', 'Roofing - Tar/Torchdown', 'Roofing - Tile', 'Solar Panels');
var hi_3417_IdArray = new Array(2121, 2122, 2123, 2124, 2010);
var hi_3417_NameArray = new Array('Exterior - Stucco/Texture', 'Siding - Aluminum', 'Siding - Composite/Wood', 'Siding - Vinyl', 'Special Finishes');
var hi_3418_IdArray = new Array(2018, 2127, 2128, 2129, 2031, 2131, 2043, 2133, 2134, 2058, 2136, 2137, 2138, 2089, 2140, 2141, 2100, 2101, 2066, 2005, 2146, 2091, 2148, 2114, 2150, 2151, 2152, 2153, 2154, 2110, 2156, 2157, 2158, 2159, 2160, 2071, 2162, 2163, 2164);
var hi_3418_NameArray = new Array('Cabinet - Refacing', 'Carpet - Cleaning', 'Carpet - Installation', 'Carpet - Repair', 'Chimney Cleaning', 'Concrete - Repair', 'Countertops - Repair', 'Debris Hauling', 'Deck - Repairs/Modification', 'Deck Cleaning/Treatment', 'Doors - Garage', 'Doors - Install', 'Doors - Repairs', 'Drainage', 'Dryout Repairs - Non Structural', 'Dryout Repairs - Structural', 'Drywall/Sheetrock - Install', 'Drywall/Sheetrock - Repairs', 'Electrical - Repairs', 'Excavation', 'Fence Repairs', 'Gazebos', 'Generators', 'Gutters - Install', 'Gutters - Repair', 'Handyman', 'Home/Office Cleaning', 'Insulation', 'Laminate & Vinyl', 'Plumbing - Servicing', 'Power Washing', 'Roof Cleaning/Treatment', 'Roofing - Repairs', 'Sheds', 'Siding - Repairs', 'Solar Panels', 'Wallpaper - Install/Removal', 'Window Cleaning', 'Window Repair');
var hi_3419_IdArray = new Array(2001, 2002, 2091, 2168, 2071, 2011);
var hi_3419_NameArray = new Array('Additions - Major', 'Additions - Minor', 'Gazebos', 'Remodeling', 'Solar Panels', 'Sunrooms');
var hi_3423_IdArray = new Array(2184, 2041, 2024);
var hi_3423_NameArray = new Array('Saunas', 'Swimming Pools', 'Water Heaters');
var hi_3420_IdArray = new Array(2036, 2172, 2173);
var hi_3420_NameArray = new Array('Marble & Granite', 'Tile - Exterior', 'Tile - Interior');
var hi_3421_IdArray = new Array(2137, 2175, 2176, 2177, 2178, 2179);
var hi_3421_NameArray = new Array('Doors - Install', 'Garage Doors, Openers', 'Skylights - Install', 'Windows Install - Major', 'Windows Install - Minor', 'Windows Treatments');

function InitilizeDdlHomeImprovementCategory(objId) {
    document.getElementById(objId).options.length = 0;
    var firstOption = new Option('Select Category', '0');
    document.getElementById(objId).options.add(firstOption);
    for (var i = 0; i < hiCategoryIdArray.length; i++) {
        var anOptionA = new Option(hiCategoryNameArray[i], hiCategoryIdArray[i]);
        document.getElementById(objId).options.add(anOptionA);
    }
}
function InitilizeDdlHomeImprovementService(Id) {
    switch (Id) {
        case ('341'): var objIdArray = hi_341_IdArray; var objNameArray = hi_341_NameArray; break;
        case ('3422'): var objIdArray = hi_3422_IdArray; var objNameArray = hi_3422_NameArray; break;
        case ('342'): var objIdArray = hi_342_IdArray; var objNameArray = hi_342_NameArray; break;
        case ('343'): var objIdArray = hi_343_IdArray; var objNameArray = hi_343_NameArray; break;
        case ('344'): var objIdArray = hi_344_IdArray; var objNameArray = hi_344_NameArray; break;
        case ('3430'): var objIdArray = hi_3430_IdArray; var objNameArray = hi_3430_NameArray; break;
        case ('3424'): var objIdArray = hi_3424_IdArray; var objNameArray = hi_3424_NameArray; break;
        case ('345'): var objIdArray = hi_345_IdArray; var objNameArray = hi_345_NameArray; break;
        case ('346'): var objIdArray = hi_346_IdArray; var objNameArray = hi_346_NameArray; break;
        case ('347'): var objIdArray = hi_347_IdArray; var objNameArray = hi_347_NameArray; break;
        case ('348'): var objIdArray = hi_348_IdArray; var objNameArray = hi_348_NameArray; break;
        case ('3425'): var objIdArray = hi_3425_IdArray; var objNameArray = hi_3425_NameArray; break;
        case ('3432'): var objIdArray = hi_3432_IdArray; var objNameArray = hi_3432_NameArray; break;
        case ('349'): var objIdArray = hi_349_IdArray; var objNameArray = hi_349_NameArray; break;
        case ('3428'): var objIdArray = hi_3428_IdArray; var objNameArray = hi_3428_NameArray; break;
        case ('3410'): var objIdArray = hi_3410_IdArray; var objNameArray = hi_3410_NameArray; break;
        case ('3427'): var objIdArray = hi_3427_IdArray; var objNameArray = hi_3427_NameArray; break;
        case ('3431'): var objIdArray = hi_3431_IdArray; var objNameArray = hi_3431_NameArray; break;
        case ('3411'): var objIdArray = hi_3411_IdArray; var objNameArray = hi_3411_NameArray; break;
        case ('3426'): var objIdArray = hi_3426_IdArray; var objNameArray = hi_3426_NameArray; break;
        case ('3412'): var objIdArray = hi_3412_IdArray; var objNameArray = hi_3412_NameArray; break;
        case ('3413'): var objIdArray = hi_3413_IdArray; var objNameArray = hi_3413_NameArray; break;
        case ('3429'): var objIdArray = hi_3429_IdArray; var objNameArray = hi_3429_NameArray; break;
        case ('3414'): var objIdArray = hi_3414_IdArray; var objNameArray = hi_3414_NameArray; break;
        case ('3415'): var objIdArray = hi_3415_IdArray; var objNameArray = hi_3415_NameArray; break;
        case ('3416'): var objIdArray = hi_3416_IdArray; var objNameArray = hi_3416_NameArray; break;
        case ('3417'): var objIdArray = hi_3417_IdArray; var objNameArray = hi_3417_NameArray; break;
        case ('3418'): var objIdArray = hi_3418_IdArray; var objNameArray = hi_3418_NameArray; break;
        case ('3419'): var objIdArray = hi_3419_IdArray; var objNameArray = hi_3419_NameArray; break;
        case ('3423'): var objIdArray = hi_3423_IdArray; var objNameArray = hi_3423_NameArray; break;
        case ('3420'): var objIdArray = hi_3420_IdArray; var objNameArray = hi_3420_NameArray; break;
        case ('3421'): var objIdArray = hi_3421_IdArray; var objNameArray = hi_3421_NameArray; break;
    }
    document.getElementById('ddlHomeImprovementService').options.length = 0;
    var firstOption = new Option('Select Service', '0');
    document.getElementById('ddlHomeImprovementService').options.add(firstOption);
    if (objIdArray == null) return;
    for (var i = 0; i < objIdArray.length; i++) {
        var anOptionA = new Option(objNameArray[i], objIdArray[i]);
        document.getElementById('ddlHomeImprovementService').options.add(anOptionA);
    }
}

document.write('<div id="DhtmlDiv" class="js_form_zipfinder"><div class="jsf_close"><span onclick="HideDhtml()">Close</span></div><div class="jsf_iframe"><iframe src="/MiscPages/ZipCodeFinder.aspx?FromJS=true" id="iFrameZipFinder" frameborder="0" scrolling="no" width="250" height="250"></iframe></div></div>');
function ShowZipFinder(obj) {
    findPosition(obj, "DhtmlDiv");
}
function findPosition(oElement, dhtmlDiv) {
    oDiv = document.getElementById(dhtmlDiv);
    if (typeof (oElement.offsetParent) != 'undefined') {
        for (var posX = 0, posY = 0; oElement; oElement = oElement.offsetParent) {
            posX += oElement.offsetLeft;
            posY += oElement.offsetTop;
        }
        oDiv.style.top = posY; // - document.getElementById('divSmartLinking').scrollTop;
        if (dhtmlDiv == 'DhtmlDiv')
            oDiv.style.top = posY - 70 + 'px'; // - document.getElementById('divTree').scrollTop;
        //alert(document.getElementById('divSmartLinking').scrollTop);
        oDiv.style.left = posX + 155 + 'px';
    }
    else {
        oDiv.style.top = oElement.y + 'px';
        oDiv.style.left = oElement.x + 'px';
    }
    oDiv.style.visibility = 'visible';
}

function HideDhtml() {
    document.getElementById('DhtmlDiv').style.visibility = 'hidden';
}
function SetZipOfParent(zipCode) {
    if (document.getElementById('divMoving').style.display == 'block')
        document.getElementById('txtMovingZipCode').value = zipCode;
    else if (document.getElementById('divStorage').style.display == 'block')
        document.getElementById('txtStorageZipCode').value = zipCode;
    else if (document.getElementById('divMortgage').style.display == 'block')
        document.getElementById('txtMortgagePropertyZip').value = zipCode;
    else if (document.getElementById('divInsurance').style.display == 'block')
        document.getElementById('txtInsuranceZipCode').value = zipCode;
    else if (document.getElementById('divHomeImprovement').style.display == 'block')
        document.getElementById('txtHomeImprovementZipCode').value = zipCode;
    else if (document.getElementById('divAuto').style.display == 'block')
        document.getElementById('txtAutoZipCode').value = zipCode;
    HideDhtml();
}

function CreateForm() {
    var html = '';
    html += "<link href='/JSForm/style.css' rel='stylesheet' type='text/css' />";
    html += "<div class='findpro-wide'>";
    html += "	<div class='fw_top'><!-- --></div>";
    html += "	<div class='fpwinner'>";
    html += "		<div class='qfwide-service'>";
    html += "			<div class='wide_left_btns'> ";
    html += "				<div><input type='radio' id='rbMoving' name='serviceType' onclick=\"ServiceType_change('Moving')\" checked='checked' /><span class='blueBig'>Moving</span></div> ";
    html += "				<div><input type='radio' id='rbStorage' name='serviceType' onclick=\"ServiceType_change('Storage')\" /><span class='blueBig'>Storage</span></div> ";
    html += "				<div><input type='radio' id='rbMortgage' name='serviceType' onclick=\"ServiceType_change('Mortgage')\" /><span class='blueBig'>Mortgage</span></div> ";
    html += "			</div> ";
    html += "			<div class='wide_right_btns'> ";
    html += "				<div><input type='radio' id='rbInsurance' name='serviceType' onclick=\"ServiceType_change('Insurance')\" /><span class='blueBig'>Insurance</span></div> ";
    html += "				<div><input type='radio' id='rbHomeImprovement' name='serviceType' onclick=\"ServiceType_change('Home Improvement')\" /><span class='blueBig'>Home Improvement</span></div> ";
    html += "				<div><input type='radio' id='rbAutoTransport' name='serviceType' onclick=\"ServiceType_change('Auto Transport')\" /><span class='blueBig'>Auto Transport</span></div> ";
    html += "			</div> ";
    html += "		</div> ";
    html += "	    <span id='spnErrors' class='ErrorMessage' >The fields marked in red are missing or invalid</span>";
    html += "		<div class='qfwide-select'> ";
    html += "			<div id='divMoving' style='display:block'> ";
    html += "                <div class='qfwleft'>";
    html += "    				<div class='qfitem-wide'>";
    html += "                        Select Moving Service<br />";
    html += "		    			<select id='ddlMovingType' class='ddlStyle' onchange='MovingTypeChange(this.value)' onkeyup='MovingTypeChange(this)'> ";
    html += "			    		    <option value='1001'>Full Service</option> ";
    html += "				        	<option value='1013'>ULoad</option> ";
    html += "    				    	<option value='1000'>International</option> ";
    html += "    					</select>";
    html += "                    </div>";
    html += "		    	    <div id='trMovingZipCode' style='display:block' class='qfitem-wide'>";
    html += "                        <span id='spnMovingZipCode'>Moving From Zip Code</span><br /> ";
    html += "                        <input type='text' maxlength='5' class='txtStyle' id='txtMovingZipCode' onchange='ClearFromZip();' />";
    html += "                        <span id='spnAutoZipFinder' onclick='ShowZipFinder(this)' class='js_field_zipfinder'>Zip Finder</span> ";
    html += "			        </div> ";
    html += "			        <div id='trMovingFromCountry' style='display:none;height:34px' class='qfitem-wide'>";
    html += "                        <span id='spnMovingFromCountry'>Moving From Country</span><br /> ";
    html += "                       <select id='ddlMovingFromCountry' class='ddlStyle'></select> ";
    html += "	    		    </div>";
    html += "                </div>";
    html += "               <div class='qfwcenter'>";
    html += "		    	    <div id='trMovingToState' style='display:block' class='qfitem-wide'>";
    html += "                        <span id='spnMovingToState'>Moving To State</span><br /> ";
    html += "                        <select id='ddlMovingToState' class='ddlStyle'></select> ";
    html += "		    	    </div>";
    html += "	    		    <div class='qfitem-wide'>";
    html += "                       <span id='spnMovingSize'>Size Of Move</span><br /> ";
    html += "			    		<select id='ddlMovingSize' class='ddlStyle'> ";
    html += "				    		<option value='0000'>Select Weight</option> ";
    html += "					    	<option value='0602'>Studio 1500 lbs</option> ";
    html += "    						<option value='0604'>1 BR Small 3000 lbs</option> ";
    html += "	    					<option value='0605'>1 BR Large 4000 lbs</option> ";
    html += "	    					<option value='0606'>2 BR Small 4500 lbs</option> ";
    html += "	    					<option value='0607'>2 BR Large 6500 lbs</option> ";
    html += "	    					<option value='0608'>3 BR Small 8000 lbs</option> ";
    html += "	    					<option value='0609'>3 BR Large 9000 lbs</option> ";
    html += "		     				<option value='0610'>4 BR Small 10000 lbs</option> ";
    html += "			    			<option value='0612'>4 BR Large 12000 lbs</option> ";
    html += "			    			<option value='0611'>Over 12000 lbs</option> ";
    html += "				    	</select> ";
    html += "			        </div> ";
    html += "		    	    <div id='trMovingToCountry' style='display:none' class='qfitem-wide'>";
    html += "                        <span id='spnMovingToCountry'>Moving To Country</span><br /> ";
    html += "                        <select id='ddlMovingToCountry' class='ddlStyle'></select> ";
    html += "    			    </div>";
    html += "                </div>";
    html += "		    </div> ";
    html += "			<div id='divStorage' style='display:none'> ";
    /*html += "				<div class='qfitem-wide'>";
    html += "					<span id='spnStorageType'>Storage Type</span><br /> ";
    html += "					<select id='ddlStorageType' class='ddlStyle'> ";
    html += "						<option value='0'>Select Type</option> ";
    html += "						<option value='1010'>Self Storage</option> ";
    html += "						<option value='1022'>Mobile Storage</option> ";
    html += "					</select> ";
    html += "				</div> ";*/
    html += "				<div class='qfitem-wide'>";
    html += "					<span id='spnStorageZipCode'>Storage Zip Code</span><br /> ";
    html += "					<input type='text' maxlength='5' class='txtStyle' id='txtStorageZipCode' onchange='ClearFromZip();' /> ";
    html += "					<span id='Span1' class='js_field_zipfinder' onclick='ShowZipFinder(this)'>Zip Finder</span> ";
    html += "				</div> ";
    html += "			</div> ";
    html += "			<div id='divMortgage' style='display:none'> ";
    html += "                <div class='qfwleft'>";
    html += "    				<div class='qfitem-wide'>";
    html += "        				<span id='spnMortgagePropertyZip'>Property Zip</span><br /> ";
    html += "		    			<input type='text' maxlength='5' class='txtStyle' id='txtMortgagePropertyZip' onchange='ClearFromZip();' /> ";
    html += "			    		<span id='Span2' class='js_field_zipfinder' onclick='ShowZipFinder(this)'>Zip Finder</span> ";
    html += "				    </div> ";
    html += "    				<div class='qfitem-wide'>";
    html += "	    				<span id='spnMortgageLoanPurpose'>Loan Purpose</span><br /> ";
    html += "		    			<select id='ddlMortgageLoanPurpose' class='ddlStyle'> ";
    html += "			    			<option value='0'>Select</option> ";
    html += "				    		<option value='Debt Consolidation'>Debt Consolidation</option> ";
    html += "					    	<option value='Home Improvement'>Home Improvement</option> ";
    html += "						    <option value='Purchase'>Purchase</option> ";
    html += "    						<option value='Refinance'>Refinance</option> ";
    html += "	    				</select> ";
    html += "		    		</div> ";
    html += "                </div>";
    html += "               <div class='qfwcenter'>";
    html += "			    	<div class='qfitem-wide'>";
    html += "    					<span id='spnMortgageCreditRating'>Credit Rating</span><br /> ";
    html += "	    				<select id='ddlMortgageCreditRating' class='ddlStyle'> ";
    html += "		    				<option value='0'>Select</option> ";
    html += "			    			<option value='Excellent'>Excellent</option> ";
    html += "				    		<option value='Fair'>Fair</option> ";
    html += "					    	<option value='Good'>Good</option> ";
    html += "						    <option value='Poor'>Poor</option> ";
    html += "    					</select> ";
    html += "	    			</div> ";
    html += "		    		<div class='qfitem-wide'>";
    html += "			    		<span id='spnMortgagePropertyType'>Property Type</span><br /> ";
    html += "				    	<select id='ddlMortgagePropertyType' class='ddlStyle'> ";
    html += "					    	<option value='0'>Select</option> ";
    html += "    						<option value='Condo'>Condo</option> ";
    html += "	    					<option value='Co-Op'>Co-Op</option> ";
    html += "		    				<option value='Multi Family'>Multi Family</option> ";
    html += "			    			<option value='Single Family'>Single Family</option> ";
    html += "				    		<option value='Town House'>Town House</option> ";
    html += "					    </select> ";
    html += "	    			</div> "
    html += "    			</div> "; ;
    html += "			</div> ";
    html += "			<div id='divInsurance' style='display:none'> ";
    html += "				<div class='qfitem-wide'>";
    html += "					<span id='spnInsuranceZipCode'>Insurance Zip Code</span><br /> ";
    html += "					<input type='text' maxlength='5' class='txtStyle' id='txtInsuranceZipCode' onchange='ClearFromZip();' /> ";
    html += "					<span id='Span3' class='js_field_zipfinder' onclick='ShowZipFinder(this)'>Zip Finder</span> ";
    html += "				</div> ";
    html += "				<div class='qfitem-wide'>";
    html += "					<span id='spnInsuranceType'>Insurance Type</span><br /> ";
    html += "					<select id='ddlInsuranceType' class='ddlStyle'> ";
    html += "						<option value='0'>Select</option> ";
    html += "						<option value='2221'>Auto Insurance</option> ";
    html += "						<option value='2220'>Home Insurance</option> ";
    html += "    					<option value='2223'>Life Insurance</option> ";
    html += "    					<option value='2222'>Renters Insurance</option> ";
    html += "					</select> ";
    html += "				</div> ";
    html += "			</div> ";
    html += "			<div id='divHomeImprovement' style='display:none'> ";
    html += "                <div class='qfwleft'>";
    html += "    				<div class='qfitem-wide'>";
    html += "	    				<span id='spnHomeImprovementZipCode'>Enter Zip Code</span><br /> ";
    html += "		    			<input type='text' maxlength='5' class='txtStyle' id='txtHomeImprovementZipCode' onchange='ClearFromZip();' /> ";
    html += "			    		<span id='Span4' class='js_field_zipfinder' onclick='ShowZipFinder(this)'>Zip Finder</span> ";
    html += "				    </div> ";
    html += "    				<div class='qfitem-wide'>";
    html += "	    				<span id='spnHomeImprovementCategory'>Choose a Category</span><br /> ";
    html += "		    			<select id='ddlHomeImprovementCategory' class='ddlStyle' onchange='InitilizeDdlHomeImprovementService(this.value)'> ";
    html += "			    			<option value=''></option> ";
    html += "				    	</select> ";
    html += "    				</div> ";
    html += "    			</div> ";
    html += "               <div class='qfwcenter'>";
    html += "	    			<div class='qfitem-wide'>";
    html += "		    			<span id='spnHomeImprovementService'>Choose a Service</span><br /> ";
    html += "			    		<select id='ddlHomeImprovementService' class='ddlStyle'> ";
    html += "				    		<option value='0'>Select Service</option> ";
    html += "					    </select> ";
    html += "		    		</div> "
    html += "		    	</div> "; ;
    html += "    		</div> ";
    html += "			<div id='divAuto' style='display:none'> ";
    html += "				<div class='qfitem-wide'>";
    html += "					<span id='spnAutoZipCode'>Shipping Zip Code</span><br /> ";
    html += "					<input type='text' maxlength='5' class='txtStyle' id='txtAutoZipCode' onchange='ClearFromZip();' /> ";
    html += "					<span id='Span5' class='js_field_zipfinder' onclick='ShowZipFinder(this)'>Zip Finder</span> ";
    html += "				</div> ";
    html += "				<div class='qfitem-wide'>";
    html += "					<span id='spnAutoToState'>State Shipping To</span><br /> ";
    html += "					<select id='ddlAutoToState' class='ddlStyle'></select> ";
    html += "				</div> ";
    html += "			</div> ";
    html += "		</div> ";
    html += "		<div class='qfwide-submit'> ";
    html += "			<img src='http://www.relocation.com/files/buttons/button_get-quotes-big.jpg' onclick='SubmitForm()'  /> ";
    html += "		</div> ";
    html += "	</div> ";
    html += "	<div class='fw_bot'><!-- --></div> ";
    html += "</div> ";

    document.write(html);
    setTimeout("Init();", 500);
}

