function gog(){
alert();
}

/**
 * 创建DOM 对象
 * Banglu
 */

function createXMLRequest() {
    var http_request;
	if (window.XMLHTTPRequest) {//Mozilla Saftri,,,,
		http_request = new XMLHTTPRequest();
	} else {
		if (window.ActiveXObject) {//IE
			http_request = new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	return http_request;
}


/**
 * 触发动作的对象必须是inupt,button等
 * 提交按钮所在的表单
 * url:表单要提交的动作(可选)
 */
function postForm(thisForm) {
	if (thisForm == null) {
		thisForm = document.forms[0];
	}
	var URL = getParameter(thisForm);
	var http_request = createXMLRequest();
	http_request.open("post", URL, false);
	http_request.onreadystatechange = function () {
		if (http_request.readyState == 4) {
			if (http_request.status == 200) {
				var rs = http_request.responseText;
	 var s=rs.split('-');
      alert(s[1]);
     if(s[0]=='1'){
         window.close();
			}
		}
		}
	};
	http_request.send(null);
}


/**
 * 触发动作的对象必须是inupt,button等
 * 提交按钮所在的表单
 * url:提交的动作   
 * Banglu
 */
function postURL(URL,frm){
    var xRequest=createXMLRequest(); 
   xRequest.open("post",URL,true);
	xRequest.onreadystatechange = function () {
		if (xRequest.readyState == 4) {
			if (xRequest.status == 200) {
				var rs = xRequest.responseText;
				alert(rs);
				getObject(frm).submit();
			   }
		  }
		}
		xRequest.send(null);
 }
 
 
//建立XMLHttpRequest对象
var xmlhttp;
function creatXMLHttpRequest(){
    try{
         xmlhttp= new ActiveXObject('Msxml2.XMLHTTP');
   }catch(e){
          try{
              xmlhttp= new ActiveXObject('Microsoft.XMLHTTP');
          }catch(e){
              try{
                  xmlhttp= new XMLHttpRequest();
             }catch(e){}
         }
    }
}

function getPart(url,id){
    creatXMLHttpRequest();
    xmlhttp.open("get",url,true);
    xmlhttp.onreadystatechange = function(){
        if(xmlhttp.readyState == 4)
        {
            if(xmlhttp.status == 200)
            {
                if(xmlhttp.responseText!=""){
                    $(id).innerHTML = unescape(xmlhttp.responseText);        
                }
            }
            else{
                $(id).innerHTML = "数据加载出错";
            }
        }
    }
    xmlhttp.setRequestHeader("If-Modified-Since","0");
    xmlhttp.send(null);
    
}
