
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 determineStyle(){
	
	var browserWidth = getBrowserWidth();
	var i, a, main;
	
	if (browserWidth > 1250){
		var a=document.getElementById("narrowscreen"); a.disabled = true;

	/*	
		for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
			if(a.getAttribute("rel").indexOf("style") != -1
			&& a.getAttribute("id")) {
				if(a.getAttribute("id") == "narrowscreen") a.disabled = true;
				if(a.getAttribute("id") == "widescreen") a.disabled = false;
			}
		}
		
	*/
	}

	if (browserWidth <= 1250){
		var a=document.getElementById("narrowscreen"); a.disabled = true;
		var a=document.getElementById("narrowscreen"); a.disabled = false;

/*
		for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
			if(a.getAttribute("rel").indexOf("style") != -1
			&& a.getAttribute("id")) {
				if(a.getAttribute("id") == "narrowscreen") a.disabled = true;
				if(a.getAttribute("id") == "narrowscreen") a.disabled = false;
				if(a.getAttribute("id") == "widescreen") a.disabled = false;
			}
		}
*/

	}
	
}



function doOnResize () {
	determineStyle();
}

function doOnLoad () {
	determineStyle();
}

