function httpPost(strURL,strData,oTarget) {
    var http=false;
    if (window.XMLHttpRequest) {http=new XMLHttpRequest();} else if (window.ActiveXObject) {http=new ActiveXObject("Microsoft.XMLHTTP");}
    http.open('POST', strURL, true);
    http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    http.onreadystatechange=function() {if (http.readyState == 4) {oTarget.innerHTML=http.responseText;}}
    http.send(strData);
    return false;
}

function httpGet(strURL,strData,oTarget) {
    	var http=false;
    	if (window.XMLHttpRequest) {http=new XMLHttpRequest();} else if (window.ActiveXObject) {http=new ActiveXObject("Microsoft.XMLHTTP");}
    	http.open('GET', strURL+'?'+strData, true);
    	http.onreadystatechange=function() {if (http.readyState == 4) {oTarget.innerHTML=http.responseText;}}
    	http.send(null);
    	return false;
}

//================================================
//
// usage
//
// <body>
// <form id="f1">
// <p>data: <input name="word" type="text" value="ok=true"></p> 
// <p>
// <input value="POST" type="button" onclick="JavaScript:httpPost('http://www.simpova.com/web/postto.asp',document.getElementById('f1').word.value,document.getElementById('result'))">
// <input value="GET" type="button" onclick="JavaScript:httpGet('http://www.simpova.com/',document.getElementById('f1').word.value,document.getElementById('result'))">
// </p>
// <hr />
// <div id="result"></div>
// </form>
// </body>
// </html>
//
//================================================


