if(top.location !== self.location){top.location=self.location;};
var openWindowTimeOut=2000;var bordercolor;titleheight=25;bordercolor="#57A01B";titlecolor="#57A01B";function PopUserLoginWindow(){if(document.readyState!="complete"){setTimeout('PopUserLoginWindow();',openWindowTimeOut)}else{CreateBackground();PopWindow(350,200,"教员登录","","login_iframe.asp?qid="+qid+"&backurl="+backurl,false)}}function PopUserLoginWindowSpeed(qid,backurl){CreateBackground();PopWindow(350,200,"教员登录","","login_iframe.asp?qid="+qid+"&backurl="+backurl,true)}function LoginSucceed(username){var Html="<link href='Hint.css' rel='stylesheet' type='text/css'>";Html+="<div align='center'>";Html+="<table width='50%' border='0' cellspacing='0' cellpadding='0'>";Html+="  <tr>";Html+="    <td class='font14'>";Html+="	 <table><tr><td height='28'></td></tr></table>";Html+="	 <font color='#006600' style='font-size:16px'><b>欢迎您,"+username+"</b></font>";Html+="	 <table><tr><td height='8'></td></tr></table>";Html+="	 <font color='#006600' style='font-size:14px'><b>3</b></font> <font color='#888888' style='font-size:12px'>秒后本窗口将自动关闭！</font>";Html+=" 	 </td>";Html+="  </tr>";Html+="</table>";Html+="</div>";self.frames["Content"].document.body.innerHTML=Html;setTimeout('ClarePopWindow()',3000)}function RedirectUserRegister(){ClareWindow();PopWindow(300,380,"用户注册","","reg_iframe.asp",true)}function PopUserRegister(){setTimeout('PopWindow(600,500,"用户注册","","reg_iframe.asp",false)',openWindowTimeOut)}function PopWindow(width,height,title,closeredirect,iframeurl,showclose){var msgObj=document.createElement("div");msgObj.setAttribute("id","msgDiv");msgObj.setAttribute("align","center");msgObj.style.background="white";msgObj.style.border="2px solid "+bordercolor;msgObj.style.position="absolute";msgObj.style.left="0";msgObj.style.top="0";msgObj.style.font="12px/1.6em Verdana, Geneva,  Arial, Helvetica, sans-serif";msgObj.style.marginLeft=(document.body.clientWidth-width)/2+"px";msgObj.style.marginTop=(document.body.clientHeight-height)/2+"px";msgObj.style.width=width+"px";msgObj.style.height=height+"px";msgObj.style.textAlign="center";msgObj.style.lineHeight="25px";msgObj.style.zIndex="10001";var tableHtml="<table width='100%' height='100%' border='0' cellspacing='0' cellpadding='0'>";tableHtml+="	  <tr height='"+titleheight+"'>";tableHtml+="		<td align='left' bgcolor='"+bordercolor+"'>&nbsp;&nbsp;<font color='#FFFFFF' style='font-size:14px'><b>"+title+"</b></font></td>";if(showclose)tableHtml+="		<td align='right' bgcolor='"+bordercolor+"'><font color='#FFFFFF' style='font-size:14px'><samp onclick='ClarePopWindow();' style='cursor:pointer'>关 闭</samp></font>&nbsp;&nbsp;</td>";tableHtml+="	  </tr>";tableHtml+="	  <tr height='100%'>";tableHtml+="   	<td colspan='2'><iframe id='Content' width='100%' height='100%' frameborder='0' scrolling='no' src='"+iframeurl+"'></iframe></td>";tableHtml+="	  </tr>";tableHtml+="</table>";document.body.appendChild(msgObj);document.getElementById("msgDiv").innerHTML=tableHtml;document.getElementById("msgDiv").focus()}function CreateBackground(){d=document.all;for(i=0;i<d.length;i++)if(d[i].tagName=="SELECT")d[i].style.display="none";var sWidth,sHeight;sWidth=document.body.clientWidth;sHeight=document.body.scrollHeight;var bgObj=document.createElement("div");bgObj.setAttribute('id','bgDiv');bgObj.style.position="absolute";bgObj.style.top="0";bgObj.style.background="#000000";bgObj.style.filter="Alpha(Opacity=30);";bgObj.style.left="0";bgObj.style.width=sWidth+"px";bgObj.style.height=sHeight+"px";bgObj.style.zIndex="10000";document.body.appendChild(bgObj)}function ClarePopWindow(){document.body.removeChild(document.getElementById("bgDiv"));document.body.removeChild(document.getElementById("msgDiv"));d=document.all;for(i=0;i<d.length;i++)if(d[i].tagName=="SELECT")d[i].style.display=""}function ClareWindow(){document.body.removeChild(document.getElementById("msgDiv"))}//PopWindow.js
function MM_preloadimages(){var d=document;if(d.images){if(!d.MM_p)d.MM_p=new Array();var i,j=d.MM_p.length,a=MM_preloadimages.arguments;for(i=0;i<a.length;i++)if(a[i].indexOf("#")!=0){d.MM_p[j]=new Image;d.MM_p[j++].src="images/head/"+a[i]+".gif"}}}function MM_showHideLayers(){var i,p,v,obj,args=MM_showHideLayers.arguments;for(i=0;i<(args.length-2);i+=3)if((obj=MM_findObj(args[i]))!=null){v=args[i+2];if(obj.style){obj=obj.style;v=(v=='show')?'visible':(v=='hide')?'hidden':v}obj.visibility=v}}function ic(s_img,s_scr){s_img.src="images/head/"+s_scr+".gif"}function stu_add(){alert("      客服暂时不在线\n\n  【请家教】请先网上登记\n\n我们会根据您的要求安排教员");this.location.href="stu_add.asp"}function tch_alert(qq,cityname){if(confirm("教员做家教，请先网上注册\n\n若是有疑问请先查看【教员常见问题】\n\nQQ客服暂时不在线\n\n只能留言，确定要留言么?")){window.open("http://wpa.qq.com/msgrd?V=1&amp;Uin="+qq+"&amp;Site=51"+cityname+"家教网做家教&amp;Menu=yes")}else{this.location.href="helps_tchquestion.asp"}}function qq(cn,qh){window.open('http://wpa.qq.com/msgrd?V=1&amp;Uin='+qh+'&amp;Site=51'+cn+'家教网&amp;Menu=yes')}function show_flash(h,w,url){document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='"+w+"' height='"+h+"'><param name='movie' value='"+url+"'><param name='quality' value='high'><param name='wmode' value='opaque'><embed src='"+url+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+w+"' height='"+h+"'></embed></object>")}//head.js
function check_types(){if(document.Login_Form.types[0].checked==false&&document.Login_Form.types[1].checked==false){document.Login_Form.types[0].focus();alert("请选择您注册的会员的类型");return false}if(document.Login_Form.types[0].checked==false){var Type_ID=1}else{var Type_ID=0}var Reg_Type=document.Login_Form.types[Type_ID].value;window.open("reg.asp?types="+Reg_Type)}function Password_onkeydown(){if(window.event.keyCode==13)Check_Login_Form()}function Check_Login_Form(){if(Login_Form.username.value==""){alert("请填写用户名！");Login_Form.username.focus();return(false)}if(Login_Form.username.value.length<3){alert("用户名最少3位！");Login_Form.username.focus();return(false)}if(!isStr(Login_Form.username.value)){alert("注意：用户名不能使用汉字、汉字字符以及非法字符（包括：空格、@、#、%等）！\n\n请把非法字符去掉后再尝试登录。");Login_Form.username.focus();return(false)}if(Login_Form.password.value==""){alert("请填写密码！");Login_Form.password.focus();return(false)}if(Login_Form.password.value.length<6){alert("密码最少６位！");Login_Form.password.focus();return(false)}if(Login_Form.password.value.length>16){alert("密码最多16位！");Login_Form.password.focus();return(false)}if(Login_Form.otherpwd.value==""){alert("请输入附加码！");Login_Form.otherpwd.focus();return(false)}if(Login_Form.otherpwd.value.length!=4){alert("附加码长度为4！");Login_Form.otherpwd.focus();return(false)}else{return true}}function isStr(s){if(s.length==0)return false;var regu="^[0-9A-Za-z_]*$";var re=new RegExp(regu);s=s.replace('@','');s=s.replace('.','');if(s.search(re)!=-1){return true}return false}function n_i(id){window.open('news_info.asp?id='+id)}function o(url){window.open(url)}function mon(t){t.bgColor="#F7F7F7"}function mot(t){t.bgColor="#FFFFFF"}function mot1(t){t.bgColor="#FBFCED"}//chkuser.js
