function showInlinePopup(popupName) {
	var overlay = document.getElementById("overlay");
	var popup = document.getElementById(popupName);
	if (!popup) {
		return false;
	}
	
	//If user has resized browser in IE6, don't call hideInlinePopups() 
	if (popup.style.display != "block") { 
		hideInlinePopups();
	} else {
		overlay.style.display = "none";
		popup.style.display = "none";
	}
	
	overlay.style.display = "block";
	popup.style.display = "block";
	//Correct positioning of some elements in IE6
	if (popup.offsetLeft >= document.getElementById("wrapper").offsetLeft + 960) {
		popup.style.marginLeft = "-937px";
		window.onresize = function() {
			showInlinePopup(popupName);
		}
		
		
	}
	/*
	if (overlay.offsetLeft >= document.getElementById("wrapper").offsetLeft + 960) {
		overlay.style.marginLeft = "-960px";
		window.onresize = function() {
			showInlinePopup(popupName);
		}
	}
	*/
	//alert(popup);
};

function hideInlinePopups() {
	var divs = document.getElementsByTagName("div");
	var overlay = document.getElementById("overlay");
	for (var i=0; i<divs.length; i++) {
		var currentDiv = divs[i];
		if (currentDiv.className == "inlineThickbox" && currentDiv.style.display != "none") {
			currentDiv.style.display = "none";							
		}
	}
	overlay.style.display = "none";
	window.onresize = null;
	return false;
};
function hideInlinePopupsViaFlash() {
	var divs = document.getElementsByTagName("div");
	var overlay = document.getElementById("overlay");
	for (var i=0; i<divs.length; i++) {
		var currentDiv = divs[i];
		if (currentDiv.className == "inlineThickbox" && currentDiv.style.display != "none") {
			currentDiv.style.display = "none";							
		}
	}
	overlay.style.display = "none";
	window.onresize = null;
};