// http://www.captain.at/howto-ajax-form-post-request.php
var http_request = false;
   function makePOSTRequest(url, parameters) {
      http_request = false;
      if (window.XMLHttpRequest) { // Mozilla, Safari,...
         http_request = new XMLHttpRequest();
         if (http_request.overrideMimeType) {
         	// set type accordingly to anticipated content type
            //http_request.overrideMimeType('text/xml');
            http_request.overrideMimeType('text/html');
         }
      } else if (window.ActiveXObject) { // IE
         try {
            http_request = new ActiveXObject("Msxml2.XMLHTTP");
         } catch (e) {
            try {
               http_request = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {}
         }
      }
      if (!http_request) {
         alert('Cannot create XMLHTTP instance');
         return false;
      }
      
      http_request.onreadystatechange = alertContents;
      http_request.open('POST', url, true);
      http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
      http_request.setRequestHeader("Content-length", parameters.length);
      http_request.setRequestHeader("Connection", "close");
      http_request.send(parameters);
   }

   function alertContents() {
      if (http_request.readyState == 4) {
         if (http_request.status == 200) {
            //alert(http_request.responseText);
            result = http_request.responseText;
            document.getElementById('myspan').innerHTML = result;            
         } else {
            alert('There was a problem with the request.');
         }
      }
   }
   

   
	function bericht(obj) {
      var poststr = "do=" + encodeURI( document.getElementById("do").value ) +
	  				"&id=" + encodeURI( document.getElementById("id").value ) +
                    "&page=" + encodeURI( document.getElementById("page").value ) +
					"&pwd=" + encodeURI( document.getElementById("pwd").value ) ;
      makePOSTRequest('http://www.amstelbigband.nl/gastenboek/index.php?', poststr);
	  		//		ajaxpage('http://www.amstelbigband.nl/abb/gastenboek/index.php', 'rightcolumn');
	  //alert(makePOSTRequest('http://www.amstelbigband.nl/abb/gastenboek/index.php?', poststr));
   }	


	function insert(obj) {
      var poststr = "do=" + encodeURI( document.getElementById("do").value ) +
	  				"&vname=" + encodeURI( document.getElementById("vname").value ) +
                    "&vemail=" + encodeURI( document.getElementById("vemail").value ) +
					"&vurl=" + encodeURI( document.getElementById("vurl").value ) +
					//"&vcomment=" + encodeURI( document.getElementById("vcomment").value ) +
					"&vcomment=" + encodeURIComponent( document.getElementById("vcomment").value ) +
					"&vsecc=" + encodeURI( document.getElementById("vsecc").value ) ;
      makePOSTRequest('http://www.amstelbigband.nl/gastenboek/index.php?', poststr);
	  				//ajaxpage('http://www.amstelbigband.nl/abb/gastenboek/index.php', 'rightcolumn');
	  //alert(makePOSTRequest('http://www.amstelbigband.nl/abb/gastenboek/index.php?', poststr));
   }
   
  
    function contact(obj) {
      var poststr = "Submit=" + encodeURI( document.getElementById("Submit").value ) +
	  				"&uwemail=" + encodeURI( document.getElementById("uwemail").value ) +
                    "&sub=" + encodeURI( document.getElementById("sub").value ) +
					"&field=" + encodeURI( document.getElementById("field").value ) +
					"&name=" + encodeURI( document.getElementById("name").value );
      makePOSTRequest('http://www.amstelbigband.nl/contact.php?', poststr);
	  				//ajaxpage('http://www.amstelbigband.nl/abb/contact.php', 'rightcolumn');
	  //alert(makePOSTRequest('http://www.amstelbigband.nl/abb/gastenboek/index.php?', poststr));
   }



var message="";

function clickIE()
 
{if (document.all)
{(message);return false;}}
 
function clickNS(e) {
if
(document.layers||(document.getElementById&&!document.all))
{
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.  onmousedown=clickNS;}
else
{document.onmouseup=clickNS;document.oncontextmenu  =clickIE;}
 
document.oncontextmenu=new Function("return false")


