function SetSearchEngine(h, s, f, o){
    if(f != "sbi"){document.getElementById(f).value = document.getElementById('sbi').value;
    }else{document.getElementById('sbi').value = document.getElementById(o).value;}
    document.getElementById(h).style.display = "none";    
    document.getElementById(s).style.display = "block";
    document.getElementById(f).focus();
}

function SearchGoogle(e,cId){
    if (!e) var e = window.event;
    if (e.keyCode) code = e.keyCode;
	else if (e.which) code = e.which;
    if(code == 13){
        __doPostBack(cId,'');
    }
}

var prm = null;

function Init(sender)
{
  prm = Sys.WebForms.PageRequestManager.getInstance();
  if (prm)
  {
      if (!prm.get_isInAsyncPostBack())
      {
            prm.add_beginRequest(BeginRequest);
      }
  }
}

function BeginRequest(sender,args)
{
    intervalID = window.setInterval("ShowWait()", 150);
}

function ShowWait()
{
    var div = $get(pwDiv);
    div.className = "updateProgress";
}

function AbortPostBack() {
   if (prm.get_isInAsyncPostBack()) {
        prm.abortPostBack();
    }        
}

if(typeof(Sys) !== "undefined") Sys.Application.notifyScriptLoaded();