var sShelterList = ""

function GoBack()
{ 
  window.location = "default.asp?" + sPassAlong ;
}

function Init()
{
//  alert(document.frmSearch.ColorGroup[0].checked) ;

}
function CheckForm(sSearchType,bFrontDoor)
{
  var s = new String;

  CheckBoxes() ;
  if (sShelterList == "")
  {
    alert("Sorry! Please Choose at least one Shelter.") ;
  }
  else
  {
    if (sShelterList.length >= 1800)
    {
      alert("Sorry! You have chosen too many shelters. You may select no more than 200 shelters.") ;
	    return ;
    } 

    SetPassalongValue("view","v_animal");
    SetPassalongValue("friends","1") ;
    SetPassalongValue("samaritans","1") ;
    SetPassalongValue("frontdoor","1");
    SetPassalongValue("stylesheet","include/default.css");
    SetPassalongValue("shelterlist",sShelterList);
    //s = "&shelterlist=" + sShelterList ;
    //s = CleanQueryString(s) ;

    if (bFrontDoor == false)
      window.location = "search.asp?" + sPassAlong + s ;
    else
    {
      if ( sSearchType == "ID" )
      {
        SetPassalongValue("where","") ;
        parent.FRAME_TOPNAV.location = "SearchNav.asp?" + sPassAlong ; // + s;
        parent.FRAME_CONTENT.location = "InstrEnterID.htm" ;
      }  
      else if (sSearchType == "PRE")
      {
        parent.FRAME_CONTENT.location = "InstrChooseType.htm" ;
        parent.FRAME_TOPNAV.location = "SearchNav.asp?" + sPassAlong ; // + s;
      }      
      else if (sSearchType == "LOST")
      {
        var sAType = new String ;
        sAType = QueryString("atype") ;

        SetPassalongValue("searchtype","LOST");
        
        if ( sAType != "" )
          parent.FRAME_CONTENT.location = "InstrChoosePhys.htm" ;  
        else
          parent.FRAME_CONTENT.location = "InstrChooseType.htm" ;
          
        parent.FRAME_TOPNAV.location = "SearchNav.asp?" + sPassAlong ; // + s;
        //parent.FRAME_CONTENT.location = "LostPet.asp?" + sPassAlong ;
        //parent.FRAME_TOPNAV.location = "SearchNav.asp?stylesheet=include/default.css&" + sPassAlong ; // + s;
      }      
      else if (sSearchType == "REGISTER")
      {
        var sAType = new String ;
        sAType = QueryString("atype") ;

        SetPassalongValue("searchtype","LOST") ;
        SetPassalongValue("reqtype",sAType) ;
        parent.FRAME_CONTENT.location = "WebForm_PetRequest.aspx?" + sPassAlong ;
      }      
      else
      {
        parent.FRAME_CONTENT.location = "InstrChooseAnimalType.htm" ;
        parent.FRAME_TOPNAV.location = "SearchNav.asp?" + sPassAlong ; // + s;
      }      
    }  
    return true ;
  }
} // end function

function All()
{
  CheckAll() ;
}
function None()
{
  UnCheckAll() ;
}
function AllClients()
{
  CheckAllClients();
}
function NoClients()
{
  UnCheckAllClients();
}
function AllOthers()
{
  CheckAllOthers();
}
function NoOthers()
{
  UnCheckAllOthers();
}


