function getOs()  
{  
   var OsObject = "";  
   if(navigator.userAgent.indexOf("MSIE")>0) {  
                return "MSIE";       //IE浏览器
   }
   if(isFirefox=navigator.userAgent.indexOf("Firefox")>0){  
                return "Firefox";     //Firefox浏览器
   }
   if(isSafari=navigator.userAgent.indexOf("Safari")>0) {  
                return "Safari";      //Safan浏览器
   }
   if(isCamino=navigator.userAgent.indexOf("Camino")>0){  
                return "Camino";   //Camino浏览器
   }
   if(isMozilla=navigator.userAgent.indexOf("Gecko/")>0){  
                return "Gecko";    //Gecko浏览器
   }  
} 
function get_request(){
          http_request = false;
        //开始初始化XMLHttpRequest 对象
        if(window.XMLHttpRequest) { //Mozilla 浏览器
                        http_request = new XMLHttpRequest();
                        if (http_request.overrideMimeType) {//设置MiME 类别        
                                        http_request.overrideMimeType("text/xml");
                        }
        }else if (window.ActiveXObject) { // IE 浏览器
                        try {
                        http_request = new ActiveXObject("Msxml2.XMLHTTP");
                        } catch (e) {
                                        try {
                                                        http_request = new ActiveXObject("Microsoft.XMLHTTP");
                                        } catch (e) {}
                        }
        }
        if (!http_request) { // 异常，创建对象实例失败
                        window.alert("不能创建XMLHttpRequest 对象实例.");
                        return false;
        }
        return http_request;
}

function get_id(id)
{
	var id;
	//alert(id);
	btype=getOs();
	http_request=get_request();
	url="/php/pv.php?id="+id;
	http_request.onreadystatechange = (btype!="Firefox")?(handleStateChange) : (handleStateChange());
	http_request.open("GET",url,false);
	http_request.send(null);
	// http_request.onreadystatechange = (btype!="Firefox")?(handleStateChange) : (handleStateChange());
}
function handleStateChange()
{
     //btype=getOs(); 
    
}// JavaScript Document
