function GetWindowWidth ( )
{
    var Width = 0;

    if( window.innerWidth )
    {
    //  All browsers except IE:
        Width = window.innerWidth;
    }
    else if( document.documentElement.clientWidth > 0 )
    {
    //  IE v6 strict:
        Width = document.documentElement.clientWidth;
    }
    else
    {
    //  IE quirks:
        Width = document.body.clientWidth;
    }
    
    return parseInt(Width);
}

function GetWindowHeight ( )
{
    var Height = 0;

    if( window.innerHeight )
    {
    //  All browsers except IE:
        Height = window.innerHeight;
    }
    else if( document.documentElement.clientHeight > 0 )
    {
    //  IE v6 strict:
        Height = document.documentElement.clientHeight;
    }
    else
    {
    //  IE quirks:
        Height = document.body.clientHeight;
    }
    
    return parseInt(Height);
}

function GetWindowTop ( )
{
    var Scroll = 0;

    if( document.body.scrollTop )
    {
    //  All browsers except IE:
        Scroll = document.body.scrollTop;
    }
    else
    {
    //  IE:
        Scroll = document.documentElement.scrollTop;
    }

    return parseInt(Scroll);
}

function GetWindowBottom ( )
{
    return GetWindowTop() + GetWindowHeight();
}

function GetElementWidth ( El )
{
    if( El.width )
        return parseInt(El.width);
        
    return parseInt( El.clientWidth );
}

function GetElementHeight ( El )
{
    if( El.height )
        return parseInt(El.height);
        
    return parseInt( El.clientHeight );
}

function GetElementLeft ( El )
{
    if( El.x )
        return parseInt(El.x);
        
    return parseInt( El.offsetLeft );
}

function GetElementTop ( El )
{
    if( El.y )
        return parseInt(El.y);
        
    return parseInt( El.offsetTop );
}

function GetImageTop ( Image )
{
    var Y = 0;

    if( Image.y )
    {
    //  All browsers except IE:
        Y = Image.y;
    }
    else
    {
    //  IE:
        Y = Image.offsetTop;
    }

    return parseInt(Y);
}

function GetImageBottom ( Image )
{
    var Height = 0;

    if( Image.height )
    {
    //  All browsers except IE:
        Height = Image.height;
    }
    else
    {
    //  IE:
        Height = Image.clientHeight;
    }

    return GetImageTop(Image) + parseInt(Height);
}

