/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//Contents for menu 1
var menu1 = new Array();
menu1[0] = '<a href="/quicklinks.php?redirect=http://www.abc.net.au/" style="color: #ffffff;">ABC Radio/TV</a>';
menu1[1] = '<a href="/quicklinks.php?redirect=http://afl.com.au/" style="color: #ffffff;">AFL Football</a>';
menu1[2] = '<a href="/quicklinks.php?redirect=http://www.anz.com.au/" style="color: #ffffff;">ANZ</a>';
menu1[3] = '<a href="/quicklinks.php?redirect=http://www.bom.gov.au/" style="color: #ffffff;">Australian Weather</a>';
menu1[4] = '<a href="/quicklinks.php?redirect=http://www.bawbawshire.vic.gov.au/" style="color: #ffffff;">Baw Baw Shire</a>';
menu1[5] = '<a href="/quicklinks.php?redirect=http://www.bendigobank.com.au/" style="color: #ffffff;">Bendigo Bank</a>';
menu1[6] = '<a href="/quicklinks.php?redirect=http://carpoint.ninemsn.com.au/" style="color: #ffffff;">CarPoint</a>';
menu1[7] = '<a href="/quicklinks.php?redirect=http://www.cfa.vic.gov.au/incidents/warnings_advice.htm" style="color: #ffffff;">CFA Current Fires List</a>';
menu1[8] = '<a href="/quicklinks.php?redirect=http://www.commbank.com.au/" style="color: #ffffff;">Commonwealth Bank</a>';
menu1[9] = '<a href="/quicklinks.php?redirect=http://mirror.dcsi.net.au/" style="color: #ffffff;">DCSI Mirror Site</a>';
menu1[10] = '<a href="/quicklinks.php?redirect=/weather.php" style="color: #ffffff;">DCSI Weather</a>';
menu1[11] = '<a href="/quicklinks.php?redirect=http://www.dse.vic.gov.au/DSE/nrenfoe.nsf/LinkView/90FCAC74BB9A4F2ECA257090001E6F22E2ACC26BB87D6BFC4A2567CB000DB12D" style="color: #ffffff;">DSE Fire Situations</a>';
menu1[12] = '<a href="/quicklinks.php?redirect=http://www.ebay.com.au/" style="color: #ffffff;">eBay Australia</a>';
menu1[13] = '<a href="/quicklinks.php?redirect=http://www.gamespot.com/" style="color: #ffffff;">Game Spot</a>';
menu1[14] = '<a href="/quicklinks.php?redirect=http://gamesdomain.yahoo.com/" style="color: #ffffff;">Games Domain</a>';
menu1[15] = '<a href="/quicklinks.php?redirect=http://heraldsun.news.com.au/" style="color: #ffffff;">Herald Sun</a>';
menu1[16] = '<a href="/quicklinks.php?redirect=http://www.national.com.au/" style="color: #ffffff;">National Bank</a>';
menu1[17] = '<a href="/quicklinks.php?redirect=http://www.theage.com.au/" style="color: #ffffff;">The Age</a>';
menu1[18] = '<a href="/quicklinks.php?redirect=http://www.warraguldirectory.com.au/" style="color: #ffffff;">The Warragul Directory</a>';
menu1[19] = '<a href="/quicklinks.php?redirect=http://www.tradingpost.com.au/" style="color: #ffffff;">Trading Post</a>';
menu1[20] = '<a href="/quicklinks.php?redirect=http://www.tradingroom.com.au/" style="color: #ffffff;">Trading Room</a>';
menu1[21] = '<a href="/quicklinks.php?redirect=http://www.ebroadcast.com.au/tv/" style="color: #ffffff;">TV Guide</a>';
menu1[22] = '<a href="/quicklinks.php?redirect=http://www.vlinepassenger.com.au/" style="color: #ffffff;">V-Line Timetable</a>';
menu1[23] = '<a href="/quicklinks.php?redirect=http://www.vet.com.au/" style="color: #ffffff;">Vet Anti-Virus</a>';
menu1[24] = '<a href="/quicklinks.php?redirect=http://www.warragulcinemas.com.au/" style="color: #ffffff;">Warragul Cinema</a>';
menu1[25] = '<a href="/quicklinks.php?redirect=http://www.westpac.com.au/" style="color: #ffffff;">Westpac</a>';
menu1[26] = '<a href="/quicklinks.php?redirect=http://www.whitepages.com.au/" style="color: #ffffff;">Whitepages</a>';
menu1[27] = '<a href="/quicklinks.php?redirect=http://www.yellowpages.com.au/" style="color: #ffffff;">Yellowpages</a>';

// All code after this is Javascript, do not edit as php!!

var menuwidth = '165px'; //default menu width
var menubgcolor = '#000066'; //menu bgcolor
var disappeardelay = 250; //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick = "yes"; //hide menu when user clicks within menu?

var ie4 = document.all;
var ns6 = document.getElementById && !document.all;

if (ie4 || ns6) {
  document.write('<div id="dropmenudiv" style="visibility:hidden;width:' + menuwidth + ';background-color:' + menubgcolor + '" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>');
}

function getposOffset(what, offsettype) {
  var totaloffset = (offsettype == "left") ? what.offsetLeft : what.offsetTop;
  var parentEl = what.offsetParent;
  while (parentEl != null) {
    totaloffset = (offsettype == "left") ? totaloffset + parentEl.offsetLeft : totaloffset + parentEl.offsetTop;
    parentEl = parentEl.offsetParent;
  }
// This is what you need to check out
  return totaloffset;
}

function showhide(obj, e, visible, hidden, menuwidth) {
  if (ie4 || ns6) {
    dropmenuobj.style.left = dropmenuobj.style.top = - 500;
  }

  if (menuwidth != "") {
    dropmenuobj.widthobj = dropmenuobj.style;
    dropmenuobj.widthobj.width = menuwidth;
  }
  if (e.type == "click" && obj.visibility == hidden || e.type == "mouseover") {
    obj.visibility = visible;
  } else if (e.type == "click") {
    obj.visibility = hidden;
  }
}

function iecompattest() {
  return (document.compatMode && document.compatMode != "BackCompat") ? document.documentElement : document.body;
}

function clearbrowseredge(obj, whichedge) {
  var edgeoffset = 0
  if (whichedge == "rightedge") {
    var windowedge = ie4 && !window.opera ? iecompattest().scrollLeft + iecompattest().clientWidth - 15 : window.pageXOffset + window.innerWidth - 15;
    dropmenuobj.contentmeasure = dropmenuobj.offsetWidth;
    if (windowedge - dropmenuobj.x < dropmenuobj.contentmeasure) {
      edgeoffset = dropmenuobj.contentmeasure - obj.offsetWidth;
    }
  } else {
    var topedge = ie4 && !window.opera ? iecompattest().scrollTop : window.pageYOffset;
    var windowedge = ie4 && !window.opera ? iecompattest().scrollTop + iecompattest().clientHeight - 15 : window.pageYOffset + window.innerHeight - 18;
    dropmenuobj.contentmeasure = dropmenuobj.offsetHeight;

    if (windowedge - dropmenuobj.y < dropmenuobj.contentmeasure) { //move up?
      edgeoffset = dropmenuobj.contentmeasure + obj.offsetHeight - 30;

      if ((dropmenuobj.y - topedge) < dropmenuobj.contentmeasure) { //up no good either?
        edgeoffset = dropmenuobj.y + obj.offsetHeight - topedge - 30;
      }
    }
  }
  return edgeoffset;
}

function populatemenu(what) {
  if (ie4 || ns6) {
    dropmenuobj.innerHTML = what.join("");
  }
}

function dropdownmenu(obj, e, menucontents, menuwidth, menuleft, menutop) {
  if (typeof(menuleft) == "undefined") {
    menuleft = 0;
  }
  if (typeof(menutop) == "undefined") {
    menutop = 0;
  }
  if (window.event) {
    event.cancelBubble = true;
  } else if (e.stopPropagation) {
    e.stopPropagation();
  }
  clearhidemenu();
  dropmenuobj = document.getElementById ? document.getElementById("dropmenudiv") : dropmenudiv;
  populatemenu(menucontents);

  if (ie4 || ns6) {
    showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth);
    dropmenuobj.x = getposOffset(obj, "left");
    dropmenuobj.y = getposOffset(obj, "top");
    dropmenuobj.style.left = dropmenuobj.x - clearbrowseredge(obj, "rightedge") + menuleft + "px";
    dropmenuobj.style.top = dropmenuobj.y - clearbrowseredge(obj, "bottomedge") + menutop + obj.offsetHeight + "px";
  }
  return clickreturnvalue();
}

function clickreturnvalue() {
  if (ie4 || ns6) {
    return false;
  } else {
    return true;
  }
}

function contains_ns6(a, b) {
  while (b.parentNode)
    if ((b = b.parentNode) == a) {
      return true;
    }
  return false;
}

function dynamichide(e) {
  if (ie4 && !dropmenuobj.contains(e.toElement)) {
    delayhidemenu();
  } else if (ns6 && e.currentTarget != e.relatedTarget && !contains_ns6(e.currentTarget, e.relatedTarget)) {
    delayhidemenu();
  }
}

function hidemenu(e) {
  if (typeof dropmenuobj != "undefined") {
    if (ie4 || ns6) {
      dropmenuobj.style.visibility = "hidden";
    }
  }
}

function delayhidemenu() {
  if (ie4 || ns6) {
    delayhide = setTimeout("hidemenu()", disappeardelay);
  }
}

function clearhidemenu() {
  if (typeof delayhide != "undefined") {
    clearTimeout(delayhide);
  }
}

if (hidemenu_onclick == "yes") {
  document.onclick = hidemenu;
}