
var isIE = (document.all && document.getElementById && !window.opera) ? true : false;
var isMozilla = (!document.all && document.getElementById && !window.opera) ? true : false;
var isOpera = (window.opera) ? true : false;
var seturl = 'url(#default#homepage)';var xtwebu = window.location.href;var webname = document.title;
var title=document.title;if(title.indexOf("_")!=-1){title=title.substring(0,title.indexOf("_"));}
var dbs=0;var s=0;
function ResumeError() {return true;}
//window.onerror = ResumeError;



function fv(){
	var html="&nbsp;<b>分享到微博：</b>\r\n";
	html +="<a href=\"javascript:addfavorite();\" target=_self><img src=\"http://img.kanshu.la/fx/favicon.gif\" width=\"15\" height=\"15\" align=\"absmiddle\" title=\"收藏本文到IE收藏夹\" />";
	html +="<a href=\"javascript:void(window.open('http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url='+encodeURIComponent(document.location.href)));\" title=\"分享本文到QQ空间\"><img src=\"http://img.kanshu.la/fx/qzone.png\" align=\"absmiddle\" alt=\"分享到QQ空间\" /></a>";
	html +="<a href=\"javascript:window.open('http://shuqian.qq.com/post?from=3&title='+encodeURIComponent(title)+'&uri='+encodeURIComponent(document.location.href)+'&jumpback=2&noui=1','favit','width=700,height=480,left=50,top=50,toolbar=no,menubar=no,location=no,scrollbars=yes,status=yes,resizable=yes');void(0)\" target=\"_self\"><img src=\"http://img.kanshu.la/fx/qq.gif\" width=\"15\" height=\"15\" border=\"0\" align=\"absmiddle\" alt=\"收藏本文到QQ收藏夹\" /></a>";
	html +="<a href=\"javascript:window.open('http://cang.baidu.com/do/add?it='+encodeURIComponent(title)+'&iu='+encodeURIComponent(document.location.href)+'&fr=ien#nw=1','_blank','scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes');void(0)\" target=\"_self\"><img src=\"http://img.kanshu.la/fx/baidu.gif\" width=\"15\" height=\"15\" border=\"0\" align=\"absmiddle\" alt=\"收藏本文到百度收藏夹\" /></a>";
	html +="<a href=\"javascript:window.open('http://www.google.com/bookmarks/mark?op=add&bkmk='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(title),'_blank','scrollbars=no,width=680,height=450,left=75,top=20,status=no,resizable=yes');void(0)\" target=\"_self\"><img src=\"http://img.kanshu.la/fx/google.gif\" width=\"15\" height=\"15\" border=\"0\" align=\"absmiddle\" alt=\"收藏本文到GOOGLE收藏夹\" /></a>";
	html +="<a href=\"javascript:void(function(){var d=document,e=encodeURIComponent,s1=window.getSelection,s2=d.getSelection,s3=d.selection,s=s1?s1():s2?s2():s3?s3.createRange().text:'',r='http://www.douban.com/recommend/?url='+e(d.location.href)+'&title='+e(d.title)+'&sel='+e(s)+'&v=1',x=function(){if(!window.open(r,'douban','toolbar=0,resizable=1,scrollbars=yes,status=1,width=450,height=330'))location.href=r+'&r=1'};if(/Firefox/.test(navigator.userAgent)){setTimeout(x,0)}else{x()}})()\"><img src=\"http://img.kanshu.la/fx/douban.gif\" width=\"15\" height=\"15\" border=\"0\" align=\"absmiddle\" alt=\"推荐到豆瓣\" /></a>";
	html +="<a href=\"javascript:void((function(s,d,e){if(/renren\.com/.test(d.location))return;var f='http://share.renren.com/share/buttonshare?link=',u=d.location,l=d.title,p=[e(u),'&title=',e(l)].join('');function%20a(){if(!window.open([f,p].join(''),'xnshare',['toolbar=0,status=0,resizable=1,width=626,height=436,left=',(s.width-626)/2,',top=',(s.height-436)/2].join('')))u.href=[f,p].join('');};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else%20a();})(screen,document,encodeURIComponent));\"><img src=\"http://img.kanshu.la/fx/renren.gif\" width=\"15\" height=\"15\" border=\"0\" align=\"absmiddle\" alt=\"分享到人人\"/></a>";
	html +="<a href=\"javascript:void((function(s,d,e,r,l,p,t,z,c){var%20f='http://v.t.sina.com.cn/share/share.php?appkey=2924220432',u=z||d.location,p=['&url=',e(u),'&title=',e(t||d.title),'&source=',e(r),'&sourceUrl=',e(l),'&content=',c||'gb2312','&pic=',e(p||'')].join('');function%20a(){if(!window.open([f,p].join(''),'mb',['toolbar=0,status=0,resizable=1,width=440,height=430,left=',(s.width-440)/2,',top=',(s.height-430)/2].join('')))u.href=[f,p].join('');};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else%20a();})(screen,document,encodeURIComponent,'','','','','',''));\"><img src=\"http://img.kanshu.la/fx/sina.gif\" width=\"15\" height=\"15\" border=\"0\" align=\"absmiddle\" alt=\"分享到新浪微博\" style=\"width:15px;\" /></a>";
	document.write(html);
}

//加入收藏夹
function addfavorite() {
    if (isMozilla) {
        if (document.all) { window.external.addFavorite(xtwebu, webname); }
        else if (window.sidebar) { window.sidebar.addPanel(webname, xtwebu, ""); }
    }
    if (isIE) { window.external.AddFavorite(xtwebu, webname); }
}

//复制链接
function copyURL(){
	copyToClipboard(xtwebu + "\n" + webname);
	alert("复制成功,请粘贴发给好友!");
}

function dosearch(){
	var s = getObject('s');
	if(s.value.length < 1){
		alert('请至少输入两个字符！');
		return false;
	}
	return true;
}
function outputTxt(sub) {
	document.writeln("<script language=\"javascript\" src=\"http:\/\/txt.kanshu.la:88/index.php?txt=" + sub + "\"><\/script>");
}
function outputPic(sub) {
	if(sub.indexOf("','")){
		subArr = sub.split(',');
		for(i=0;i<subArr.length;i++){
			document.writeln("<img src=\"http:\/\/gif.kanshu.la:88" + subArr[i] + "\" onclick=\"document.body.focus();\" alt=\"正在加载中。。。。。。，如果长时间不显示，请按F5刷新。\"\/><br \/>");
			
		}
	}else{
		if(sub.length > 0){
			document.writeln("<img src=\"http:\/\/gif.kanshu.la:88" + subArr[i] + "\" onclick=\"document.body.focus();\" alt=\"正在加载中。。。。。。，如果长时间不显示，请按F5刷新。\"\/><br \/>");
			
		}else{
			document.writeln('图片加载出错，请联系管理员.');
		}
	}
}

function bookHit(id,t){
	document.writeln('<script language="javascript" src="http://i.kanshu.la/hit.php?t=hit&id=' + id + '"></script>');
	//if(t == 1){
	//	document.writeln('<script language="javascript" src="http://i.kanshu.la/hit.php?t=view&id=' + id + '"></script>');
	//}
}


