function detectBrowser()
{
	browsername=navigator.appName;
	if(browsername.indexOf("Microsoft")!=-1)	//<!-- Is it a Microsoft browser? (Returns -1 if not)
	{		
		if(navigator.appVersion.indexOf("MSIE 6.")!=-1)	//<!-- Is it IE6? We don't suport older browsers at all and IE7 don't need this. We have to search for "MSIE 6." Since Windows Vista identifiy as Windows NT 6.0 and thus trigger this script.
		{
			//<!-- The browser is Microsoft Internet Explorer 6.x and thus run ieWidth() to prevent the center div from overflowing
			ieWidth();
		}
	}
}

//<!-- ieWidth() sets the width of the center div. This is intended for browsers that don't suport max-width/min-width (IE6)
function ieWidth()
{
	getStyleClass("#page").style.width="950px";	//<!-- We don't support smaller widows than 1024px (small margin for the scrollbar) in IE6
	getStyleClass("#center").style.width="610px";	//<!-- With a page with of 950px center should be 660px wide
}

//<!-- getStyleClass() returns the CSS class with the name submitted
function getStyleClass(className)
{
	for(var s=0;s < document.styleSheets.length;s++)
	{
		if(document.styleSheets[s].rules)
		{
			for(var r=0;r < document.styleSheets[s].rules.length;r++)
			{
				if(document.styleSheets[s].rules[r].selectorText==className)
				{
					return document.styleSheets[s].rules[r];
				}
			}
		}
		else if(document.styleSheets[s].cssRules)
		{
			for(var r=0;r < document.styleSheets[s].cssRules.length;r++)
			{
				if(document.styleSheets[s].cssRules[r].selectorText==className)
					return document.styleSheets[s].cssRules[r];
			}
		}
	}
	return null;
}
