function getDocHeight() 
{
	var body = document.body;
	var html = document.documentElement;

	return Math.max( body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight );
}

function getCookie(c_name)
{

	if (document.cookie.length > 0)
	{
		c_start = document.cookie.indexOf(c_name + "=");
		if (c_start != -1)
		{ 
			c_start=c_start + c_name.length + 1; 
			c_end = document.cookie.indexOf(";",c_start);
			if (c_end==-1) c_end = document.cookie.length;
			return unescape(document.cookie.substring(c_start,c_end));
		} 
	}
	return "";
}

function refresher(iTimeOut) 
{
	window.setTimeout("location.reload(true)", iTimeOut);
}

function checkBlock (iHeight)
{
	document.getElementById("block_window").style.height = iHeight+"px";
	
	var oDate = new Date();
	var iCurrentTime = (oDate.getTime() / 1000);
	var iEndingTime = getCookie("block_end");
	
	if (iEndingTime > iCurrentTime)
	{
		document.getElementById("block_window").style.display = "block";
		document.getElementById("block_info").style.display = "block";
		document.getElementById("block_loader").style.display = "block";
		
		window.setInterval("location.reload(true)", 10000);
	}
}

