function loadXMLDoc(m) {
	var nm=encodeURI(document.form1.nm.value);
	var em=encodeURI(document.form1.em.value);
	var cm=encodeURI(document.form1.cm.value);
	var l =cm.length
	if (l>500)
	{
	alert("Comment cannot be longer than 500 characters. Your comment is " + l + " characters long");
	return false
	}
	document.form1.cm.value="";
	
	
	var url="/ce/postcomment.aspx?m=" + m + "&nm=" + nm +"&em="+em+"&cm="+cm;
	var currentTime = new Date();
	var vTicks = currentTime.valueOf();
	var strURL=url+'&r='+vTicks;		
	// branch for native XMLHttpRequest object
	if (window.XMLHttpRequest) {
		req = new XMLHttpRequest();
		req.onreadystatechange = processReqChange;
		req.open("GET", strURL, true);
		req.send(null);
	
		
	// branch for IE/Windows ActiveX version
	} else if (window.ActiveXObject) {
		req = new ActiveXObject("Microsoft.XMLHTTP");

		if (req) {
			req.onreadystatechange = processReqChange;
			req.open("GET", strURL, true);
			req.send();
		
		}
	}
	
}
function processReqChange() {
	// only if req shows "loaded"
	
	if (req.readyState == 4) {
		// only if "OK"
		if (req.status == 200) {	
			//document.getElementById("ttr").value=req.responseText;
			alert(req.responseText);
			return true
		} else {
			return false
		//	alert("There was a problem retrieving the XML data:\n" + req.statusText);
		}
	}
}
