onSubNav = false;

function over(id, href) {
	document.getElementById(id).className = "over";
	if(id.indexOf('subnav')==-1){
		document.getElementById(id+'arrow').className = "arrowShow";
		document.getElementById(id + 'subnav').style.display='block';
		if (!onSubNav) {
			link = document.getElementById(id);
			link.setAttribute('href','#');
			link["onclick"] = new Function("location.href='" + href + "'");
		}
	} else {
		link = document.getElementById(id.substring(0,4));
		link.setAttribute('href','#');
		link["onclick"] = new Function("location.href='#null'");
		onSubNav = true;
	}
}

function overSelected(id, href) {
	if(id.indexOf('subnav')==-1){
		document.getElementById(id + 'subnav').style.display='block';
		if (!onSubNav) {
			link = document.getElementById(id);
			link.setAttribute('href','#');
			link["onclick"] = new Function("location.href='" + href + "'");
		}
	} else {
		link = document.getElementById(id.substring(0,4));
		link.setAttribute('href','#');
		link["onclick"] = new Function("location.href='#null'");
		onSubNav = true;
	}
}

function overNoDrop(id) {
	document.getElementById(id).className = "over";
	document.getElementById(id+'arrow').className = "arrowShow";
}

function out(id) {
	document.getElementById(id).className = "";
	if(id.indexOf('subnav')==-1){
		document.getElementById(id+'arrow').className = "arrow";
		document.getElementById(id + 'subnav').style.display='none';
		onSubNav = false;
	}
}

function outSelected(id) {
	if(id.indexOf('subnav')==-1){
		document.getElementById(id + 'subnav').style.display='none';
		onSubNav = false;
	}
}

function outNoDrop(id) {
	document.getElementById(id).className = "";
	document.getElementById(id+'arrow').className = "arrow";
}

function staffOver(id,src) {
	document.getElementById(id).src="images/"+src+"_over.jpg";
	document.getElementById(id+'Details').style.display="block";
}

function staffOut(id,src) {
	document.getElementById(id).src="images/"+src+".jpg";
	document.getElementById(id+'Details').style.display="none";
}

function swap(id, newSrc) {
	document.getElementById(id).src = newSrc;
}

