function displayPic()
{
  var numPics  = 4;
  var index    = (Math.floor(Math.random() * numPics)) + 1;
  var filename = "/images/newshead" + index + ".jpg";
  document.write("<img align=center src='" + filename + "' border=0>");
}

function mailto(name,place)
{
  document.write("<a href='mailto:" + name + "@" + place + "'>");
  document.write(name);
  document.write("<img src='/images/at.gif' border=0>");
  document.write(place);
  document.write("</a>\n");
}

function openWindow(name,width,height,scroll)
{
  file = name + ".html";
  var options = "width=" + width + ",height=" + height +
                ",resizable=1,scrollbars=" + scroll;
  window.open(file,name,options);
}

function openWindow2(file,width,height,scroll)
{
  var options = "width=" + width + ",height=" + height +
                ",resizable=1,scrollbars=" + scroll;
  window.open(file,"",options);
}

function openWindow3(file,width,height,scroll)
{
  if (!(navigator.appName == "Microsoft Internet Explorer" &&
       parseInt(navigator.appVersion)>=4 && navigator.platform == "MacPPC"))
  {
    var options = "width=" + width + ",height=" + height +
                  ",resizable=1,scrollbars=" + scroll;
    window.open(file,"",options);
  }
  else
    document.write(file);
}

function goTo(url)
{
  window.location.href = url;
}

function slideArrows(prv,nxt)
{
  var strPRV = "onclick=goTo('" + prv + "')> ";
  var strNXT = "onclick=goTo('" + nxt + "')> ";

  document.write("<form>");
  document.write("<input class=dinput type=button value=' << '");
  document.write(strPRV);
  document.write("<input class=dinput type=button value=' >> '");
  document.write(strNXT);
  document.write("</form>");
}

function showSlide(num,tot)
{
  var prv = num - 1;
  var nxt = num + 1;

  if (num == 1)
    prv = tot;
  if (num == tot)
    nxt = 1;

  var strPRV = "onclick=goTo('slide_" + prv + ".html')> ";
  var strNXT = "onclick=goTo('slide_" + nxt + ".html')> ";

  document.write("<h4>(" + num + " of " + tot + ")</h4> ");
  document.write("<form>");
  document.write("<input class=buttontext type=button value=' << '");
  document.write(strPRV);
  document.write("<input class=buttontext type=button value=' >> '");
  document.write(strNXT);
  document.write("</form>");

  document.write("<img src='slide_" + num + ".jpg'><br> ");
}
