function newAjax()
{
	var xmlHttp;
	
	try
	{
		// Firefox, Opera 8.0+, Safari
		xmlHttp = new XMLHttpRequest();
	}
	catch(e)
	{
		// Internet Explorer
		try
		{
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch(e)
		{
			try
			{
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch(e)
			{
				alert("Your browser does not support AJAX!");
				return false;
			}
		}
	}
	
	return xmlHttp;
}
  
function newMaskMsg(width,height,content)
{
	var msg = "";
	
	msg += "<div style=\"background: white; border: 1px solid #000080; display: block; height: " + height + "px; left: 50%; margin: -" + (height / 2) + "px 0 0 -" + (width / 2) + "px; position: absolute; top: 50%; width: " + width + "px;\">";
	msg += "	<div style=\"display: block; font-family: sans-serif; font-size: 12px; height: " + (height - 52) + "px; left: 10px; overflow: auto; position: absolute; right: 10px; text-align: left; top: 10px;\">";
	msg += 			content;
	msg += "	</div>";
	msg += "	<div style=\"bottom: 10px; display: block; height: 22px; left: 10px; position: absolute; right: 10px; text-align: right;\">";
	msg += "		<input class=\"button\" id=\"msgButton\" onclick=\"javascript:toggleMaskLayer();\" style=\"float: right; width: 72px;\" type=\"submit\" value=\"Close\" />";
	msg += "	</div>";
	msg += "</div>";
	
	document.getElementById("mask-msg").innerHTML = msg;
	
	toggleMaskLayer();
	
	document.getElementById("msgButton").focus();
}

/*
 * Show/Hide the mask layer message boxes, etc.
 */
function toggleMaskLayer()
{
	if (document.getElementById("mask-bg").style.display == "block")
	{
		document.getElementById("mask-bg").style.display = "none";
		document.getElementById("mask-msg").style.display = "none";
	}
	else
	{
		document.getElementById("mask-bg").style.display = "block";
		document.getElementById("mask-msg").style.display = "block";
	}
}