function outAjax(){
	//alert();
	//document.getElementById("view").style.display="none";
	}
function getHttpObject()
{
var objType = false;
try {
objType = new ActiveXObject('Msxml2.XMLHTTP');
}
catch(e)
{
 try {
 objType = new ActiveXObject('Microsoft.XMLHTTP');
 } catch(e) 
 {objType = new XMLHttpRequest();
 }}return objType;}
 
 var req_theDay_star;
 function getAjax(_year,_month,_day)
 {
	 	//alert(_year+"_"+_month+"_"+_day);
	
	// alert(_year+""+_month+""+_day);
	//alert(_year+""+_month+""+_day);
 postBody="_year="+escape(_year)+"&_month=" + escape(_month+1)+"&_day=" + escape(_day)+"&getmonth=0";
// postBody="cdate="+escape(_year+"-"+(_month+1)+"-"+_day)+"&getmonth=0";
 var myTime = escape(new Date());
 var serverAddress = "/search/Dealcalender.jsp?nowtime="+myTime;
 //alert(serverAddress);
 
  var theHttpRequest = getHttpObject();

 theHttpRequest.onreadystatechange = function() {processAJAX();};
 theHttpRequest.open("POST", serverAddress, true);
 theHttpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 
 theHttpRequest.send(postBody);
 function processAJAX()
 {
 if (theHttpRequest.readyState == 4)  
  {
    if (theHttpRequest.status == 200)
	{
	try {var returnvalue=theHttpRequest.responseText;
	//alert(returnvalue)
							var object = document.getElementById("view");
							var func = new Function("return("+returnvalue+");");
							var json = func();
		var html_str=""
		html_str+="<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"478\" class=\"link12_orange f12_orange\">"
		html_str+="<tr><td colspan=\"2\" height=\"15\"></td></tr>"
		for (var news_index=0;news_index<json.DealNewsList.length;news_index++)
		{	
		html_str+="<tr align=\"left\">"
		html_str+="<td width=\"8\" height=\"24\" class=\"menu04\"></td>"
		html_str+="<td width=\"400\">"+json.DealNewsList[news_index].linkstring+"</td>"
		html_str+="</tr>"
		}
		html_str+="<tr><td height=\"22\" colspan=\"2\"></td></tr></table>"
		object.innerHTML=html_str;
	}
	catch(e) 
	{alert(e.message);return false}
	//opobj.innerHTML=""
	}
			 else 
			 {//alert("..............\n\n系统错误: " + theHttpRequest.statusText +"\n\n..............");
			 }
	 }
	}
	
}



/*
利用Ajax获取此月含有记录的日子并存入数组
2007-10-12-zhangchao
*/
 function getAjax_flag(_year,_month)
 {
	var _days =1;
 postBody="_year="+escape(_year)+"&_month=" + escape(_month+1)+"&_day=" + escape(_days)+"&_getmonth=1"; 
 
 var myTime = escape(new Date());
 var serverAddress = "/search/Dealcalender.jsp?nowtime="+myTime;
  var theHttpRequest = getHttpObject();

for (var datearr_index=Date_arr.length-1;datearr_index>=0;datearr_index--)
{Date_arr.pop();}//初始化时间数组之前将其晴空

 theHttpRequest.onreadystatechange = function() {processAJAX();};
 theHttpRequest.open("POST", serverAddress, true);
 theHttpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 
 theHttpRequest.send(postBody);
 function processAJAX()
 {
 if (theHttpRequest.readyState == 4)  
  {
    if (theHttpRequest.status == 200)
	{
	try {var returnvalue=theHttpRequest.responseText;
	
	var func = new Function("return("+returnvalue+");");
	timelist = func();
	for (var indexcalendar_=0 ;indexcalendar_<timelist.DealCalenderList.length;indexcalendar_++){Date_arr.push(timelist.DealCalenderList[indexcalendar_].Datestring);}

	}
	catch(e) 
	{alert(e.message);return false}
	
	}
			 else 
			 {alert("..............\n\n系统错误: " + theHttpRequest.statusText +"\n\n..............");
			 }
	 }
	 window.setTimeout("drawCld("+_year+","+_month+",temp);",500);
	}
}


