
function sendform(theForm, values, onSuccess, onFailure, evalScripts) {
	theForm = $(theForm);
	var myCall = new Array();
	if(values != null) {
		for (i = 0; i < values.length; i++) {
			myCall[i] = new Element('input');
		     myCall[i].setProperties({'type': 'hidden', 'name': 'arg[' + i + ']', 'value': values[i]});
			$(theForm).adopt(myCall[i]);
		}
	}
	var now = new Date();
  	var additional = "tc=" + now.getSeconds() + "." + now.getMilliseconds();
  	theForm.action = theForm.action + (theForm.action.match(/\?/) ? "&" : "?") + additional;
  	theForm.send({	method: 'post', 
    				evalScripts: (evalScripts && evalScripts == true),
    				onSuccess: function(response) { if(onSuccess) onSuccess(response, true); }, 
    				onFailure: function(response) { if(onFailure) onFailure(response, false); }
    			});
}
