//禁止框架
if (frames) {
	if(top.frames.length>0)		top.location.href = self.location;
}
if (top.location !== self.location) {
    top.location = self.location;
}

//将rel=external的超连接改为新开窗口
window.onload = externallinks;
function externallinks() {
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a");
	for (var i=0; i<anchors.length; i++) {
		var anchor = anchors[i];
		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external")
			anchor.target = "_blank";
	}
}

//网络书签
function addfavorite() {
	var title=top.window.document.title;
	var url=top.window.location.href;
	try {
		window.external.addFavorite(url, title);
	}
	catch (e) {
		try {
			window.external.addToFavoritesBar(url, title);
		}
		catch (e) {
			try {
				window.sidebar.addPanel(title, url, "");
			}
			catch (e) {
				alert("请直接在键盘上按 “Ctrl+D” 将本页保存到您的收藏夹。");
			}
		}
	}
}
function bookmark() {
	var wzt=encodeURIComponent(document.title);
	var wztb=escape(document.title);
	var wzu=encodeURIComponent(document.location.href);
	var wzub=escape(document.location.href);
	//var desc=document.getElementById('description');
	//var t=desc.getAttribute('content');
	var desc='';
	var t='';
	var wzd=encodeURIComponent(t);
	var wzdb=escape(t);
	var title=document.title;
	var sc=document.location.href;
	var wzi=" target='_blank'><img src='images/bookmark/";
	document.writeln("加入收藏：<a href='javascript:addfavorite();' alt='加入电脑收藏夹' title='加入电脑收藏夹' target='_self'><img src='images/bookmark/ie.gif' />电脑收藏夹</a>");
	document.writeln("&nbsp;<a href='http://shuqian.qq.com/post?title="+wzt+"&uri="+wzu+"&from=3&jumpback=2&noui=1' alt='收藏到QQ书签' title='收藏到QQ书签'"+wzi+"qq.gif' />QQ书签</a>");
	document.writeln("&nbsp;<a href='http://cang.baidu.com/do/add?iu="+wzu+"&it="+wzt+"&dc="+wzd+"&fr=ien#nw=1' alt='收藏到百度搜藏' title='收藏到百度搜藏'"+wzi+"baidu.gif' />百度搜藏</a>");
	document.writeln("&nbsp;<a href='http://www.google.com/bookmarks/mark?op=add&bkmk="+wzu+"&title="+wzt+"&annotation="+wzd+"' alt='收藏到Google书签' title='收藏到Google书签'"+wzi+"google.gif' />Google书签</a>");
	document.writeln("&nbsp;<a href='https://favorites.live.com/quickadd.aspx?marklet=1&mkt=en-us&url="+wzub+"&t="+wztb+"' alt='收藏到Live书签' title='收藏到Live书签'"+wzi+"live.gif' />Live书签</a>");
	document.writeln("&nbsp;<a href=http://vivi.sina.com.cn/collect/icollect.php?pid=2008&url="+wzub+"&title="+wztb+"' alt='收藏到新浪ViVi' title='收藏到新浪ViVi'"+wzi+"vivi.gif' />新浪ViVi</a>");
	document.writeln("<a href='http://fav.115.com/?ac=add&title="+wzt+"&url="+wzu+"'"+wzi+"115.gif' alt='分享到115收藏' title='分享到115收藏'>115收藏</a><br />");
	document.writeln("一键转播：<a href='http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url="+wzu+"' alt='分享到QQ空间' title='分享到QQ空间'"+wzi+"qqzone.gif' />QQ空间</a>");
	document.writeln("&nbsp;<a href='http://share.renren.com/share/buttonshare.do?link="+wzu+"&title="+wzt+"' alt='分享到人人网' title='分享到人人网'"+wzi+"renren.gif' />人人网</a>");
	document.writeln("&nbsp;<a href='http://www.kaixin001.com/repaste/share.php?rurl="+wzu+"&rcontent="+wzu+"&rtitle="+wzt+"' alt='分享到开心网' title='分享到开心网'"+wzi+"kaixin.gif' />开心网</a>");
	document.writeln("&nbsp;<a href='http://www.douban.com/recommend/?url="+wzu+"&title="+wzt+"' alt='分享到豆瓣' title='分享到豆瓣'"+wzi+"douban.gif' />豆瓣网</a>");
	document.writeln("&nbsp;<a href='http://v.t.qq.com/share/share.php?url="+wzu+"&title="+wzt+"&appkey=' alt='转播到腾讯微博' title='转播到腾讯微博'"+wzi+"qqtw.gif' />腾讯微博</a>");
	document.writeln("&nbsp;<a href='http://v.t.sina.com.cn/share/share.php?url="+wzu+"&title="+wzt+"' alt='转帖到新浪微博' title='转帖到新浪微博'"+wzi+"sina.gif' />新浪微博</a>");
	document.writeln("&nbsp;<a href='http://apps.hi.baidu.com/share/?url="+wzu+"&title="+wzt+"' alt='转帖到百度空间' title='转帖到百度空间'"+wzi+"baiduhi.gif' />百度空间</a>");
	document.writeln("<a href='http://bai.sohu.com/share/blank/add.do?link="+wzu+"' alt='分享到搜狐白社会' title='分享到搜狐白社会'"+wzi+"sohu.gif' />搜狐白社会</a>");
}

function counter() {
	//document.write('<script language="javascript" type="text/javascript" src="http://js.users.51.la/317521.js"></script>');
	document.write('<script src="http://s9.cnzz.com/stat.php?id=2179332&web_id=2179332" language="javascript"></script>');
}

function showBanner() {
	var banner = new Array();
	banner[0] = "<a href=\"http://www.halove.net/ming/\">世纪算命网 — 完全免费的在线算命网<br />抽签、改运、看相、合婚、起名、测字、风水、星座、择吉等<br />超准的爱情缘分算命，属相配对，月老灵签<\/a>";
	banner[1] = "<a href=\"http://www.pfhome.com/\">民间偏方大全 — 提供各种民间秘方，中医名方，中药验方，小偏方<br />减肥偏方，美容偏方，咳嗽偏方，鼻炎偏方，牛皮癣偏方，止咳偏方，牙疼偏方<br />感冒偏方，咳嗽偏方，痔疮偏方，糖尿病偏方，生发偏方，冻疮偏方，高血压偏方，胃病偏方，便秘偏方等<\/a>";
	var showId_banner = Math.floor(Math.random() * 2);
	document.write(""+banner[showId_banner]+"");
}
function showSide() {
	document.writeln("公　　告<br />　　 本站没有任何弹出窗口广告。如果您访问本站时出现弹窗，请联系您的宽带接入商解决或者Google一下原因。<br /><br />世纪算命网　备用域名<br />　　 在地址栏输入 <a href=\"http://www.m2100.com/\">www.m2100.com<\/a> 可直接进入。");
}
