
function xmlhttpPost(strURL, strSubmit, strResultFunc) {
    var xmlHttpReq = false;
    if (window.XMLHttpRequest) {
            xmlHttpReq = new XMLHttpRequest();
    }
    else if (window.ActiveXObject) {
            xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
	xmlHttpReq.open('POST', strURL, true);
	xmlHttpReq.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
    xmlHttpReq.onreadystatechange = function() {
		if (xmlHttpReq.readyState == 4) {
            eval(strResultFunc + '(xmlHttpReq.responseText);');
		}
    }
    xmlHttpReq.send(strSubmit);
}

function displayResult(strIn) {
	var strContent = '';	
	strContent = strIn
	document.getElementById("tekstiAlue").innerHTML = strContent
	//tekstiAlue.innerHTML = strContent
}

function displayResultPic(strIn) {
	var strContent = '';	
	strContent = strIn
	//kuvaAlue.innerHTML = strContent
	if (strIn.length == 0 ) {
		document.getElementById("kuvaAlue").style.display = 'none';
	}
}