// JavaScript Document
	var imHeight;
	var imWidth;
 
	 function getImageHeight() {
		return imHeight;
	 }
	 
	 function getImageWidth() {
		return imWidth;
	 }
	 
	 document.observe('dom:loaded', function() {
		//imageresize();
		//Event.observe(document.onresize ? document : window, 'resize', imageresize);
	 });
	 
	 function getCss() {
	 	var viewport = document.viewport.getDimensions();
		var height = viewport.height;
		var width = viewport.width;
		var cssfile;
		if (height >= 800 && width >=1280) {
			cssfile = "../../stylesheets/large.css";
		} else if (height >= 600 && width >= 1024) {
			cssfile = "../../stylesheets/medium.css"; 
		} else {
			cssfile = "../../stylesheets/small.css";
		}
		return document.write('<link href="'+cssfile+'" type="text/css" rel="stylesheet" />'); 
	 }
	 
	 function getHomeCss() {
	 	var viewport = document.viewport.getDimensions();
		var height = viewport.height;
		var width = viewport.width;
		var cssfile;
		if (height >= 800 && width >=1280) {
			cssfile = "../stylesheets/large.css";
		} else if (height >= 600 && width >= 1024) {
			cssfile = "../stylesheets/medium.css"; 
		} else {
			cssfile = "../stylesheets/small.css";
		}
		return document.write('<link href="'+cssfile+'" type="text/css" rel="stylesheet" />'); 
	 }
 
	 function imageresize() {   
		var viewport = document.viewport.getDimensions();
		var width = viewport.width;
		var height = viewport.height;
		if (height >= 800 && width >=1280) {  
			imHeight = 600;
			imWidth = 900;
		} else if (height >= 600 && width >= 1024) {   
			imHeight = 500;
			imWidth = 750; 
		} else {
			imHeight = 400;
			imWidth = 600;
		}
		var imageHeight = $('content').getHeight();
		var padding = (height-imageHeight-20) / 2;
		$('body').setStyle({marginTop:padding+'px'});
	 }