//搜索
function SearchBaidu()
{
var keyword=Form_search.keyword.value
//location.href="http://www.baidu.com/baidu?word="+keyword+"&tn=bds&cl=3&ct=2097152&si=www.cn910.net";
window.open("http://www.baidu.com/baidu?word="+keyword+"&tn=bds&cl=3&ct=2097152&si=www.cn910.net");
return false;}

function SearchCheck()
{
if(Form_search.L.value=="")
{
	alert("请选择搜索类别!");
	return false;
}
if(Form_search.keyword.value=="输入关键字" || Form_search.keyword.value=="")
{
	alert("请输入您要查询的关键字!");
	document.Form_search.keyword.focus()
	return false;
}
if(Form_search.L.value==7)
{
window.open("/bbs/search.asp?menu=ok&content=a&searchxm=username&search=key&searchxm2=topic&");
	return false
}
return true;}
function ShowSearch(c,self)
{if(c==null || c==""){
	c=1;}
	var cls1="s_of";
	var cls2="s_of";
	var cls3="s_of";
	var cls4="s_of";
	var cls5="s_of";
	var cls6="s_of";
	switch(c){
		case 1:
		cls1="s_on";
		break;
		case 2:
		cls2="s_on";
		break;
		case 3:
		cls3="s_on";
		break;
		case 4:
		cls4="s_on";
		break;
		case 5:
		cls5="s_on";
		break;
		case 6:
		cls6="s_on";
		break;
	}
document.writeln("<div id=cn910_search>");
document.writeln("                <FORM name=Form_search action=/search.asp method=get")
if (self==null){
document.writeln(" target=_blank")
}else{
document.writeln(" target=_self")
}
document.writeln(">");
document.writeln("				<input name=\"L\" type=\"hidden\" value="+c+">");
document.writeln("    <div id=ads_search_1><img src=\"/pic/tiaiqi.gif\" border=\"0\"></div>");
document.writeln("  <div id=cn910_search_2>");
document.writeln("        <div id=cn910_search_2_1>");
document.writeln("            <div id=cn910_search_2_1_1><img src=\"/pic/touming.gif\" width=100 height=1></div>");
document.writeln("            <div class="+cls1+" id=\"search1\" onClick=\"s_chg(this,1);\">新 闻</div>");
document.writeln("            <div id=cn910_search_2_1_1>|</div>");
document.writeln("            <div class="+cls2+" id=\"search2\" onClick=\"s_chg(this,2);\">课 件</div>");
document.writeln("            <div id=cn910_search_2_1_1>|</div>");
document.writeln("            <div class="+cls3+" id=\"search3\" onClick=\"s_chg(this,3);\">教 案</div>");
document.writeln("            <div id=cn910_search_2_1_1>|</div>");
document.writeln("            <div class="+cls4+" id=\"search4\" onClick=\"s_chg(this,4);\">综 合</div>");
document.writeln("            <div id=cn910_search_2_1_1>|</div>");
document.writeln("            <div class="+cls5+" id=\"search5\" onClick=\"s_chg(this,5);\">题 库</div>");
document.writeln("            <div id=cn910_search_2_1_1>|</div>");
document.writeln("            <div class="+cls6+" id=\"search6\" onClick=\"s_chg(this,6);\">论 文</div>");
document.writeln("        </div>");
document.writeln("        ");
document.writeln("        <div id=cn910_search_2_1>");
document.writeln("            <div id=cn910_search_2_1_2><B>站内搜索</B></div>");
document.writeln("            <div id=cn910_search_2_1_3><input name=keyword class=input_search onFocus=\"this.value=\'\'\" value=输入关键字  maxlength=50 ></div>   ");
document.writeln("            <div id=cn910_search_2_1_4><INPUT type=submit class=bot1 value=站内搜 onClick=return(SearchCheck())></div>   ");
document.writeln("            <div id=cn910_search_2_1_4><INPUT type=submit class=bot2 value=百度搜 onClick=return(SearchBaidu())></div>   ");
document.writeln("            ");
document.writeln("        </div>");
document.writeln("    </div>");
document.writeln("    <div id=ads_search_2>  </div>");
document.writeln("</form>");
document.writeln("</div>");
document.writeln("");}

function s_chg(td_now,key)
{

	
	search1.className = search2.className = search3.className = search4.className = search5.className = search6.className = "s_of";
	td_now.className = "s_on";
	document.Form_search.L.value=key;


}


//登录
function LoginCheck()
{

	if (document.Form_login.username.value == "")
	{
		alert("请输入您的用户名！")
		document.Form_login.username.focus()
		return false
	}
	
	if (document.Form_login.userpass.value == "")
	{
		alert("请输入您的密码！")
		document.Form_login.userpass.focus()
		return false
	}
	if (document.Form_login.addcode.value == "" || document.Form_login.addcode.value == "验证码")
	{
		alert("请输入验证码！")
		
		document.Form_login.addcode.value = ""
		document.Form_login.addcode.focus()
		return false
	}
return true
}

function openwindow(id){
window.open("showplacard.asp?id="+id,"","height=375,width=557,resizable=no,scrollbars=no,status=no,toolbar=no,menubar=no,location=no");
	}
//资源另存为
function doSaveFile(title,savename,id){
	
		  var win=window.open("/"+savename+".asp?id="+id,"","top=1,left=1");
		  //win.document.write(title)
		  win.document.execCommand("SaveAs","",title+".html")
		  win.close();
}
function sameheight(){
	C_Left.style.height='auto';
	C_Right.style.height='auto';
	var L_height=document.getElementById("C_Left").offsetHeight;
	var R_height=document.getElementById("C_Right").offsetHeight;
	if (L_height>R_height) {
		document.getElementById("C_Right").style.height = L_height; 
	}else{
		document.getElementById("C_Left").style.height = R_height-10; 
	}

}

function rightdisplay(){
if(C_Right.style.display=='none'){
C_Right.style.display='';
C_Left.style.width='698px';
sameheight();
}else{
C_Right.style.display='none';
C_Left.style.width='960px';
C_Left.style.height='auto';
}
}

function loadThreadFollow(id,b,p){
if (reply_content.style.display!='block'){
targetImg.src="/pic/minus.gif";
reply_content.style.display="block";
if(targetImg.loaded=="no"){document.frames["hiddenframe"].location.replace("/loadingreply.asp?id="+id+"&page="+p+"&b="+b+"");targetImg.loaded="yes"}
}else{
targetImg.src="/pic/plus.gif";
reply_content.style.display="none";
}
sameheight();
}
document.write("<iframe height=0 width=0 name=hiddenframe></iframe>")

