var Request = new Object();
Request.send = function(url, method, callback, data, urlencoded) {
	var req;	
	if(window.XMLHttpRequest){
		req = new XMLHttpRequest();
	}else if(window.ActiveXObject){
		req = new ActiveXObject("Microsoft.XMLHTTP");
	}
	req.onreadystatechange = function() {
		if(req.readyState == 4){
			if (req.status < 400) {
				(method=="POST") ? callback(req) : callback(req,data);
			}else{
				//alert("服务器繁忙请稍后再试!");
			}
		}
	}
	if (method=="POST") {
		req.open("POST", url, true);
		if (urlencoded) req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		req.send(data);
	} else {
		req.open("GET", url, true);
		req.send(null);
	}
	return req;
}
Request.sendRawPOST = function(url, data, callback) {
	Request.send(url, "POST", callback, data, false);
}
Request.sendPOST = function(url, data, callback) {
	Request.send(url, "POST", callback, data, true);
}
Request.sendGET = function(url, callback, args) {
	return Request.send(url, "GET", callback, args);
}

function _$$$$$$$(id)
{
	return document.getElementById(id);
}


function diaocha1(id){	
	
		new Request.sendGET('/newadmin/diaocha.php?p=t1&cid='+id,dodiaocha1,"");
}
function diaocha3(id){	
		new Request.sendGET('/newadmin/diaocha.php?p=t3&cid='+id,dodiaocha1,"");
}
function dodiaocha1(response)
{
	var res = response.responseText;	
	var strs= new Array(); //定义一数组 
	strs=res.split(":"); //字符分割 
	_$$$$$$$('diaocha1'+strs[0]).innerHTML = strs[1];
	_$$$$$$$('diaocha1'+strs[0]).focus();
	
}		

function diaocha2(id){	
		new Request.sendGET('/newadmin/diaocha.php?p=t2&cid='+id,dodiaocha2,"");
}
function diaocha4(id){	
		new Request.sendGET('/newadmin/diaocha.php?p=t4&cid='+id,dodiaocha2,"");
}
function dodiaocha2(response)
{
	var res = response.responseText;	
	var strs= new Array(); //定义一数组 
	strs=res.split(":"); //字符分割 
	_$$$$$$$('diaocha2'+strs[0]).innerHTML = +strs[1];
	_$$$$$$$('diaocha2'+strs[0]).focus();
	
}	



function getIndexComment(id){		
		new Request.sendGET('/newadmin/ajax.php?p=indexcomment&pid='+id,doComment,"");
		
}

function doComment(response)
{
	var res = response.responseText;		
	_$$$$$$$('indexcomment').innerHTML = res;
	_$$$$$$$('indexcomment').focus();
	
}		

function getAnniu(id){		
		new Request.sendGET('/newadmin/ajax.php?p=anniu&pid='+id,doAnniu,"");
		
}

function doAnniu(response)
{
	var res = response.responseText;		
	_$$$$$$$('anniu').innerHTML = res;
	_$$$$$$$('anniu').focus();
	
}		

function getCommentList(id){		
		new Request.sendGET('/newadmin/ajax.php?p=commentlist&pid='+id,doCommentList,"");
		
}

function doCommentList(response)
{
	var res = response.responseText;		
	_$$$$$$$('commentlist').innerHTML = res;
	_$$$$$$$('commentlist').focus();
	
}		
function getTodaySubject(id){		
		new Request.sendGET('/newadmin/ajax.php?p=todaySubject&pid='+id,doTodaySubject,"");
		
}

function doTodaySubject(response)
{
	var res = response.responseText;		
	_$$$$$$$('todaySubject').innerHTML = res;
	_$$$$$$$('todaySubject').focus();
	
}


function getLinkList(id){		
		new Request.sendGET('/newadmin/ajax.php?p=linkList&pid='+id,doLinkList,"");
		
}

function doLinkList(response)
{
	var res = response.responseText;		
	_$$$$$$$('linkList').innerHTML = res;
	_$$$$$$$('linkList').focus();
	
}		
function getIntro(id){		
		new Request.sendGET('/newadmin/ajax.php?p=intro&pid='+id,doIntro,"");
		
}

function doIntro(response)
{
	var res = response.responseText;		
	_$$$$$$$('intro').innerHTML = res;
	_$$$$$$$('intro').focus();
	
}		


function getBlogList(id){		
		new Request.sendGET('/newadmin/ajax.php?p=bloglist&pid='+id,doBlogList,"");
		
}

function doBlogList(response)
{
	var res = response.responseText;		
	_$$$$$$$('bloglist').innerHTML = res;
	_$$$$$$$('bloglist').focus();
	
}		


function getHtcontent(id){		
		new Request.sendGET('/newadmin/ajax.php?p=htcontent&pid='+id,doHtcontent,"");
		
}

function doHtcontent(response)
{
	var res = response.responseText;		
	_$$$$$$$('htcontent').innerHTML = res;
	_$$$$$$$('htcontent').focus();
	
}		

