Event.observe(window,"load", function () {
	// this function will run when the page is loaded
	var width = document.viewport.getWidth();
	if (width <= 800) {
		$('Body').addClassName("narrow");
	}
});


Event.observe(window,"resize", function () {
	// this function will run when the page is resized
	var width = document.viewport.getWidth();
	if (width <= 800) {
		$('Body').addClassName("narrow");
	} else {
		$('Body').removeClassName("narrow"); 
	}
});
