function IsEnterKey(evt) 
{
  if (!evt) 
  {
    //grab IE event object.
    evt = window.event
  } 
  else if (!evt.keyCode) 
  {
    evt.KeyCode = evt.which
  }
  //alert(evt.keyCode)
  return (evt.keyCode==13)
}

function processOnEnter(fld, evt)
{
  if (IsEnterKey(evt))
  {
    //alert(fld.value)
    window.location.href="search.aspx?searchtext=" + escape(fld.value)
    return false
  }
  return true
}

function clickButton(e, buttonid){ 
      var evt = e ? e : window.event;
      var bt = document.getElementById(buttonid);

      if (bt){ 
          if (evt.keyCode == 13){ 
                bt.click(); 
                return false; 
          } 
      } 
}

//set popup window options 
function popUp(strURL,strType,strHeight,strWidth) {
var strOptions="";
	if (strType=="flashPopup") strOptions="resizable,height="+strHeight+",width="+strWidth;
	if (strType=="popup") strOptions="scrollbars,resizable,height="+strHeight+",width="+strWidth;
	if (strType=="fullScreen") strOptions="scrollbars,location,directories,status,menubar,toolbar,resizable";
window.open(strURL, 'newWin', strOptions);
}
