var xmlReturn;  //xmlHttp, 
function xmlRequest(Name,Content,PostFunction) {
if(typeof xmlHttp == 'undefined') {
	var xmlHttp = null;
	}
if(typeof XMLHttpRequest!='undefined') {
	xmlHttp = new XMLHttpRequest();
	}
else {	
	xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
	}

	var ptr;
	if(xmlHttp != null) {
		if(PostFunction == null) {
			PostFunction = "returnNothing()"
			}
		xmlHttp.open('POST',Name,true);
		xmlHttp.onreadystatechange=function() {
		if (xmlHttp.readyState==4) {
			ptr = xmlHttp.responseText.indexOf('OK')
			if((ptr>=0) && (ptr<= 3)) {
				xmlReturn = 1
				}
			else {
				ptr = xmlHttp.responseText.indexOf('WARNING')
				if((ptr>=0) && (ptr<= 3)) {
					xmlReturn = 2
					alert(xmlHttp.responseText)
					}
				else {
					ptr = xmlHttp.responseText.indexOf('ERROR')
					if((ptr>=0) && (ptr<= 3)) {
						xmlReturn = 3
						alert(xmlHttp.responseText)
						}
					else {
						xmlReturn = 4
						try {
							eval(xmlHttp.responseText)
							}
						catch(e) {
							var eWin =    window.open("","UnexpectedError")
							eWin.document.write(xmlHttp.responseText)
							//alert("Unexpected Error\n" + xmlHttp.responseText)
							}
						} 
					} 				
				}
			setTimeout(PostFunction,10)
			}
		}
		xmlHttp.setRequestHeader("Content-Type","multipart/mime")
		xmlHttp.send(Content)
		}
	else {
		alert("Unable to create XML HTTP Request")
		}
	}
	
function returnNothing() {
	return
	}

