function get_XmlHttp() {
	var xmlHttp = null;

	if (window.XMLHttpRequest) {
		xmlHttp = new XMLHttpRequest();
	} else if (window.ActiveXObject) {
		xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	}

	return xmlHttp;
}

function ajaxrequest(tagID, post) {
	var http = get_XmlHttp();
	var info = 'request=' + post;

	http.open("POST", 'destinations.ajax.regions.php', true);
	http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	http.send(info);

	http.onreadystatechange = function() {
		if (http.readyState == 4) {
			var mata = http.responseText.split("</option>");

			for (i = 0; i <= (mata.length - 2); i++) {
				var container = document.getElementById(tagID);
				var newdiv = document.createElement("option");
				if (i == 0) {
					container.innerHTML = '';
				}
				newdiv.innerHTML = mata[i];
				container.appendChild(newdiv);
			}

		}
	}
}
