﻿// JavaScript Document
//document.domain="jxjyzy.com";

			function geturl(){
  if (!top.gAbsolutePath){
		var loc = document.location;
		top.protocal = loc.protocol;
		top.host = loc.host;
		top.hostname = loc.hostname;
		top.port = loc.port;
		top.gAbsolutePath = top.protocal + "//" + top.host + (top.port != '' ? ':' + top.port : '') 
  }
  top.path = top.gAbsolutePath;
  return top.gAbsolutePath + "//";
}
		function getfullurl()
		{
			var loc = document.location;
			var path=loc.pathname.substr(loc.pathname.indexOf('/')+1, loc.pathname.lenght).replace("//","/");
		  	return path;
		}
		function readCookie(name)		
		{		
		  var cookieValue = "";		
		  var search = name + "=";		
		  if(document.cookie.length > 0)		
		  { 		
			offset = document.cookie.indexOf(search);		
			if (offset != -1)		
			{ 		
			  offset += search.length;		
			  end = document.cookie.indexOf(";", offset);		
			  if (end == -1) end = document.cookie.length;		
			  cookieValue = decodeURI(document.cookie.substring(offset, end));		
			}		
		  }		
		  return cookieValue;		
		};
		function readCookieEx(name)
		{
		  var cookieValue = "";
		  var search = name + "=";
		  if(document.cookie.length > 0){ 		
			offset = document.cookie.indexOf(search);		
			if (offset != -1)		
			{ 		
			  offset += search.length;		
			  end = document.cookie.indexOf(";", offset);		
			  if (end == -1) end = document.cookie.length;		
			  cookieValue = decodeURI(document.cookie.substring(offset, end));		
			}		
		  }		
		  return cookieValue;		
		};
		function Deletecookie (name) 
		{  
			var exp = new Date();    
			exp.setTime (exp.getTime() - 1);    
			var cval = readCookie (name);    
			document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();  
		}  
				function ContentSize(size)
		{
			var obj=document.all.Content;
			obj.style.fontSize=size+"px";
		}
		function Head()
		{
	
			var cook=readCookieEx("jxjyzy");
			if(cook!=null && cook!="")
			{
				var Type="",Account,UserID,Licence,Name,Pwd,Point="",MsgCount="",EmailCount="";
				var arr=cook.split("&");
				for(var i=0;i<arr.length;i++)
				{
					var xx=arr[i].split("=");
					if(xx[0]=="Account")
					{
						Account=xx[1];
						continue;
					}
					if(xx[0]=="UserID")
					{
						UserID=xx[1];
						continue;
					}
					if(xx[0]=="Name")
					{
						Name=xx[1];
						continue;
					}
					if(xx[0]=="Pwd")
					{
						Pwd=xx[1];
						continue;			
					}
					if(xx[0]=="Licence")
					{
						Licence=xx[1];
						continue;
					}
					if(xx[0]=="Point")
					{
						Point=xx[1];
						continue;
					}
					if(xx[0]=="EmailCount")
					{
						EmailCount=xx[1];
						continue;
					}
					if(xx[0]=="MsgCount")
					{
						MsgCount=xx[1];
						continue;
					}
					if(xx[0]=="Type")
					{
						Type=xx[1];	
						continue;
					}
				}
				if(Type=="1")
				{				
					document.writeln("    <div id='loginin'style='padding-top:4px'> 欢迎您!<font color=\"#FF0000\"><strong>"+Account+"</strong></font>");
	document.writeln("<span id=\"spanMsg\"></span>");
						document.writeln("<font color=\"#CCCCCC\">|</font> <a href=\"http://www.jxjyzy.com/User/Index_new.aspx\">会员中心</a><font color=\"#CCCCCC\">|</font> <a href=\"http://www.jxjyzy.com/User/Index_new.aspx?Url="+geturl()+"User/UserResEdits.aspx?EditMode=False\">上传资源</a><font color=\"#CCCCCC\">|</font> <a href=\"http://bbs.jxjyzy.com/space/\">我的博客</a><font color=\"#CCCCCC\">|</font> <a href=\"http://bbs.jxjyzy.com/showalbumlist.aspx?uid="+UserID+"\">我的相册</a><font color=\"#CCCCCC\">|</font> <a href=\""+geturl()+"Login/LoginOut.aspx\">退出</a></div>");
					var url = "http://www.jxjyzy.com/WebService/ResourceService.svc/";
					var	param='';
				    Call(url,"GetMsgCount",param,OnGetMsgCountResult);
				}
				else
				{
					Deletecookie("jxjyzy");
					document.writeln("<div id='loginin'>");
					//document.writeln("    用户名<label><input name=\"labAccount\" type=\"text\" class=\"login_input\" id=\"labAccount\" size=\"12\"/></label>");
					//document.writeln("    密　码<label><input name=\"labPwd\" type=\"password\" class=\"login_input\" id=\"labPwd\" size=\"12\" /></label>");
					//document.writeln("    验证码<label><input name=\"labCode\" type=\"text\" class=\"login_input\" id=\"labCode\" size=\"8\" /></label>");
					//document.writeln("    <input type=\'image\' src='http://www.jxjyzy.com/Login/ValidateImage.aspx\' align=\'absmiddle\' style=\" width:35px; height:19px;\"  border=\'0\' value=\'验证码\' />");
					//document.writeln("    <input name=\"Submit\" type=\"image\" onclick=\'Login();\' id=\"Submit\" value=\"提交\" src='http://img.jxjyzy.com/images/login_buttonnew.gif' align=\"absmiddle\"/>");
					document.writeln("    <a href='http://auth.jxjyzy.com/Login.aspx?ReturnUrl="+window.location.href+"\'><img src='http://img.jxjyzy.com/images/baoming.gif' align=\"absmiddle\"/>登录</a>");
					document.writeln("    &nbsp;&nbsp;&nbsp;&nbsp;<a href='http://auth.jxjyzy.com/Register.aspx'>新用户注册</a>&nbsp;&nbsp;<a href='http://auth.jxjyzy.com/GetPassword.aspx'>&nbsp;&nbsp;找回密码</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href='"+geturl()+"Help/Help.aspx?HelperID=14\'>忘记用户名</a></div>");
				}
			}
			else
			{
				document.writeln("<div id='loginin'>");
				//document.writeln("    用户名<label><input name=\"labAccount\" type=\"text\" class=\"login_input\" id=\"labAccount\" size=\"12\"/></label>");
				//document.writeln("    密　码<label><input name=\"labPwd\" type=\"password\" class=\"login_input\" id=\"labPwd\" size=\"12\" /></label>");
				//document.writeln("    验证码<label><input name=\"labCode\" type=\"text\" class=\"login_input\" id=\"labCode\" size=\"8\" /></label>");
				//document.writeln("    <input type=\'image\' src='http://www.jxjyzy.com/Login/ValidateImage.aspx\' align=\'absmiddle\' style=\" width:35px; height:19px;\"  border=\'0\' value=\'验证码\' />");
				//document.writeln("    <input name=\"Submit\" type=\"image\" onclick=\'Login();\' id=\"Submit\" value=\"提交\" src='http://img.jxjyzy.com/images/login_buttonnew.gif' align=\"absmiddle\"/>");
				document.writeln("    <a href='http://auth.jxjyzy.com/Login.aspx?ReturnUrl="+window.location.href+"\'><img src='http://img.jxjyzy.com/images/baoming.gif' align=\"absmiddle\"/>登录</a>");
				document.writeln("   &nbsp;&nbsp;&nbsp;&nbsp;<a href='http://auth.jxjyzy.com/Register.aspx'>新用户注册</a>&nbsp;&nbsp;<a href='http://auth.jxjyzy.com/GetPassword.aspx'>&nbsp;&nbsp;找回密码</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href='"+geturl()+"Help/Help.aspx?HelperID=14\'>忘记用户名</a></div>");
			}
		}
function OnGetMsgCountResult(MsgCount)
{
	var html="";
	if(MsgCount=="0")
		html="<a href=\"http://www.jxjyzy.com/User/Index_new.aspx?Url="+geturl()+"User/UserInnerMessageList.aspx?Status=Receive\"><img src='http://img.jxjyzy.com/images/noMessage.gif' width=\"18\" height=\"11\" /></a>";
		else
			html="   <a href=\"http://www.jxjyzy.com/User/Index_new.aspx?Url="+geturl()+"User/UserInnerMessageList.aspx?Status=Receive\"><img src='http://img.jxjyzy.com/images/newMsg.gif' width=\"18\" height=\"11\" /></a>";
			html=html+"    短信<a href=\"http://www.jxjyzy.com/User/Index_new.aspx?Url="+geturl()+"User/UserInnerMessageList.aspx?Status=Receive\"><font color=\"#0000FF\">("+MsgCount+")</font></a>";
	document.getElementById("spanMsg").innerHTML=html;
		if(MsgCount!="0")
		{
		 var now= new Date();
		 var year=now.getYear();
		 var month=now.getMonth()+1;
		 var day=now.getDate();
		 var hour=now.getHours();
		 var minute=now.getMinutes();
		 var second=now.getSeconds();
		 var nowdate=year+"-"+month+"-"+day+" "+hour+":"+minute+":"+second;
		ymPrompt.alert({message:"<P align=left>你有"+MsgCount+"条未读短消息，如需查看请点击<a href='http://www.jxjyzy.com/User/Index_new.aspx?Url=http://www.jxjyzy.com/User/UserInnerMessageList.aspx?Status=Receive' target='_blank'>这里</a>。</P></br>江西省基础教育资源中心</br>"+nowdate,title:'系统消息',winPos:'rb',width:280,height:230,showMask:false})
			}
}
function Header()
{
	document.writeln("  <!--header start-->");
	document.writeln("  <div id=\"header\">");
	document.writeln("    <!--登录-->");
	document.writeln("    <div id=\"login\" style=\"padding-left:10px;padding-top:5px;background-image:url(http://img.jxjyzy.com/images/login_bg_new.jpg);height:28px;text-align:left;\">");
	document.writeln("    <span id=\"header_map_link\"><img src='http://img.jxjyzy.com/images/map.gif' width=\"13\" height=\"11\" /><a href=\"/Link/LinkIndex.htm\">教育导航</a>&nbsp;&nbsp;&nbsp;&nbsp;<img src='http://img.jxjyzy.com/images/setindex.gif' width=\"13\" height=\"11\" /><a onclick=\'javascript:addHome()\' href=\'http://www.jxjyzy.com/#\'>设为首页</a>&nbsp;&nbsp;&nbsp;&nbsp;<img src='http://img.jxjyzy.com/images/map.gif' width=\"13\" height=\"11\" /><a href=\"/sitemap.htm\">网站地图</a>&nbsp;&nbsp;&nbsp;&nbsp;<img src='http://img.jxjyzy.com/images/rss.gif' width=\"13\" height=\"11\" /><a href=\"/RSS/RSSIndex.htm\">RSS订阅</a></span>");
	document.writeln("    <SCRIPT language=JavaScript type=text/javascript>Head();</SCRIPT>");
	document.writeln("    </div>");
	document.writeln("    <!--网站logo-->");
	document.writeln("    <div id=\"logo\"><a href=\"http://www.jxjyzy.com\"><img src='http://img.jxjyzy.com/images/logonew.gif' alt=\"江西省基础教育网logo\" width=\"345\" height=\"74\" /></a></div>");
	document.writeln("    <!--头部导航-->");
	document.writeln("    <div id=\"nav\">");
	document.writeln("    <ul>");
	document.writeln("        <li><a href=\"/TeacherTraining/Default.htm\"><font color=\"#FF0000\"><strong>培训</strong></font></a></li>");
	document.writeln("        <li><a href=\"/Activity/default.htm\"><font color=\"#FF0000\"><strong>活动</strong></font></a></li>");
	document.writeln("        <li><a href=\"http://bbs.jxjyzy.com/\"><font color=\"#FF0000\"><strong>论坛</strong></font></a></li>");
	document.writeln("        <li><a href=\"http://bbs.jxjyzy.com/spaceindex.aspx\">博客</a></li>");
	document.writeln("        <li><a href=\"http://bbs.jxjyzy.com/albumindex.aspx\">相册</a></li>");
	document.writeln("        <li><a href=\"/EMail/EMailLogin.aspx?ReturnUrl=http://mail.jxjyzy.com/webmailgov/mail.jsp\">邮箱</a></li>");
	document.writeln("        <li id=\"four\"><strong><a href=\"http://man.jxjyzy.com/VideoMeeting\"><font color=\"#FF0000\">互动视频</font></a></strong></li>");
	document.writeln("        <li id=\"four\"><a href=\"http://auth.jxjyzy.com/login.aspx?Orgin=2\"><font color=\"#FF0000\">管理入口</font></a></li>");
	document.writeln("        <li id=\"other\" style='width:49px;padding:0px 4px 0px 4px;'><a href=\"/Resource/FLResourceSHow.aspx\">资源分类</a></li>");
	document.writeln("        <li id=\"five\" style='width:85px;padding:0px;'><a href=\"/EnglishProject/index.htm\"><font color=\"green\"><b>学生学习专栏</b></font></a></li> ");
	document.writeln("    </ul>");
	document.writeln("    <ul>");
	document.writeln("        <li><a href=\"/Resource/Search.htm\">资源</a></li>");
	document.writeln("        <li><a href=\"/ResourceHtml/Categories/Detail_New_154_72.html\">素材</a></li>");
	document.writeln("        <li><a href=\"/ResourceHtml/Categories/Detail_New_153_72.html\">课件</a></li>");
	document.writeln("        <li><a href=\"/ResourceHtml/Categories/Detail_New_152_72.html\">教案</a></li>");
	document.writeln("        <li><a href=\"/ResourceHtml/Categories/Detail_New_151_72.html\">试题</a></li>");
	document.writeln("        <li><a href=\"/ResourceHtml/Categories/Detail_New_155_72.html\">文章</a></li>");
	document.writeln("        <li id=\"four\"><a href=\"/Coursehtml/JingPin.html\">精品课程</a></li>");
	document.writeln("        <li id=\"four\"><a href=\"/Coursehtml/TongBu.html\">同步课堂</a></li>");
	document.writeln("        <li id=\"four\"><a href=\"/Coursehtml/JingSai.html\">竞赛活动</a></li>");
	document.writeln("        <li id=\"four\"><a href=\"/Coursehtml/DiEr.html\">第二课堂</a></li>");
	document.writeln("    </ul> ");
	document.writeln("    <ul>");
	document.writeln("        <li><a href=\"/ResourceHtml/Categories/New_72.html\">语文</a></li>");
	document.writeln("        <li><a href=\"/ResourceHtml/Categories/New_81.html\">数学</a></li>");
	document.writeln("        <li><a href=\"/ResourceHtml/Categories/New_73.html\">英语</a></li>");
	document.writeln("        <li><a href=\"/ResourceHtml/Categories/New_88.html\">物理</a></li>");
	document.writeln("        <li><a href=\"/ResourceHtml/Categories/New_89.html\">化学</a></li>");
	document.writeln("        <li><a href=\"/ResourceHtml/Categories/New_90.html\">生物</a></li>");
	document.writeln("        <li><a href=\"/ResourceHtml/Categories/New_80.html\">政治</a></li>");
	document.writeln("        <li><a href=\"/ResourceHtml/Categories/New_86.html\">历史</a></li>");
	document.writeln("        <li><a href=\"/ResourceHtml/Categories/New_87.html\">地理</a></li>");
	document.writeln("        <li><a href=\"/ResourceHtml/Categories/New_163.html\">综合</a></li>");
	document.writeln("        <li><a href=\"/Resource/Search.htm?SearchType=Name&amp;_t=1&amp;Content=%E4%B8%AD%E8%80%83&amp;Hidden=中考&amp;ClassID=-1&amp;SegmentID=-1&amp;GradeID=-1&amp;SubjectID=-1&amp;FormatParentID=-1&amp;Submit.x=0&amp;Submit.y=0\">中考</a></li>");
	document.writeln("        <li><a href=\"/Resource/Search.htm?SearchType=Name&amp;_t=1&amp;Content=%25E9%25AB%2598%25E8%2580%2583&Hidden=%E9%AB%98%E8%80%83&amp;ClassID=-1&amp;SegmentID=-1&amp;GradeID=-1&amp;SubjectID=-1&amp;FormatParentID=-1&amp;Submit.x=0&amp;Submit.y=0\">高考</a></li>");
	document.writeln("    </ul> ");
	document.writeln("    </div>");
	document.writeln("  </div>");
	document.writeln("  <!--header end--> ");
}
		
//加为收藏
function addFav()
{
window.external.AddFavorite('http://www.jxjyzy.com',' ');
}
function addAnnounceFav()
{
	window.external.AddFavorite(getfullurl(),' ');
}

//设为首页
function addHome()
{
document.body.style.behavior='url(#default#homepage)';
document.body.setHomePage('http://www.jxjyzy.com');
}
function AdvertisementMiddle()
{
	document.write("<div id='ad_article_cotent' style='margin:0 0 5px 5px; float:right;display:none;'></div>");
}
//底部尾文件
function Bottom() 
{
document.writeln("  <div id=\"bottom\">    ");
document.writeln("    <div style=\"text-align:center;\">");
document.writeln("	    <ul>");
document.writeln("        	<li><a href='"+geturl()+"Help/Help.aspx'>网站简介</a> -  <a href=\"/sitemap.htm\">网站地图</a> - <a href='"+geturl()+"Help/Help.aspx'>会员服务</a> -  <a href='"+geturl()+"ArticleHtml/Announce64.html'>广告服务</a> -  <a href='"+geturl()+"Help/Help.aspx?HelperID=2'>联系我们</a> -  <a href=\"javascript:FeedBack()\">意见建议</a> -   <a onclick=\'javascript:addHome()\' href=\'http://www.jxjyzy.com/#\'>设为首页</a>  - <a href='javascript:addFav()'>加入收藏</a>  -  <a href='"+geturl()+"Help/Help.aspx'>网站帮助</a> -  <a href='"+geturl()+"Help/DownLoad.aspx'>常用软件下载</a></li>");
document.writeln("            <li>Copyright © 2009 jxjyzy.com Inc. All Rights Reserved.  江西省基础教育资源网 版权所有</li>");
//document.writeln("            <li>网站备案号: 赣ICP备08000352号-1  用户服务:0791-8510792 技术支持:0791-8530343    <a href=\"http://sighttp.qq.com/cgi-bin/check?sigkey=52ea0a3207fc24abade1bd022193654bfa60a399506bdf86605c465cafa0cd349deb2f30759af3eade7138fa31683ec1\" target=\"_blank\" onclick=\"var tempSrc=http://sighttp.qq.com/wpa.js?rantime='+Math.random()+'&sigkey=52ea0a3207fc24abade1bd022193654bfa60a399506bdf86605c465cafa0cd349deb2f30759af3eade7138fa31683ec1;var oldscript=document.getElementById('testJs');var newscript=document.createElement('script');newscript.setAttribute('type','text/javascript'); newscript.setAttribute('id', 'testJs');newscript.setAttribute('src',tempSrc);if(oldscript == null){document.body.appendChild(newscript);}else{oldscript.parentNode.replaceChild(newscript, oldscript);}return false;\"><img border='0' SRC=http://wpa.qq.com/pa?p=1:8023718:1 alt='点击这里给我发消息'></a>   &nbsp;&nbsp;<script src=\'http://s73.cnzz.com/stat.php?id=419855&web_id=419855&show=pic\' language=\'JavaScript\' charset=\'gb2312\'></script></li>");
document.writeln("           <li>网站备案号: 赣ICP备08000352号-1  用户服务:0791-88512788 技术支持:0791-88530343     <a href=http://wpa.qq.com/msgrd?V=1&Uin=8023718&Site=-&Menu=no target=_blank><img border=0 SRC=http://wpa.qq.com/pa?p=1:8023718:4 alt=点击这里给我发消息>QQ技术支持</a>    &nbsp;&nbsp;<script src='http://s73.cnzz.com/stat.php?id=419855&web_id=419855&show=pic' language='JavaScript' charset='gb2312'></script></li>");
document.writeln("        <ul id=\"bottom_logo\">");
document.writeln("       	  <li><a href=\"http://www.miibeian.gov.cn/\" target=\"_blank\"><img src='http://img.jxjyzy.com/images/beian.gif' width=\"118\" height=\"48\" /></a></li>");
document.writeln("            <li><a href=\"http://218.87.4.80/zxbj.asp\" target=\"_blank\"><img src='http://img.jxjyzy.com/images/buliang.jpg' width=\"118\" height=\"48\" /></a></li>");
document.writeln("            <li><a href=\"http://nanchang.cyberpolice.cn/\" target=\"_blank\"><img src='http://img.jxjyzy.com/images/wl110.jpg' width=\"118\" height=\"48\" /></a></li>");
document.writeln("        </ul>");
document.writeln("        <p style=\"color:#ccc; margin:0px;\">本网大部分资源来源于会员上传，除本网组织的资源外，版权归原作者所有，如有侵犯版权，请立刻和本网联系并提供证据，本网将在三个工作日内改正。</p>");
document.writeln("        ");
document.writeln("    </div> ");
document.writeln("  </div>");    
}

