	function map(map)
	{
	    onclick = window.open(map,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=640,height=400'); 
		onclick.focus();
	}  
	
	function definitions(page)
	{
	    onclick = window.open(page,'definition','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=420,height=280'); 
		onclick.focus();
	}  
	

    function highlight(element) 
    {

        element.focus();
        element.style.backgroundColor='EBF7FE'; 
    }
	
    function isFilled(element) 
    {
        if(element.value == "" || element.value == null)
        {
        element.focus();
        element.style.backgroundColor='EBF7FE'; 
        return false;
        }
        else 
        {
        element.style.backgroundColor='FFFFFF'; 
        return true;
        }
    }
    function isFilledOpt(element) 
    {
        if(element.value == "" || element.value == null)
        {
        element.focus();
        element.style.backgroundColor='FFFFFF'; 
        return false;
        }
        else 
        {
        element.style.backgroundColor='FFFFFF'; 
        return true;
        }
    }
    
     function isFilledCheckbox(element) 
     {
        if (element.options[element.options.selectedIndex].value == "" || element.options[element.options.selectedIndex].value == null)
        {
        element.focus();
        element.style.backgroundColor='EBF7FE>'; 
        return false;
        }
        else 
        {
        element.style.backgroundColor='FFFFFF'; 
        return true;
        }
     }
    
    function isNumeric(element) 
    {
        if(element.value == "" || element.value == null || isNaN(element.value))
        {
        element.focus();
        element.style.backgroundColor='EBF7FE'; 
        return false;
        }
        else 
        {
        element.style.backgroundColor='FFFFFF'; 
        return true;
        }
    }
    
    function isDate(mon, day, year) 
    {
        //Input from pulldown menu
        //Month Formated as Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec 
        //Day Formated 1-31
        //Year as 4 digit year
        
        
        var m = mon.value.toUpperCase();
        var d = day.value;
        var y = year.value;
        
        if ( m == 'FEB')
        {
            var isleap=(y%4==0 && (y%100!=0 || y%400==0));
            
            if (d > 29 || (d == 29 && !isleap)) 
            {
            day.focus();
            day.style.backgroundColor='EBF7FE'; 
            alert( m + " in " + y + " doesn't have " + d + " days.");
            return false;
            }       
            else
            {




            day.style.backgroundColor='FFFFFF'; 
            return true;
            } 
        }
        
        if ( ((m == 'APR') || (m == 'JUN') || (m == 'SEP') || (m == 'NOV')) && (d > 30) )
        {
        day.focus();
        day.style.backgroundColor='EBF7FE'; 
        alert("The month of " + m + " only has 30 days.");
        return false;
        }
        else
        {
        day.style.backgroundColor='FFFFFF'; 
        return true;
        }
        
    }
    
    function isPhone(a,b,c,d)
    {
        var areacode = a.value;
        var part1 = b.value;
        var part2 = c.value;
        var req = d;
        var ac_list = "204,211,222,226,242,246,250,264,268,284,289,306,311,333,340,345,403,411,416,418,438,441,444,450,456,506,511,514,519,543,555,600,604,611,613,647,649,654,664,666,670,671,680,684,700,705,709,710,711,758,767,777,778,784,807,809,811,819,867,868,869,876,900,902,905,911,976,999,456,789,987,876";
        
        //alert("req=" + req + "\nsearch=" + ac_list.search(areacode));
        if ( req == 1 )
        {
            if ( isNaN(areacode) || areacode == '' || areacode.substring(0,1) == '0' || areacode.substring(0,1) == '1' || ac_list.search(areacode) >= 0)
            {
            highlight(a);
            alert("You must enter a valid area code");
            return false;
            }
            
            if( isNaN(part1) || part1 == '' || part1.length != 3 || isNaN(part2) || part2 == '' || part2.length != 4 || part1 == '555' || part1.substring(0,1) == '0' || part1.substring(0,1) == '1' )
            {
            highlight(c);
            highlight(b);
            alert("You must enter a valid phone number");
            return false;
            }
        }
        else
        {
            if ( areacode.substring(0,1) == '0' || areacode.substring(0,1) == '1' || ac_list.search(areacode) >= 0)
            {
            highlight(a);
            alert("You must enter a valid area code");
            return false;

            }
            
            if( part1 == '555' || part1.substring(0,1) == '0' || part1.substring(0,1) == '1' )
            {
            highlight(c);
            highlight(b);
            alert("You must enter a valid phone number");
            return false;
            }
        }

        return true;
    }
	
    function isSelected(element) 
    {
        if (element.options[element.options.selectedIndex].value == "" || element.options[element.options.selectedIndex].value == null)
        {
        element.focus();
        element.style.backgroundColor='EBF7FE'; 
        return false;
        }
        else 
        {
        element.style.backgroundColor='FFFFFF'; 
        return true;
        }
    }
    
    
    
    function AK(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '999,995,996,997,998,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"AK\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function AL(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '356,357,358,359,364,366,367,369,352,354,362,355,363,365,368,350,351,360,361,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"AL\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function AR(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '720,721,722,723,716,724,726,717,725,727,718,719,728,729,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"AR\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function AZ(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '859,855,857,865,856,864,850,852,853,860,863,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"AZ\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function CA(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '908,918,919,926,928,936,938,939,946,947,948,949,954,956,957,959,904,906,914,916,922,924,932,934,942,944,950,952,960,907,915,917,925,927,933,935,937,943,945,953,955,958,961,900,901,902,903,905,910,911,912,913,920,921,923,930,931,940,941,951,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"CA\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function CO(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '804,805,806,814,815,800,802,809,810,816,801,807,808,811,803,812,813,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"CO\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function CT(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '062,063,064,065,060,067,069,061,066,068,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"CT\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function DC(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '202,204,200,203,205,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"DC\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function DE(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '199,197,198,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"DE\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function FL(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '321,326,328,331,333,336,338,341,322,323,324,325,332,334,335,346,347,349,320,327,329,330,337,339,342,344,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"FL\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function GA(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '303,305,308,311,313,318,301,398,399,304,306,307,309,314,315,316,317,300,302,310,312,319,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"GA\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function HI(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '967,968,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"HI\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function IA(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '500,502,504,510,512,522,524,506,507,508,509,514,516,526,528,503,505,513,515,525,527,501,511,520,521,523,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"IA\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function ID(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '833,838,834,835,836,837,832,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"ID\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function IL(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '604,606,612,614,622,624,608,609,616,618,619,626,627,628,629,605,607,615,617,625,600,601,602,603,610,611,613,620,623,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"IL\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function IN(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '460,461,462,467,470,471,472,473,465,475,477,468,469,478,479,463,464,466,474,476,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"IN\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function KS(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '662,664,672,674,676,660,661,670,671,665,673,675,666,667,668,669,677,678,679,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"KS\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    

    
    function KY(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '402,404,405,412,413,414,415,424,425,426,427,400,407,409,410,417,419,420,422,401,403,406,408,411,416,418,421,423,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"KY\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function LA(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '704,706,711,714,708,705,707,700,701,703,710,712,713,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"LA\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function MA(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '016,017,018,019,010,012,014,022,024,026,055,011,020,021,023,013,015,025,027,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"MA\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function MD(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '208,211,218,210,212,219,206,207,209,214,215,216,217,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"MD\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function ME(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '044,045,048,039,041,047,040,046,049,042,043,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"ME\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function MI(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '480,481,482,483,490,491,492,493,485,487,495,497,484,494,496,486,488,489,498,499,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"MI\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function MN(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '551,553,562,563,557,558,561,567,550,556,559,560,554,555,564,565,566,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"MN\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function MO(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '633,644,645,646,647,654,655,656,631,637,638,640,649,650,652,630,636,639,641,648,651,657,658,634,635,653,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"MO\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function MS(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '393,394,395,396,386,388,391,387,389,390,392,397,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"MS\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function MT(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '595,597,599,590,591,592,593,594,596,598,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"MT\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function NC(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '280,281,270,272,277,279,282,284,273,274,275,276,286,287,288,289,271,278,283,285,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"NC\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function ND(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '587,580,582,583,585,581,584,586,588,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"ND\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    function NE(Zip)

        {
        Zip3 = Zip.substring(0,3);
        ZipList = '688,689,685,690,692,680,681,686,687,691,683,684,693,000';
        
        if (ZipList.search(Zip3) == -1)
            {

            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"NE\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function NH(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '031,037,035,038,034,036,030,032,033,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"NH\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function NJ(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '077,078,079,084,085,086,073,075,081,083,088,070,071,072,074,076,080,082,087,089,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"NJ\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function NM(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '870,879,884,880,881,882,883,871,873,878,874,875,877,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"NM\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function NV(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '893,891,897,898,889,894,895,890,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"NV\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function NY(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '063,100,107,109,110,117,119,125,127,137,139,141,146,148,102,103,105,112,114,115,120,122,123,130,132,133,135,005,101,104,106,108,111,113,116,118,121,124,126,131,134,136,140,147,149,128,129,138,142,143,144,145,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"NY\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function OH(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '434,435,437,448,449,458,459,431,433,438,442,445,447,452,455,457,432,440,441,443,450,451,456,430,436,439,444,446,453,454,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"OH\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function OK(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '731,736,738,744,734,740,741,730,735,737,739,743,745,746,747,748,749,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"OK\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function OR(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '970,971,972,974,976,977,978,979,973,975,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"OR\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function PA(Zip)
        {
        Zip3 = Zip.substring(0,3);

        ZipList = '155,157,163,165,173,175,177,180,187,189,190,150,151,152,153,160,161,170,171,182,183,184,185,192,194,195,154,156,162,164,172,174,181,186,188,191,193,196,158,159,166,167,168,169,176,178,179,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"PA\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function PR(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '007,009,006,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"PR\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function RI(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '028,029,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"RI\". Please review the zip code and state you have entered and try again.");
            return false;

            }
        else
            return true;

        }
    
    
    
    function SC(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '296,298,291,292,293,294,295,290,297,299,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"SC\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function SD(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '570,572,574,576,577,571,573,575,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"SD\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function TN(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '370,372,379,380,382,374,375,376,377,384,385,383,371,373,378,381,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"TN\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function TX(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '733,750,756,759,760,766,769,776,779,782,785,790,792,795,752,762,763,770,772,773,788,789,798,799,754,755,757,764,765,774,775,778,780,781,786,787,791,796,797,751,753,758,761,767,768,777,783,784,793,794,885,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"TX\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function UT(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '841,843,844,845,846,847,840,842,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"UT\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function VA(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '225,227,235,237,241,243,246,201,220,221,223,230,231,232,233,222,224,234,236,240,226,228,229,238,239,242,244,245,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"VA\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function VI(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '008,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"VI\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function VT(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '054,056,057,059,050,052,051,053,058,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"VT\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function WA(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '980,982,990,992,984,986,989,994,983,985,988,991,993,981,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"WA\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function WI(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '534,537,539,540,541,530,532,543,545,548,531,544,546,547,549,535,538,542,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"WI\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function WV(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '251,253,258,263,264,248,268,249,250,252,259,265,247,254,255,256,257,260,261,262,266,267,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"WV\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
    
    
    function WY(Zip)
        {
        Zip3 = Zip.substring(0,3);
        ZipList = '824,826,827,829,834,822,830,820,821,831,823,825,828,000';
        
        if (ZipList.search(Zip3) == -1)
            {
            alert("The following zip code \"" + Zip  + "\" is not valid in the state of \"WY\". Please review the zip code and state you have entered and try again.");
            return false;
            }
        else
            return true;

        }
    
     
    
    function Bookmark()
    {
        var DateVar = new Date();
        var mm = DateVar.getMonth() + 1;
        mm = "0" + mm.toString()
        mm = mm.substring(0,2);

        
        var yy = DateVar.getYear();
        yy = yy.toString();
        yy = yy.substring(2,4);
        
        var SC = "BM-" + mm + yy;
        
        
        var txt = "Bookmark This Page!"
        var url = "http://www.LowQuotes.com/index.cfm?SC=" + SC
        var title = "Low Quotes.com";
        
        var ver = navigator.appName;
        var num = parseInt(navigator.appVersion);
        if ((ver == "Microsoft Internet Explorer")&&(num >= 4)) 
            {
            window.external.AddFavorite(url,title);
            }
            else
            {
            txt += "  \n\nPress keys (Ctrl+D) on your keyboard";
            alert(txt);
            } 
    }


function popUp11(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=820,height=600,left = 240,top = 212');");
}

     function isValid(form) {
              
	    if ( isSelected(form.PROP_DESC) ==  false )
            {
            alert("What type of property is this loan for?")
            return false;
            }
	    if ( form.PROP_DESC.value ==  "mobile" )
            {
            alert("We're sorry. Currently we cannot accept applications for Mobile or Manufactured homes.")
            return false;
            }
		if ( isSelected(form.EST_VAL) ==  false )
            {
            alert("How much do you estimate this property to be worth?")
            return false;
            }
/*
--------------------------------------------------------------------------------
*/
		BALONE = parseFloat(form.BAL_ONE.value);
		if ( isSelected(form.BAL_ONE) ==  false || BALONE<1)
            {
            alert("What is the balance of your mortgage?")
            return false;
            }
		if ( isSelected(form.MTG_ONE_INT) ==  false )
            {
            alert("What is the interest rate on your mortgage?")
            return false;
            }
		if ( isSelected(form.PRODUCT) ==  false )
            {
            alert("What type of loan do you need?")
            return false;
            }
		if ( isSelected(form.CRED_GRADE) ==  false )
            {
            alert("What kind of credit do you have?")
            return false;
            }
		if ( isSelected(form.ADD_CASH) ==  false )
            {
            alert("Do you need any additional cash?")
            return false;
	    }
		ADDCASH = parseFloat(form.ADD_CASH.value);
		ESTVAL = parseFloat(form.EST_VAL.value);
		if ((BALONE+ADDCASH)>ESTVAL)
			{
			alert("The sum of the balances of your mortgages (" + formatCurrency(BALONE) + ") plus any additional cash you requested (" + formatCurrency(ADDCASH) + ") is greater than the value of your home (" + formatCurrency(ESTVAL) + ").  Please fix the values.")
			return false;
		}
/*
--------------------------------------------------------------------------------
*/
         if ( isFilled(form.FNAME) == false ) 
            {        
            alert("You must enter your First Name");
            return false;
            }
         if ( isFilled(form.LNAME) == false ) 
            {        
            alert("You must enter Your Last Name");
            return false;
            }
         if ( isFilled(form.ADDRESS) == false ) 
            {        
            alert("You must enter your Address");
            return false;
            }
         if ( isFilled(form.CITY) == false ) 
            {        
            alert("You must enter a city");
            return false;
            }
         if ( isSelected(form.STATE) ==  false )
            {
            alert("You must choose a state")
            return false;
            }
         if ( (isFilled(form.ZIP) == false) || !(form.ZIP.value.length == 5)) 
            {        
            highlight(form.ZIP);
            alert("You must enter a valid 5 digit zip code");
            return false;
            }
         if (!(isNumeric(form.ZIP))) 
            {        
            alert("You must enter a valid 5 digit zip code");
            return false;
            } 
            
            WhichFunction = form.STATE.options[form.STATE.options.selectedIndex].value;
            Zip = form.ZIP.value;
            
         if( !(eval(WhichFunction)(Zip)) )
            {
            highlight(form.ZIP); 
            return false;
            }    

          
	  if ( !(isPhone(form.ep1, form.ep2, form.ep3, 1)) )
            {
            return false;
            }  else {
		isFilled(form.ep1);
		isFilled(form.ep2);
		isFilled(form.ep3);
	    }
		
	 if (isFilledOpt(form.dp1) == true || isFilledOpt(form.dp2) == true || isFilledOpt(form.dp3) == true)      
           {
           if ( !(isPhone(form.dp1, form.dp2, form.dp3, 1)) )
            {
            return false;
            } else {
		isFilled(form.dp1);
		isFilled(form.dp2);
		isFilled(form.dp3);
	    }
           }
		if ( !(isFilled(form.EMAIL)))
            {
            alert("You missed the following question: Email Address");
            return false;
            }
		 var field = form.EMAIL; // email field
         var str = field.value; // email string	
		 var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
         var reg2 = /^[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/; // valid
  		 if (!reg1.test(str) && reg2.test(str)) { // if syntax is valid
			} else {
				highlight(form.EMAIL);
				alert("Please enter a valid Email address");
				return false;
			}
		if ( isSelected(form.PREF_CALLTIME) ==  false )
            {
            alert("What time would you like to be contacted?")
            return false;
            }
/*
--------------------------------------------------------------------------------
*/
/*
       form.dayphone.value = '' + form.dp1.value + form.dp2.value + form.dp3.value
	   form.evephone.value = '' + form.ep1.value + form.ep2.value + form.ep3.value
*/
       return true;
       }

function formatCurrency(num) {
	num = num.toString().replace(/\$|\,/g,'');
	if(isNaN(num))
	num = "0";
	sign = (num == (num = Math.abs(num)));
	num = Math.floor(num*100+0.50000000001);
	cents = num%100;
	num = Math.floor(num/100).toString();
	if(cents<10)
	cents = "0" + cents;
	for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
	num = num.substring(0,num.length-(4*i+3))+','+
	num.substring(num.length-(4*i+3));
	return (((sign)?'':'-') + '$' + num + '.' + cents);
}