function getFormParams(formId){
	var namesAndValues = "";
	$(":input", formId).each(function(){
		if($(this).attr("type") == "checkbox" || $(this).attr("type") == "radio"){
			//handle checkboxes and radio buttons 'checked' state
			if($(this).attr("checked")){
				namesAndValues += $(this).attr("name") + "=" + $(this).attr("value") + "&";
			}
		}
		else if($(this).attr("type") == "submit"){
			//don't pass in submit buttons
		}
		else{
			if(typeof $(this).attr("value") == "undefined"){
				namesAndValues += $(this).attr("name") + "=";
			}
			else{			
				namesAndValues += $(this).attr("name") + "=" + $(this).attr("value") + "&";
			}
		}
	});
	//remove trailing ampersand
	return namesAndValues.substring(0, namesAndValues.length-1);
}
