window.onload = function(){
    var nav = navigator.appName;
    var is_ie = false;
    if(nav=="Microsoft Internet Explorer" || nav=="msie"){
            is_ie = true;
    }
    var res = "s="+screen.width+";"+screen.height+";";
    if(is_ie){
		try{
            res += document.documentElement.clientWidth+";"+document.documentElement.clientHeight;
		}catch(e){}
    }else{
        res += window.innerWidth+";"+window.innerHeight;
    }
    newXMLHTTPRequest("/stat.php",null,"POST",res);
}
function newXMLHTTPRequest(url,callbackFunc,meth,data,async){
        var xmlreq = false;
        if (window.XMLHttpRequest) {
                xmlreq = new XMLHttpRequest();
        } else if (window.ActiveXObject){
            try {
                xmlreq = new ActiveXObject("Msxml2.XMLHTTP");
            } catch (e1) {
                try {
                    xmlreq = new ActiveXObject("Microsoft.XMLHTTP");
                } catch (e2){}
            }
        }
        if ( xmlreq ){
            meth = ( meth == null ) ? "GET" : meth.toUpperCase();
            async = ( async == null ) ? true : async;
            if ( callbackFunc != null ){
                xmlreq.onreadystatechange = function() {
                    if (4 == xmlreq.readyState){
                        if ( xmlreq.status == 200 ){
                            callbackFunc(xmlreq.responseText,xmlreq.responseXML);
                        }
                    }
                };
            }
            xmlreq.open(meth,url,async);
            if ("POST" == meth){
                xmlreq.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
                xmlreq.send(data);
            }else{
                xmlreq.send(null);
            }
        }
}

