// JavaScript Document
// scenario1
function processClick1(inValue){
  //	alert("we are here" + inValue );
	   	new Ajax.Request("JSONscenario.php5", {
		parameters: "eventType="+inValue,
		asynchronous: true,
		method: "post",
		onComplete: function(xhrResponse) {
 	      var JSONreturn = (xhrResponse.responseText);
	//	alert(JSONreturn);
		JSONvalues = eval('(' + JSONreturn + ')');
	//	alert(JSONvalues.endYear);
		var stopDate = new Date(JSONvalues.endYear,JSONvalues.endMonth - 1,JSONvalues.endDay);
		var thisDay = new Date;
	//	alert (stopDate + "  " + thisDay);
			if (stopDate <= thisDay) {
			  alert ("Registration is now closed");	
			  //location.href = ("index.shtml");	
			return;
			}
			else location.href="http://www.oapaintball.com/scenariocc.php?Eventdate="+JSONvalues.eventDateNice+"&Amount=" + JSONvalues.amount +"&Eventname="+ JSONvalues.eventName + "&Location"+JSONvalues.location;
			
		},
		onFailure: function(xhrResponse) {
			//
			alert("this was failure getting important data, please try again");
			//$(tableId).parentNode.innerHTML = xhrResponse.statusText;
		}
		
	});
	return;
}
function pretendButtonsTo(inValue){
	inValue.style.backgroundColor = "#0000CC";
	inValue.style.cursor = "pointer";
}
function pretendButtonsfro(inValue){
inValue.style.backgroundColor = "#000";
}