var iscode = false;
function show_code()
{
	if ($("div_code").innerHTML=="")
	{
		$("div_code").innerHTML = ' 验证码：<input name="code" id="code" type="text" size="4"  maxlength="4" onKeyPress="if ((event.keyCode<48 || event.keyCode>57)) event.returnValue=false"><img id=code1 src="/inc/code.asp?" alt= "验证码,看不清楚?请点击刷新验证码" style="cursor : pointer;"  onClick="this.src+=Math.random()" align="absmiddle"> <A href="javascript:reloadcode(\'code1\');" title="刷新验证码" >刷新</a>'	
		//reloadcode('code1');
	}
	iscode = true;
	if(hasReply){cancleReply();}
} 
function show_replycode()
{
	if ($("div_replycode").innerHTML=="")
	{
		$("div_replycode").innerHTML = ' 验证码：<input name="replycode" id="replycode" type="text" size="4"  maxlength="4" onKeyPress="if ((event.keyCode<48 || event.keyCode>57)) event.returnValue=false"><img id=code2 src="/inc/code.asp?" alt= "验证码,看不清楚?请点击刷新验证码" style="cursor : pointer;"  onClick="this.src+=Math.random()" align="absmiddle"> <A href="javascript:reloadcode(\'code2\');" title="刷新验证码" >刷新</a>'
		//reloadcode('code2');	
	}
} 

function reloadcode(code_src){ 
	$(code_src).src = '/inc/code.asp?'+ Math.random();
} 

 function reply_clearfield()
{
	if ($("more").value == "我来说两句！")
	{
		$("more").value = "";
	}
}
 function replyJB_clearfield()
{
	if ($("reply_more").value == "附加说明：请详细说明举报原因以便管理员查询处理！")
	{
		$("reply_more").value = "";
	}
}

//var wz_id=123456; 
//function wt(){return wt=wz_id;}
var hasReply = false;
var replyCommentOrder = "";


function cancleReply()
{
//$("replydiv" + replyCommentOrder).innerHTML = "";
//$("replydiv" + replyCommentOrder).style.display = "none";
$("replydiv" + replyCommentOrder).parentNode.removeChild($("replydiv" + replyCommentOrder));
hasReply = false;
$("reply" + replyCommentOrder).style.display = "block";
}

function showReplay(order)
{

if(hasReply){cancleReply();}
replyCommentOrder = order;

if(replyCommentOrder == ""){return ;}

if(iscode){div_code.innerHTML = "";iscode = false;}


tmpHtml = '<table width="100%" border="0" cellspacing="0" cellpadding="0" > '
tmpHtml +='<tr><td height=26 align=center> '
tmpHtml +='<img onClick="faces(\'reply_more\',\'[xl_1]\')" src="/faces/xl_1.gif" border="0" style="cursor: hand"> '
tmpHtml +='<img onClick="faces(\'reply_more\',\'[xl_2]\')" src="/faces/xl_2.gif" border="0" style="cursor: hand"> '
tmpHtml +='<img onClick="faces(\'reply_more\',\'[xl_3]\')" src="/faces/xl_3.gif" border="0" style="cursor: hand"> '
tmpHtml +='<img onClick="faces(\'reply_more\',\'[xl_4]\')" src="/faces/xl_4.gif" border="0" style="cursor: hand"> '
tmpHtml +='<img onClick="faces(\'reply_more\',\'[xl_5]\')" src="/faces/xl_5.gif" border="0" style="cursor: hand"> '
tmpHtml +='<img onClick="faces(\'reply_more\',\'[xl_6]\')" src="/faces/xl_6.gif" border="0" style="cursor: hand"> '
tmpHtml +='<img onClick="faces(\'reply_more\',\'[xl_7]\')" src="/faces/xl_7.gif" border="0" style="cursor: hand"> '
tmpHtml +='<img onClick="faces(\'reply_more\',\'[xl_8]\')" src="/faces/xl_8.gif" border="0" style="cursor: hand"> '

tmpHtml +='<img onClick="faces(\'reply_more\',\'[xl_11]\')" src="/faces/xl_11.gif" border="0" style="cursor: hand"> '
tmpHtml +='<img onClick="faces(\'reply_more\',\'[xl_12]\')" src="/faces/xl_12.gif" border="0" style="cursor: hand"> '
tmpHtml +='<img onClick="faces(\'reply_more\',\'[xl_13]\')" src="/faces/xl_13.gif" border="0" style="cursor: hand"> '
tmpHtml +='<img onClick="faces(\'reply_more\',\'[xl_14]\')" src="/faces/xl_14.gif" border="0" style="cursor: hand"> '
tmpHtml +='<img onClick="faces(\'reply_more\',\'[xl_15]\')" src="/faces/xl_15.gif" border="0" style="cursor: hand"> '
tmpHtml +='<img onClick="faces(\'reply_more\',\'[xl_16]\')" src="/faces/xl_16.gif" border="0" style="cursor: hand"> '
tmpHtml +='<img onClick="faces(\'reply_more\',\'[xl_17]\')" src="/faces/xl_17.gif" border="0" style="cursor: hand"> '
tmpHtml +='<img onClick="faces(\'reply_more\',\'[xl_18]\')" src="/faces/xl_18.gif" border="0" style="cursor: hand"> '

tmpHtml +='<img onClick="faces(\'reply_more\',\'[xl_21]\')" src="/faces/xl_21.gif" border="0" style="cursor: hand"> '
tmpHtml +='<img onClick="faces(\'reply_more\',\'[xl_22]\')" src="/faces/xl_22.gif" border="0" style="cursor: hand"> '
tmpHtml +='<img onClick="faces(\'reply_more\',\'[xl_23]\')" src="/faces/xl_23.gif" border="0" style="cursor: hand"> '
tmpHtml +='<img onClick="faces(\'reply_more\',\'[xl_24]\')" src="/faces/xl_24.gif" border="0" style="cursor: hand"> '
tmpHtml +='<img onClick="faces(\'reply_more\',\'[xl_25]\')" src="/faces/xl_25.gif" border="0" style="cursor: hand"> '
tmpHtml +='</td></tr>'
tmpHtml +='<FORM action="" method="post" name="replycommentform" > '
tmpHtml +='<tr> '
tmpHtml +='<td><textarea name="reply_more" id="reply_more" cols="60" rows="6" onFocus="show_replycode();" class="textarea1" style="width:98%" ></textarea></td> '
tmpHtml +='</tr> '
tmpHtml +='<tr> '
tmpHtml +='<td align="right" height="30" valign="middle"><div align="right" style="padding-top:2px;">昵称：<input name="reply_username" id="reply_username" type="text" value="'+username+'" '+readstr+' size="10" maxlength="10" onfocus="show_replycode();"> '
tmpHtml +='<span id="div_replycode"></span>&nbsp;&nbsp;<input type="button" name="rSubmit" value="发表评论" onClick="return replyComment('+replyCommentOrder+');">&nbsp;&nbsp;<input type="button" name="rSubmit2" value="取消评论" onClick="cancleReply();"></div><div align="right" style="padding-top:2px" class="red" id=reply_err></div></td> '
tmpHtml +='</tr> '
tmpHtml +='</FORM> '
tmpHtml +='</table> '
//$('replydiv'+replyCommentOrder).innerHTML = tmpHtml;
//$("replydiv" + replyCommentOrder).style.display = "";
replyNode = document.createElement("DIV");
replyNode.innerHTML = tmpHtml;
replyNode.id = 'replydiv'+replyCommentOrder;
replyNode.className = "commentAction commentReply";
$("hf" + replyCommentOrder).appendChild(replyNode);
$('reply_more').focus();

replyCommentOrder = replyCommentOrder;
$("reply" + replyCommentOrder).style.display = "none";
hasReply = true;
}

function showJB(order)
{

if(hasReply){cancleReply();}
replyCommentOrder = order;

if(replyCommentOrder == ""){return ;}

if(iscode){div_code.innerHTML = "";iscode = false;}


tmpHtml = '<table width="100%" border="0" cellspacing="0" cellpadding="0" > '
tmpHtml +='<tr><td height=26 align=center> '
tmpHtml +='举报原因：<input name="jbyy" type="checkbox" id=jbyy value="不和谐">不和谐 <input name="jbyy" type="checkbox" id=jbyy value="广告">广告 <input name="jbyy" type="checkbox" id=jbyy value="色情">色情 <input name="jbyy" type="checkbox" id=jbyy value="反动">反动 <input name="jbyy" type="checkbox" id=jbyy value="暴力">暴力 <input name="jbyy" type="checkbox" id=jbyy value="诈骗">诈骗 <input name="jbyy" type="checkbox" id=jbyy value="骚扰">骚扰 <input name="jbyy" type="checkbox" id=jbyy value="非法">非法 <input name="jbyy" type="checkbox" id=jbyy value="其它">其它 '
tmpHtml +='</td></tr>'
tmpHtml +='<FORM action="" method="post" name="replyjb" > '
tmpHtml +='<tr> '
tmpHtml +='<td><textarea name="reply_more" id="reply_more" cols="60" rows="6" onFocus="show_replycode();replyJB_clearfield()" class="textarea1" style="width:98%" >附加说明：请详细说明举报原因以便管理员查询处理！</textarea></td> '
tmpHtml +='</tr> '
tmpHtml +='<tr> '
tmpHtml +='<td align="right" height="30" valign="middle"><div align="right" style="padding-top:2px;">昵称：<input name="reply_username" id="reply_username" type="text" value="'+username+'" '+readstr+' size="10" maxlength="10" onfocus="show_replycode();"> '
tmpHtml +='<span id="div_replycode"></span>&nbsp;&nbsp;<input type="button" name="rSubmit" value="提交举报" onClick="return replyJB('+replyCommentOrder+');">&nbsp;&nbsp;<input type="button" name="rSubmit2" value="取消举报" onClick="cancleReply();"></div><div align="right" style="padding-top:2px" class="red" id=reply_err></div></td> '
tmpHtml +='</tr> '
tmpHtml +='</FORM> '
tmpHtml +='</table> '
//$('replydiv'+replyCommentOrder).innerHTML = tmpHtml;
//$("replydiv" + replyCommentOrder).style.display = "";
replyNode = document.createElement("DIV");
replyNode.innerHTML = tmpHtml;
replyNode.id = 'replydiv'+replyCommentOrder;
replyNode.className = "commentAction commentReply";
$("hf" + replyCommentOrder).appendChild(replyNode);
//$('reply_more').focus();
replyCommentOrder = replyCommentOrder;
$("reply" + replyCommentOrder).style.display = "none";
hasReply = true;
}

function comment()
{
reply_clearfield()	
show_code();
pl_cz('',5);	
//return false;
}
  
function replyComment(rid)
{
show_replycode();
pl_cz(rid,4);	
//return false;
}

function replyJB(rid)
{
replyJB_clearfield()		
show_replycode();
pl_cz(rid,3);	
//return false;
}

function pl_cz(pl_id,tag)
{
switch(parseInt(tag)){
	case 1:
	indiv('/pl_cz.asp?fd=d&cz=1&pl_id='+pl_id,'d'+pl_id);
	break;
	case 2:
	indiv('/pl_cz.asp?fd=c&cz=2&pl_id='+pl_id,'c'+pl_id);
	break;
	//case 3:
	//indiv('/pl_cz.asp?fd=b&cz=3&pl_id='+pl_id,'b'+pl_id);
	//break;
	case 3:
var url='/pl_cz.asp',post='cz=3&pl_id='+pl_id+'&jbyy='+encodeURIComponent(encodeURIComponent(check_v('jbyy')))+'&username='+encodeURIComponent(encodeURIComponent($('reply_username').value))+'&code='+$('replycode').value+'&more='+encodeURIComponent(encodeURIComponent($('reply_more').value))+' ' 
		var xmlhttp = createXMLHttps();
		xmlhttp.open("POST",url,true);
		xmlhttp.setRequestHeader("Cache-Control","no-cache");
		xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=GB2312");	
		xmlhttp.send(post);
		xmlhttp.onreadystatechange = function()
	   {
			//alert(xmlhttp.responseText);
			if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
			{
				info=xmlhttp.responseText
				$("reply_err").innerHTML=info.substr(2);
				if (info.substr(0,1)=='0') 
				{
				cancleReply();
				$("b" + replyCommentOrder).innerHTML="<span class=red>已举报</span>"
				}					
				else if (info.substr(0,1)=='8') 
				{
				reloadcode('code2');	
				}	
				//else if (info.substr(0,1)=='') 
				//{
				//$("reply_err").innerHTML="操作出错，内容可能有非法字符！";	
				//}	
				xmlhttp=null;
			}
			else{
				$("err").innerHTML=="数据处理中...";	
			}
		}
		//xmlhttp.send(null);
	break;	
	case 4:
var url='/pl_cz.asp',post='cz=5&wz_id='+wz_id+'&pl_id='+pl_id+'&username='+encodeURIComponent(encodeURIComponent($('reply_username').value))+'&code='+$('replycode').value+'&more='+encodeURIComponent(encodeURIComponent($('reply_more').value))+' ' 	
//URL='/pl_cz.asp?cz=4&wz_id='+wz_id+'&pl_id='+pl_id+'&username='+$('reply_username').value+'&code='+$('replycode').value+'&more='+$('reply_more').value+' '
	var xmlhttp = createXMLHttps();
	xmlhttp.open("POST",url,true);
	xmlhttp.setRequestHeader("Cache-Control","no-cache");
	xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=GB2312");	
	xmlhttp.send(post);	
	xmlhttp.onreadystatechange = function()
	{
		//alert(xmlhttp.responseText);
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
		{
			info=xmlhttp.responseText
			$("reply_err").innerHTML=info.substr(2);
			if (info.substr(0,1)=='0') 
			{
			hasReply=false;
			indiv('/pl_list.asp?id='+wz_id,'list');	
			$("pltop").focus();
			}
			else if (info.substr(0,1)=='4') 
			{
			alert(info.substr(2));	
			hasReply=false;
			indiv('/pl_list.asp?id='+wz_id,'list');
			$("pltop").focus();
			}			
			else if (info.substr(0,1)=='8') 
			{
			reloadcode('code2');	
			}	
			//else if (info.substr(0,1)=='') 
			//{
			//$("reply_err").innerHTML="操作出错，内容可能有非法字符！";	
			//}	
			xmlhttp=null;
	    }
		else{
			$("err").innerHTML=="数据处理中...";	
		}		
	}
	//xmlhttp.send(null);
	break;
	case 5:
var url='/pl_cz.asp',post='cz=5&wz_id='+wz_id+'&username='+encodeURIComponent(encodeURIComponent($('username').value))+'&code='+$('code').value+'&more='+encodeURIComponent(encodeURIComponent($('more').value))+' ' 
//var url='/pl_cz.asp',post='cz=5&wz_id='+wz_id+'&username='+escape($('username').value)+'&code='+$('code').value+'&more='+escape($('more').value)+' ' 
//var url='/pl_cz.asp',post='cz=5&wz_id='+wz_id+'&username='+$('username').value+'&code='+$('code').value+'&more='+$('more').value+' ' 
		var xmlhttp = createXMLHttps();
		xmlhttp.open("POST",url,true);
		xmlhttp.setRequestHeader("Cache-Control","no-cache");
		xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=GB2312");	
		xmlhttp.send(post);
		xmlhttp.onreadystatechange = function()
	   {
			//alert(xmlhttp.responseText);
			if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
			{
				info=xmlhttp.responseText
				$("err").innerHTML=info.substr(2);
				if (info.substr(0,1)=='0') 
				{
				hasReply=false;
				indiv('/pl_list.asp?id='+wz_id,'list');	
				$("pltop").focus();
				}
				else if (info.substr(0,1)=='4') 
				{
				alert(info.substr(2));	
				hasReply=false;
				indiv('/pl_list.asp?id='+wz_id,'list');
				$("pltop").focus();
				}			
				else if (info.substr(0,1)=='8') 
				{
				reloadcode('code1');	
				}	
				//else if (info.substr(0,1)=='') 
				//{
				//$("err").innerHTML="操作出错，内容可能有非法字符！";	
				//}	
				xmlhttp=null;
			}
			else{
				$("err").innerHTML=="数据处理中...";	
			}
		}
		//xmlhttp.send(null);
	break;
    }
}


function err_info(err)
{
switch(err){
case "username":
err_str="username";
break;
err_div.innerHTML = err_str;}
}

function faces(oTextarea,strText)
{
        var myField;
         myField = $(oTextarea);
        if (document.selection) {
                myField.focus();
                sel = document.selection.createRange();
                sel.text = strText;
                myField.focus();
        }
        else if (myField.selectionStart || myField.selectionStart == '0') {
                var startPos = myField.selectionStart;
                var endPos = myField.selectionEnd;
                var cursorPos = endPos;
                myField.value = myField.value.substring(0, startPos)
                                          + strText
                                          + myField.value.substring(endPos, myField.value.length);
                cursorPos += strText.length;
                myField.focus();
                myField.selectionStart = cursorPos;
                myField.selectionEnd = cursorPos;
        }
        else {
                myField.value += strText;
                myField.focus();
        } 
}

function pgjs(rpg,order,divid)
{
if($(divid))
{
    //DIVID.innerHTML = '<img border=0 src=loading.gif>'
	url='/pl_list.asp?id='+wz_id+'&Page='+rpg+' '
	if (order!='') 
	{url='/pl_list.asp?id='+wz_id+'&px='+order+'&Page='+rpg+' '}	
	var xmlhttp = createXMLHttps();
	xmlhttp.open("GET",url,true);
	xmlhttp.onreadystatechange = function()
	{
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
		{
			$(divid).innerHTML = xmlhttp.responseText;
		}
		else{
		$(divid).innerHTML=="Loading...";	
		}		
	}
	xmlhttp.send(null);
}
}

function jd_pgjs(rpg,order,divid)
{
if($(divid))
{
    //DIVID.innerHTML = '<img border=0 src=loading.gif>'
	url='/hotel/jd_pl_list.asp?id='+wz_id+'&Page='+rpg+' '
	if (order!='') 
	{url='/hotel/jd_pl_list.asp?id='+wz_id+'&px='+order+'&Page='+rpg+' '}	
	var xmlhttp = createXMLHttps();
	xmlhttp.open("GET",url,true);
	xmlhttp.onreadystatechange = function()
	{
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
		{
			$(divid).innerHTML = xmlhttp.responseText;
		}
		else{
		$(divid).innerHTML=="Loading...";	
		}		
	}
	xmlhttp.send(null);
}
}

function jd_comment()
{
//show_code();
jd_pl_cz('',5);	
//return false;
}

function jd_pl_cz(pl_id,tag)
{
switch(parseInt(tag)){
	case 1:
	indiv('/hotel/jd_pl_cz.asp?fd=d&cz=1&pl_id='+pl_id,'d'+pl_id);
	break;
	case 2:
	indiv('/hotel/jd_pl_cz.asp?fd=c&cz=2&pl_id='+pl_id,'c'+pl_id);
	break;
	case 5:
    for (var i=0;i<getobjs('hp').length;i++)
    {
     if ( getobjs('hp')[i].checked )
	 {  var hp_v=getobjs('hp')[i].value; }
    }	
var url='/hotel/jd_pl_cz.asp',post='cz=5&wz_id='+wz_id+'&username='+encodeURIComponent(encodeURIComponent($('username').value))+'&hp='+encodeURIComponent(encodeURIComponent(hp_v))+'&more='+encodeURIComponent(encodeURIComponent($('more').value))+' ' 
		var xmlhttp = createXMLHttps();
		xmlhttp.open("POST",url,true);
		xmlhttp.setRequestHeader("Cache-Control","no-cache");
		xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=GB2312");	
		xmlhttp.send(post);
		xmlhttp.onreadystatechange = function()
	   {
			//alert(xmlhttp.responseText);
			if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
			{
				info=xmlhttp.responseText
				$("err").innerHTML=info.substr(2);
				if (info.substr(0,1)=='0') 
				{
				indiv('/hotel/jd_pl_list.asp?id='+wz_id,'list');	
				$("pltop").focus();
				}
				else if (info.substr(0,1)=='4') 
				{
				alert(info.substr(2));	
				indiv('/hotel/jd_pl_list.asp?id='+wz_id,'list');
				$("pltop").focus();
				}			
				//else if (info.substr(0,1)=='8') 
				//{
				//reloadcode('code1');	
				//}	
				//else if (info.substr(0,1)=='') 
				//{
				//$("err").innerHTML="操作出错，内容可能有非法字符！";	
				//}	
				xmlhttp=null;
			}
			else{
				$("err").innerHTML=="数据处理中...";	
			}
		}
		//xmlhttp.send(null);
	break;
    }

}

//--------------------------------------------cy
function cy_pgjs(rpg,order,divid)
{
if($(divid))
{
    //DIVID.innerHTML = '<img border=0 src=loading.gif>'
	url='/restaurant/cy_pl_list.asp?id='+wz_id+'&Page='+rpg+' '
	if (order!='') 
	{url='/restaurant/cy_pl_list.asp?id='+wz_id+'&px='+order+'&Page='+rpg+' '}	
	var xmlhttp = createXMLHttps();
	xmlhttp.open("GET",url,true);
	xmlhttp.onreadystatechange = function()
	{
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
		{
			$(divid).innerHTML = xmlhttp.responseText;
		}
		else{
		$(divid).innerHTML=="Loading...";	
		}		
	}
	xmlhttp.send(null);
}
}

function cy_comment()
{
//show_code();
cy_pl_cz('',5);	
//return false;
}

function cy_pl_cz(pl_id,tag)
{
switch(parseInt(tag)){
	case 1:
	indiv('/restaurant/cy_pl_cz.asp?fd=d&cz=1&pl_id='+pl_id,'d'+pl_id);
	break;
	case 2:
	indiv('/restaurant/cy_pl_cz.asp?fd=c&cz=2&pl_id='+pl_id,'c'+pl_id);
	break;
	case 5:
    for (var i=0;i<getobjs('hp').length;i++)
    {
     if ( getobjs('hp')[i].checked )
	 {  var hp_v=getobjs('hp')[i].value; }
    }	
    for (var i=0;i<getobjs('dp_kw').length;i++)
    {
     if ( getobjs('dp_kw')[i].checked )
	 {  var dp_kw=getobjs('dp_kw')[i].value; }
    }
    for (var i=0;i<getobjs('dp_hj').length;i++)
    {
     if ( getobjs('dp_hj')[i].checked )
	 {  var dp_hj=getobjs('dp_hj')[i].value; }
    }
    for (var i=0;i<getobjs('dp_fw').length;i++)
    {
     if ( getobjs('dp_fw')[i].checked )
	 {  var dp_fw=getobjs('dp_fw')[i].value; }
    }	
var url='/restaurant/cy_pl_cz.asp',post='cz=5&wz_id='+wz_id+'&username='+encodeURIComponent(encodeURIComponent($('username').value))+'&dp_rjxf='+encodeURIComponent(encodeURIComponent($('dp_rjxf').value))+'&hp='+encodeURIComponent(encodeURIComponent(hp_v))+'&dp_kw='+encodeURIComponent(encodeURIComponent(dp_kw))+'&dp_hj='+encodeURIComponent(encodeURIComponent(dp_hj))+'&dp_fw='+encodeURIComponent(encodeURIComponent(dp_fw))+'&more='+encodeURIComponent(encodeURIComponent($('more').value))+' ' 
		var xmlhttp = createXMLHttps();
		xmlhttp.open("POST",url,true);
		xmlhttp.setRequestHeader("Cache-Control","no-cache");
		xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=GB2312");	
		xmlhttp.send(post);
		xmlhttp.onreadystatechange = function()
	   {
			//alert(xmlhttp.responseText);
			if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
			{
				info=xmlhttp.responseText
				$("err").innerHTML=info.substr(2);
				if (info.substr(0,1)=='0') 
				{
				indiv('/restaurant/cy_pl_list.asp?id='+wz_id,'list');	
				$("pltop").focus();
				}
				else if (info.substr(0,1)=='4') 
				{
				alert(info.substr(2));	
				indiv('/restaurant/cy_pl_list.asp?id='+wz_id,'list');
				$("pltop").focus();
				}			
				//else if (info.substr(0,1)=='8') 
				//{
				//reloadcode('code1');	
				//}	
				//else if (info.substr(0,1)=='') 
				//{
				//$("err").innerHTML="操作出错，内容可能有非法字符！";	
				//}	
				xmlhttp=null;
			}
			else{
				$("err").innerHTML=="数据处理中...";	
			}
		}
		//xmlhttp.send(null);
	break;
    }

}
//--------------------------------------------wm
function wm_pgjs(rpg,order,divid)
{
if($(divid))
{
    //DIVID.innerHTML = '<img border=0 src=loading.gif>'
	url='/wm_pl_list.asp?id='+wz_id+'&Page='+rpg+' '
	if (order!='') 
	{url='/wm_pl_list.asp?id='+wz_id+'&px='+order+'&Page='+rpg+' '}	
	var xmlhttp = createXMLHttps();
	xmlhttp.open("GET",url,true);
	xmlhttp.onreadystatechange = function()
	{
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
		{
			$(divid).innerHTML = xmlhttp.responseText;
		}
		else{
		$(divid).innerHTML=="Loading...";	
		}		
	}
	xmlhttp.send(null);
}
}

function wm_comment()
{
//show_code();
wm_pl_cz('',5);	
//return false;
}

function wm_pl_cz(pl_id,tag)
{
switch(parseInt(tag)){
	case 1:
	indiv('/wm_pl_cz.asp?fd=d&cz=1&pl_id='+pl_id,'d'+pl_id);
	break;
	case 2:
	indiv('/wm_pl_cz.asp?fd=c&cz=2&pl_id='+pl_id,'c'+pl_id);
	break;
	case 5:
//    for (var i=0;i<getobjs('hp').length;i++)
//    {
//     if ( getobjs('hp')[i].checked )
//	 {  var hp_v=getobjs('hp')[i].value; }
//    }	
//    for (var i=0;i<getobjs('dp_kw').length;i++)
//    {
//     if ( getobjs('dp_kw')[i].checked )
//	 {  var dp_kw=getobjs('dp_kw')[i].value; }
//    }
//    for (var i=0;i<getobjs('dp_sd').length;i++)
//    {
//     if ( getobjs('dp_sd')[i].checked )
//	 {  var dp_sd=getobjs('dp_sd')[i].value; }
//    }
//    for (var i=0;i<getobjs('dp_fw').length;i++)
//    {
//     if ( getobjs('dp_fw')[i].checked )
//	 {  var dp_fw=getobjs('dp_fw')[i].value; }
 //   }	
//var url='/wm_pl_cz.asp',post='cz=5&wz_id='+wz_id+'&username='+encodeURIComponent(encodeURIComponent($('username').value))+'&hp='+encodeURIComponent(encodeURIComponent(hp_v))+'&dp_kw='+encodeURIComponent(encodeURIComponent(dp_kw))+'&dp_sd='+encodeURIComponent(encodeURIComponent(dp_sd))+'&dp_fw='+encodeURIComponent(encodeURIComponent(dp_fw))+'&more='+encodeURIComponent(encodeURIComponent($('more').value))+' ' 
var url='/wm_pl_cz.asp',post='cz=5&wz_id='+wz_id+'&username='+encodeURIComponent(encodeURIComponent($('username').value))+'&more='+encodeURIComponent(encodeURIComponent($('more').value))+' ' 
		var xmlhttp = createXMLHttps();
		xmlhttp.open("POST",url,true);
		xmlhttp.setRequestHeader("Cache-Control","no-cache");
		xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=GB2312");	
		xmlhttp.send(post);
		xmlhttp.onreadystatechange = function()
	   {
			//alert(xmlhttp.responseText);
			if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
			{
				info=xmlhttp.responseText
				$("err").innerHTML=info.substr(2);
				if (info.substr(0,1)=='0') 
				{
				indiv('/wm_pl_list.asp?id='+wz_id,'list');	
				$("pltop").focus();
				}
				else if (info.substr(0,1)=='4') 
				{
				alert(info.substr(2));	
				indiv('/wm_pl_list.asp?id='+wz_id,'list');
				$("pltop").focus();
				}			
				//else if (info.substr(0,1)=='8') 
				//{
				//reloadcode('code1');	
				//}	
				//else if (info.substr(0,1)=='') 
				//{
				//$("err").innerHTML="操作出错，内容可能有非法字符！";	
				//}	
				xmlhttp=null;
			}
			else{
				$("err").innerHTML=="数据处理中...";	
			}
		}
		//xmlhttp.send(null);
	break;
    }

}
