awhitley2 0 Newbie Poster

I am very new at javascript and programming in general. I am using the following function and 9 more labeled "doAjax1" through "doAjax10" respectively. I have an html file called "ch2_xhrMockServer.htm" that I am calling 10 sets of json data from with the name of each being "response1" through "response10". I have 10 separate html buttons that call up each separate function. I am sure I could do this with a single function instead of 10 separate functions. I am too new at this. Any ideas on how to do this? Once I see it, I can do it from now on. Thanks everybody, and sorry for being so dense as to not be able to do something that is probably very simple to most of you. I guess we have to start somewhere. Here is the code:

function doAjax1()
		{
			dojo.xhrGet({ url : "ch2_xhrMockServer.htm",
			content : { var1 : "val1", var2 : "val2" },
			load : function(resp)
				{
					var o = dojo.fromJson(resp);
					dojo.byId("ajaxResponse").innerHTML = o.response1;
				}
			});
		}

Here is an example of the html content buttons that call each function.

<span class="pic1">
			<img border='0px' id="pic1" src='img/homePageButton.png' alt='Click Here' onClick="doAjax1();">
		</span>
		<br /><br />
		<span class="pic2">
			<img border='0px' id="pic2" src='img/Page2InfoButton.png' alt='Click Here' onClick="doAjax2();">
		</span>