	Event.observe(window, 'load', initIeolSchoolLogin, false);
	
	function initIeolSchoolLogin() {
	      //学校首页登陆入口
	      url = "/online/login_info2.php?sindex=1&"+(new Date()).toString();
	      
	      if(getEolUserName()!="not found")
	      	sendXmlForIeolSchoolLogin(url,'ieolSchoolLogin');
	      else{
	        var content = '<form id="ssologinForm"  name="ssologinForm" method="post" action="http://reg.eol.cn/interface/sublogin.php">\
	        					<div id="gkcx_top_login">\
									<strong class="z_blue01_12b">EOL通行证：</strong>\
									<input type="text" class="input_120" style="font-size:11px" value="Email地址" name="email" id="username" type="text" value="Email地址" onfocus="this.select()" onblur="if (value ==\'\'){value=\'Email地址\'}" onclick="if(value==\'Email地址\'){value=\'\'}" nmouseover="this.focus()"/>&nbsp;&nbsp;&nbsp;&nbsp;\
									<strong class="z_blue01_12b"> 密码：</strong><input type="password" name="passwd" id="password" class="input_65" />\
									<input  name="subcode" id="subcode" type="hidden" value="1002"/>\
									<input type="hidden" name="from" value="'+oldurladdress+'" />\
									<input type="hidden" name="type" value="1" />&nbsp;&nbsp;\
									<input name="Submit" type="image" value="提交" src="';
									if(school_vip==0){
						content +='/images/g_button_login.jpg';
									}else{
						content +='/images/gkcx5_g_button_login.jpg';
									}
						content +='" align="top" />&nbsp;&nbsp;&nbsp;&nbsp;\
									<a href="http://reg.eol.cn/register.php?url='+oldurladdress+'">注册</a>\
								</div>\
							</form>';
	      	parseXmlIeolSchoolLogin(content,'ieolSchoolLogin');
	      }
	      
	     var newhref= window.location.href;
	     if   (oldhref.indexOf("schoolhtm/schoolTemple/school"+schoolid+".htm")>=0){   
	         document.getElementById("temporarily").innerHTML = xiaoyuanContent;
	     }	 
	}

	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).replace("href=furl","href='"+furl+"'").replace("getSchoolId",getSchoolId()),param);
				parseXmlIeolSchoolLogin((xmlreq_ieolSchoolLogin.responseText).replace("href=furl","href='"+furl+"'").replace("getSchoolId",getSchoolId()).replace(/(getGaddress)/g,gddress),param);
				//alert((xmlreq_ieolSchoolLogin.responseText).replace("href=furl","href='"+furl+"'").replace("getSchoolId",getSchoolId()).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;
	}

	
