function loadPage(pageName)
{
   addLoc(pageName);
   document.getElementById('rootSha').style.width="inherit";
   document.getElementById('slideArea').style.height="";
   if (pageName == "updates") {
      innerStuff = document.getElementById('theStuff');
      document.getElementById('root').style.width="511px";
      innerStuff.style.maxHeight="466px";
      innerStuff.style.height="auto";
      document.getElementById('randimaBox').style.display = "none";
      document.getElementById('titleBar').innerHTML = "Updates";
      document.getElementById('updatesBox').style.display = "inline";
      document.getElementById('changez').innerHTML = "";
   }
   else if (pageName == "randima") {
      innerStuff = document.getElementById('theStuff');
      document.getElementById('root').style.width="315px";
      innerStuff.style.maxHeight="272px";
      innerStuff.style.height="272px";
      document.getElementById('updatesBox').style.display = "none";
      document.getElementById('titleBar').innerHTML = "Random Image";
      document.getElementById('randimaBox').style.display = "inline";
      document.getElementById('changez').innerHTML = "";
      showPivot();
   }
   else {
      innerStuff = document.getElementById('theStuff');
      document.getElementById('randimaBox').style.display = "none";
      document.getElementById('updatesBox').style.display = "none";
      switch(pageName){
         case "forums":
            document.getElementById('root').style.width="800px";
            innerStuff.style.height="412px";
            innerStuff.style.maxHeight="";
            document.getElementById('titleBar').innerHTML = "Forums";
            break;
         case "links":
            document.getElementById('root').style.width="511px";
            innerStuff.style.height="auto";
            innerStuff.style.maxHeight="466px";
            document.getElementById('titleBar').innerHTML = "Links";
            break;
         case "vids":
            document.getElementById('root').style.width="800px";
            innerStuff.style.height="413px";
            innerStuff.style.maxHeight="412px";
            document.getElementById('titleBar').innerHTML = "Videos";
            break;
         case "music":
            document.getElementById('root').style.width="800px";
            innerStuff.style.height="auto";
            innerStuff.style.maxHeight="412px";
            document.getElementById('titleBar').innerHTML = "Music";
            break;
         case "dls":
            document.getElementById('root').style.width="800px";
            innerStuff.style.height="auto";
            innerStuff.style.maxHeight="412px";
            document.getElementById('titleBar').innerHTML = "Downloads";
            break;
         case "about":
            document.getElementById('root').style.width="800px";
            innerStuff.style.height="auto";
            innerStuff.style.maxHeight="412px";
            document.getElementById('titleBar').innerHTML = "About";
            break;
         default:
            alert('Page Not Found lolfailcakes');
            return loadPage('updates');
            break;
      }
      xmlhttp = false;
      try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); }
      catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); }
      catch (e) { try { xmlhttp = new XMLHttpRequest(); }
      catch (e) { xmlhttp = false; }}}
      if (!xmlhttp) { alert('AJAX or ActiveX was not successful. Aw.') };
      xmlhttp.open("GET",pageName + ".rawr",false);
      xmlhttp.send(null);
      document.getElementById('changez').innerHTML=xmlhttp.responseText;
   }
}
function getStyle(el,styleProp)
{
   var x = document.getElementById(el);
   if (x.currentStyle)
      var y = x.currentStyle[styleProp];
   else if (window.getComputedStyle)
      var y = document.defaultView.getComputedStyle(x,null).getPropertyValue(styleProp);
   return y;
}
function addLoc(pageName)
{
   location.hash = '#' + pageName;
}
