You can pass the button id via a get parameter to the next page and then read it with jQuery.
On Page 1 format your links like this
<a href="page2.html?button=temp1">Button 1</a>
On Page 2
var button = $.getUrlVars()['button'];
Which will store the value 'temp1' into the variable button
Or something similar to that.
EDIT: I wrote the code for you below, but you're going to want to brush up on your JavaScript.
On Page 2
<script type="text/javascript">
var button = $.getUrlVars()['button'];
//these values should correspond to the values you are passing in your get parameters.
switch(button){
case 'temp1':
$("#sTinyMceEditorId").load("Folder/firsttemplate.html");
break;
case 'temp2':
$("#sTinyMceEditorId").load("Folder/secondtemplate.html");
break;
case 'temp3':
$("#sTinyMceEditorId").load("Folder/thirdtemplate.html");
break;
default:
alert("Button id not recognized.");
break;
}
</script>
EDIT: The getUrlVars function as an extension of jQuery - forgot to include.
$.extend({
getUrlVars: function(){
var vars = [], hash;
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
for(var i = 0; i < hashes.length; i++){
hash = hashes[i].split('=');
vars.push(hash[0]);
vars[hash[0]] = hash[1];
}
return vars;
}
})