Event.observe(window, 'load', init, false);

function init() {


      //柱状图的接口
      url = "/ieol_html/vote1/gkcx_vote_"+schoolcode+".htm";
      //url = "/ieolhtmtest/gkcx_vote_"+schoolcode+".htm";
      sendXmlForHistogram(url,'histogram');

       //报考指数的接口
      url = "/ieol_html/vote2/gkcx_index_"+schoolcode+".htm";
      //url = "/ieolhtmtest/gkcx_index_"+schoolcode+".htm";
      sendXmlForExponent(url,'exponent');
      
      
      //网友推荐专业的接口
      url = "/ieol_html/vote3/gkcx_"+schoolcode+".htm";
    //url = "/ieolhtmtest/gkcx_"+schoolcode+".htm";
      sendXmlForCommendSpecialty(url,'commendSpecialty');
      
       //关注此高校的接口        
      url = "/ieol_html/order/school_"+schoolcode+".htm";
    //url = "/ieolhtmtest/order_school_"+schoolcode+".htm";
      sendXmlForAttentionSchoolList(url,'attentionSchoolList');
    
      //了解此高校的接口
      url = "/ieol_html/edu/school_"+schoolcode+".htm";
    //url = "/ieolhtmtest/edu_school_"+schoolcode+".htm";
      sendXmlForRealizeSchoolList(url,'realizeSchoolList');
      
     var newhref= window.location.href;
     if   (oldhref.indexOf("schoolhtm/schoolTemple/school"+schoolid+".htm")>=0)   
     {   
         document.getElementById("temporarily").innerHTML = xiaoyuanContent;
     }	 
     
   
}


    //柱状图的接口的请求Request()
    var xmlreq_histogram = false;
	/**
	 * 为 柱状图 的 xmlreq_histogram 赋值
	 */	
	function newXMLHttpRequestForHistogram()
	{
		  if (window.XMLHttpRequest) 
		  {
		    	xmlreq_histogram = new XMLHttpRequest();	
		  } 
		  else if (window.ActiveXObject)
		  {
				try
				{
					xmlreq_histogram = new ActiveXObject("Msxml2.XMLHTTP");	
				} 
				catch (e1)
				{
						try 
						{	
							xmlreq_histogram = new ActiveXObject("Microsoft.XMLHTTP");	
						}
						catch (e2)
						{
							
						}
				}
		   }
	 }
	 /**
	 * 为 柱状图 的 xmlreq_histogram 发起请求
	 */	
	 function sendXmlForHistogram(url, param)
	 {
            newXMLHttpRequestForHistogram();
			try
			{
				xmlreq_histogram.onreadystatechange= function(){proceForHistogram(param)};
				xmlreq_histogram.open("GET", url, true);		
				xmlreq_histogram.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
				xmlreq_histogram.send(null);	
			}
			catch(exception)
			{
				//alert("请求发送失败");
			}
	 }
	/**
	 * 处理 柱状图 的 xmlreq_histogram 结果
	 */	
	 function proceForHistogram(param)
	 {
		if(xmlreq_histogram.readyState == 4)
		{		
			if(xmlreq_histogram.status == 200 || xmlreq_histogram.status == 0)
			{	
				parseXml(xmlreq_histogram.responseText,param);
			}
			else
			{
				//window.alert("读取xml发生异常");
				//alert(xmlreq_histogram.statusText);
			}
		}
	 }






    //报考指数的接口的请求Request()
    var xmlreq_exponent = false;
	/**
	 * 为 报考指数 的 xmlreq_exponent 赋值
	 */	
	function newXMLHttpRequestForExponent()
	{
		  if (window.XMLHttpRequest) 
		  {
		    	xmlreq_exponent = new XMLHttpRequest();	
		  } 
		  else if (window.ActiveXObject)
		  {
				try
				{
					xmlreq_exponent = new ActiveXObject("Msxml2.XMLHTTP");	
				} 
				catch (e1)
				{
						try 
						{	
							xmlreq_exponent = new ActiveXObject("Microsoft.XMLHTTP");	
						}
						catch (e2)
						{
							
						}
				}
		   }
	 }
	 /**
	 * 为 报考指数 的 xmlreq_exponent 发起请求
	 */	
	 function sendXmlForExponent(url, param)
	 {
            newXMLHttpRequestForExponent();
			try
			{
				xmlreq_exponent.onreadystatechange= function(){proceForExponent(param)};
				xmlreq_exponent.open("GET", url, true);		
				xmlreq_exponent.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
				xmlreq_exponent.send(null);	
			}
			catch(exception)
			{
				//alert("请求发送失败");
			}
	 }
	/**
	 * 处理 报考指数 的 xmlreq_exponent 结果
	 */	
	 function proceForExponent(param)
	 {
		if(xmlreq_exponent.readyState == 4)
		{		
			if(xmlreq_exponent.status == 200 || xmlreq_exponent.status == 0)
			{
				parseXml(xmlreq_exponent.responseText,param);
			}
			else
			{
				//window.alert("读取xml发生异常");
				//alert(xmlreq_exponent.statusText);
			}
		}
	 }
	 
	
	//网友推荐专业的接口的请求Request()
    var xmlreq_commendSpecialty = false;
	/**
	 * 为 网友推荐专业 的 xmlreq_commendSpecialty 赋值
	 */	
	function newXMLHttpRequestForCommendSpecialty()
	 {
		  if (window.XMLHttpRequest) 
		  {
		    	xmlreq_commendSpecialty = new XMLHttpRequest();	
		  } 
		  else if (window.ActiveXObject)
		  {
				try
				{
					xmlreq_commendSpecialty = new ActiveXObject("Msxml2.XMLHTTP");	
				} 
				catch (e1)
				{
						try 
						{	
							xmlreq_commendSpecialty = new ActiveXObject("Microsoft.XMLHTTP");	
						}
						catch (e2)
						{
							
						}
				}
		   }
	}
	/**
	 * 为 网友推荐专业 的 xmlreq_commendSpecialty 发起请求
	 */	
	function sendXmlForCommendSpecialty(url, param)
	{
            newXMLHttpRequestForCommendSpecialty();
			try
			{
				xmlreq_commendSpecialty.onreadystatechange= function(){proceForCommendSpecialty(param)};
				xmlreq_commendSpecialty.open("GET", url, true);		
				xmlreq_commendSpecialty.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
				xmlreq_commendSpecialty.send(null);	
			}
			catch(exception)
			{
				//alert("请求发送失败");
			}
	}
	/**
	 * 处理 网友推荐专业 的 xmlreq_commendSpecialty 结果
	 */	
	function proceForCommendSpecialty(param)
	{
		if(xmlreq_commendSpecialty.readyState == 4)
		{		
			if(xmlreq_commendSpecialty.status == 200 || xmlreq_commendSpecialty.status == 0)
			{	
				parseXml(xmlreq_commendSpecialty.responseText,param);
			}
			else
			{
				//window.alert("读取xml发生异常");
				//alert(xmlreq_commendSpecialty.statusText);
			}
		}
	}
	
	
	//关注此高校的接口的请求Request()
    var xmlreq_attentionSchoolList = false;
    /**
	 * 为 关注此高校 的 xmlreq_attentionSchoolList 赋值
	 */	
	function newXMLHttpRequestForAttentionSchoolList()
	 {
		  if (window.XMLHttpRequest) 
		  {
		    	xmlreq_attentionSchoolList = new XMLHttpRequest();	
		  } 
		  else if (window.ActiveXObject)
		  {
				try
				{
					xmlreq_attentionSchoolList = new ActiveXObject("Msxml2.XMLHTTP");	
				} 
				catch (e1)
				{
						try 
						{	
							xmlreq_attentionSchoolList = new ActiveXObject("Microsoft.XMLHTTP");	
						}
						catch (e2)
						{
							
						}
				}
		   }
	}
	/**
	 * 为 关注此高校 的 xmlreq_attentionSchoolList 发起请求
	 */	
	function sendXmlForAttentionSchoolList(url, param)
	{
            newXMLHttpRequestForAttentionSchoolList();
			try
			{
				xmlreq_attentionSchoolList.onreadystatechange= function(){proceForAttentionSchoolList(param)};
				xmlreq_attentionSchoolList.open("GET", url, true);		
				xmlreq_attentionSchoolList.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
				xmlreq_attentionSchoolList.send(null);	
			}
			catch(exception)
			{
				//alert("请求发送失败");
			}
	}
	/**
	 * 处 关注此高校 的 xmlreq_attentionSchoolList 请求
	 */	
	function proceForAttentionSchoolList(param)
	{
		if(xmlreq_attentionSchoolList.readyState == 4)
		{		
			if(xmlreq_attentionSchoolList.status == 200 || xmlreq_attentionSchoolList.status == 0)
			{	
				parseXml(xmlreq_attentionSchoolList.responseText,param);
			}
			else
			{
				//window.alert("读取xml发生异常");
				//alert(xmlreq_attentionSchoolList.statusText);
			}
		}
	}
	
	
	//了解此高校的接口的请求Request()
	var xmlreq_realizeSchoolList = false;
    /**
	 * 为 了解此高校 的 xmlreq_realizeSchoolList 赋值
	 */	
	function newXMLHttpRequestForRealizeSchoolList()
	 {
		  if (window.XMLHttpRequest) 
		  {
		    	xmlreq_realizeSchoolList = new XMLHttpRequest();	
		  } 
		  else if (window.ActiveXObject)
		  {
				try
				{
					xmlreq_realizeSchoolList = new ActiveXObject("Msxml2.XMLHTTP");	
				} 
				catch (e1)
				{
						try 
						{	
							xmlreq_realizeSchoolList = new ActiveXObject("Microsoft.XMLHTTP");	
						}
						catch (e2)
						{
							
						}
				}
		   }
	}
    /**
	 * 为 了解此高校 的 xmlreq_realizeSchoolList 发起请求
	 */	
	function sendXmlForRealizeSchoolList(url, param)
	{
            newXMLHttpRequestForRealizeSchoolList();
			try
			{
				xmlreq_realizeSchoolList.onreadystatechange= function(){proceForRealizeSchoolList(param)};
				xmlreq_realizeSchoolList.open("GET", url, true);		
				xmlreq_realizeSchoolList.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
				xmlreq_realizeSchoolList.send(null);	
			}
			catch(exception)
			{
			    //alert(exception['message']);
				//alert("请求发送失败");
			}
	}
	/**
	 * 处理 了解此高校 的 xmlreq_realizeSchoolList 请求
	 */	
	function proceForRealizeSchoolList(param)
	{
		if(xmlreq_realizeSchoolList.readyState == 4)
		{		
			if(xmlreq_realizeSchoolList.status == 200 || xmlreq_realizeSchoolList.status == 0)
			{	
				parseXml(xmlreq_realizeSchoolList.responseText,param);
			}
			else
			{
				//window.alert("读取xml发生异常");
				//alert(xmlreq_realizeSchoolList.statusText);
			}
		}
	}
	
		
    /**
     * 为相应的div赋值
     */
	function parseXml(xmlDom,div_id)
	{
	   
		var content = xmlDom;
		document.getElementById(div_id).innerHTML = content;
	}

	
