function screenSet()
{
	browserWidth = document.documentElement.clientWidth;
	browserHeight = document.documentElement.clientHeight;
	
	if (browserWidth == 0)
	{
		browserWidth = document.body.clientWidth;
	}
	
	if (browserHeight == 0)
	{
		browserHeight = document.body.clientHeight;
	}
	
	browserScale = browserWidth / 1280;
	objLogo = document.getElementById("logo").style;
	objHeader = document.getElementById('header').style;
	objHeaderImg = document.getElementById('headerImg');
	objLegal = document.getElementById('legal').style;
	objBackground = document.getElementById('background').style;
	objQuickLaunch = document.getElementById('quickLaunchToolbar').style;
	
	if (browserWidth < 800)
	{
		objLogo.width = "288px";
		objBackground.width = "800px";
		objBackground.position = "absolute";
		
		with(objQuickLaunch)
		{
			right = null;
			left = "320px";
		}
		
		with(objHeader)
		{
			width = "480px";
			right = null;
			left = "320px";
		}
   	}
   	
   	if (browserWidth > 799)
   	{
	   	objLogo.width = "36%";
	   	objBackground.width = "100%";
	   	objBackground.position = "fixed";
   		
	   	with(objQuickLaunch)
		{
			left = null;
			right = "25px";
		}
	   	
   		with(objHeader)
   		{
	   		width = "60%";
	   		left = null;
	   		right = "2px";
   		}
	}
	
	if (browserWidth > 1182)
	{
		objLogo.width = "486px";
		objHeader.width = "696px";
	}
	
	if (browserHeight < 550)
	{
		objBackground.height = "550px";
		
		with(objLegal)
		{
			bottom = null;
			right = null;
			top = "545px";
			left = "5px";
		}
	}
	
	if (browserHeight > 549)
	{
		objBackground.height = "100%";
		
		with(objLegal)
		{
			left = null;
			top = null;
			bottom = "5px";
			right = "5px";
		}
	}
	
	objQuickLaunch.top = objHeaderImg.height + 5 + "px";
}

function hideOverlay()
{
	document.getElementById('overlay').innerHTML = "";
	document.getElementById('overlay').className = "overlay";
}

function fontIncrease(objToIncrease)
{
	objElement = document.getElementById(objToIncrease).style;
	objElement.fontSize = fontElement + 2 + "pt";
	fontElement = fontElement + 2;
}

function fontDecrease(objToDecrease)
{
	objElement = document.getElementById(objToDecrease).style;
	if (fontElement != minFontElement)
	{
		objElement.fontSize = fontElement - 2 + "pt";
		fontElement = fontElement - 2;
	}
}

function openXMLFile(xmlfile)
{
	xmlfile = "xml/" + xmlfile;
	if (window.XMLHttpRequest)
  	{
  		xmlhttp=new XMLHttpRequest();
  	}

  	else
  	{
  		xmlhttp=new ActiveXObject('Microsoft.XMLHTTP');
  	}

  	xmlhttp.open("GET", xmlfile, false);
	xmlhttp.send();
	xmlDoc = xmlhttp.responseXML;

	return xmlDoc;
}

function loadQuickLaunch()
{
	var topic = new Array();
	var fetch = new Array();
	var itemArray = new Array();
	
	xmlDoc = openXMLFile('services.xml');
	linkFileA = xmlDoc.getElementsByTagName('xml')[0].getAttribute('linkedto');

	itemCount = xmlDoc.getElementsByTagName('topic').length;
	
	for (x = 0; x < itemCount; x++)
	{
		attrMenu = xmlDoc.getElementsByTagName('type')[x].getAttribute('menu');
		if (attrMenu == "visible")
		{
			pushValue = xmlDoc.getElementsByTagName('title')[x].childNodes[0].nodeValue + "|" + linkFileA + "?fetch=" + xmlDoc.getElementsByTagName('fetch')[x].childNodes[0].nodeValue;
			itemArray.push(pushValue);
		}
	}
	
	xmlDoc = openXMLFile('about.xml');
	linkFileB = xmlDoc.getElementsByTagName('xml')[0].getAttribute('linkedto');
	
	itemCount = xmlDoc.getElementsByTagName('topic').length;
	
	for (x = 0; x < itemCount; x++)
	{
		attrMenu = xmlDoc.getElementsByTagName('type')[x].getAttribute('menu');
		if (attrMenu == "visible")
		{
			pushValue = xmlDoc.getElementsByTagName('title')[x].childNodes[0].nodeValue + "|" + linkFileB + "?fetch=" + xmlDoc.getElementsByTagName('fetch')[x].childNodes[0].nodeValue;
			itemArray.push(pushValue);
		}
	}
	
	xmlDoc = openXMLFile('quicklinks.xml');
	itemCount = xmlDoc.getElementsByTagName('quicklink').length;
	
	for (x = 0; x < itemCount; x++)
	{
		pushValue = xmlDoc.getElementsByTagName('title')[x].childNodes[0].nodeValue + "|" + xmlDoc.getElementsByTagName('url')[x].childNodes[0].nodeValue;
		itemArray.push(pushValue);
	}
	
	itemArray.sort();
	
	for (x = 0; x < itemArray.length; x++)
	{
		var temp = itemArray[x].split('|');
		topic[x] = temp[0];
		fetch[x] = temp[1];
	}

	objQuicklinks = document.getElementById('quicklinks');
	
	for (x = 0; x < topic.length; x++)
	{
		objQuicklinks.options[objQuicklinks.options.length] = new Option(topic[x], fetch[x]);
	}
}

function quickLaunch()
{
	objQuicklinks = document.getElementById('quicklinks');
	window.location.href = objQuicklinks.value;
}

function showLegal()
{
	document.getElementById('overlay').className = "overlay_active";
	document.getElementById('legalBox').style.visibility = "visible";
}

function hideLegal()
{
	document.getElementById('overlay').className = "overlay";
	document.getElementById('legalBox').style.visibility = "hidden";
}
