// JavaScript Document

function GetInnerSize () {
	var x,y;
	if (self.innerHeight) // all except Explorer
	{
		x = self.innerWidth+-20;
		y = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
		// Explorer 6 Strict Mode
	{
		x = document.documentElement.clientWidth;
		y = document.documentElement.clientHeight;
	}
	else if (document.body) // other Explorers
	{
		x = document.body.clientWidth;
		y = document.body.clientHeight;
	}
	return [x,y];
}

function frameSize()
{
	var inner = GetInnerSize ();
	if(inner[1]>400)
	{
		document.getElementById("map_wrapper").style.height =  inner[1]+"px";
		document.getElementById("map").style.height =  inner[1]+"px";
	}
	
	if(inner[1]<document.getElementById("content").offsetHeight)
	{
		document.getElementById("map_wrapper").style.height =  (document.getElementById("content").offsetHeight+10)+"px";
		document.getElementById("map").style.height =  (document.getElementById("content").offsetHeight+10)+"px";
		
	}
	
}

/*
window.onload = function()
{
	frameSize();
}*/
window.onresize = function()
{
	frameSize();
}
