/**
 * function getViewportSize()
 *
 * This function differentiates between browsers to get the viewport
 * size. The size is returned as an array. The first value is the width and
 * the second value is the height.
 *
 * @return array
 */
function getViewportSize() {
    var size = [0, 0];//basic varray

    //browser differentiation for the viewport size
    if (typeof window.innerWidth != 'undefined') {//opera, gecko, netscape etc.
        size = [window.innerWidth, window.innerHeight];
    } else if ((typeof document.documentElement != 'undefined') && (typeof document.documentElement.clientWidth != 'undefined') && (document.documentElement.clientWidth != 0)) {//ie in standard mode through DTD
        size = [document.documentElement.clientWidth, document.documentElement.clientHeight];
    } else {//ie in quirks mode
        size = [document.getElementsByTagName('body')[0].clientWidth,
        document.getElementsByTagName('body')[0].clientHeight];
    }
    return size;
}//end - function getViewportSize()
