/**
 * @author zhaoyao
 */
function byId(domid)
{
    return document.getElementById(domid);
}
function htmlshow(dom)
{
	byId(dom).style.display = "";
}
function htmlhide(dom)
{
	byId(dom).style.display = "none";
	byId(dom).innerHTML="";
	
}

function Show_Content(ti,lid)
{
	for (i=0;i<7;i++)
	{
	  htmlhide("ShowContent"+i+"");
	}
	var shstr;
	shstr="";
	shstr=shstr+"<div class='ShowContent'><ul><li class='Showli1'><a href='javascript:;' onclick=htmlhide('ShowContent"+ti+"')>关闭 <img src='images/w_close.gif' width='11' height='11' border='0' /></a></li>";
	shstr=shstr+"<li id='showlogin'></li></ul></div>";
	byId("ShowContent"+ti+"").innerHTML=shstr;
	htmlshow("ShowContent"+ti+"");
	var xmlhttp;
	try{
		xmlhttp=new XMLHttpRequest();
		}
	catch(e){
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	xmlhttp.onreadystatechange=function(){
	if (xmlhttp.readyState==4){
		if (xmlhttp.status==200){
			var data=xmlhttp.responseText;
			code_result(data,ti);
			}
		else{
			byId("showlogin").innerHTML="加载数据失败!";
			}
		}
	else{
		byId("showlogin").innerHTML="<img src='images/load.gif' />正在进行数据加载...";
		}
	}
	xmlhttp.open("post", "loadcontent.asp", true);
	xmlhttp.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	xmlhttp.send("lid="+escape(lid));
}
function code_result(data,ti){
	var resultbox=byId("ShowContent"+ti+"");
	if(data==0){
		byId("showlogin").innerHTML="加载数据失败!";
		}
	else{
		var sarray=new Array();
		sarray=data.split("|");
		shstr="";
	shstr=shstr+"<div class='showcontent'><ul><li class='showli1'><a href='javascript:;' onclick=htmlhide('ShowContent"+ti+"')>关闭 <img src='images/w_close.gif' width='11' height='11' border='0' /></a></li>";
	shstr=shstr+"<li class='showli2'>问："+sarray[0]+"</li><li class='showli3'>答："+sarray[1]+"</li></ul></div>";
		byId("ShowContent"+ti+"").innerHTML=shstr;
	    //htmlshow("ShowContent"+ti+"");
		}
}

