﻿// Browser Window Size and Position
// copyright Stephen Chapman, 3rd Jan 2005, 8th Dec 2005
// you may copy these functions but please keep the copyright notice as well
function pageWidth() {return window.innerWidth != null? window.innerWidth : document.documentElement && document.documentElement.clientWidth ?       document.documentElement.clientWidth : document.body != null ? document.body.clientWidth : null;} function pageHeight() {return  window.innerHeight != null? window.innerHeight : document.documentElement && document.documentElement.clientHeight ?  document.documentElement.clientHeight : document.body != null? document.body.clientHeight : null;} function posLeft() {return typeof window.pageXOffset != 'undefined' ? window.pageXOffset :document.documentElement && document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ? document.body.scrollLeft : 0;} function posTop() {return typeof window.pageYOffset != 'undefined' ?  window.pageYOffset : document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ? document.body.scrollTop : 0;} function posRight() {return posLeft()+pageWidth();} function posBottom() {return posTop()+pageHeight();}

function getInternetExplorerVersion() {
// Returns the version of Internet Explorer or a -1
// (indicating the use of another browser).
   var rv = -1; // Return value assumes failure.
     if (navigator.appName == 'Microsoft Internet Explorer')
       {
           var ua = navigator.userAgent;
           var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
           if (re.exec(ua) != null)
              rv = parseFloat( RegExp.$1 );
        }
     return rv;
}



function hide_slides() {
 if (pageWidth() > 1440) {
  disp = 'table-cell';
  isie = getInternetExplorerVersion();
  if (isie != -1 ) disp='inline';
  var leftgap=document.getElementById('left-gap');
  leftgap.style.display = disp;
  var rightgap=document.getElementById('right-gap');
  rightgap.style.display = disp;
  var themenu=document.getElementById('menu');
  themenu.style.paddingLeft='10%';
  themenu.style.width='90%';
  var thefooter=document.getElementById('foot_content');
  thefooter.style.paddingLeft='10%';
  thefooter.style.paddingRight='10%';
 }
}


