

    //checks entire county..
   function AddCounty(county){
        var PutnamCountyArray =new Array("1560","1327","1340","1326","1363","1335","1336");
        var BureauCountyArray =new Array("1376","1376","1349","1374","1328","1330","1338","1312","1323","1337","1317","1379","1356","1329","1320","1362","1322","1368","1315");
        var LaSalleCountyArray =new Array("1352","564","518","1342","347","518","551","549","350","1372","557","350","1373","1301","350","360","1354","1301","1373","350","350","341","360","1348","1316","1348","1370","1325","1332","1334","1364","1321");
        
        switch (county){
            case "Bureau": 
                var arLen=BureauCountyArray.length;
                for ( var i=0, len=arLen; i<len; ++i ){
                     CheckBoxSelectArea(BureauCountyArray[i]);
                  }
            break;
            case "LaSalle": 
                var arLen=LaSalleCountyArray.length;
                for ( var i=0, len=arLen; i<len; ++i ){
                     CheckBoxSelectArea(LaSalleCountyArray[i]);
                  }
            break;
            case "Putnam": 
                var arLen=PutnamCountyArray.length;
                for ( var i=0, len=arLen; i<len; ++i ){
                     CheckBoxSelectArea(PutnamCountyArray[i]);
                  }
            break;
            default : alert("Error: No Properties Selected");
        }    
   }//end AddCounty()
   
   function AddCity(CityID){
    CheckBoxSelectArea(CityID);
    location.href = "#" + CityID;
    document.getElementById(CityID).style.backgroundColor = '#F9F967';
   }
   
   function highlightBox(checkID,valueID)                
    {
    var state = true
    document.forms[0].SearchAreaList
    var cbControl = 'SearchAreaList' 
    var chkBoxCount= document.forms[0].SearchAreaList 
    
            for(var i=0;i<chkBoxCount.length;i++) 

            {
              if (chkBoxCount[i].value == valueID) {
                //alert(document.getElementById(checkID).value);
                if (document.getElementById('chk_' + checkID).checked == true)
                {
                document.getElementById(checkID).style.backgroundColor = '#F9F967';
                }
                else {
                document.getElementById(checkID).style.backgroundColor = '';
                }
                
              }
                
            }
           
            return false; 
    }  
   
  //checks box from map 
   function CheckBoxSelectArea(checkID)                
    {
    var state = true
    document.forms[0].SearchAreaList
    var cbControl = 'SearchAreaList' 
    var chkBoxCount= document.forms[0].SearchAreaList 
    
            for(var i=0;i<chkBoxCount.length;i++) 
           
            {
              if (chkBoxCount[i].value == checkID) {
                chkBoxCount[i].checked = state;
              }
                
            }
           
            return false; 
    }   
    
    function checkAllAreas(){
    
        document.forms[0].SearchAreaList
        var cbControl = 'SearchAreaList' 
        var nameCount;
        var chkBoxCount= document.forms[0].SearchAreaList 
            for(var i=0;i<chkBoxCount.length;i++){
                    chkBoxCount[i].checked = true;
                    nameCount = document.getElementsByName(chkBoxCount[i].value);
                    for(var j=0;j<nameCount.length;j++){
                    nameCount[j].style.backgroundColor = '#F9F967';
                    }             
                }
               
                return false;     
    }
    
    function uncheckAllAreas(){
    
        document.forms[0].SearchAreaList
        var cbControl = 'SearchAreaList' 
        var nameCount;
        var chkBoxCount= document.forms[0].SearchAreaList 
            for(var i=0;i<chkBoxCount.length;i++){
                    chkBoxCount[i].checked = false; 
                    nameCount = document.getElementsByName(chkBoxCount[i].value);
                    for(var j=0;j<nameCount.length;j++){
                    nameCount[j].style.backgroundColor = '';
                    }                
                }
               
                return false;     
    }