/* Suckerfish menu script
   Suckerfish Dropdowns by Patrick Griffiths and Dan Webb
   http://www.htmldog.com/articles/suckerfish/dropdowns/

*/

sfHover = function() {
	var sfEls = document.getElementById("navcontainer").getElementsByTagName("li");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);



/* Simple homebrew gig calendar, AJAX to PHP
   Geoff Duncan
*/
function gdLoadCal(aDate)
{
	var calDiv = document.getElementById('gdCalDiv');
	//
	var reqURL = 'http://' + window.location.hostname + '/php-lib/gdcal.php';
	if (!isNaN(aDate)) {
		reqURL = reqURL + '?d=' + aDate;
	}
	//
	var req = new XMLHttpRequest();
	req.open('GET',reqURL,true);
	req.onreadystatechange = function (aEvt) {
		if (req.readyState == 4) {
			if (req.status == 200) {
				calDiv.innerHTML = req.responseText;
			} else {
				calDiv.innerHTML = "Error loading calendar";
			}
		}
	}
	req.send(null);
	return false;
}

