function clientWidth() 
{
    var client_width = 0;
    if( typeof( window.innerWidth) == 'number' ) 
    {
        //Non-IE
        client_width = window.innerWidth;
    } 
    else if( document.documentElement && document.documentElement.clientWidth ) 
    {
        //IE 6+ in 'standards compliant mode'
        client_width = document.documentElement.clientWidth;
    } 
    else if( document.body && document.body.clientWidth) 
    {
        //IE 4 compatible
        client_width = document.body.clientWidth;
    }
    return client_width;
}

function clientHeight() 
{
    var client_height = 0;
    if( typeof( window.innerHeight) == 'number' ) 
    {
        //Non-IE
        client_height = window.innerHeight;
    } 
    else if( document.documentElement && document.documentElement.clientHeight ) 
    {
        //IE 6+ in 'standards compliant mode'
        client_height = document.documentElement.clientHeight;
    } 
    else if( document.body && document.body.clientHeight ) 
    {
        //IE 4 compatible
        client_height = document.body.clientHeight;
    }
    return client_height;
}