// Blizzcon Site Scripts

function menuToggle(thisElement)
{
	thisElement.childNodes[0].style.backgroundPosition = (thisElement.childNodes[0].style.backgroundPosition == "center bottom") ? "center top" : "center bottom";
}

function navToggle(thisElement)
{
	thisElement.style.backgroundPosition = (thisElement.style.backgroundPosition == "center bottom") ? "center top" : "center bottom";
}

function sendMeTo(destination)
{
	if(destination.indexOf(".") == -1) { window.location.href = destination+".shtml"; }
	else window.location.href = destination;
}

function adjustNightelf()
{
	windowWidth = (document.documentElement.clientWidth) ? document.documentElement.clientWidth : document.body.clientWidth;
	document.getElementById("nelfDiv").style.width = 108+(windowWidth-1024)/2 + "px";
	document.getElementById("protossDiv").style.width = 108+(windowWidth-1024)/2 + "px";
}
/* - - - - - - - - - - - - - - - - */
function dropToggle()
{
	document.getElementById("dropBox").style.overflow = (document.getElementById("dropBox").style.overflow == "hidden") ? "visible" : "hidden";
	//document.getElementById("dropBox").style.height = "150px";
}

previousListItem = 0;
function nowThisIsHappening(thisListItem)
{
/*
	if (thisListItem != previousListItem)
  {
		document.getElementById("slotZero").innerHTML = document.getElementById("slot"+thisListItem).innerHTML;
    previousListItem = thisListItem;
  }
*/
	dropToggle();
}
/* - - - - - - - - - - - - - - - - */
window.onload = adjustNightelf;