function GetScrollX()
{
    var scrollX = 0;
    if( document.documentElement && document.documentElement.scrollLeft ) 
    { //IE standards compliant and W3C
        scrollX = document.documentElement.scrollLeft;
    }
    else if( document.body && document.body.scrollLeft ) 
    { // IE 6 not standards compliant
        scrollX = document.body.scrollLeft;
    }
    else if( window.pageXOffset ) 
    { // older browsers
        scrollX = window.pageXOffset;
    }
    else if( window.scrollX ) 
    { // Gecko and KHTML/Webkit browsers I think...
    scrollX = window.scrollX;
    }
    return(scrollX);
};
/**
    Function to get scroll position of thw window
*/
function GetScrollY()
{
    var scrollY = 0;
    if( document.documentElement && document.documentElement.scrollTop ) 
    {
        scrollY = document.documentElement.scrollTop;
    }
    else if( document.body && document.body.scrollTop ) 
    {
        scrollY = document.body.scrollTop;
    }
    else if( window.pageYOffset ) 
    {
        scrollY = window.pageYOffset;
    }
    else if( window.scrollY ) 
    {
        scrollY = window.scrollY;
    }
    return scrollY;
};
/**
    Function to get client size of the window
*/
function GetWindowHeight()
{
    var height = 0;
    if( typeof( window.innerWidth ) == 'number' ) 
    {
        //Non-IE
        height = window.innerHeight;
    } 
    else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) 
    {
        //IE 6+ in 'standards compliant mode'
        height = document.documentElement.clientHeight;
    } 
    else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) 
    {
        //IE 4 compatible
        height = document.body.clientHeight;
    }
    return(height);
};
/**
    Function to get client size of the window
*/
function GetWindowWidth()
{
    var width = 0;
    if( typeof( window.innerWidth ) == 'number' ) 
    {
        //Non-IE
        width = window.innerWidth;
    } 
    else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) 
    {
        //IE 6+ in 'standards compliant mode'
        width = document.documentElement.clientWidth;
    } 
    else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) 
    {
        //IE 4 compatible
        width = document.body.clientWidth;
    }
    return(width);
}
