

function writeQNavBar(){
    var userId=getCookie("user:id");
    if (userId==null) {return "";}
 
   var exam_modul=true;
   var userRoles = getCookie("user:roles"); 
   if (userRoles == null) { return ""; }
    var lock=userRoles.indexOf("examinee")!=-1;
    var returnHtm;
    returnHtm="<ul>";
    returnHtm += "<li><a href=\"" + root + "exam/enterexam.aspx\" style='color: #F00;'>参加考试</a></li>";
returnHtm += "<li><a href=\"" + root + "exam/webenterlist.aspx\">报名考试</a></li>";
   
     returnHtm+="<li><a href=\""+root+"exam/score/myscore.aspx\">我参加过的考试</a></li>";
     returnHtm += "<li><a href=\"" + root + "exam/score/index.aspx\">成绩查询</a></li>";
     
    if (!lock)
   
    {
   returnHtm+="<li><a href='"+root+"secure/assignment.aspx'>欢迎首页</a></li>";
    
//returnHtm+="<li><a href='secure/common/sms/mysms.aspx'>我的短信</a></li>";
//returnHtm+="<li><a href='secure/common/sms/sendsms.aspx'>发送短信</a></li>";


     // var adm=getCookie("")
    //if (adm!=null)returnHtm+="<li><a href='secure/common/sms/sendsms.aspx?class=0&sendto="+encodeURIComponent(adm)+"'>联系管理员</a></li>";
    //returnHtm+="<li><a href=\"javascript:var newwin=window.open('"+urlroot()+"secure/common/users/editself.aspx','msgWindow1','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes'); newwin.focus();\" >个人资料</a></li>";
    
    }
    else{
    returnHtm+="<li style='color: #F00;FONT-WEIGHT: bold;'>你已被锁定在考试状态</li>";
    
    if (self.location.pathname!=root+"exam/enterexam.aspx"){window.location =root+"exam/enterexam.aspx"}
    }
    returnHtm+="<li><a href='"+root+"department/editselfinfo.aspx'>个人信息</a></li>";
returnHtm+="<li><a href='"+root+"secure/xgmm.aspx'>修改密码</a></li>";
    returnHtm+="<li><a style='FONT-WEIGHT: bold;' href='"+root+"logout.aspx' target='_parent'>退出</a></li>";
	
returnHtm+="</ul>";
return returnHtm;
}

document.write(writeQNavBar())