function $(ID){
	return document.getElementById(ID);
}

function Input(ID){
	if($(ID).value == ""){
		return 0;
	}else{
		return 1;
	}
}

function redirect(url) {
	window.location.replace(url);
}

function showalert(err){
	alert("中联社提示您：\n\n------------------------------\n" + err + "\n------------------------------");
}

function ESAjax(){
	var _z = false;
	try {
		_z = new XMLHttpRequest();
	}catch (trymicrosoft){
		try {
			_z = new ActiveXObject("Msxml2.XMLHTTP");
		}catch (othermicrosoft){
			try {
				_z = new ActiveXObject("Microsoft.XMLHTTP");
			}catch (failed){
				_z = false;
			}
		}
	}
	this.setRequest = function(url,parameter,func){
		_z.open("POST",url,true); 
		_z.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); 
		_z.onreadystatechange = function(){
			if (_z.readyState==4){
				if (_z.status==200){
					func(_z.responseText);
				}
			}
		}
		_z.send(encodeURI(parameter));
	}
}
