
function divAlign()
{

	maxWidth = document.documentElement.offsetWidth - 20;
	maxHeight = document.documentElement.offsetHeight - 20;
//	maxHeight = document.body.clientHeight;
//	maxWidth = document.body.clientWidth;
	if (maxHeight < 650)
	{
		maxHeight = 650;
	}

	unitHeight = Math.floor(maxHeight / 10);
	unitWidth = Math.floor(maxWidth / 10);
	borderWidth = unitWidth;
	borderHeight = unitHeight;
	
	
	// increase border size if border < 75 pixels)
	if (borderWidth < 75)
	{
		unitWidth = Math.floor((maxWidth - 150) / 10);
		borderWidth = 75;
	}
	
	if (borderHeight < 75)
	{
		unitHeight = Math.floor((maxHeight - 150) / 10);
		borderHeight = 75;
	}
	
	
	
//	alert(maxHeight + " x " + maxWidth);
//	alert(unitWidth + " x " + unitHeight + "; " + borderWidth + ", "  + borderHeight);
//	alert(((unitWidth * 10) - (borderWidth * 2)) + ", " + ((unitHeight * 10) - (borderHeight * 2)));

//	alert(navigator.appName);
	document.getElementById("mainContent").style.position = "absolute";
	document.getElementById("mainContent").style.top = borderHeight + "px";
	document.getElementById("mainContent").style.left = borderWidth + "px";
	document.getElementById("mainContent").style.width = ((maxWidth) - (borderWidth * 2)) + "px";
	document.getElementById("mainContent").style.height = ((maxHeight) - (borderHeight * 2)) + "px";

	if (navigator.appName == "Microsoft Internet Explorer")
	{
		document.getElementById("mainContent").style.width = ((maxWidth) - (borderWidth * 2) + 20) + "px";
		document.getElementById("mainContent").style.height = ((maxHeight) - (borderHeight * 2) + 20) + "px";
	}
	
//	alert('is this thing on?');
//	alert(String((maxWidth) - (borderWidth * 2)));
//	alert(document.getElementById("mainContent").style.width);

	document.getElementById("ur_corner_image").style.position = "absolute";
	document.getElementById("ur_corner_image").style.top = (borderHeight - 71) + "px";
	document.getElementById("ur_corner_image").style.left = (borderWidth - 71) + "px";
	document.getElementById("ur_corner_image").style.display = "block";

	document.getElementById("ur_corner_image_2").style.position = "absolute";
	document.getElementById("ur_corner_image_2").style.top = (borderHeight - 71) + "px";
	document.getElementById("ur_corner_image_2").style.left = (borderWidth) + "px";
	document.getElementById("ur_corner_image_2").style.display = "block";

	document.getElementById("ur_corner_image_3").style.position = "absolute";
	document.getElementById("ur_corner_image_3").style.top = (borderHeight) + "px";
	document.getElementById("ur_corner_image_3").style.left = (borderWidth - 71) + "px";
	document.getElementById("ur_corner_image_3").style.display = "block";

	document.getElementById("ul_corner_image").style.position = "absolute";
	document.getElementById("ul_corner_image").style.top = (borderHeight - 71) + "px";
	document.getElementById("ul_corner_image").style.left = ((maxWidth) - (borderWidth) + 19) + "px";
	document.getElementById("ul_corner_image").style.display = "block";

	document.getElementById("ll_corner_image").style.position = "absolute";
	document.getElementById("ll_corner_image").style.top = ((maxHeight) - (borderHeight) + 19) + "px";
	document.getElementById("ll_corner_image").style.left = ((maxWidth) - (borderWidth) + 19) + "px";
	document.getElementById("ll_corner_image").style.display = "block";

	document.getElementById("lr_corner_image").style.position = "absolute";
	document.getElementById("lr_corner_image").style.top = ((maxHeight) - (borderHeight) + 19) + "px";
	document.getElementById("lr_corner_image").style.left = (borderWidth - 71) + "px";
	document.getElementById("lr_corner_image").style.display = "block";

	document.getElementById("titlebox").style.position = "absolute";
	document.getElementById("titlebox").style.top = 10 + "px";
	document.getElementById("titlebox").style.left = (borderWidth + unitWidth) + "px";
	document.getElementById("titlebox").style.borderWidth = 1 + "px";
	document.getElementById("titlebox").style.borderStyle = "solid";
	document.getElementById("titlebox").style.borderColor = "#55AAC0";
	document.getElementById("titlebox").style.backgroundColor = "#0088C0";
	document.getElementById("titlebox").style.padding = 2 + "px";
	document.getElementById("titlebox").style.display = "block";
	
	document.getElementById("main_navigation").style.position = "absolute";
	document.getElementById("main_navigation").style.top = borderHeight + "px";
	document.getElementById("main_navigation").style.left = (borderWidth + unitWidth * 6) + "px";
	document.getElementById("main_navigation").style.borderWidth = 2 + "px";
	document.getElementById("main_navigation").style.borderStyle = "solid";
	document.getElementById("main_navigation").style.borderColor = "#55AAC0";
	document.getElementById("main_navigation").style.backgroundColor = "#0088C0";
	document.getElementById("main_navigation").style.padding = 2 + "px";
	document.getElementById("main_navigation").style.display = "block";
	
	document.getElementById("copyright").style.position = "absolute";
	document.getElementById("copyright").style.top = maxHeight - 30 + "px";
	document.getElementById("copyright").style.left = (borderWidth + unitWidth * 5) + "px";
	document.getElementById("copyright").style.borderWidth = 1 + "px";
	document.getElementById("copyright").style.borderStyle = "solid";
	document.getElementById("copyright").style.borderColor = "#55AAC0";
	document.getElementById("copyright").style.backgroundColor = "#0088C0";
	document.getElementById("copyright").style.padding = 2 + "px";
	document.getElementById("copyright").style.display = "block";
	
	document.getElementById("scale_image").style.position = "absolute";
	document.getElementById("scale_image").style.top = ((maxHeight) - (borderHeight) + 30) + "px";
	document.getElementById("scale_image").style.left = (borderWidth + 11) + "px";
	document.getElementById("scale_image").style.display = "block";

	document.getElementById("expand_main_nav_image").style.position = "absolute";
	document.getElementById("expand_main_nav_image").style.top = borderHeight + 4 + "px";
	document.getElementById("expand_main_nav_image").style.left = (borderWidth + unitWidth * 6 - 80) + "px";
	document.getElementById("expand_main_nav_image").style.display = "block";

	document.getElementById("check_resize_image").style.position = "absolute";
	document.getElementById("check_resize_image").style.top = (borderHeight - 52) + "px";
	document.getElementById("check_resize_image").style.left = (maxWidth - borderWidth - 160) + "px";
	document.getElementById("check_resize_image").style.display = "block";


}

