﻿function checkdata()
{
	
 var myform=window.document.loginform;

	if(myform.username.value.length<1)
	{
		alert("用户名为空");
		myform.username.focus();
		//event.returnValue = false;
		return false;
	}

	if(myform.inputPassword.value.length<1)
	{
		alert("密码为空");
		myform.inputPassword.focus();
		return false;
	}
	var inputPassword = myform.inputPassword.value;
 	var password  =  myform.password;
	return true;
}
function checksearch()
				{
				var keyword= document.getElementById("keyword").value;
					if(keyword.length<2||keyword=="")
					{
						alert("关键词必须2位以上");return false;
					}
					if(keyword=="关键字"){alert("你不写关键词袄？");return false;}
					return true;
				}
var member = new Array();
var userAgent = navigator.userAgent.toLowerCase();

function get_browser() {
	var b;
	if (window.ActiveXObject) {
		v = userAgent.substr(userAgent.indexOf('msie') + 5, 3);
		b = 'ie';
	} else if (userAgent.indexOf("firefox") != - 1) {
		v = userAgent.substr(userAgent.indexOf('gecko/') + 6, 8);
		b = 'firefox';
	} else if (userAgent.indexOf("safari") != - 1) {
		v = -1;
		b = 'safari';
	} else if (userAgent.indexOf("opera") != - 1) {
		v = opera.version();
		b = 'opera';
	} else {
		v = -1;
		b = -1;
	}

	return {
		name : b,
		version: v
	};
}

var browser = get_browser();

/*类库区
*****************************************/
function trim(s){return s.replace(/(^[ \t|???]*)|([ \t|???]*$)/g, "");}	//去掉首尾空格。
function $(s){return document.getElementById(s);}	//获取id为s的元素
function $$(s){return document.frames?document.frames[s]:$(s).contentWindow;}	//获取frame或iframe
function $c(s){return document.createElement(s);}	//创建新元素
function swap(s,a,b,c){$(s)[a]=$(s)[a]==b?c:b;}
function exist(s){return $(s)!=null;}	//结束
function removeNode(s){if(exist(s)){$(s).innerHTML = '';$(s).removeNode?$(s).removeNode():$(s).parentNode.removeChild($(s));}}	//去掉元素

function acc(s, n){	//对 id 为 s 的容器计数累加
	if(empty(n)) {
		n = 1;
	}
	$(s).innerHTML = parseInt($(s).innerHTML) + n;
}

function dw(s){document.write(s);} //输出
function CopyText(id) {
	$(id).select();
	copy($(id).value);
}
function copy(text2copy) {
	if (window.clipboardData) {
		window.clipboardData.setData("Text",text2copy);
	} else {
		var flashcopier = 'flashcopier';
		if(!$(flashcopier)) {
		var divholder = document.createElement('div');
		divholder.id = flashcopier;
		document.body.appendChild(divholder);
		}

		$(flashcopier).innerHTML = '';
		var divinfo = '<embed src="/template/images/clipboard.swf" FlashVars="clipboard='+escape(text2copy)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';//这里是关键
		$(flashcopier).innerHTML = divinfo;

	}
}

function copyToClipboard(meintext) {
if (window.clipboardData) {
	alertmenu("ie");
	window.clipboardData.setData("Text", meintext);

} else if (window.netscape) {
	netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
	var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard);
	if (!clip) return;
	alertmenu("mozilla");
	var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable);
	if (!trans) return;
	trans.addDataFlavor('text/unicode');
	var str = new Object();
	var len = new Object();
	var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
	var copytext=meintext;
	str.data=copytext;
	trans.setTransferData("text/unicode",str,copytext.length*2);
	var clipid=Components.interfaces.nsIClipboard;
	if (!clip) return false;
	clip.setData(trans,null,clipid.kGlobalClipboard);
}
	alertmenu("Following info was copied to your clipboard:\n\n" + meintext);
	return false;
}
function sm(word,url){
document.writeln('<p class="solink"><a target="_blank" href="http://www.baidu.com/baidu?ie=utf-8&tn=lnshice_pg&word='+url+'">搜索更多<span>'+word+'</span>在百度</a></p>');
document.writeln('<p class="solink"><a target="_blank" href="http://www.google.cn/search?complete=1&hl=zh-CN&newwindow=1&client=pub-8276138596539117&prog=aff&domains=www.peixunye.com&q='+url+'&sitesearch=&meta=&aq=f">搜索更多<span>'+word+'</span>在Google</a></p>');
document.writeln("<!-- SiteSearch Google -->");
document.writeln("<form method=\"get\" action=\"http:\/\/www.google.cn\/search\" target=\"google_window\">");
document.writeln("<table border=\"0\" bgcolor=\"#E9F4F8\">");
document.writeln("<tr><td nowrap=\"nowrap\" valign=\"top\" align=\"left\" height=\"32\">");
document.writeln("");
document.writeln("<\/td>");
document.writeln("<td nowrap=\"nowrap\">");
document.writeln("<input type=\"hidden\" name=\"domains\" value=\"www.peixunye.com\"><\/input>");
document.writeln("<label for=\"sbi\" style=\"display: none\">输入您的搜索字词<\/label>");
document.writeln("<input type=\"text\" name=\"q\" size=\"45\" maxlength=\"255\" value=\"\" id=\"sbi\"><\/input>");
document.writeln("<label for=\"sbb\" style=\"display: none\">提交搜索表单<\/label>");
document.writeln("<input type=\"submit\" name=\"sa\" value=\"Google 搜索\" id=\"sbb\"><\/input>");
document.writeln("<\/td><\/tr>");
document.writeln("<tr>");
document.writeln("<td>&nbsp;<\/td>");
document.writeln("<td nowrap=\"nowrap\">");
document.writeln("<table>");
document.writeln("<tr>");
document.writeln("<td>");
document.writeln("<input type=\"radio\" name=\"sitesearch\" value=\"\" checked id=\"ss0\"><\/input>");
document.writeln("<label for=\"ss0\" title=\"搜索网络\"><font size=\"-1\" color=\"#000000\">Web<\/font><\/label><\/td>");
document.writeln("<td>");
document.writeln("<input type=\"radio\" name=\"sitesearch\" value=\"www.shanpao.org\" id=\"ss1\"><\/input>");
document.writeln("<label for=\"ss1\" title=\"搜索 www.peixunye.com\"><font size=\"-1\" color=\"#000000\">www.peixunye.com<\/font><\/label><\/td>");
document.writeln("<\/tr>");
document.writeln("<\/table>");
document.writeln("<input type=\"hidden\" name=\"client\" value=\"pub-8276138596539117\"><\/input>");
document.writeln("<input type=\"hidden\" name=\"forid\" value=\"1\"><\/input>");
document.writeln("<input type=\"hidden\" name=\"prog\" value=\"aff\"><\/input>");
document.writeln("<input type=\"hidden\" name=\"ie\" value=\"UTF-8\"><\/input>");
document.writeln("<input type=\"hidden\" name=\"oe\" value=\"UTF-8\"><\/input>");
document.writeln("<input type=\"hidden\" name=\"hl\" value=\"zh-CN\"><\/input>");
document.writeln("<\/td><\/tr><\/table>");
document.writeln("<\/form>");
document.writeln("<!-- SiteSearch Google -->");
}
function my_page_copy(){
document.writeln("<li>")
document.writeln("<span class=\"bold\">复制地址：<\/span>")
document.writeln("<script type=\"text\/javascript\">document.write(\'<input id=\"vurl\" type=\"text\" size=\"40\" value=\"\'+location.href+\'?\'+document.title+\'\" onclick=\"copyUrl(this.id);\">\');<\/script>");
document.writeln("<input class=\"btn1\" type=\"button\" value=\"复 制\" onclick=\"copyUrl(\'vurl\')\" \/>");
document.writeln("<\/li>");
document.writeln("<li class=\"gray\"><span class=\"bold white\">友情提示：<\/span>[↑该页网址↑通过QQ或MSN告诉你的朋友吧!]<\/li>");
document.writeln("<li style=\"padding:0 0 5px 0; height:21px;\"><span class=\"bold l\">收藏提示：<\/span>");
document.writeln("<a href=\"javascript:window.open(\'http:\/\/shuqian.qq.com\/post?from=3&title=\'+encodeURIComponent(document.title)+\'&uri=\'+encodeURIComponent(document.location.href)+\'&jumpback=2&noui=1\',\'favit\',\'width=930,height=470,left=50,top=50,toolbar=no,menubar=no,location=no,scrollbars=yes,status=yes,resizable=yes\');void(0)\" style=\"color:#155da5; text-align:center; display:block; height:21px; padding:0 5px; line-height:21px; float:left; border:1px solid #8CA0D8; margin-right:10px;\">收藏到QQ书签<\/a>");
document.writeln("<a href=\"javascript:window.open(\'http:\/\/cang.baidu.com\/do\/add?it=\'+encodeURIComponent(document.title.substring(0,76))+\'&iu=\'+encodeURIComponent(location.href)+\'&fr=ien#nw=1\',\'_blank\',\'scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes\'); void 0\" style=\"color:#155da5; text-align:center; display:block; height:21px; padding:0 5px; line-height:21px; float:left; border:1px solid #8CA0D8;\">添加到百度搜藏<\/a><\/li>")
}
function my_footer(){
document.writeln(" <a href=\"http:\/\/www.miibeian.gov.cn\/\" target=\"_blank\">京ICP备08002887号<\/a> ");
}
function my_conag(){
document.writeln("<p id=\"cbtn\"><a href=\"#rescmt\">查看\/发表评论<\/a><\/p>");
document.writeln("<script type=\"text\/javascript\"><!--");
document.writeln("google_ad_client = \"pub-8276138596539117\";");
document.writeln("\/* 250x250, 创建于 08-5-17 *\/");
document.writeln("google_ad_slot = \"2357356529\";");
document.writeln("google_ad_width = 250;");
document.writeln("google_ad_height = 250;");
document.writeln("\/\/-->");
document.writeln("<\/script>");
document.writeln("<script type=\"text\/javascript\"");
document.writeln("src=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">");
document.writeln("<\/script>");
}
function my_conag_m(){
document.writeln("<script type=\"text\/javascript\"><!--");
document.writeln("google_ad_client = \"pub-8276138596539117\";");
document.writeln("\/* 125x125, 创建于 08-7-6 *\/");
document.writeln("google_ad_slot = \"0049020728\";");
document.writeln("google_ad_width = 125;");
document.writeln("google_ad_height = 125;");
document.writeln("\/\/-->");
document.writeln("<\/script>");
document.writeln("<script type=\"text\/javascript\"");
document.writeln("src=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">");
document.writeln("<\/script>")
}
function my_shoucang(){
document.writeln("<iframe id=\"baiduframe\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" framespacing=\"0\" vspace=\"0\" hspace=\"0\" frameborder=\"0\" width=\"200\" height=\"110\" src=\"http:\/\/unstat.baidu.com\/bdun.bsc?tn=lnshice_pg&cv=0&cid=1051555&csid=245&bgcr=ffffff&ftcr=000000&urlcr=0000ff&tbsz=130&sropls=1,2,3,4,5,6&kwgp=0\" charset=gb2312>");
document.writeln("<\/iframe>");
}
function my_deftag(){
document.writeln("");
}
function my_topbanner(){
document.writeln("");
}
function my_tj(){
document.writeln("<script language=\"javascript\" type=\"text\/javascript\" src=\"http:\/\/js.users.51.la\/1451977.js\"><\/script>");
document.writeln("<noscript><a href=\"http:\/\/www.51.la\/?1451977\" target=\"_blank\"><img alt=\"&#x6211;&#x8981;&#x5566;&#x514D;&#x8D39;&#x7EDF;&#x8BA1;\" src=\"http:\/\/img.users.51.la\/1451977.asp\" style=\"border:none\" \/><\/a><\/noscript>");
document.writeln("<script type=\"text\/javascript\">var wea_sid = 4518; var wea_domain=\"\";<\/script>");
document.writeln("<script type=\"text\/javascript\" charset=\"UTF-8\" src=\"http:\/\/s.vdoing.com\/mystats.js\"><\/script>");
}
function my_ggtag(){
document.writeln("<script type=\"text\/javascript\"><!--");
document.writeln("google_ad_client = \"pub-8276138596539117\";");
document.writeln("\/* 468x15, 单元链接 *\/");
document.writeln("google_ad_slot = \"8157924712\";");
document.writeln("google_ad_width = 468;");
document.writeln("google_ad_height = 15;");
document.writeln("\/\/-->");
document.writeln("<\/script>");
document.writeln("<script type=\"text\/javascript\"");
document.writeln("src=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">");
document.writeln("<\/script>")
}
function killErrors(){
	return true;
}
window.onerror = killErrors;