function createXHR() 
	{
	    var request = false;
	        try {
	            request = new ActiveXObject('Msxml2.XMLHTTP');
	        }
	        catch (err2) {
	            try {
	                request = new ActiveXObject('Microsoft.XMLHTTP');
	            }
	            catch (err3) {
			try {
				request = new XMLHttpRequest();
			}
			catch (err1) 
			{
				request = false;
			}
	            }
	        }
	    return request;
	}

	function submitForm(url, content, daid)	// url is the script and data is a string of parameters
	{ 
		var xhr = createXHR();

		xhr.onreadystatechange=function()
		{ 
			if(xhr.readyState == 4)
			{
				var commentdiv = document.getElementById(daid);
					if(xhr.status  == 200){
						commentdiv.innerHTML = ""+xhr.responseText;
					}else{
						commentdiv.innerHTML = "Error posting comment.";
					}
			}
		}; 
		xhr.open("POST", url, true);		
		xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xhr.send(content); 
	} 
