function resize()
{
	// Fetch width and height
	
	var x,y;
	if (self.innerHeight) // all except Explorer
	{
		x = self.innerWidth;
		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;
	}
	
	var width = x;
	var height = y;

	// Height Calculation
	
	var heightScroll = false;
	
	if(height < 606)
	{
		height = 606;
		heightScroll = true;
	}
	
	var reference = height - 408;
	
	// Width Calculations
	
	var widthScroll = false;	
	var difference = 0;
	
	if(width < 1000)
	{
		difference = 1000 - width;
		widthScroll = true;
	}
	
	// Ajustments according to scrollbars
	
	if(widthScroll)
	{
		difference += 20;
		if(!heightScroll)
		{
			reference -= 16;
		}
	}
	
	// Write results in the DOM
	
	var topString = String(reference) + "px"
	var rightText = "-" + String(difference) + "px";
	
	document.getElementById("outerBottomRightHaven").style.top = topString;
	document.getElementById("outerBottomRightHaven").style.right = rightText;
	document.getElementById("rightHaven").style.right = rightText;
}

// Recalculate on resize
window.onresize = resize;