function ToggleMenu(menuId)
{
	var currentClass = document.getElementById(menuId).className;
	
	CloseAllMenus();
	
	if(currentClass == "DisplayNone")
	{
		document.getElementById(menuId).className = "DisplayBlock";	
	}
	else
	{
		document.getElementById(menuId).className = "DisplayNone";
	}
}

function ToggleWorkshopVisibility(WorkshopId, Show)
{
	if(Show)
	{
		document.getElementById(WorkshopId).className = "DisplayBlock";
	}
	else
	{
		document.getElementById(WorkshopId).className = "DisplayNone";
	}
}

function ToggleLaunchParty(WorkshopId, OtherControlId)
{
	
	if(!document.getElementById(OtherControlId).checked)
	{
		document.getElementById(WorkshopId).className = "DisplayBlock";
	}
	else
	{
		document.getElementById(WorkshopId).className = "DisplayNone";
	}
}


function ToggleAddress(menuId)
{
	if(document.getElementById(menuId).style.display == "none")
	{
		document.getElementById(menuId).style.display = "block";	
	}
	else
	{
		document.getElementById(menuId).style.display = "none";	
	}
}

function CloseAllMenus()
{
	document.getElementById('speakers').className = "DisplayNone";
	document.getElementById('theconference').className = "DisplayNone";	
	document.getElementById('schedule').className = "DisplayNone";
	document.getElementById('location').className = "DisplayNone";
	document.getElementById('bookingandprices').className = "DisplayNone";
	document.getElementById('birthlighttrust').className = "DisplayNone";

}

function AreYouSure(buttonId, Message)
{
	areYouSure = confirm(Message);
	if (areYouSure == true) 
	{
		document.getElementById(buttonId).click();
	}
	else
	{
		return false;
	}
}


// popup window reference, so we can ensure we only open one pop-up
var objWin = null;

// open a popup named window with default settings
function popupWindow(pURL, pName){
 var width=800;
 var height=600;
 
 var strParams='';
  
 intLeft = (screen.width) ? (screen.width-width)/2 : 0;
 intTop = (screen.height) ? (screen.height-height)/2 : 0;
 strParams+='height=' + height + ', ';
 strParams+='width=' + width + ', ';
 strParams+='top=' + intTop + ', ';
 strParams+='left=' + intLeft;
 
 strParams+=', scrollbars=yes, resizable=yes, toolbar=no, menubar=no';

 if (pURL!='')
  objWin = window.open(pURL, pName, strParams);
 
 if(objWin.window.focus)
  objWin.window.focus();
}



sfHover = function() {
			
		if( document.getElementById("nav") )
		{
			var sfEls = document.getElementById("nav").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);

