//js获取cookie
var acookie=document.cookie.split("; ");
function getck(sname)
{//获取单个cookies
for(var i=0;i<acookie.length;i++){
var arr=acookie[i].split("=");
if(sname==arr[1]){
if(arr.length>1)
return unescape(arr[2]);
else
return "";
}}
return "";
}
var user=getck("UserName");
document.write("<table align=center width=760><tr><td><a href=http:\/\/www.365xinxi.net><img src=http:\/\/www.365xinxi.net\/images\/logo.gif alt=新乡信息网 width=190 height=67 border=0><\/a><\/td><td><div id=tool1 class=topmenu><ul><li><a href=http:\/\/www.365xinxi.net>网站首页<\/a><\/li><li><a href=http:\/\/www.365xinxi.net\/search.aspx>信息搜索<\/a><\/li><li><a href=http:\/\/www.365xinxi.net\/addinfor.html>游客发信息<\/a><\/li><li><a href=http:\/\/qiye.365xinxi.net\/>商家企业<\/a><\/li><li><a href=http:\/\/www.365xinxi.net\/citymap.html>新乡地图<\/a><\/li><li><a href=http:\/\/www.365xinxi.net\/guanggao.htm target=_blank>广告垂询<\/a><\/li><\/ul><\/div><div id=tool2>");
document.write("<a href=http:\/\/www.365xinxi.net\/ad1\/index.html target=_blank><img src=http:\/\/www.365xinxi.net\/ad1\/pate.gif border=0><\/a>");
document.write("<\/div><form id=SearchForm name=SearchForm method=get onsubmit='return search();' action=http:\/\/www.365xinxi.net\/i_search.aspx>搜索:<input id=keyword maxlength=16 name=keyword size=16> <select name=c1 id=c1><option value=0>所有类别</option><option value=10>房屋租售</option><option value=9>求职招聘</option><option value=2>电脑数码</option><option value=7>车辆交易</option><option value=3>生活家居</option><option value=4>商品买卖</option><option value=6>教育培训</option><option value=5>酒店餐饮</option><option value=8>工业机械</option></select> <input type=submit value=搜索> <\/form> ");
if(user!="")
	document.write("您好! <a href=http:\/\/www.365xinxi.net\/u_panel.aspx>"+user+"<\/a> <a href=http:\/\/www.365xinxi.net\/u_logout.aspx>退出<\/a>");
else
	document.write("<a href=http:\/\/www.365xinxi.net\/u_login.html>登录<\/a> <a href=http:\/\/www.365xinxi.net\/u_reg.aspx>注册<\/a> <a href=http:\/\/www.365xinxi.net\/u_panel.aspx>用户中心<\/a>");
document.write(" <a title=收藏此页面 href=javascript:window.external.AddFavorite(location.href,document.title)>收藏<\/a> <a href=http:\/\/www.365xinxi.net\/help.html target=_blank>帮助<\/a> <a href=http:\/\/www.365xinxi.net\/s_book.aspx target=_blank>留言<\/a><\/td><\/tr>");
document.write("<tr><td colspan=2><a href=http:\/\/www.0373ad.com target=_blank><img border=0 src=http:\/\/www.365xinxi.net\/images\/ad1.gif><\/a><a href=http:\/\/www.365xinxi.net\/infor\/201008\/155502.html target=_blank><img border=0 src=http:\/\/www.365xinxi.net\/images\/ad2.gif><\/a><\/td><\/tr><\/table>");

function addfavor()
{
	if (event.button==2)
	{window.external.addFavorite('http://www.365xinxi.net','新乡信息网——使您生活更方便!')}
}
//搜索框代码
function search(domain)
{
	if(SearchForm.keyword.value==""){
		window.alert("请输入搜索关键字！");
		SearchForm.keyword.focus();
		return false;
	}
	return true;
}
//i_show页面
function searchmobile(tel)
{
	if(tel==""||tel==null)
	tel=document.getElementById("tel").value;
	if(!(/^1[3|5|8][0-9]\d{4,8}$/.test(tel))){
	alert("不是正确的11位手机号或者正确的手机号前七位");
	return false;}
	searchurl="../../chkmobile.aspx?tel="+tel;
	window.open(searchurl,"mobilewindow", "height=300,width=490,status=yes,toolbar=no,menubar=no,location=no,left="+(window.screen.width-490)/2+",top="+(window.screen.height-400)/2);
}

function checktel(tel)
{
	if(tel==""||tel==null)
	tel=document.getElementById("tel").value;
	chkurl="http://www.365xinxi.net/checktel.aspx?tel="+tel;
	window.open(chkurl,'','');
}
function upinfor()
{
	document.upform.style.display="";
	document.getElementById("upbut").style.display="none";
	document.upform.pass.focus();
}
function checkuppass()
{
	if(trim(upform.pass.value)=="")
	{alert('请输入管理密码！');
	upform.pass.focus();
	return false;}
	document.upform.submit();
}
function chkreply()
{
	content=trim(RForm.Rcontent.value);
	if(content==""||content=="请文明上网，礼貌发帖")
	{alert('请输入回复内容！');
	RForm.Rcontent.focus();
	return false;}
	if(content.length>200)
	{alert('回复内容不能超过100个字符！');
	return false;}
	
	RForm.Button1.disabled=true;
	RForm.Button1.value="提交中,请稍候...";
}
function chkcontent()
{
	con=trim(RForm.Rcontent.value);
	if(con=="请文明上网，礼貌发帖")
	{RForm.Rcontent.value="";}
	RForm.Rcontent.style.color="black";
}
function showtip()
{
	con=trim(RForm.Rcontent.value);
	if(con=="")
	{RForm.Rcontent.value="请文明上网，礼貌发帖";
	RForm.Rcontent.select();}
}
function copytext()
{
	src="";
	content=document.selection.createRange().text;
	if(content.length>30)
	src="(来源:新乡信息网www.365xinxi.net)";
	c1=content.substring(0,content.length/2);
	c2=content.substring(content.length/2,content.length);
	content=c1+src+c2;
	window.clipboardData.setData("Text",content);
}
function copyURL()
{
	url=window.location.href;
	window.clipboardData.setData("Text",url);
	alert("复制成功，您可以通过QQ/MSN将本信息网址发给好友");
}
function trim(s)//去前后空格
{
	s=s.replace( /^\s*/, "");
	s=s.replace( /\s*$/, "");
	return s;
}
function FontSize(fsize)
{
	var ctext = document.getElementById("scontent");
	var rtext=document.getElementById("sreply");
	ctext.style.fontSize = fsize +"px";
	rtext.style.fontSize=fsize+"px";
}
function lshow(t)//首页top10
{
var p=t.parentNode;
var a=0;
	for (var i=0; i<p.childNodes.length; i++){if(t.background == p.childNodes[i].background)a++;}
	if(a==1)return;
	for (var i=0; i<p.childNodes.length; i++)
	{
		p.childNodes[i].style.background = '';
		if(p.childNodes[i].id != '' && document.getElementById('s_' + p.childNodes[i].id)){document.getElementById('s_' + p.childNodes[i].id).style.display='none';}
	}
	t.style.background='white';
	document.getElementById('s_' + t.id).style.display='';
}
function sendmsg(sendname)
{
	url="http://www.365xinxi.net/m_send.aspx?name="+sendname;
	window.open(url, "","height=350,width=450,status=yes,toolbar=no,menubar=no,location=no,left="+(window.screen.width-350)/2+",top="+(window.screen.height-550)/2)
}
function showmenu(tel)//手机提示菜单
{
var timer;
var d=document.createElement("DIV")
d.onmouseover=function(){clearTimeout(timer)}
d.onmouseout=function(){timer=setTimeout(function(){d.style.display='none';},100);};
event.srcElement.onmouseout=function(){timer=setTimeout(function(){d.style.display='none';},1000);};
d.style.width="100px";
d.style.height="50px";
d.style.padding="5px";
d.style.background="white";
d.innerHTML="<a href=javascript:searchmobile("+tel+")>手机归属查询</a><br><a href=javascript:checktel("+tel+")>已发信息查询</a>";
d.style.border="solid 1px #99CCFF";
d.style.position="absolute";
	popWidth=d.clientWidth;
	popHeight=d.clientHeight;
	if(event.x+12+popWidth>document.body.clientWidth) popLeftAdjust=-popWidth-24
		else popLeftAdjust=0;
	if(event.y+12+popHeight>document.body.clientHeight) popTopAdjust=-popHeight-24
		else popTopAdjust=0;
	d.style.left=event.x+document.body.scrollLeft+popLeftAdjust;
	d.style.top=event.y+12+document.body.scrollTop+popTopAdjust;
document.body.insertBefore(d);
}