
/* Variables -------------------------------------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------------------------------------------------ */
var user_browser = navigator.userAgent;
var br_NS = br_OO = br_IE5 = br_IE6 = false;
var doc_height, doc_width, doc_avail_height, doc_avail_width
var box_height = 200;
var box_width = 200;
if (user_browser.match("Gecko")) {br_NS = true;}
else
{
	if (user_browser.match("Opera")) {br_OO = true;}
	else
	{
		if (user_browser.match("MSIE")) {br_IE6 = true;}
		else {br_IE5 = true;};
	};
};

/* Functions -------------------------------------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------------------------------------------------ */
function GetDimensions()
{
	if (br_IE6){
		doc_height = document.body.clientHeight;
		doc_width = document.body.clientWidth;
	};
	if (br_IE5){
		doc_height = document.documentElement.clientHeight;
		doc_width = document.documentElement.clientWidth;
	};
	if (br_NS || br_OO){
		doc_height = window.innerHeight;
		doc_width = window.innerWidth;
	};
	doc_avail_width = ((doc_width - 602) / 2) + 602 - box_width;
	doc_avail_height = ((doc_height - 450) / 2) + 450 - 10 - 8 - box_height;
};

function GetDimensions2()
{
	if (br_IE6){
		doc_height = document.body.clientHeight;
		doc_width = document.body.clientWidth;
	};
	if (br_IE5){
		doc_height = document.documentElement.clientHeight;
		doc_width = document.documentElement.clientWidth;
	};
	if (br_NS || br_OO){
		doc_height = window.innerHeight;
		doc_width = window.innerWidth;
	};
	doc_avail_width = ((doc_width - 602) / 2) + 602 + 100 - box_width;
	doc_avail_height = 8;
};

function SetDimensions(){
	document.getElementById('box').style.left = doc_avail_width + "px";
	document.getElementById('box').style.top = doc_avail_height + "px";
	document.getElementById('box').style.visibility = "visible";
}
