function createxmlhttp()
{
    xmlhttpobj = false;
    try{//创建对象
        xmlhttpobj = new XMLHttpRequest;
    }catch(e){
        try{
            xmlhttpobj=new ActiveXObject("MSXML2.XMLHTTP");
        }catch(e2){
            try{
                xmlhttpobj=new ActiveXObject("Microsoft.XMLHTTP");
            }catch(e3){
                xmlhttpobj = false;
            }
        }
    }
    return xmlhttpobj; 
}

function ltb_textcen_uplod(divid,class_id)
{
if (class_id==""||divid==""){
   return;
}
	var poststr="id="+divid+"_"+class_id;
    var url="wwwwanginc/ajax_home_list.asp";
	var xmlhttpobj = createxmlhttp();
	if(xmlhttpobj){//如果创建对象xmlhttpobj成功
		xmlhttpobj.open('post',url,true);//get方法 加个随机数。
		xmlhttpobj.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); 
		xmlhttpobj.send(poststr);
		xmlhttpobj.onreadystatechange=function(){//客户端监控函数
			if(xmlhttpobj.readyState==4){//服务器处理请求完成
				if(xmlhttpobj.status==200){
					var html = xmlhttpobj.responseText;//获得返回值
					var RSArrs = html.split("{ltb_hack2009}");	
					document.getElementById(divid+"_1").innerHTML=RSArrs[0];
					document.getElementById(divid+"_2").innerHTML=RSArrs[1];
				}else{
					document.getElementById(divid+"_2").innerHTML="对不起，您请求的页面有问题...";
				}
			}else{
				document.getElementById(divid+"_2").innerHTML="加载中，请梢候...";
			}
		}
		
	}
}
function ltb_textcen_list(divid,class_id)
{
if (class_id==""||divid==""){
   return;
}
	var poststr="id="+divid+"_"+class_id;
    var url="wwwwanginc/ajax_home_list.asp";
	var xmlhttpobj = createxmlhttp();
	if(xmlhttpobj){//如果创建对象xmlhttpobj成功
		xmlhttpobj.open('post',url,true);//get方法 加个随机数。
		xmlhttpobj.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); 
		xmlhttpobj.send(poststr);
		xmlhttpobj.onreadystatechange=function(){//客户端监控函数
			if(xmlhttpobj.readyState==4){//服务器处理请求完成
				if(xmlhttpobj.status==200){
					var html = xmlhttpobj.responseText;//获得返回值
					document.getElementById(divid).innerHTML=html;
				}else{
					document.getElementById(divid).innerHTML="对不起，您请求的页面有问题...";
				}
			}else{
				document.getElementById(divid).innerHTML="加载中，请梢候...";
			}
		}
		
	}
}
function change_menu1(id,content_id,num,total_ztc_menu,menu_on,menu_off,class_id)
{
 for (var i=1;i<=total_ztc_menu;i++)
 {
   document.getElementById(id+'_'+i).className=menu_off;
   //document.getElementById(content_id+'_'+i).style.display='none';
 }
 document.getElementById(id+'_'+num).className=menu_on;
 ltb_textcen_uplod(content_id,class_id);
 ///document.getElementById(content_id+'_'+num).style.display='block';
}
function change_menu(id,content_id,num,total_ztc_menu,menu_on,menu_off,class_id)
{
 for (var i=1;i<=total_ztc_menu;i++)
 {
   document.getElementById(id+'_'+i).className=menu_off;
   //document.getElementById(content_id+'_'+i).style.display='none';
 }
 document.getElementById(id+'_'+num).className=menu_on;
 ltb_textcen_list(content_id,class_id);
 ///document.getElementById(content_id+'_'+num).style.display='block';
}
