﻿/* Search.js - JScript File
   Includes scripts for the search.aspx page
   History:
   08-XX-08     Sanjoy C.       Original Code
*/



//custom validators
function ClientValidate(source, clientside_arguments)
{   
  var theCity = theCityCtrl.value;
  var theState = theStateCtrl.value;
  var theZip = theZipCtrl.value;
  
  if (theZip == "")
  {
     if (theCity == "" || theState == "0")
     {
        clientside_arguments.IsValid=false;
     }
     else
     {
        clientside_arguments.IsValid=true;
     }
  }
  else
  {
     clientside_arguments.IsValid=true;
  }
}




//to fix firefox back problem, nothing responses; this fixes everything except the btnSearch click event.
var __oldAction = theForm.action;
var __oldPostBack = __doPostBack;
__doPostBack = function(eventTarget, eventArgument) {
    theForm.action = __oldAction;
    __oldPostBack(eventTarget, eventArgument);            
}