
//Begin Flyout Menu
var sAgent = navigator.userAgent;  // Not used?
var bIsIE432 = true;   // bIs95NT && bIsIE4 - Doesn't work in anything other than IE anyway =(

// Variable declarations for StartMenu.

var sOpenMenuID = ""; // Points to any open pop-up menus, is blank otherwise.
var iTimerID;
var bMouseOnMenu = false;  // If mouseover, menu pops out.
var iTimerMouseID;        // Delays clearing menu on mouseout main.

// Main function, StartMenu, that hides any open pop-up menus, determines which menu DIV to access, and starts its display. 

function StartMenu() {
  if (bIsIE432) {
     var eSrc = window.event.srcElement;
     window.event.cancelBubble = true;
     if (sOpenMenuID != "") {
        document.all[sOpenMenuID].style.display = "none";
     }     
		 if (eSrc.className=="clsMenuTitle") {
         var nMenuNum = eSrc.id.substring(eSrc.id.length - 1,eSrc.id.length);
         sOpenMenuID = "idMenu" + nMenuNum;
         var eMenu = document.all[sOpenMenuID];
         // Start displaying the pop-up menu.
         eMenu.style.clip = "rect(0 0 0 0)";
         document.all[sOpenMenuID].style.display = "block";
         nChunk = 25;
         iTimerID = window.setTimeout("showMenu(" + eMenu.id + ")", 10);
      }
   }
}

function clearMenu() { // Set Timer to clear menu on mouseout.
      window.event.cancelBubble = true;
      if (sOpenMenuID != "") {
          iTimerMouseID = window.setTimeout("clearMenu2()", 1000);
      }
}

function clearMenu2() { // Clear menu after delay (if mouseout).
      if ((sOpenMenuID != "")&& !bMouseOnMenu) {
            document.all[sOpenMenuID].style.display = "none";
            sOpenMenuID = "";
      }
}

var nChunk; // nChunk is a variable scaled by 25 in successive iterations of a conditional loop.

function showMenu(eMenu) { // showMenu function reveals the menu in 25 percent chunks every 10 milliseconds.
      eMenu.style.clip = "rect(0 100% " + nChunk + "% 0)";  // Makes "rect" visible...
       // Top, right, bottom, and left specify length values, any of which can be replaced by "auto", leaving that side not clipped.
       // E.g. The value of "top" specifies that everything above this value on the Y-axis (with 0 at the top) is clipped.
      nChunk += 25;
      if (nChunk <= 100) {
         iTimerID = window.setTimeout("showMenu(" + eMenu.id + ")", 10);
      } else {
          window.clearTimeout(iTimerID);
        }
}
// End Flyout Menu



// Begin Get Co-ordinates
function mouseCoord(e) {
  status = "X,Y = " + e.offsetX + "," + e.offsetY;
	//"offsetX" and "offsetY" only supported in IE.
}
// End Get Co-ordinates



// Begin Browser Sniff
var detect = navigator.userAgent.toLowerCase();
var OS,browser,version,total,thestring;

if (checkIt('konqueror'))
{
	browser = "Konqueror";
	OS = "Linux";
}
else if (checkIt('safari')) browser = "Safari"
else if (checkIt('omniweb')) browser = "OmniWeb"
else if (checkIt('opera')) browser = "Opera"
else if (checkIt('webtv')) browser = "WebTV";
else if (checkIt('icab')) browser = "iCab"
else if (checkIt('msie')) browser = "Internet Explorer"
else if (!checkIt('compatible'))
{
	browser = "Netscape Navigator"
	version = detect.charAt(8);
}
else browser = "Unknown Browser";

if (!version) version = detect.charAt(place + thestring.length);

if (!OS)
{
	if (checkIt('linux')) OS = "Linux";
	else if (checkIt('x11')) OS = "Unix";
	else if (checkIt('mac')) OS = "Mac"
	else if (checkIt('win')) OS = "Windows"
	else OS = "an unknown operating system";
}

function checkIt(string)
{
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}
// End Browser Sniff


// Begin Print Browser
function callBrowser() {
  document.write(browser + " v." + version);
}
// End Print Browser


// Begin Print Platform
function callPlatform() {
  document.write(navigator.platform);
}
// End Print Platform



// Get today's date to display.
var Today = new Date();


// Begin Print Date
function callDate() {
  document.write(Today.toLocaleDateString());
}
// End Print Date


