<!-- Begin

// The popup function is used to create a new window with the passed URL in it
function popup(lnk) {
    window.open(lnk, "Help",config="height=600,width=650,scrollbars=Yes,resizable=Yes")
}

function popupsketch(lnk) {
    window.open(lnk, "Sketch",config="height=580,width=780,scrollbars=Yes,resizable=Yes")
//    window.open(lnk, "Sketch",config="height=630,width=840,scrollbars=Yes,resizable=Yes")
}

function popupExplain(lnk) {
    window.open(lnk, "Explain",config="height=512,width=640,scrollbars=Yes,resizable=Yes")
}

function popupHomestead(lnk) {
    iHeight = 120;
    iWidth = 460;
    iTopLoc = (screen.height - iHeight) / 2;
    iLeftLoc = (screen.width - iWidth) / 2;
    window.open(lnk, "Homestead",config="top=" + iTopLoc + ",left=" + iLeftLoc + ",height=" + iHeight + ",width=" + iWidth + ",scrollbars=No,resizable=Yes");
}

function popupphoto(lnk) {
    window.open(lnk, "Photo",config="height=510,width=680,scrollbars=Yes,resizable=Yes,menubar=yes")
}

function fncGoTo(lnk) {
    window.location=lnk
}

//----------------------------------------------------------------------------
function PreloadImages()
{
  ImageDir = "images/";
  ImageNum = 10;
  ImageNames = new Array ("lines_blue.gif",
                          "logo.gif",
                          "Tab1.gif",
                          "Tab2.gif",
                          "Tab3.gif",
                          "Tab4.gif",
                          "Tab5.gif",
                          "Tab6.gif",
                          "Tab7.gif",
                          "Tabs_bg2.gif");

  var Pics = new Array();

  for (i = 0; i <= ImageNum; i++)
  {
    Pics[i] = new Image();
    Pics[i].src = ImageDir + ImageNames[i];
  }
}

//
function ReformatBloLot()
{
  BloLot = document.frmBloLotSearch.BloLot.value
  Dash1Loc = 4
  Dash2Loc = 6
  Dash3Loc = 12
  Dash4Loc = 17

  Dash1 = BloLot.indexOf("-")
  if (Dash1 == -1)
  {
  }
  else
  {
    if (Dash1 < Dash1Loc)
    {
      tmpString = "0000"
      BloLot = tmpString.substring(0,Dash1Loc-Dash1) + BloLot
    }
    Dash2 = BloLot.indexOf("-", Dash1Loc + 1)
    if (Dash2 == -1)
    {
    }
    else
    {
      Dash3 = BloLot.indexOf("-", Dash2Loc + 1)
      if (Dash2 == -1)
      {
      }
      else
      {
      Dash4 = BloLot.indexOf("-", Dash3Loc + 1)

      }
    }
  }
  alert ("BloLot = " + BloLot)
  alert ("Dash 1 = " + Dash1)
  alert ("Dash 2 = " + Dash2)
  alert ("Dash 3 = " + Dash3)
  alert ("Dash 4 = " + Dash4)

  document.frmBloLotSearch.BloLot.value = BloLot
}

// The CheckBloLot function is used to validate the Block / Lot number enter on the search screen
function CheckBloLot() {
  if (document.frmBloLotSearch.BloLot.value == "")
  {
    alert("You must enter a Block / Lot number.")
  }
  else
  {
    document.frmBloLotSearch.submit()
  }
}

// The CheckName function is used to validate the names entered on the search screen
function CheckName() {
  if (document.frmNameSearch.LName.value == "")
  {
    alert("You must enter a Last Name.")
  }
  else
  {
    document.frmNameSearch.submit()
  }
}

// The CheckAddress function is used to validate the address entered on the search screen
function CheckAddress() {
  if (document.frmAddressSearch.StreetName.value == "")
  {
    alert("You must enter a Street Name.")
  }
  else
  {
    document.frmAddressSearch.submit()
  }
}

// The funClock function is used to display the current time on the page as an active clock
function funClock()
{

  if (!document.all)
    return;

  // if the browser is not IE or Netscape compatable then return without doing anything.
  if (!document.layers && !document.all)
    return;

  var runTime = new Date();
  var hours = runTime.getHours();
  var minutes = runTime.getMinutes();
  var seconds = runTime.getSeconds();
  var dn = "AM";

  // if the hour is greater or equal to 12 then it is the afternoon
  if (hours >= 12)
  {
    dn = "PM";
    hours = hours - 12;
  }

  // if the hour is 0 then it's really 12
  if (hours == 0)
  {
    hours = 12;
  }

  // if the minutes are less than 9 then zero fill
  if (minutes <= 9)
  {
    minutes = "0" + minutes;
  }

  // if the seconds are less than 9 then zero fill
  if (seconds <= 9)
  {
    seconds = "0" + seconds;
  }

  // Store the current time in a local variable
  movingtime = "<b>"+ hours + ":" + minutes + ":" + seconds + " " + dn + "</b>";

  // if the browser understands layers (Netscape)
  if (document.layers)
  {
    document.layers.clock.document.write(movingtime);
    document.layers.clock.document.close();
  }

  // else if this is an IE browser
  else if (document.all)
  {
    clock.innerHTML = movingtime;
  }

  // Set the time out to one second so that the clock updates.
  setTimeout("funClock()", 1000)
}

// Run the funClock function when the page first loads
//window.onload = funClock;

//  End -->
