/*
 * Created on Nov 14, 2006
 *
 * Assign behaviors and event handlers to contextual help elements
 */
/** Assign event handlers to all contextual help toggle classed buttons **/

whatIsButtons = MochiKit.DOM.getElementsByTagAndClassName("a", 'whatIsButton');
helpButtons = MochiKit.DOM.getElementsByTagAndClassName("a", 'helpButton');
hideButtons = MochiKit.DOM.getElementsByTagAndClassName("div", 'contextHelpClose');

for(var i=0; i < whatIsButtons.length; i++){
	whatIsButtons[i].onclick = function(){ return toggleHelp(this.id.substring(13)); };
}
for(var i=0;  i < hideButtons.length; i++){
	hideButtons[i].onclick = function(){ return toggleHelp(this.id.substring(11)); };
}
for(var i=0;  i < helpButtons.length; i++){
	helpButtons[i].onclick = function(){ return toggleHelp(this.id.substring(10)); };
}
/** end contextual help event handler assignment **/