function DecodeCookie(str){
	if(str==null){return null}
	var strArr;
	var strRtn="";
	strArr=str.split("a");
	for (var i=strArr.length-1;i>=0;i--)
	strRtn+=String.fromCharCode(eval(strArr[i]));
	return strRtn;
}
function GetCookie(sMainName, sSubName){
	var sCookieName = sMainName + "=";
	var sSubCookieName = (sSubName) ? sSubName + "=" : null;
	var sCookie;
	var sWholeCookie = document.cookie;
	var nValueBegin = sWholeCookie.indexOf(sCookieName);
	if(nValueBegin != -1){
	var nValueEnd = sWholeCookie.indexOf(";", nValueBegin);
	if (nValueEnd == -1) nValueEnd = sWholeCookie.length;
	var sValue = sWholeCookie.substring(nValueBegin + sCookieName.length, nValueEnd);
	if(sSubCookieName){
	var nSubValueBegin = sValue.indexOf(sSubCookieName);
	if(nSubValueBegin != -1){
	var nSubValueEnd = sValue.indexOf("&", nSubValueBegin);
	if(nSubValueEnd == -1) nSubValueEnd = sValue.length;
	var sSubValue = sValue.substring(nSubValueBegin + sSubCookieName.length, nSubValueEnd);
	return unescape(sSubValue);}}
	if(!sSubCookieName) return unescape(sValue);}
	return null;
}
function $(v){ return(document.getElementById(v)); }
function $S(v){ return($(v).style); }
function agent(v){ return(Math.max(navigator.userAgent.toLowerCase().indexOf(v),0)); }
function isset(v){ return((typeof(v)=='undefined' || v.length==0)?false:true); }
function winxy(v){ var z=agent('msie')?Array(document.body.scrollHeight,document.body.scrollWidth):Array(window.innerHeight,window.innerWidth); return(isset(v)?z[v]:z); }
function logend(){ $S('logbg').display='none'; $S('logdiv').display='none'; }
function logdiv(t,v,b){
	$S('logbg').width=winxy(1)+'px';
	$S('logbg').height=winxy(0)+'px';
	$S('logbg').display='block';
	$('logdiv').innerHTML="<div class=logtitle><span>"+t+"</span><a href=\"\" onclick=\"logend();return false\">×</a></div><div class=logtext>"+v+"</div><div class=logbottom><input type=button class=logexit onclick=\"logend()\" value=\"确 定\" />"+"</div>"; 
	$S('logdiv').left=Math.round((winxy(1)-b)/2)+'px'; 
	$S('logdiv').width=b+'px';
	$S('logdiv').top=(document.body.scrollTop+document.documentElement.scrollTop)+(window.screen.availHeight/2-150)+'px';
	$S('logdiv').display='block';
}
function avals(obj){
	var __c = document.cookie;
	var __b = false;
	var __s = __c.indexOf('INDI');
	if(__s>-1){var __a = __c.match(/USERNAME=.[^&]+/);if(__a!=null){__b=true;}}
	//if(!__b){__s = __c.indexOf('COMP');if(__s>-1){var __a = __c.match(/refresh=.[^&]+/);if(__a!=null){__b=true;}}}
	var d_id = obj.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.getAttribute("id").replace("fl_","");
	var d_ids = "";
	var idval = d_id;
	if (d_id == "m" || d_id == "n"){
		for(var i=0;i<document.form1.onid.length;i++){if(document.form1.onid[i].checked){ d_ids += document.form1.onid[i].value + 'A'; }}
		if (d_ids == ""){alert("请先选中需要留言的项目！");return false;}else{idval = d_ids}
	}
	checkBox.hiddenFlaotDiv();//清除浮动框
	var str = obj.innerHTML.replace("·","");
	if(__b){
		ajax.get("http://search.jmw.com.cn/gbook_s.asp?id="+idval+"&content="+str,function(objs){
		if (objs.responseText == "err"){window.open("http://search.jmw.com.cn/signin.asp?id="+idval+"&content="+escape(str));}
		else{logdiv('提示信息',DecodeCookie(objs.responseText),'320');}
		});
		hide_menu("fl_" + d_id);
	}else{window.open("http://search.jmw.com.cn/signin.asp?id="+idval+"&content="+escape(str))};
}
function show_menu(obj){
	$S(obj).display = "block";}
function hide_menu(obj){$S(obj).display = "none";}
function CheckAll(){
	var length = document.form1.elements.length;
	var tocheck = document.form1.allbox.checked;
	for (var i=0; i<length; i++){if(document.form1.elements[i].name.indexOf("onid") != -1){document.form1.elements[i].checked = tocheck;}}
}
function show_menus(obj,pp){
	var show = sendstr;
	var restr = "“" + pp + "”";
	if (pp == ""){restr = "此项目"}
	show = show.replace(/\*/g,restr);
	if (coknum>0){show = show.replace(/\@/g,cokaaa.substring(0,coknum));
	}else{show = show.replace(/\@/g,"我所在的地区");}
	$(obj).innerHTML = show;
	$S(obj).display = "";
}
var sendstr = '<iframe style="position:absolute;z-index:-1;width:e-xpression(this.nextSibling.offsetWidth);height:e-xpression(this.nextSibling.offsetHeight);top:e-xpression(this.nextSibling.offsetTop);left:e-xpression(this.nextSibling.offsetLeft);" frameborder=0></iframe><table width="100%" border=0 cellspacing=0 cellpadding=0><tr><td><ul class="vsv"><li class="tle">最近几天（8.22-8.23)网站DNS正在调整中，可能会出现网站无法访问或内容无法正常显示，给您带来不便，请您谅解。中国加盟网全体员工感谢您对我们一直以来的关注与支持，我们将继续努力完善我们的平台，力争为您提供更便捷、更专业的服务！</li></ul></td></tr></table>';
var cokaaa = DecodeCookie(GetCookie("INDI","ADDRES"));
var coknum = -1;
if (cokaaa!=null){
	coknum = cokaaa.indexOf("县")+1;
	if(coknum<=0){coknum = cokaaa.indexOf("区")+1;}
	if(coknum<=0){coknum = cokaaa.indexOf("市")+1;}
	if(coknum<=0){coknum = cokaaa.indexOf("省")+1;}
}
var toptitle = "<table width=\"100%\" border=0 cellspacing=0 cellpadding=0 class=sb1><tr><td width=10></td><td width=20 align=center><img src=http://search.jmw.com.cn/sig_img/search_61.gif /></td><td width=116><div style=\"position:relative; z-index:70\"><a href=\"\" onmouseover=\"show_menus('fl_m','')\" onmouseout=\"hide_menu('fl_m')\" onclick=\"return false\"><img src=\"http://search.jmw.com.cn/sig_img/but1.gif\" border=\"0\" /></a><div id=\"fl_m\" onmouseover=\"show_menu('fl_m')\" onmouseout=\"hide_menu('fl_m')\" style=\"display:none; top:19px\" class=comslen></div></div></td><td width=20 align=center><img src=\"http://search.jmw.com.cn/sig_img/search_61.gif\" /></td><td width=116><a href=\"\" class=a1 onclick=\"actCheckbox();return false\"><img src=\"http://search.jmw.com.cn/sig_img/but2.gif\" border=0 /></a></td><td><img src=http://search.jmw.com.cn/images/ctop.gif /> <a href=\"http://www.jmw.com.cn/gywm/1gsgk-lxwm.htm#1\" target=\"_blank\" class=\"a1\">如何让自己的信息排名靠前？</a></td><td width=70 align=center>投资金额</td><td width=70 align=center>门店数量</td><td width=70>综合指数</td></tr></table><table width=\"100%\" border=0 cellspacing=0 cellpadding=0><tr><td height=3 bgcolor=#0d76cc></td></tr></table>"
var toptitles = "<table width=\"100%\" border=0 cellspacing=0 cellpadding=0 class=sb2><tr><td width=10></td><td width=20 align=center><img src=http://search.jmw.com.cn/sig_img/search_61.gif /></td><td width=116><div style=\"position:relative; z-index:70\"><a href=\"\" onmouseover=\"show_menus('fl_m','')\" onmouseout=\"hide_menu('fl_m')\" onclick=\"return false\"><img src=\"http://search.jmw.com.cn/sig_img/but1.gif\" border=\"0\" /></a><div id=\"fl_m\" onmouseover=\"show_menu('fl_m')\" onmouseout=\"hide_menu('fl_m')\" style=\"display:none; top:19px\" class=comslen></div></div></td><td width=20 align=center><img src=\"http://search.jmw.com.cn/sig_img/search_61.gif\" /></td><td width=116><a href=\"\" class=a1 onclick=\"actCheckbox();return false\"><img src=\"http://search.jmw.com.cn/sig_img/but2.gif\" border=0 /></a></td><td width=150> </td><td width=60 align=center valign=bottom>投资金额</td><td width=70 align=center valign=bottom>门店数量</td><td width=70 valign=bottom>综合指数</td></tr></table><table width=\"100%\" border=0 cellspacing=0 cellpadding=0><tr><td height=3 bgcolor=#0d76cc></td></tr></table>"
