	      
	function init() {
window.onresize = dynamicLayout;  
      dynamicLayout();
        }
	
	
	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 getBrowserHeight(){
		if (window.innerHeight){
			return window.innerHeight;}	
		else if (document.documentElement && document.documentElement.clientHeight != 0){
			return document.documentElement.clientHeight;	}
		else if (document.body){return document.body.clientHeight;}		
			return 0;
	}


function dynamicLayout(){
	var browserHeight = getBrowserHeight();

	//Load Thin CSS Rules
	if (browserHeight < 500){
		changeLayout("600");
	}
	//Load Wide CSS Rules
	//if ((browserHeight >= 750) && (browserHeight <= 950)){
	//	changeLayout("wide");
	//}
	//Load Wider CSS Rules
	if (browserHeight > 500){
		changeLayout("768");
	}
}

function changeLayout(description){
   var i, a;
   for(i=0; (a = document.getElementsByTagName("link")[i]); i++){
	   if(a.getAttribute("title") == description){a.disabled = false;}
	   else if(a.getAttribute("title") != "default"){a.disabled = true;}
   }
}


	function addEvent( obj, type, fn ){ 
	   if (obj.addEventListener){ 
	      obj.addEventListener( type, fn, false );
	   }
	   else if (obj.attachEvent){ 
	      obj["e"+type+fn] = fn; 
	      obj[type+fn] = function(){ obj["e"+type+fn]( window.event ); } 
	      obj.attachEvent( "on"+type, obj[type+fn] ); 
	   } 
	} 
	

	addEvent(window, 'load', dynamicLayout);
	addEvent(window, 'resize', dynamicLayout);