// JavaScript Document

// Returns the version of Internet Explorer or a -1
// (indicating the use of another browser).
function getInternetExplorerVersion() {
  var rv = -1; // Return value assumes failure.
  if (navigator.appName == 'Microsoft Internet Explorer') {
    var ua = navigator.userAgent;
    var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
    if (re.exec(ua) != null)
      rv = parseFloat( RegExp.$1 );
  }
  return rv;
}

function checkVersion() {
  var ver = getInternetExplorerVersion();
  if ( ver > -1 ) {
    if ( ver <= 6.0 ) 
      alert("You are currently running an older version of Internet Explorer! In order to view this site as intended by the author it is recommended you upgrade to Internet Exlporer version 7. To help you a link is provide at the bottom of this page.");
    else
     return false;
  }
}

// displays icon at bottom of page if IE version is < 6. would like to combine with checkVersion() function
function showHideIcon() {
  var ver = getInternetExplorerVersion();
  if ( ver > -1 ) {
    if ( ver <= 6.0 )
	document.getElementById('iedwnlwd').style.display='block';
    else
     return false;
  }
}

function moreInfo(linkTarget) {
		infoWindow = window.open(linkTarget, "Information", "toolbar=yes,status=yes,menubar=no,location=yes,scrollbars=yes,resizable=yes,width=900,height=850"
		); infoWindow.focus();
}

function mailForm(linkTarget) {
		infoWindow = window.open(linkTarget, "Information", "toolbar=yes,status=yes,menubar=no,location=yes,scrollbars=no,resizable=no,width=800,height=500"
		); infoWindow.focus();
}

function warnUser() {
	return alert("The information on this page has been extracted from mapping software and is only intended as a guide!");
}

function printpage() {
  window.print()
}
