function PositionObjects()
{
	var viewportwidth = 0;
	var viewportheight = 0;
	
	if (typeof window.innerWidth != 'undefined')
	{
		viewportwidth = window.innerWidth,
		viewportheight = window.innerHeight
	}	
	else if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientWidth != 'undefined' && document.documentElement.clientWidth != 0)
	{
		viewportwidth = document.documentElement.clientWidth,
		viewportheight = document.documentElement.clientHeight
	}	
	else
	{
		viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
		viewportheight = document.getElementsByTagName('body')[0].clientHeight
	}
	
	var PageSize = getPageSizeWithScroll();
 
	var pageWidth = PageSize[0];
	var pageHeight = PageSize[1];	

	
	var WrapDIV = document.getElementById("Wrap");
	var MenuDIV = document.getElementById("Menu");
	var ContentDIV = document.getElementById("Content");
	
	var NewHeight = ContentDIV.offsetHeight + findPosX(ContentDIV) + 200;
	
	if(NewHeight < viewportheight)
	{
		NewHeight = viewportheight;
	}
	
	WrapDIV.style.height = NewHeight + "px";
	if(navigator.userAgent.indexOf("Firefox") == -1)
	{
		WrapDIV.style.width = pageWidth + "px";
	}
	MenuDIV.style.height = NewHeight + "px";
}

function getPageSizeWithScroll()
{
	if (window.innerHeight && window.scrollMaxY)
	{
		yWithScroll = window.innerHeight + window.scrollMaxY;
		xWithScroll = window.innerWidth + window.scrollMaxX;
	}
	else if (document.body.scrollHeight > document.body.offsetHeight)
	{
		yWithScroll = document.body.scrollHeight;
		xWithScroll = document.body.scrollWidth;
	}
	else
	{
		yWithScroll = document.body.offsetHeight;
		xWithScroll = document.body.offsetWidth;
  	}
	var arrayPageSizeWithScroll = new Array(xWithScroll,yWithScroll);
	return arrayPageSizeWithScroll;
}

function findPosX(obj)
{
	var curleft = 0;
	if(obj.offsetParent)
	{
	    while(1) 
	    {
	      curleft += obj.offsetLeft;
	      if(!obj.offsetParent)
	        break;
	      obj = obj.offsetParent;
	    }
	}
	else if(obj.x)
	    curleft += obj.x;
	return curleft;
}

function findPosY(obj)
{
var curtop = 0;
if(obj.offsetParent)
    while(1)
    {
      curtop += obj.offsetTop;
      if(!obj.offsetParent)
        break;
      obj = obj.offsetParent;
    }
else if(obj.y)
    curtop += obj.y;
return curtop;
}
