function blanket_size() {
	if (typeof window.innerWidth != 'undefined') {
		viewportheight = window.innerHeight;
	} else {
		viewportheight = document.documentElement.clientHeight;
	}
	if ((viewportheight > document.body.parentNode.scrollHeight) && (viewportheight > document.body.parentNode.clientHeight)) {
		blanket_height = viewportheight;
	} else {
		if (document.body.parentNode.clientHeight > document.body.parentNode.scrollHeight) {
			blanket_height = document.body.parentNode.clientHeight;
		} else {
			blanket_height = document.body.parentNode.scrollHeight;
		}
	}
}
function displayPopup(get_popup_content,extraid)
{
	var current_url = window.location.protocol + "//" + window.location.host;
	//alert(current_url+'/clientarea/popup_content.php?popup_content='+get_popup_content+'&extraid='+extraid);
	blanket_size();
	document.getElementById('hide_content').style.height = blanket_height + 'px';
	document.getElementById('popup_container').style.visibility = "visible";
	document.getElementById('popup_container').style.display = "block";
	document.getElementById('hide_content').style.visibility = "visible";
	document.getElementById('hide_content').style.display = "block";
	
	if (window.XMLHttpRequest) {
		http = new XMLHttpRequest();
	} 
	else if (window.ActiveXObject) {
		http = new ActiveXObject("Microsoft.XMLHttp");
	}
	http.onreadystatechange = function (){
		if (http.readyState == 4) {
			var xmlObj = http.responseXML; //This takes the resopnse from the xml and turns it into a var
			var html = xmlObj.getElementsByTagName('result').item(0).firstChild.data; //This takes the first child from the field result and turns it into the var html	
			document.getElementById('popup_container').innerHTML = html; //This places the gathereed html into the div id popup_details
		}
	};
	http.open("GET",current_url+'/clientarea/popup_content.php?popup_content='+get_popup_content+'&extraid='+extraid,true); //This opens the url
	http.send(null); //This sends the request
}
function hidePopup()
{
	document.getElementById('popup_container').style.visibility = "hidden";
	document.getElementById('popup_container').style.display = "none";
	document.getElementById('hide_content').style.visibility = "hidden";
	document.getElementById('hide_content').style.display = "none";
}