var xmlHttp;
function GetXmlHttpObject()
{
	var xmlHttp=null;
	try
	{
	// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	}
	catch (e)
	{
	// Internet Explorer
		try
		{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	return xmlHttp;
}
function show_option(section,pcode){
	xmlHttp=GetXmlHttpObject();
	var url='show_option.php';
	url=url+'?section='+section+'&pcode='+pcode;
	xmlHttp.onreadystatechange=changed_show_option; 
	xmlHttp.open('GET',url,true);
	xmlHttp.send(null);
}

function changed_show_option() { 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=='complete'){ 
		 var gettext=xmlHttp.responseText.split('@@@');
		 var pos=gettext[0];
		 document.getElementById(pos).style.display="block";
		document.getElementById(pos).innerHTML=gettext[1];
	}
}

function show_imageupload(section,pcode){
	xmlHttp=GetXmlHttpObject();
	var url='show_image.php';
	url=url+'?section='+section+'&pcode='+pcode;
	xmlHttp.onreadystatechange=changed_show_option; 
	xmlHttp.open('GET',url,true);
	xmlHttp.send(null);
}

function changed_show_imageupload() { 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=='complete'){ 
		 var gettext=xmlHttp.responseText.split('@@@');
		 var pos=gettext[0];
		 document.getElementById(pos).style.display="block";
		document.getElementById(pos).innerHTML=gettext[1];
	}
}

function show_gettitle(datamodel,viewid,cut_summary,id){
	xmlHttp=GetXmlHttpObject();
	var url='show_gettitle.php';
	url=url+'?datamodel='+datamodel+'&viewid='+viewid+'&cut_summary='+cut_summary+'&id='+id;
	xmlHttp.onreadystatechange=changed_show_gettitle; 
	xmlHttp.open('GET',url,true);
	xmlHttp.send(null);
}

function changed_show_gettitle() { 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=='complete'){ 
		 var gettext=xmlHttp.responseText.split('@@@');
		 var pos=gettext[0];
		document.getElementById(pos).innerHTML=gettext[1];
	}
}


/*首页上面黄页查询中的左右滚动显示的信息_begin
var Obj;
	var amount;
	var speed;
	var num = 0;
	var moving = true;
	var target;
	var autos;
	function move(val,picture_space,objname){
		if(autos) clearTimeout(autos);
		if(moving){
			Obj = document.getElementById(objname);
			var objtag = Obj.getElementsByTagName("li");
			var pho_limit = objtag.length-4;
			if(val==2){
				moving = false;
				if(num<pho_limit){
					amount = (num+1)*picture_space;
					target = -1*picture_space*(num+1);
					go_right();
					num++;
				}else{
					num=0;
					Obj.style.left = "0px";
					amount = (num+1)*picture_space;
					target = -1*picture_space*(num+1);
					go_right();
					num++;
				}
			}else{
				moving = false;
				if(num>0){
					amount = (num-1)*picture_space;
					target = -1*picture_space*(num-1);
					go_left();
					num--;
				}else{
					num=pho_limit;
					Obj.style.left = -picture_space*num+"px";
					amount = (num-1)*picture_space;
					target = -1*picture_space*(num-1);
					go_left();
					num--;
				}
			}
		}
		var shownum=num+1;
		if(shownum>pho_limit)shownum=1;
		if(shownum==0)shownum=pho_limit+2;
	}
	function go_left(){
		if(Obj.style.left=="") Obj.style.left = "-1px";
		var current_pos = parseInt(Obj.style.left.substring(0,Obj.style.left.indexOf('px')));
		speed = -1*parseInt((current_pos+amount)/3)+8;

		Obj.style.left = current_pos + speed + "px";
		var sss = window.setTimeout("go_left()",100);
		if(current_pos>(target-11)){
			clearTimeout(sss);
			Obj.style.left = target+"px";
			moving = true;
		}
	}
	function go_right(){
		if(Obj.style.left=="") Obj.style.left = "-1px";
		var current_pos = parseInt(Obj.style.left.substring(0,Obj.style.left.indexOf('px')));
		speed = parseInt((current_pos+amount)/3)+8;
		Obj.style.left = current_pos - speed + "px";
		var sss = window.setTimeout("go_right()",100);
		if(current_pos<(target+12)){
			clearTimeout(sss);
			Obj.style.left = target+"px";
			moving = true;
		}
	}
	function setAuto2(){
		autoStart=setInterval("move(2,94,'move_yellowpage')", 2000);
	}

	function clearAuto(){
		clearInterval(autoStart);
	}
	setAuto2();
首页上面黄页查询中的左右滚动显示的信息_end*/

/*首页上面黄页查询中的交替显示的信息_begin
function tag_show(val1,val2,allnum,now){
	for(i=1;i<=allnum;i++){
		if(i==now){
			document.getElementById(val1+i).style.display='block';
			document.getElementById(val2+i).className='current';
		}else{
			document.getElementById(val1+i).style.display='none';
			document.getElementById(val2+i).className='';
		}
	}
}
var now_yp=1;
function setAuto_yp(){
	var autoStart_yp=setInterval(function(){
		(now_yp<3)?now_yp++:now_yp=1;
		tag_show('top_yp','top_ypt',3,now_yp);
	},5000);
}
setAuto_yp();
首页上面黄页查询中的交替显示的信息_end*/

