// Recreating normal browser behavior in Javascript.
// Internet Explorer screws up the nav menu on initial load even though there's nothing
// wrong with it, so we have to use javascript to automatically scroll down the screen
// and back up to fix it.
// Thank you for wasting our time Microsoft!
function reload()
{
        window.blur;
        window.blur;
} 
function checkbrowser()
{
  if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ //test for MSIE x.x;
   var ieversion=new Number(RegExp.$1) // capture x.x portion and store as a number
   /*if (ieversion>=8)
    document.write("You're using IE8 or above")
   else if (ieversion>=7)
    document.write("You're using IE7.x")
   else if (ieversion>=6)
    document.write("You're using IE6.x")
   else if (ieversion>=5)
    document.write("You're using IE5.x")*/
   iescrollfix();
   /*toggleWindowSize();*/   
  }  
}

function toggleWindowSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( /MSIE (\d+\.\d+);/.test(navigator.userAgent) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } 
  resizeWidth = myWidth - 15;
  resizeHeight = myHeight - 15;
  window.alert( 'Width = ' + myWidth );
  window.alert( 'Height = ' + myHeight );
  window.resizeTo(1212, 586);
  /*doresize(myWidth,myHeight);*/
}

function iescrollfix()
{
   window.scroll(0,150); // horizontal and vertical scroll targets
   window.scroll(0,0); // horizontal and vertical scroll targets
}

