function checkBrowserWidth()
{
    var theWidth = getBrowserWidth();
    var stylesheet = 'formate-960.css';

    if (theWidth<=608) {
	setStylesheet("304");
    }
    else if (theWidth<=760) {
	setStylesheet("608");
    }
    else if (theWidth <=960) {
	setStylesheet("760");
    }
    else if (theWidth <=1200) {
	setStylesheet("960");
    }
    else if (theWidth <=1600) {
	setStylesheet("1200");
    }
    else if (theWidth >1600) {
	setStylesheet("1600");
    }
    else {
	setStylesheet("960");
    }

    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 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;
		}
	    }
	}
    }
    /*
    
    document.writeln('<style type="text/css"><!-- @import url(' + styleTitle + '); --></style>');

    */


    return true;
}



