﻿	var myreturnText=""; var mahuidong="666";
	function $(id){if(document.getElementById(id)){return document.getElementById(id); }else{return null}}
	function CreateHttpRequest(){
try{return new ActiveXObject('MSXML2.XMLHTTP.4.0');}
catch(e){
try{return new ActiveXObject('MSXML2.XMLHTTP.3.0');}
catch(e){
try{return new ActiveXObject('MSXML2.XMLHTTP.2.6');}
catch(e){
try{return new ActiveXObject('MSXML2.XMLHTTP');}
catch(e){
try{return new ActiveXObject('Microsoft.XMLHTTP');}
catch(e){
try{return new XMLHttpRequest();}
catch(e){return null;}}}}}}}
	
/////////////////////////////////////////////////////////


function Command(url,data,divid,showload,fsuccess,ferror)
{
   var o=Command.prototype; 
   o.url=url;
   o.divid=divid;
   o.data=data+"&timeStamp="+new Date().getTime();;
   o.ferror=ferror;
   o.fsuccess=fsuccess;
   o.returndata="";
   o.doIt = function (){o.showload();o.getRss();}
   /*StartShowLoad*/
   o.showload=function(){if(showload)showload();}
   /*EndShowLoad*/
   /*StartCreateXmlHttp*/
	o.getRss=function() 
	{
	    this.http_request=CreateHttpRequest();
        try{
         //this.http_request.setrequestheader("Content-Type","no-cache"); 
		this.http_request.onreadystatechange = function(){o.callback();};
		this.http_request.open("post", o.url, true);
		this.http_request.setrequestheader("Content-Type","application/x-www-form-urlencoded;charset=utf-8");
		this.http_request.send(o.data);
		}catch(e){alert(e.message+o.data);}
	}
	/*EndCreateXmlHttp*/
	
	/*Startcallback*/
	o.callback=function() {
		if (this.http_request.readyState == 4)
		{ 
			if (this.http_request.status == 200) {this.loadready();}
			else
			{
			if(o.ferror)o.ferror();alert("您所请求的页面有异常。");
			}
		}
	}
	/*Endcallback*/
	/*StartloadReady*/
	o.loadready=function()
	{
	    try{
		var resText=this.http_request.responseText;
		//alert(resText);
		if(!document.getElementById(o.divid))
		{
		var myhd=document.createElement('input');
		myhd.setAttribute('id',o.divid);
		myhd.setAttribute('type',"hidden");
		myhd.setAttribute('value',resText);
		document.body.appendChild(myhd);
		}
		document.getElementById(o.divid).value=resText;
		myreturnText=resText;
		if(o.fsuccess)fsuccess();
			}catch(e){alert(e.name+e.message+"sssssssss");}
	}
	/*EndloadReady*/

    this.doIt();


}

