 	function HideContent(d){
		if(d.length < 1){ return; }
		document.getElementById(d).style.display = "none";
	}	
	function ShowContent(d){ if(d.length < 1) { 
			return; 
		}
		document.getElementById(d).style.display = "block";
	}
	
	function ReverseContentDisplay(d) 
	{
		if(d.length < 1) 
		{ 
			return; 
		}
		if(document.getElementById(d).style.display == "none" )
		{
			 document.getElementById(d).style.display = "block"; 
		 }
		else 
		{ 
			document.getElementById(d).style.display = "none"; 
		}
	}
	
	function about()
	{
		HideContent("aqi");
		HideContent("aboutBut");	
		ShowContent("about");
		ShowContent("homeBut");
		HideContent("graph");
	}
	function home()
	{
		HideContent("about");
		HideContent("homeBut");
		ShowContent("aqi");
		ShowContent("aboutBut");
		ShowContent("graph");
	}
	
    
	var updateLayout = function() {	
	  if (window.innerWidth != currentWidth) {
	    currentWidth = window.innerWidth;
	    var orient = (currentWidth == 320) ? "profile" : "landscape";
	    document.body.setAttribute("orient", orient);
	    window.scrollTo(0, 1);
	  }
	};
	window.applicationCache.update();
	iPhone.DomLoad(updateLayout);
	setInterval(updateLayout, 3500);