
	Event.observe(window, 'load', initIeolSchoolLogin, false);
	function initIeolSchoolLogin() {
	      //系统首页登陆入口
	      url = "/online/login_info4.php?"+(new Date()).toString();
	      if(getEolUserName()!="not found")
	      	sendXmlForIeolSchoolLogin(url,'ieolSchoolLogin');
	      else{
	      	if(oldurladdress="http://"+gddress+"/")
	      		oldurladdress = oldurladdress+"index.htm";
	        var content = '<form style="margin-top:2px;margin-bottom:10px;" id="ssologinForm"  name="ssologinForm" method="post" action="http://reg.eol.cn/interface/sublogin.php">\
						<div class="lin_right_title"><span class="z_333_12"><strong>教育在线社区登录</strong></span></div> \
						<p class="z_333_12">通行证：<input name="email" id="username" type="text" class="lin_right_input" style="font-size:11px" value="Email地址" onfocus="this.select()" onblur="if (value ==\'\'){value=\'Email地址\'}" onclick="if(value==\'Email地址\'){value=\'\'}" onmouseover="this.focus()" />　<INPUT name="image" type="image" src="/images/login.gif" align="absmiddle"/>\
						</p>\
						<p class="z_333_12">密　码：<input name="passwd" id="password" type="password" class="lin_right_input" />　<a href="http://reg.eol.cn/register.php?url='+oldurladdress+'" class="z_org_12l">我要注册</a></p>\
						<input  name="subcode" id="subcode" type="hidden" value="1002"/>\
						<input type="hidden" name="from" value="'+oldurladdress+'" />\
						<input type="hidden" name="type" value="1" />\
					</form>';
	      	parseXmlIeolSchoolLogin(content,'ieolSchoolLogin');
	      }
	}

	var xmlreq_ieolSchoolLogin = false;
 
	function newXMLHttpRequestForIeolSchoolLogin(){
		  if (window.XMLHttpRequest) 
		  {
		    	xmlreq_ieolSchoolLogin = new XMLHttpRequest();	
		  } 
		  else if (window.ActiveXObject)
		  {
				try
				{
					xmlreq_ieolSchoolLogin = new ActiveXObject("Msxml2.XMLHTTP");	
				} 
				catch (e1)
				{
						try 
						{	
							xmlreq_ieolSchoolLogin = new ActiveXObject("Microsoft.XMLHTTP");	
						}
						catch (e2)
						{
							
						}
				}
		   }
	}

	function sendXmlForIeolSchoolLogin(url, param)
	{
            newXMLHttpRequestForIeolSchoolLogin();
			try
			{
				xmlreq_ieolSchoolLogin.onreadystatechange= function(){proceForIeolSchoolLogin(param)};
				xmlreq_ieolSchoolLogin.open("GET", url, true);		
				xmlreq_ieolSchoolLogin.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
				xmlreq_ieolSchoolLogin.setRequestHeader("Cache-Control", "no-cache");
				xmlreq_ieolSchoolLogin.setRequestHeader("Pragma", "no-cache");
				xmlreq_ieolSchoolLogin.send(null);	
			}
			catch(exception)
			{
			    //alert(exception['message']);
				//alert("请求发送失败");
			}
	}

	function proceForIeolSchoolLogin(param)
	{
		 if(xmlreq_ieolSchoolLogin.readyState==1)
	     {
			document.getElementById(param).innerHTML = "<div id='gkcx_top_login'>正在连接服务器...</div>";	
	     }
	    else if(xmlreq_ieolSchoolLogin.readyState==2 || xmlreq_ieolSchoolLogin.readyState==3)
	     {
			document.getElementById(param).innerHTML = "<div id='gkcx_top_login'>正在读取数据...</div>";	
	     }
		if(xmlreq_ieolSchoolLogin.readyState == 4)
		{		
			if(xmlreq_ieolSchoolLogin.status == 200 || xmlreq_ieolSchoolLogin.status == 0)
			{	
				//parseXmlIeolSchoolLogin(xmlreq_ieolSchoolLogin.responseText,param);
				//alert(xmlreq_ieolSchoolLogin.responseText);
				parseXmlIeolSchoolLogin((xmlreq_ieolSchoolLogin.responseText).replace("from=furl","from="+oldurladdress+"").replace(/(getGaddress)/g,gddress),param);
				//alert((xmlreq_ieolSchoolLogin.responseText).replace(/(getGaddress)/g,gddress));
			
			}
			else
			{
				//window.alert("读取xml发生异常");
				//alert(xmlreq_ieolSchoolLogin.statusText);
			}
		}
	}
	
		
    /**
     * 为相应的div赋值
     */
	function parseXmlIeolSchoolLogin(xmlDom,div_id)
	{
		var content = xmlDom;
		document.getElementById(div_id).innerHTML = content;
	}

	
