var swfId = "${application}";

function getSwf(id) {
	if (navigator.appName.indexOf("Microsoft") != -1) {
		return window[id];
	} 
	else {
		return document[id];
	}
}    

/**
* Shows the handraiser form. 
* @param url Url of the handraiser form.
*/
function openUpdates(url) {
	var d = document.getElementById("divHandraiser");
	d.style.visibility = "visible";
	var f = document.getElementById("iframeHandraiser");
	f.src=url;
}

/**
* Hides the handraiser form and restarts site.
*/
function closeHandraiser()
{
	hideHandraiser();
	// needed an interval for some reason.
	setTimeout("restartSite()",50);
}

/**
* Calls AS function to restart the site.
*/
function restartSite()
{
	var swf = getSwf(swfId);
	if(swf.unpauseSite){
		swf.unpauseSite();
	}
}

/**
* Hides the handraiser.
*/
function hideHandraiser()
{
	var div = document.getElementById("divHandraiser");
	div.style.visibility = "hidden";
}