function checkBrowserWidth()
{
	var theWidth = getBrowserWidth();
	var theName = navigator.userAgent;
	

	if (theWidth > 995)
	{
		if (theName.indexOf('MSIE') != -1)
		{
			setStylesheet("Layout 1024x768IE");
		} else {
			setStylesheet("Layout 1024x768");
		}
		//setColumnHeights();
	}
	else
	{
		setStylesheet("Layout 800x600");
		
		//setColumnHeights("auto");
	}
	
	return true;
}




function getBrowserWidth()
{
	if (window.innerWidth)
	{
		return window.innerWidth;
	}
	else if (document.documentElement && document.documentElement.clientWidth != 0)
	{
		return document.documentElement.clientWidth;
	}
	else if (document.body)
	{
		return document.body.clientWidth;
	}
	
	return 0;
}




function setColumnHeights(auto)
{
	var theFeature2 = document.getElementById("feature2Inner");
	var theFeature3 = document.getElementById("feature3Inner");
	var theFeature4 = document.getElementById("feature4Inner");
	var theHeight = "auto";

	if (!auto)
	{
		theHeight = parseInt(theFeature2.scrollHeight);

		if (theFeature3 && theFeature3.scrollHeight > theHeight)
		{
			theHeight = parseInt(theFeature3.scrollHeight);
		}

		if (theFeature4 && theFeature4.scrollHeight > theHeight)
		{
			theHeight = parseInt(theFeature4.scrollHeight);
		}

		theHeight += "px";
	}

	theFeature2.style.height = theHeight;
	theFeature3.style.height = theHeight;
	theFeature4.style.height = theHeight;
	
	return true;
}




function setStylesheet(styleTitle)
{
	var currTag;

	if (document.getElementsByTagName)
	{
		for (var i = 0; (currTag = document.getElementsByTagName("link")[i]); i++)
		{
			if (currTag.getAttribute("rel").indexOf("style") != -1 && currTag.getAttribute("title"))
			{
				currTag.disabled = true;

				if(currTag.getAttribute("title") == styleTitle)
				{
					currTag.disabled = false;
				}
			}
		}
	}
	
	return true;
}