function clearValidationMessages(selector){if(selector){$(selector).remove();}else{$('.formError').remove();}}
function replaceWidget(what,withWhat){var trueElement=$(dijit.byId(what).domNode);var tmpId='_'+Math.ceil(Math.random()*100000);trueElement.wrap('<span id="'+tmpId+'"></span>');dijit.byId(what).destroy();$('#'+tmpId).html(withWhat);try{dojo.parser.parse(tmpId);}catch(e){}}
$(function(){$('.formError').live('click',function(){$(this).remove();});});
