Sorry, I had forgotten about this.
$("#tab-container").tabs({
"onSelect": function(title){
if(lastTab != null){
eval(lastTab + "_OnUnload()")
}
eval(util_Simplify(title) + "_OnSelect()");
lastTab = util_Simplify(title);
}
});
util_Simplify goes through a string and puts everything to lower case and removes all spaces. The next version of my code will have objects that manage the content for each tab, and that can be handled easily with the code above by changing the _OnUnload() to .OnUnload().