function notify(text,type,refID){if(!$('notificationArea'))
return false;onclick='Effect.Fade(this.parentNode);';if(refID){unhideNote(refID);onclick+="hideNote('"+refID+"');";}
$('notificationArea').innerHTML='<div><a class="btnX" href="javascript:void(0)" onclick="'+onclick+'" title="Hide this message"><img src="/img/btnX.png" alt="x" /></a><ul class="'+type+'"><li>'+text+'</li></ul></div>';if(type=='success'){$('notificationArea').getElementsByTagName('div')[0].style.backgroundColor='transparent';new Effect.Highlight('notificationArea',{startcolor:'#bee3b7',endcolor:'#f0ffef',restorecolor:'#f0ffef'});}}
function hideNote(refID){var q='nocache='+new Date().getTime();q+='&refID='+refID;var myAjax=new Ajax.Request('/ajax/hide-note',{parameters:q});}
function unhideNote(refID){var q='nocache='+new Date().getTime();q+='&refID='+refID;q+='&unhide=1';var myAjax=new Ajax.Request('/ajax/hide-note',{parameters:q});}
function resetNotes(){var myAjax=new Ajax.Request('/ajax/reset-notes',{parameters:'nocache='+new Date().getTime(),onComplete:notify('All messages have been unhidden.','success')});}
function removeFormOverlay(){if(!$('formOverlay'))return;Element.remove('formOverlay');}
function addFormOverlay(){if(!$('formMain')||$('formOverlay'))return;new Insertion.Top('formMain','<div id="formOverlay"></div>');}