function getDocHeight() 
{
    var D = document;
    
	return Math.max
	(
        Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
		Math.max(D.body.scrollHeight, D.documentElement.scrollHeight)
        //Math.max(D.body.offsetHeight, D.documentElement.offsetHeight)//,
        //Math.max(D.body.clientHeight, D.documentElement.clientHeight)
    );
	
	//return document.documentElement.scrollHeight;
}

function RESIZE()
{
	document.getElementById("wrap").style.height = getDocHeight() + "px";	
	//document.write(document.documentElement.scrollHeight);
	//document.write(document.height);
}
