onerror=handleErr;
var txt="";

function handleErr(msg,url,l)
{
txt="There was an error on this page.\n\n";
txt+="Error: " + msg + "\n";
txt+="URL: " + url + "\n";
txt+="Line: " + l + "\n\n";
txt+="Click OK to continue.\n\n";
alert(txt);
return true;
}


function checkrequired(which) {
  var pass=true;
  for (i=0;i<which.length;i++) {
    var tempobj=which.elements[i];
    if (tempobj.id.substring(0,8)=="required") {
      if (((tempobj.type=="text"||tempobj.type=="textarea")&&
          tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&
          tempobj.selectedIndex==0)) {
        pass=false;
        break;
      }
    }
  }
  if (!pass) {
    shortFieldName=tempobj.id.substring(8,30).toUpperCase();
    alert("The "+shortFieldName+" field is a required field.");
    return false;
  } else {
  return true;
  }
}

// Copyright (c) 2000 internet.com Corp. 
// http://www.webreference.com/js/
// License is granted if and only if this entire
// copyright notice is included. By Tomer Shiran.

function launch(newURL, newName, newFeatures, orgName) {
  var remote = open(newURL, newName, newFeatures);
  if (remote.opener == null) // if something went wrong
    remote.opener = window;
  remote.opener.name = orgName;
  return remote;
}


function chkGoogle(myForm){

  var myAddress = myForm.Address.value;
  var myZIP = myForm.Zip.value;
  var myURL = "http://maps.google.com/maps?q=";
  myURL = myURL + myZIP + "+" + myAddress.replace(" ","+");
  GoogleLookup = launch(myURL, "GoogleLookup", "menubar=No,resizable=Yes,scrollbars=Yes,status=No,toolbar=No", "myWindow");

}

function chkBing(myForm){

  var myAddress = myForm.Address.value;
  var myZIP = myForm.Zip.value;
  var myURL = "http://www.bing.com/maps/default.aspx?q=";
  myURL = myURL + myAddress.replace(" ","%20") + "%20" + myZIP;
  BingLookup = launch(myURL, "BingLookup", "menubar=No,resizable=Yes,scrollbars=Yes,status=No,toolbar=No", "myWindow");

}

function chkDouglasCountyAssessor(myForm){

  var myAddress = myForm.Address.value;

  var myURL1 = "http://douglasne.mapping-online.com/DouglasCoNe/static/parcelproc.jsp?Name=&Id=&HouseNo=";
  var myURL2 = "&StreetDir=&StreetName=&StreetSfx=&Submit=New+Parcel+Search";

  myURL1 = myURL1 + myAddress.substring(0,myAddress.indexOf(' ')) + myURL2;

  DouglasLookup = launch(myURL1, "DouglasLookup", "menubar=No,resizable=Yes,scrollbars=Yes,status=No,toolbar=No", "myWindow");

}

function chkSarpyCountyAssessor(myForm){

  var myAddress = myForm.Address.value;

  var myURL = "http://www.sarpy.com/sarpyproperty";

  SarpyLookup = launch(myURL, "SarpyLookup", "menubar=No,resizable=Yes,scrollbars=Yes,status=No,toolbar=No", "myWindow");

}

function msg() {
  alert("Hello world!");
}


