function send_message()
{ 
	//Optional: Show a waiting message in the layer with ID ajax_response
	document.getElementById("contact_form_section").style.display = "none";	
	document.getElementById("status_text").innerHTML = "<p>Sending Message...</p>";	
	
	//Sending data
	xmlHttp = GetXmlHttpObject();
	if (xmlHttp != null)
	{			
		var name 	= encodeURI(document.getElementById('name').value);
		var phone = encodeURI(document.getElementById('phone').value);
		var email = encodeURI(document.getElementById('contact_email').value);
		var msg 	= encodeURI(document.getElementById('msg').value);
		var url		= "../admin/message_add.php";
		url = url +	"?submit_form=" + 1 + 
								"&name=" + name + 
								"&phone=" + phone + 
								"&email=" + email + 
								"&msg=" + msg + 
								"&sid=" + Math.random();
		xmlHttp.onreadystatechange = stateChanged;
		xmlHttp.open("GET", url, true);
		xmlHttp.send(null);
	} 
}

function stateChanged()
{ 
	if (xmlHttp.readyState == 4)
	{ 	
		document.getElementById("status_text").innerHTML = "";	
		document.getElementById("contact_form_section").style.display = "";	
		document.getElementById("contact_form_section").innerHTML = xmlHttp.responseText;	
	}
}
