function xInit(thing)
{
    if ( window.attachEvent ){ window.attachEvent("onload",thing); }

    if ( window.addEventListener ){ 
        window.addEventListener("load",thing,true); 
        }
}

xInit(getClientDimensions);

function getClientDimensions()
{
	var windowHeight, windowWidth, screenHeight, screenWidth, bitDepth;
	
        if ( document.documentElement && document.documentElement.clientHeight )
        {    
            windowHeight = document.documentElement.clientHeight;
            windowWidth =  document.documentElement.clientWidth;
            screenHeight = screen.height;
            screenWidth = screen.width;
            bitDepth = screen.colorDepth; 
        }
	else if (document.all)
	{	
            windowHeight = document.body.clientHeight;
            windowWidth = document.body.clientWidth;
            screenHeight = screen.height;
            screenWidth = screen.width;
            bitDepth = screen.colorDepth; 
	}
	else 
	{	
            windowHeight = window.innerHeight;
            windowWidth = window.innerWidth;
            screenHeight = screen.height;
            screenWidth = screen.width;
            bitDepth = screen.colorDepth; 
	}
	
        //document.cookie = "UA=;expires=01-Jan-90";
        //document.cookie = "UA='" + navigator.userAgent + "';";

        //cookieValue = screenWidth + "x" + screenHeight + "-" + windowWidth + "x" + windowHeight + "-" + bitDepth;
        
	//document.cookie = "UA='" + navigator.userAgent) + "';";
	//document.cookie = "windowHeight=" + windowHeight + ";";
	//document.cookie = "windowWidth=" + windowWidth + ";";
	//document.cookie = "screenHeight=" + screenHeight + ";";
	//document.cookie = "screenWidth=" + screenWidth + ";";
	//document.cookie = "bitDepth=" + bitDepth + ";";
		
}


