function num2str(num) {
	return (num < 10) ? "0" + num : num;
}
function Trim(s) {
	if (s == "") {
		return "";
	}
	while (s.charAt(0) == " ") {
		s = s.substring(1, s.length);
	}
	if (s == "") {
		return "";
	}
	while (s.charAt(s.length - 1) == " ") {
		s = s.substring(0, s.length - 1);
	}
	return s;
}
function GetXmlHttpObject(){
	var xmlHttp = null;
	try {
		xmlHttp = new XMLHttpRequest();
	} catch (e) {
		try {
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	return xmlHttp;
}
