function showForm(msgID)
{
	if (msgID=="")
	{
		document.getElementById("commentSection").innerHTML="";
		return;
	}
	if (window.XMLHttpRequest)
	{// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
	}
	else
	{// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	xmlhttp.onreadystatechange=function()
	{
		if (xmlhttp.readyState==4 && xmlhttp.status==200)
		{
			document.getElementById("commentSection").innerHTML=xmlhttp.responseText;
			document.getElementById("instructions").innerHTML='*=required field<br /><br />';
		}
	}
	xmlhttp.open("GET","/layout/commentForm.asp?msgID="+msgID,true);
	xmlhttp.send();
}

function submitForm(msgID)
{
	if (msgID=="")
	{
		document.getElementById("commentSection").innerHTML="";
		return;
	}
	if (window.XMLHttpRequest)
	{// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
	}
	else
	{// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	xmlhttp.onreadystatechange=function()
	{
		if (xmlhttp.readyState==4 && xmlhttp.status==200)
		{
			document.getElementById("commentSection").innerHTML=xmlhttp.responseText;
			if (xmlhttp.responseText.indexOf("NOTE:") != -1){
				document.getElementById("instructions").innerHTML='Please correct your information';
			}
			else
			{
				document.getElementById("instructions").innerHTML='Message received for review.';
			}
		}
	}
	var comments = encodeURIComponent(document.getElementById("comments").value);
	var email = document.getElementById("email").value;
	var name = encodeURIComponent(document.getElementById("name").value);
	xmlhttp.open("POST","/webApp/doComments.asp",true);
	xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
	xmlhttp.send('msgID='+msgID+'&comments='+comments+'&email='+email+'&name='+name);
}
