
var winWidth = 740;
var winWidth2 = 740;
var winWidth3 = 0;



function getInsideWindowWidth() {
	isIE6CSS = (document.compatMode && document.compatMode.indexOf("CSS1") >= 0) ? true : false;
	if (window.innerWidth) {
		return window.innerWidth;
	}
	else if (isIE6CSS) {
		// measure the html element's clientWidth
		return document.documentElement.clientWidth;
	}
	else if (document.body && document.body.clientWidth) {
		return document.body.clientWidth;
	}
	return 1; // 0 could lead to dividing 0 by 2.
}




var idChrome = "no";
var agt2 = new String(navigator.userAgent.toLowerCase());
if (agt2.indexOf("chrome") != -1) {
	idChrome = "yes";
}

function resetStyleSheet() {
	if (idChrome == "yes") {
		winWidth = getInsideWindowWidth();
		winWidth2 = (getInsideWindowWidth() - 1024)*0.5;
		if (winWidth < 1000) { // lose l and r column
			document.styleSheets[0].rules[2].style.visibility = "hidden";
			document.styleSheets[0].rules[3].style.visibility = "hidden";
		}
		var extraWidAv = winWidth - 1000 - 20; // 20 is for scrollbars
		if (extraWidAv > 2) { // don't bother for less
			document.styleSheets[0].rules[2].style.left = (0 + winWidth2) + "px";
			document.styleSheets[0].rules[3].style.left = (870 + winWidth2) + "px";
		}
	}
	else if (document.styleSheets[0].rules) { // IE
		winWidth = getInsideWindowWidth();
		winWidth2 = (getInsideWindowWidth() - 1024)*0.5;
		if (winWidth < 1000) { // lose l and r column
			document.styleSheets[0].rules[2].style.visibility = "hidden";
			document.styleSheets[0].rules[3].style.visibility = "hidden";
		}
		var extraWidAv = winWidth - 1000 - 20; // 20 is for scrollbars
		if (extraWidAv > 2) { // don't bother for less
			document.styleSheets[0].rules[2].style.left = (3 + winWidth2) + "px";
			document.styleSheets[0].rules[3].style.left = (890 + winWidth2) + "px";
		}

	}
	else { // MOZILLA
		winWidth = getInsideWindowWidth();
		winWidth2 = (getInsideWindowWidth() - 1024)*0.5;
		if (winWidth < 1000) { // lose l and r column
			document.styleSheets[0].cssRules[2].style.visibility = "hidden";
			document.styleSheets[0].cssRules[3].style.visibility = "hidden";
		}

		var extraWidAv = winWidth - 1000 - 20; // 20 is for scrollbars
		if (extraWidAv > 2) { // don't bother for less
			document.styleSheets[0].cssRules[2].style.left = (winWidth2) + "px";
			document.styleSheets[0].cssRules[3].style.left = (870 + winWidth2) + "px";
		}

	}
}





