
   var http34_request = false;
function makePOSTRequest34(url, parameters, tourid) {
      http34_request = false;
      if (window.XMLHttpRequest) { // Mozilla, Safari,...
         http34_request = new XMLHttpRequest();
         if (http34_request.overrideMimeType) {
         	// set type accordingly to anticipated content type
            //http34_request.overrideMimeType('text/xml');
            http34_request.overrideMimeType('text/html');
         }
      } else if (window.ActiveXObject) { // IE
         try {
            http34_request = new ActiveXObject("Msxml.XMLHTTP");
         } catch (e) {
            try {
               http34_request = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {}
         }
      }
      if (!http34_request) {
         alert('Cannot create XMLHTTP instance');
         return false;
      }
 
      http34_request.onreadystatechange = alertContents34;
      http34_request.open('POST', url, true);
      http34_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
      http34_request.setRequestHeader("Content-length", parameters.length);
      http34_request.setRequestHeader("Connection", "close");
      http34_request.send(parameters);
openmatches(tourid,'1',''); 
 
   }
 
   function alertContents34() {
      if (http34_request.readyState == 4) {
         if (http34_request.status == 200) {
            //alert(http34_request.responseText);
            result = http34_request.responseText;         
			document.getElementById('matchblock').innerHTML=result;
	     } else {
            alert('There was a problem with the request.');
         }
 
      }
  }
 
   function getsavemanmatch(obj,amount,tourid,status) {
	  var theid ='1';
      var poststr = "amount="+ amount +"&tourid="+tourid+"&status="+ status +"&posted=1&";
	  while(theid<amount)
	  {
	if(theid=='1')
	{  
	atheid=status +theid;
	poststr = poststr + atheid +"=" + encodeURI( document.getElementById(atheid).value );
	}
	else
	{
	atheid=status +theid;
	poststr = poststr+ "&" + atheid + "=" + encodeURI( document.getElementById(atheid).value );
	}
	 theid++;
	  }
   makePOSTRequest34('ajax/first/creatematches.php', poststr, tourid);
   }
