function onTabChange(hrefpre,divpre,idx,maxidx)
{
	var i=1;
	while(i<=maxidx)
	{
		if (i!=idx)
		{
			href_obj = document.getElementById(hrefpre + i);
			href_obj.className = "";
			div_obj = document.getElementById(divpre + i);
			div_obj.style.display = "none";
		}
		i = i + 1;
	}
	href_obj = document.getElementById(hrefpre+idx);
	href_obj.className = "active";
	div_obj = document.getElementById(divpre + idx);
	div_obj.style.display = "block";
}
//String.prototype.trim = function(){return this.replace(/(^\s*)|(\s*$)/g, "");};
Ajaxyes = {
    xmlhttp: null,
    init :function()
    {
        if(window.XMLHttpRequest){ //Mozilla 
          this.xmlhttp =  new XMLHttpRequest();
        }
        else if(window.ActiveXObject){
          try{
            this.xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
          }
          catch(e)
          {
             try
             {
              this.xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
             }catch(e){}
          }
        }
    },
    sendRequest:function(url,sendMethod,data,asyncMethod)
    {
        if(this.xmlhttp == null)
        {
            this.init();
        }
        this.xmlhttp.open(sendMethod,url,true);
        this.xmlhttp.onreadystatechange = asyncMethod;   //指定响应的函数
        if(sendMethod.toUpperCase() == "POST")
        {
            this.xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
            this.xmlhttp.setRequestHeader("Content-Length",data.length);
        }
        this.xmlhttp.send(data);  //发送请求
    },
    returnData : function(type)
    {
        if(this.xmlhttp.readyState==4){ //对象状态
            if(this.xmlhttp.status==200)
            {   //信息已成功返回，开始处理信息
                if(type=="text")
                    return this.xmlhttp.responseText;
                else
                    return this.xmlhttp.responseXML;
                //window.alert(res);
            }
            else
            {
                return "";
            }
        } 
    }
}