var popupStatus = 0;

function loadPopup()
{
	if(popupStatus==0)
        {
		jQuery(".white_background").css(
                {
			"opacity": "0.8"
		});
		scroll(0,0);
		jQuery(".white_background").fadeIn("slow");
		jQuery(".popup_body").fadeIn("slow");
		popupStatus = 1;
	}
}

function disablePopup()
{
	if(popupStatus==1){
		jQuery(".white_background").fadeOut("slow");
		jQuery(".popup_body").fadeOut("slow");
		//location.prev();
		popupStatus = 0;
	}
}

//centering popup
function centerPopup()
{
/*	//request data for centering
	var browser = navigator.appName;
	var b_version = navigator.appVersion;
	var version = parseFloat(b_version);
	if(browser == "Microsoft Internet Explorer" && version <=6)
	{
		var windowWidth = document.body.clientWidth;
		var windowHeight = document.body.clientHeight;
	}
	else
	{
		var windowWidth = document.documentElement.clientWidth;
		var windowHeight = document.documentElement.clientHeight;
	}
	var popupHeight = jQuery(".popup_body").height();
	var popupWidth = jQuery(".popup_body").width();
	//centering
	if(browser == "Microsoft Internet Explorer" && version <=7)
	{
		jQuery(".popup_body").css({
			"position": "absolute",
			"top": 200
			
		});
	}
	else
	{
			jQuery(".popup_body").css({
			"position": "absolute",
			"top": 200
			
		});
	}
	//only need force for IE6

	jQuery(".popup_body").css({
		"height": windowHeight,
		"width": windowWidth
	});
*/
}

/*

 var xmlHttp;
function sendAjax(info,functionname)
{
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request");
 return;
 }
	xmlHttp.onreadystatechange=functionname;
	xmlHttp.open("GET",info,true);
	xmlHttp.send(null);
}

function stateChanged()
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 {
	 var text = xmlHttp.responseText;
	 var cleartext = text.split('|');

	centerPopup();
	document.getElementById('popuphead').innerHTML = cleartext[0];
	document.getElementById('popupbody').innerHTML = cleartext[1];
	if(cleartext[2] == "noclose")
	{
		document.getElementById('close').style.display = "none";
	}
	loadPopup();

 }
}
*/
