// AJAX Note Box

function stateChanged() 
{ 
	if (xmlHttp.readyState==4)
	{ 
		//alert(xmlHttp.responseText.toString());
		document.formNotes.strNotes.value = xmlHttp.responseText.replace(/<br>/gi, '\r');
	}
}

function getXmlHttpObject()
{
	var xmlHttp=null;
	try
	{
	// Firefox, Opera 8.0+, Safari
	xmlHttp=new XMLHttpRequest();
	}
	catch (e)
	{
	// Internet Explorer
	try
	{
	xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
	}
	catch (e)
	{
	xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	}
	return xmlHttp;
}

function getNotes() {
	
	xmlHttp=getXmlHttpObject();
	if (xmlHttp==null)
	{
		alert("Your browser does not support AJAX!");
		return;
	} 
	xmlHttp.onreadystatechange=stateChanged;
	//xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	xmlHttp.open("POST","/afa.asp?idWebPage=36362&strNotes=" + document.formNotes.strNotes.value.replace(/\r/gi, '<br>'), true);
	
	xmlHttp.send('');
	//alert("Updated");
}

//window.onload = getNotes;