//alert(screen.width);

//http://snipplr.com/view.php?codeview&id=3873
function setCSS(css) {
	try {
		// append stylesheet to alter
		//document.getElementsByTagName("head")[0].appendChild(css);

		window.useMap = 'lores';
		$('lores').href = '/css/screen_lores.css';
	} catch (e) {
		setTimeout(function(){setCSS(css)}, 100);
	}
}

if(screen.width <= 800) {
	//console.log('setting 800 stylesheet!');
	// create CSS element to set up the page
	//var css = document.createElement("link");
	//css.setAttribute("href",'/css/screen_lores.css');
	//css.setAttribute("rel","stylesheet");
	//css.setAttribute("type","text/css");
	
	// attempt to add the css and then keep trying till we do
	//setCSS(css);

	setCSS(null);
	//css = null;
}