// declare new variables for each new div that you add, and link to the div by ID
// var region_div = document.getElementById("region_div");
var doc = null;

function ajax() {
	// Make a new XMLHttp object
	if (typeof window.ActiveXObject != 'undefined' ) doc = new ActiveXObject("Microsoft.XMLHTTP");
	else doc = new XMLHttpRequest();
}

function SelectRegions(dest, id){
    	ajax();

	// Load the result from the response page
	// ** As far a I know firefox will only load a document on the SAME domain!!	
	if (doc){
		doc.open("GET", "location.php?id=" + id, false);
		doc.send(null);

		field=document.getElementById(dest);
		field.innerHTML=doc.responseText;
	}
	else{
		alert('Browser unable to create XMLHttp Object');
	}
}

function GetFormContent(dest, form_type){
	if(form_type=='none'){
		field=document.getElementById(dest);
		field.innerHTML='';
		return;
	}
	ajax();
	if (doc){
		doc.open("GET", "form_content.php?form_type=" + form_type, false);
		doc.send(null);

		field=document.getElementById(dest);
		field.innerHTML=doc.responseText;
	}
	else{
		alert('Browser unable to create XMLHttp Object');
	}
}