/**
 *
 * Quick jQuery based dropdown menu
 * Avery James Brooks 2007
 * http://www.ajbnet.com
 *
 */

var menuTimers = Array();

function openMenu(menuID) {
        try {
                clearTimeout(menuTimers[menuID + "timer"]);
                $('#'+menuID).slideDown();
        } catch (err) {} // the goggles do nothing!
}

function waitAndOpen(menuID) {
	try {
		clearTimeout(menuTimers[menuID + "timer2"]);
	} catch (err) {}
	menuTimers[menuID + "timer2"] = setTimeout("openMenu('" + menuID + "')",300);
}

function clearWaitAndOpen(menuID) {
	try {
		clearTimeout(menuTimers[menuID + "timer2"]);
	} catch (err) {}
}

function closeMenu(menuID) {
	$('#'+menuID).slideUp();
}

function waitAndClose(menuID) {
	try {
		clearTimeout(menuTimers[menuID + "timer"]);
	} catch (err) {}
	menuTimers[menuID + "timer"] = setTimeout("closeMenu('" + menuID + "')",1000);
}

function clearWaitAndClose(menuID) {
	try {
		clearTimeout(menuTimers[menuID + "timer"]);
	} catch (err) {}
}
