var iftype=5;
var oftype=4;
var ft_flag=getCookie("fmenutypeflag");
if(ft_flag=="Null"||ft_flag==""){
	setCookie("fmenutypeflag","-1",360000,"/");
}
ft_flag=getCookie("fmenutypeflag");
ft_flag=parseInt(ft_flag);
iftype=ft_flag*iftype;
oftype=ft_flag*oftype;

function showmenu(n){
	if(menu[n].filters[0]!=null && menu[n].filters[0].status==2)return ;
	closemenu(n);
	menu[0].style.left=m_1.offsetLeft+141;
	menu[1].style.left=m_1.offsetLeft+222;
	menu[2].style.left=m_1.offsetLeft+303;
        menu[3].style.left=m_1.offsetLeft+384;
        menu[n].style.top=107;
	comein(menu[n],iftype,0.3);
}
function closemenu(n)
{
	for(var i=0;i<4;i++){
		if(i==n)continue;
		hiddenMenu(i);
	}
}
var mh0,mh1,mh2,mh3,mh4;
function hiddenMenu(n){
	if(menu[n].filters[0]!=null && menu[n].filters[0].status==2){
		 setTimeout("hiddenMenu("+n+")",1);
	}
	else{
		if(menu[n].style.visibility!="visible")return;
		goout(menu[n],oftype,0.2);//menu[n].style.visibility="hidden";
	}
}
function qhstype(cob){
	iftype=(-1)*iftype;
	oftype=(-1)*oftype;
	if(iftype>0){
		setCookie("fmenutypeflag","1",360000,"/");
	}
	else{
		setCookie("fmenutypeflag","-1",360000,"/");
	}
}
function onmenu(ob){
	ob.style.color="red";
}
function outmenu(ob){
	ob.style.color="white";
}
  var welcomestring;
  var  mydate = new Date();
  var  myyear = mydate.getYear();
  if(myyear < 300)myyear = 1900 + myyear ;
    mymonth = mydate.getMonth()+1;
    today = mydate.getDate();  
    myhour = mydate.getHours();
    if(myhour<6)             
      welcomestring="凌晨好";
    else if(myhour<9)
      welcomestring="早上好";
    else if(myhour<12)
      welcomestring="上午好";
    else if(myhour<14)
      welcomestring="中午好";
    else if(myhour<17)
      welcomestring="下午好";
    else if(myhour<19)
      welcomestring="傍晚好";
    else if(myhour<22)
      welcomestring="晚上好";
    else
      welcomestring="夜里好";


function getUserName(){
        var keyName = "classciom="&&"username=";
        var uName = "";
        var myCookie = document.cookie;
        var myStart = myCookie.indexOf(keyName);
        if(myStart == -1)
                return "";
        var myEnd = myCookie.indexOf(";",myStart);
        if(myEnd == -1){
                uName = myCookie.substring(myStart+keyName.length,
myCookie.length);
        }else {
                uName = myCookie.substring(myStart+keyName.length,myEnd);
        }

        return uName;
}
userid = getUserName();

function MakeArray(n) {
        this.length = n
        return this
}

dayNames = new MakeArray(7);
dayNames[1] = "SUN";
dayNames[2] = "MON";
dayNames[3] = "TUES";
dayNames[4] = "WED";
dayNames[5] = "THURS";
dayNames[6] = "FRI";
dayNames[7] = "STA";
function customDateString(oneDate) {
        var theDay = dayNames[oneDate.getDay() + 1];
        var theMonth = oneDate.getMonth() + 1;
        var theYear = oneDate.getYear(); 
        if  (theYear < 1900) { theYear = theYear + 1900};
        var today = theYear + "-" + theMonth + "-" + oneDate.getDate() + " " + " " + theDay;
        return today;
}

function getBanner(){
var html = "";
var rnd = Math.floor(Math.random()*2);
if(rnd == 1)
  html = "<img src=\"/97741/images/banner_04.jpg\"/>";
else
  html = "<iframe style=\"width:495;height:68\" src=\"/97741/js/banner.html\" frameBorder=\"0\" scrolling=\"no\"></iframe>";
return html;
}

document.write("<div align=\"center\" style=\"z-index:8;\">"+
"<table border=\"0\" width=\"775\" cellspacing=\"0\" cellpadding=\"0\" height=\"90\" onmouseover=\"closemenu()\">"+
"<tr><td width=\"60\" align=\"left\" background=\"/97741/images/bj_01.jpg\"></td><td width=\"220\" align=\"center\"><img src=\"/97741/images/title.jpg\" width=\"220\" height=\"68\"></td>"+
"<td width=\"495\" align=\"right\">"+getBanner()+"</td></tr>"+
"</table>"+
"</div>"+
""+
"<div align=\"center\">"+
"<table id=m_1 border=\"0\"  height=\"16\" cellspacing=\"0\" cellpadding=\"0\">"+
"<tr>"+
"<td width=\"60\" height=\"16\" onmouseover=\"closemenu()\" background=\"/97741/images/bj_01.jpg\"></td>"+
"<td width=\"80\" height=\"16\" class=\"menu0\" align=\"center\" style=\"cursor:hand\" onmouseover=\"closemenu()\" onclick=\"top.location='/97741/';\">首页</td>"+
"<td width=\"1\" height=\"16\"></td>"+
"<td width=\"80\" height=\"16\" class=\"menu0\" align=\"center\" style=\"cursor:hand\" onmouseover=\"showmenu(0)\">会员注册</td>"+
"<td width=\"1\" height=\"16\"></td>"+
"<td width=\"80\" height=\"16\" class=\"menu0\" align=\"center\" style=\"cursor:hand\" onmouseover=\"showmenu(1)\">网络班级</td>"+
"<td width=\"1\" height=\"16\"></td>"+
"<td width=\"80\" height=\"16\" class=\"menu0\" align=\"center\" style=\"cursor:hand\" onmouseover=\"showmenu(2)\">其它频道</td>"+
"<td width=\"1\" height=\"16\"></td>"+
"<td width=\"80\" height=\"16\" class=\"menu0\" align=\"center\" style=\"cursor:hand\" onmouseover=\"showmenu(3)\">关于我们</td>"+
"<td width=\"1\" height=\"16\" onmouseover=\"closemenu()\"></td>"+
"<td width=\"18\" height=\"16\" class=\"menu0\" onmouseover=closemenu() id=wmenubar>"+
"<img  width=\"18\" height=\"16\" src=\"/97741/images/home.gif\"  style=\"cursor:hand\" alt=\"切换菜单模式\" onclick=\"qhstype(this);\"></td>"+
"<td width=\"292\" height=\"16\" class=\"menu0\" onmouseover=closemenu() id=wmenubar  style=\"FILTER: alpha(opacity=100,finishopacity=10,style=1)\" valign=\"center\">&nbsp;"+userid+"&nbsp;"+welcomestring+"&nbsp;&nbsp;"+ customDateString(new Date()) +"</td>"+
"</tr>"+
"</table>"+
"</div>"+
""+
"<table width=775 height=\"1\" cellspacing=\"0\" cellpadding=\"5\" border=\"0\" align=\"center\">"+
"<tr><td width=\"60\" height=\"1\" align=\"center\" background=\"/97741/images/bj_01.jpg\"></td><td width=\"715\" height=\"1\" align=\"center\"></td></tr>"+
"</table>");
document.write ("<span id=menu style=\"position:absolute;visibility:hidden;z-index:5;\">"+
"<table border=\"0\" width=\"80\" cellspacing=\"4\" cellpadding=\"0\" bordercolor=\"#FFFFFF\" class=menu1>"+
"  <tr><td width=\"100%\" height=\"2\"></td></tr>"+
"  <tr>"+
"    <td width=\"100%\" height=\"1\" onmouseover=\"onmenu(this)\" onmouseout=\"outmenu(this)\" onclick=\"top.location='/97741/Register/NewsUser.asp';\">"+
"&nbsp;新手注册"+
"    </td>"+
"  </tr>"+
"  <tr>"+
"    <td width=\"100%\" height=\"1\" onmouseover=\"onmenu(this)\" onmouseout=\"outmenu(this)\" onclick=\"top.window.location.replace('/97741/Register/UserLogin.asp');\">"+
"&nbsp;会员登陆"+
"    </td>"+
"  </tr>"+
"  <tr>"+
"    <td width=\"100%\" height=\"1\" onmouseover=\"onmenu(this)\" onmouseout=\"outmenu(this)\" onclick=\"top.window.location.replace('/97741/Register/UserInfo.asp');\">"+
"&nbsp;会员信息"+
"    </td>"+
"  </tr>"+
"  <tr>"+
"    <td width=\"100%\" height=\"1\" onmouseover=\"onmenu(this)\" onmouseout=\"outmenu(this)\" onclick=\"top.window.location.replace('/97741/Register/password.asp');\">"+
"&nbsp;忘记密码"+
"    </td>"+
"  </tr>"+
"  <tr>"+
"    <td width=\"100%\" height=\"1\" onmouseover=\"onmenu(this)\" onmouseout=\"outmenu(this)\" onclick=\"top.window.location.replace('/97741/Register/logout.asp?logout="+location.href+"');\">"+
"&nbsp;安全退出"+
"    </td>"+
"  </tr>"+
"  <tr><td width=\"100%\" height=\"2\"></td></tr>"+
"</table>"+
"</span>"+
""+
"<span id=menu style=\"position:absolute;visibility:hidden;z-index:5;\">"+
"<table border=\"0\" width=\"80\" cellspacing=\"4\" cellpadding=\"0\" bordercolor=\"#FFFFFF\" class=menu1>"+
"  <tr><td width=\"100%\" height=\"2\"></td></tr>"+
"  <tr>"+
"    <td width=\"100%\" height=\"1\" onmouseover=\"onmenu(this)\" onmouseout=\"outmenu(this)\" onclick=\"top.location='/97741/book/';\">"+
"&nbsp;填写留言"+
"    </td>"+
"  </tr>"+
"  <tr>"+
"    <td width=\"100%\" height=\"1\" onmouseover=\"onmenu(this)\" onmouseout=\"outmenu(this)\" onclick=\"top.location='/97741/book/book.asp'\" >"+
"&nbsp;查看留言"+
"    </td>"+
"  </tr>"+
"  <tr>"+
"    <td width=\"100%\" height=\"1\" onmouseover=\"onmenu(this)\" onmouseout=\"outmenu(this)\" onclick=\"top.location='/97741/9/index.html'\" >"+
"&nbsp;班级论坛"+
"    </td>"+
"  </tr>"+
"  <tr>"+
"    <td width=\"100%\" height=\"1\" onmouseover=\"onmenu(this)\" onmouseout=\"outmenu(this)\" onclick=\"top.location='/97741/chat/';\">"+
"&nbsp;班级聊天"+
"    </td>"+
"  </tr>"+
"  <tr><td width=\"100%\" height=\"2\"></td></tr>"+
"</table>"+
"</span>"+
""+
"<span id=menu style=\"position:absolute;visibility:hidden;z-index:5;\">"+
"<table border=\"0\" width=\"80\" cellspacing=\"4\" cellpadding=\"0\" bordercolor=\"#FFFFFF\" class=menu1>"+
"  <tr><td width=\"100%\" height=\"2\"></td></tr>"+
"  <tr>"+
"    <td width=\"100%\" height=\"1\" onmouseover=\"onmenu(this)\" onmouseout=\"outmenu(this)\" onclick=\"top.location='/97741/photo/';\">"+
"&nbsp;班级相册"+
"    </td>"+
"  </tr>"+
"  <tr>"+
"    <td width=\"100%\" height=\"1\" onmouseover=\"onmenu(this)\" onmouseout=\"outmenu(this)\" onclick=\"top.location='/97741/news/';\">"+
"&nbsp;校园文化"+
"    </td>"+
"  </tr>"+
"  <tr>"+
"    <td width=\"100%\" height=\"1\" onmouseover=\"onmenu(this)\" onmouseout=\"outmenu(this)\" onclick=\"top.location='/97741/chart/';\">"+
"&nbsp;搞笑图片"+
"    </td>"+
"  </tr>"+
"  <tr>"+
"    <td width=\"100%\" height=\"1\" onmouseover=\"onmenu(this)\" onmouseout=\"outmenu(this)\" onclick=\"top.location='/97741/news/flash.asp';\">"+
"&nbsp;动画欣赏"+
"    </td>"+
"  </tr>"+
"  <tr>"+
"    <td width=\"100%\" height=\"1\" onmouseover=\"onmenu(this)\" onmouseout=\"outmenu(this)\" onclick=\"top.location='/97741/download/';\">"+
"&nbsp;网站下载"+
"    </td>"+
"  </tr>"+
"  <tr>"+
"    <td width=\"100%\" height=\"1\" onmouseover=\"onmenu(this)\" onmouseout=\"outmenu(this)\" onclick=\"top.location='/97741/other/opto.asp';\">"+
"&nbsp;专业简介"+
"    </td>"+
"  </tr>"+
"  <tr><td width=\"100%\" height=\"2\"></td></tr>"+
"</table>"+
"</span>"+
""+
"<span id=menu style=\"position:absolute;visibility:hidden;z-index:5;\">"+
"<table border=\"0\" width=\"80\" cellspacing=\"4\" cellpadding=\"0\" bordercolor=\"#FFFFFF\" class=menu1>"+
"  <tr><td width=\"100%\" height=\"2\"></td></tr>"+
"  <tr>"+
"    <td width=\"100%\" height=\"1\" onmouseover=\"onmenu(this)\" onmouseout=\"outmenu(this)\" onclick=\"top.location='/97741/other/about.asp';\">"+
"&nbsp;关于我们"+
"    </td>"+
"  </tr>"+
"  <tr>"+
"    <td width=\"100%\"  height=\"1\" onmouseover=\"onmenu(this)\" onmouseout=\"outmenu(this)\" onclick=\"top.location='/97741/other/about_net.asp';\">"+
"&nbsp;关于本站"+
"    </td>"+
"  </tr>"+
"  <tr><td width=\"100%\" height=\"2\"></td></tr>"+
"</table>"+
"</span>");