ajax={
xmlHttp:null,
strText:"",
onSuccess:null,
onRequest:null,
$:function(_){return document.getElementById(_);},
create:function(){
if(window.ActiveXObject)
	try{
		this.xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
	}catch(e){
			try{
				this.xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
			}catch(e){}
	}
else if(window.XMLHttpRequest) this.xmlHttp=new XMLHttpRequest();
},
post:function(strUrl,showObj,hideLoading){
		this.create();
		var _this = this;
		try{
			this.xmlHttp.open("POST",strUrl.url,true);		
			this.xmlHttp.setRequestHeader("cache-control","no-cache"); 
			this.xmlHttp.setRequestHeader("Content-Length",strUrl.parames.length);
			this.xmlHttp.setRequestHeader("Charset","utf-8");
			this.xmlHttp.setRequestHeader("CONTENT-TYPE","application/x-www-form-urlencoded");
			this.xmlHttp.onreadystatechange=function(){
			if(_this.xmlHttp.readyState!=4 && showObj){if(_this.onRequest && !hideLoading){_this.onRequest();}}
			if(_this.xmlHttp.readyState==4 && _this.xmlHttp.status==200){
					if(_this.onSuccess)
						_this.onSuccess(_this.xmlHttp.responseText);
										 }
								  }  //end onreadystatechange
			this.xmlHttp.send(strUrl.parames+"&_="+new Date().getTime());  // send parames
		}
		catch(e){}
},   //end Post
get:function(strUrl,showObj){
		this.create();
		var _this = this;
		try{
			if(this.onRequest) this.onRequest();
			this.xmlHttp.open("GET",strUrl.url+"?_="+new Date().getTime()+"&"+strUrl.parames,true);
			this.xmlHttp.onreadystatechange=function(){
			if(_this.xmlHttp.readyState!=4 && showObj){if(_this.onRequest) _this.onRequest();};	
			if(_this.xmlHttp.readyState==4 && _this.xmlHttp.status==200){
				alert(_this.xmlHttp.responseText);
					if(showObj){_this.$(showObj).innerHTML=_this.xmlHttp.responseText;}
					}
														}  //end onreadystatechange
			this.xmlHttp.send(null);  // send parames
		}
		catch(e){}
}
}

function $ (id) {
	return document.getElementById(id);
}
	//图片滚动代码
//div_1是最外面的包围的样式，且必须overflow:hidden;
//div_2和div_3是同一个级别的DIV
function marquee(div_1,div_2,div_3)
{
	var speed=40;
	var FGDemo=$(div_1);
	var FGDemo1=$(div_2);
	var FGDemo2=$(div_3);
	FGDemo2.innerHTML=FGDemo1.innerHTML
	function Marquee1()
	{
		if(FGDemo2.offsetHeight-FGDemo.scrollTop<=0)
		{
			FGDemo.scrollTop-=FGDemo1.offsetHeight;
		}
		else
		{
			FGDemo.scrollTop++;
		}
	}
	var MyMar1=setInterval(Marquee1,speed);
	FGDemo.onmouseover=function()
	{
		clearInterval(MyMar1);
	}
	FGDemo.onmouseout=function()
	{
		MyMar1=setInterval(Marquee1,speed);
	}
}

