function toggleExpandEvent( eventID ) {
	if( lastExpandedEventID != "" ) {
		document.getElementById( "details_" + lastExpandedEventID ).style.display = "none";
		document.getElementById( "img_" + lastExpandedEventID ).src = plus_button;
	}
	if( eventID != lastExpandedEventID ) {
		//IE Suxs doesn't it?
		if( document.compatMode && document.compatMode == "CSS1Compat" ) {
			document.getElementById( "details_" + eventID ).style.display = "table-row";
		}
		else {
			document.getElementById( "details_" + eventID ).style.display = "block";
		}
		document.getElementById( "img_" + eventID ).src = minus_button;
		lastExpandedEventID = eventID;
	}
	else {
		lastExpandedEventID = "";
	}
}

function subscribePopup( eventID ) {
	var windowname = "GEM3Subscribe";
	var separator = "?";
	if (subscribe_url.indexOf("?") > 0) {
	   separator ="&";
    }
	window.open(subscribe_url+separator+"EventID="+eventID,windowname,"height=210, width=350, toolbar=no, location=no, directories=no, menubar=no, status=no")
	//window.open(subscribe_url+separator+"EventID="+eventID,windowname)
}

function changePlayerClass(eventID)
{
  var c=document.getElementById("className");
  var p=document.getElementById("pl_name");
  var g=document.getElementById("guild");
  var l=document.getElementById("level");
  window.location = manage_characters_url +"action=add&className=" + c.options[c.selectedIndex].value + "&pl_name=" + p.value + "&guild=" + g.value + "&level=" + l.value;
}
