/*
Tabs Menu (mouseover)- By Dynamic Drive
For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
This credit MUST stay intact for use

JavsScript1.2
URL: http://www.dynamicdrive.com/dynamicindex1/tabmouseover.htm
*/

var submenu = new Array();

//Set submenu contents. Expand as needed. For each content, make sure everything exists on ONE LINE. Otherwise, there will be JS errors.
submenu[0] = ' ';
submenu[1] = '<span class="submenu">'
						+ '<img src="/images/bullets/arrow.gif" width="5" height="9" hspace="1" />'
							+ '<a href="/courses/index.php?catid=1">' + msg[2008] + '</a>'
						+ '  <img src="/images/bullets/arrow.gif" width="5" height="9" hspace="1" />'
							+ '<a href="/courses/index.php?catid=2">' + msg[2009] + '</a>'
						+ '  <img src="/images/bullets/arrow.gif" width="5" height="9" hspace="1" />'
							+ '<a href="/courses/index.php?catid=3">' + msg[2010] + '</a>'
						+ '  <img src="/images/bullets/arrow.gif" width="5" height="9" hspace="1" />'
							+ '<a href="/courses/index.php?catid=4">' + msg[2011] + '</a>'
						//+ '  <img src="/images/bullets/arrow.gif" width="5" height="9" hspace="1" />'
							//+ '<a href="/courses/index.php?catid=5">' + msg[2012] + '</a>'
						+ '</span>';
submenu[2] = ' ';
submenu[3] = ' ';
submenu[4] = ' ';
submenu[5] = ' ';
submenu[6] = '<span class="submenu">'
						//+ '<img src="/images/bullets/arrow.gif" width="5" height="9" hspace="1" />'
							//+ '<a href="/members/interactive.php">' + msg[2001] + '</a>'
						+ '  <img src="/images/bullets/arrow.gif" width="5" height="9" hspace="1" />'
							+ '<a href="/info/index.php#enrolmentInfo">' + msg[2002] + '</a>'
						+ '  <img src="/images/bullets/arrow.gif" width="5" height="9" hspace="1" />'
							+ '<a href="/info/index.php#holiday">' + msg[2003] + '</a>'
						+ '  <img src="/images/bullets/arrow.gif" width="5" height="9" hspace="1" />'
							+ '<a href="/info/index.php#membershipInfo">' + msg[2004] + '</a>'
						+ '  <img src="/images/bullets/arrow.gif" width="5" height="9" hspace="1" />'
							+ '<a href="/info/index.php#weatherInfo">' + msg[2005] + '</a>'
						+ '  <img src="/images/bullets/arrow.gif" width="5" height="9" hspace="1" />'
							+ '<a href="/info/index.php#centerInfo">' + msg[2006] + '</a>'
						+ '  <img src="/images/bullets/arrow.gif" width="5" height="9" hspace="1" />'
							+ '<a href="/info/gz_center.php">' + msg[2007] + '</a>'
						+ '  <img src="/images/bullets/arrow.gif" width="5" height="9" hspace="1" />'
							+ '<a href="/info/recruit.php">' + msg[2013] + '</a>'
						+ '  <img src="/images/bullets/arrow.gif" width="5" height="9" hspace="1" />'
							+ '<a href="/info/unsubscribe.php">' + msg[2014] + '</a>'
						+ '</span>';
submenu[7] = ' ';
submenu[8] = ' ';
submenu[9] = ' ';
submenu[10] = ' ';
submenu[11] = ' ';

//Set delay before submenu disappears after mouse moves out of it (in milliseconds)
var delay_hide = 1000;

var menuobj = null;
/////No need to edit beyond here

function initMenu() {
	menuobj = document.getElementById ? document.getElementById("describe") : document.all ? document.all.describe : document.layers ? document.dep1.document.dep2 : "";
}

function showit(which) {
	try {
		clear_delayhide();
		thecontent=(which==-1)? "" : submenu[which];
		if (document.getElementById||document.all) {
			menuobj.innerHTML=thecontent;
		} else if (document.layers) {
			menuobj.document.write(thecontent);
			menuobj.document.close();
		}
	} catch (e) {}
}

function resetit(e) {
	if (document.all&&!menuobj.contains(e.toElement)) {
		delayhide=setTimeout("showit(-1)",delay_hide);
	} else if (document.getElementById&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget)) {
		delayhide=setTimeout("showit(-1)",delay_hide);
	}
}

function clear_delayhide() {
	if (window.delayhide) {
		clearTimeout(delayhide);
	}
}

function contains_ns6(a, b) {
	while (b.parentNode) {
		if ((b = b.parentNode) == a) {
			return true;
		}
	}

	return false;
}
