function MyVasAjax() {
    this.base = Ajax;
    this.base();
}
MyVasAjax.prototype = new Ajax();

MyVasAjax.prototype.send = function (checkUrl) {
   sAlert();
   if(checkUrl==undefined){
     this.loadXMLHttpRequest("business/CheckUserAction.do?random="+Math.random(),"get","");
   }else{
   	this.loadXMLHttpRequest(checkUrl,"get","");
   }
};
MyVasAjax.prototype.onReadyStateChange = function (httpRequest) {
    if (httpRequest.readyState == 4) {
        if (httpRequest.status == 200) {
            this.processXMLHttpRequest(httpRequest);
        } else {
        	close();
        }
    }
};
MyVasAjax.prototype.processXMLHttpRequest = function (httpRequest) {
	var respText = httpRequest.responseText;
	if (respText == "Login") {
		//alert("\u7528\u6237\u5df2\u7ecf\u767b\u5f55");
		var _link = actionName;
		if(actionName.indexOf("?") != -1) {
			_link += "&" + Math.random();
		} else {
			_link += "?" + Math.random();
		}
		//alert(flag);
		if (flag == "orderRelation") {
			//alert("\u8ba2\u8d2d\u5173\u7cfb\u67e5\u8be2");
			window.parent.document.main.location.href = _link;
		} else if (flag == "userOrderHis"){
			   //alert(_link);
		        window.parent.document.main.location.href = _link;
		}  else if (flag == "productCancel"){
			   //alert(_link);
		        window.parent.document.main.location.href = _link;
		} 
	} else {
          //alert("用户没有登录");
		parent.location.href = "SendRedirectAction.do?random="+Math.random();
	}
     
};

