/*
 * This library provides utility functions for manipulating windows
 */

/**
 * This function returns an array with two elements:
 *   [ windowWidth, windowHeight ]
 * The function is supporting preculiorities of various browsers
 * It is developed by Mark Wilson-Jones (http://www.howtocreate.co.uk/tutorials/javascript/browserwindow)
 */
function getWindowSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  return [ myWidth, myHeight ];
}

var HEADER_HEIGHT = 140;
var FOOTER_HEIGHT = 40;
var RIGHT_SCROLL_MARGIN = 5;

function isNumeric(n) {
    return Number(n) != Number.NaN;
}

function isPositiveNumeric(n) {
    return isNumeric(n) && (n >= 0);
}
 
function isIE() {
    return (window.event ? true : false);
}



