// JavaScript Document
var xmlHttp = false;

var webTopPath = "/";
	
	function CrXMLHttpRequest() {
		xmlHttpObj = ["Microsoft.xmlHttp","MSXML2.xmlHttp.5.0","MSXML2.xmlHttp.4.0","MSXML2.xmlHttp.3.0","MSXML2.xmlHttp"];
		if(window.XMLHttpRequest) { //Mozilla 浏览器
			xmlHttp = new XMLHttpRequest();
		} else if(window.ActiveXObject) {
			for(i=0;i<xmlHttpObj.length;i++) {
				xmlHttp = new ActiveXObject(xmlHttpObj[i]);
				if(xmlHttp) {
					break;    
				}
			}
		} else {
			return false;
		}
		return xmlHttp?xmlHttp:false;
	}
	
	function sendQuery(value1) {
		var url = webTopPath+"includes/actionscript.php?pubyear=" + value1;
		CrXMLHttpRequest();
		xmlHttp.open("GET", url, true);
		xmlHttp.onreadystatechange = ReadyQuery;
		xmlHttp.send(null);
	}
	
	function ReadyQuery() {
		if (xmlHttp.readyState == 4) {
			if (xmlHttp.status == 200) {
				var state = xmlHttp.responseText;
				var frm = document.getElementById("pubnumber");
				frm.options.length = 0;
				frm.options[0] = new Option("=全年=",0)
				if( state!="0" ) {
					var option_id = state.split("‖");
					for(var i=0; i<option_id.length; i++){
						var a = i+1;
						var select_id = option_id[i].split("|");
						frm.options[a] = new Option(select_id[1],select_id[0]);
					}
				}
			}
		}
	}
