var fullurl=unescape(escape(document.location));
var nlong=fullurl.length;
var n=fullurl.indexOf("?")+1;
var strWord=fullurl.substring(n,nlong);

var Url=location.hostname;
var path=location.href; 

//获得Cookie解码后的值
function GetCookieVal(offset){
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1)
	endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}

//获得Cookie的原始值
function GetCookie(name){
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	while (i < clen){
		var j = i + alen;
		if (document.cookie.substring(i, j) == arg)
		return GetCookieVal (j);
		i = document.cookie.indexOf(" ", i) + 1;
		if (i == 0) break;
	}
	return null;
}

//设置Cookie有效时长
function CookieTime(name,longday){
	var exp = new Date();
	exp.setDate (exp.getDate() + longday);
	var cval = GetCookie (name);
	document.cookie = name + "=" + cval + "; expires="+ exp.toGMTString();
}

//设定Cookie值
function SetCookie(name, value){
	var expdate = new Date();
	var argv = SetCookie.arguments;
	var argc = SetCookie.arguments.length;
	var expires = (argc > 2) ? argv[2] : null;
	var path = (argc > 3) ? argv[3] : null;
	var domain = (argc > 4) ? argv[4] : null;
	var secure = (argc > 5) ? argv[5] : false;
	if(expires!=null) expdate.setTime(expdate.getTime() + ( expires * 1000 ));
	document.cookie = name + "=" + escape (value) +((expires == null) ? "" : ("; expires="+ expdate.toGMTString()))
	+((path == null) ? "" : ("; path=" + path)) +((domain == null) ? "" : ("; domain=" + domain))
	+((secure == true) ? "; secure" : "");
}

if(GetCookie("from_site")==""||GetCookie("from_site")==null||GetCookie("from_site")=="http://www.edu24ol.com/"){
	SetCookie("from_site",strWord);
	CookieTime("from_site",365);
}

if(Url!="www.edu24ol.com"){
	str_userlog="<table width=\"240\" cellspacing=\"0\" cellpadding=\"0\">"
	str_userlog=str_userlog+"<tr>"
    str_userlog=str_userlog+"<td class=\"wangluo\"><table width=\"200\" cellspacing=\"0\" cellpadding=\"0\">"
    str_userlog=str_userlog+"  <tr>"
    str_userlog=str_userlog+"    <td height=\"25\">学员登录</td>"
	str_userlog=str_userlog+"     <td class=\"redword\"><a href=\"/ClassList.asp\" target=\"_blank\"><font color=\"#ff0000\">在线报名</font></a></td>"
    str_userlog=str_userlog+"    <td><a href=\"/ClassRegist.asp\" target=\"_blank\">新用户注册</a></td>"
    str_userlog=str_userlog+"  </tr>"
    str_userlog=str_userlog+"</table></td>"
	str_userlog=str_userlog+"</tr>"
	str_userlog=str_userlog+"<tr>"
	str_userlog=str_userlog+"  <td><form id=\"form2\" name=\"form2\" method=\"post\" action=\"user_center/index.asp\" target=\"_blank\">"
	str_userlog=str_userlog+"    <table width=\"220\" cellspacing=\"0\" cellpadding=\"0\">"
	str_userlog=str_userlog+"      <tr>"
	str_userlog=str_userlog+"        <td height=\"25\">用户名</td>"
	str_userlog=str_userlog+"        <td><input name=\"username\" type=\"text\" size=\"8\" style=\"height:18px;\" /></td>"
	str_userlog=str_userlog+"        <td>密码</td>"
	str_userlog=str_userlog+"        <td><input name=\"psw\" type=\"password\" size=\"8\" style=\"height:18px;\" /></td>"
	str_userlog=str_userlog+"      </tr>"
	str_userlog=str_userlog+"      <tr>"
	str_userlog=str_userlog+"        <td height=\"25\">验证码</td>"
	str_userlog=str_userlog+"        <td><input name=\"rnd\" type=\"text\" id=\"rnd\" size=\"8\" style=\"height:18px;\" /></td>"
	str_userlog=str_userlog+"        <td class=\"redword\"><font color=\"#ff0000\"><label id=\"i_rnd\"></label></font></td>"
    str_userlog=str_userlog+"      <td><input type=\"image\" name=\"imageField\" src=\"images/NewIndex/login.jpg\"></td>"
	str_userlog=str_userlog+"   </tr>"
	str_userlog=str_userlog+"  </table>"
	str_userlog=str_userlog+" </form></td>"
	str_userlog=str_userlog+"</tr>"
	str_userlog=str_userlog+"<tr>"
	str_userlog=str_userlog+"  <td><table width=\"220\" cellspacing=\"0\" cellpadding=\"0\">"
	str_userlog=str_userlog+"    <tr>"
	str_userlog=str_userlog+"      <td><a href=\"listen.asp\" target=\"_blank\"><img src=\"images/newindex/hezuo1.jpg\" width=\"61\" height=\"17\" border=\"0\" align=\"absmiddle\" /></a></td>"
	str_userlog=str_userlog+"      <td><a href=\"/help/join_class.htm\" target=\"_blank\"><img src=\"images/newindex/hezuo2.jpg\" width=\"60\" height=\"17\" border=\"0\" align=\"absmiddle\" /></a></td>"
	str_userlog=str_userlog+"       <td><a href=\"help/tech_question.htm\" target=\"_blank\"><img src=\"images/newindex/hezuo3.jpg\" width=\"60\" height=\"17\" border=\"0\" align=\"absmiddle\" /></a></td>"
	str_userlog=str_userlog+"      <td><a href=\"/help/merit.htm\" target=\"_blank\"><img src=\"images/newindex/hezuo4.jpg\" width=\"59\" height=\"17\" border=\"0\" align=\"absmiddle\" /></a></td>"
	str_userlog=str_userlog+"    </tr>"
	str_userlog=str_userlog+"  </table>"
	str_userlog=str_userlog+"      <table width=\"220\" cellspacing=\"0\" cellpadding=\"0\">"
	str_userlog=str_userlog+"        <tr>"
	str_userlog=str_userlog+"          <td><img src=\"images/newindex/hezuo5.jpg\" width=\"87\" height=\"26\" align=\"absmiddle\" /></td>"
	str_userlog=str_userlog+"          <td><a href=\"listen.asp\" target=\"_blank\"><img src=\"images/newindex/hezuo6.jpg\" width=\"37\" height=\"26\" border=\"0\" align=\"absmiddle\" /></a></td>"
	str_userlog=str_userlog+"          <td><a href=\"ClassList.asp\" target=\"_blank\"><img src=\"images/newindex/hezuo7.jpg\" width=\"36\" height=\"26\" border=\"0\" align=\"absmiddle\" /></a></td>"
	str_userlog=str_userlog+"          <td><a href=\"ClassRegist.asp\" target=\"_blank\"><img src=\"images/newindex/hezuo8.jpg\" width=\"35\" height=\"26\" border=\"0\" align=\"absmiddle\" /></a></td>"
	str_userlog=str_userlog+"          <td><a href=\"help/index_pay.htm\" target=\"_blank\"><img src=\"images/newindex/hezuo9.jpg\" width=\"45\" height=\"26\" border=\"0\" align=\"absmiddle\" /></a></td>"
	str_userlog=str_userlog+"        </tr>"
	str_userlog=str_userlog+"    </table></td>"
	str_userlog=str_userlog+"</tr>"
	str_userlog=str_userlog+"</table>"
	//document.getElementById("edu_userlogin").innerHTML =str_userlog;
	//document.write("<script language=\"javascript\" src=\"/edu24ol_Rnd.asp\">);
}

if(Url!="www.edu24ol.com"&&Url!="www.edu21cn.com"&&Url!="www.yx24.com"&&Url!="www.js21cn.com"&&Url!="www.cj21cn.com"&&Url!="www.wy21cn.com"){
	if(document.getElementById("edu24ol_toolbarcard")){document.getElementById("edu24ol_toolbarcard").innerHTML="学习卡";}
	
	edu24ol_cardstr="<div><IMG src=\"images/newindex/top10.jpg\" width=177 height=204></div>"
	if(document.getElementById("edu24ol_showcard")){document.getElementById("edu24ol_showcard").innerHTML=edu24ol_cardstr;}
	if(document.getElementById("edu24ol_workstation")){document.getElementById("edu24ol_workstation").innerHTML="";}
}
