function SafeMail(name, domain, display, css, subject) {
  css       = (css)     ? ' class="' + css + '"' : '';
  subject   = (subject) ? '?subject=' + subject : '';
  displayed = (display) ? display : name + '@' + domain;
  mailto    = name + '@' + domain + subject;
  document.write('<a href="mailto:' + mailto + '"' + css + '>' + displayed + '</a>');
}
function SetFocus(fieldname,formname){if (formname == ''){ formname = 'form'; }if (eval("document."+formname+".elements[fieldname].value == ''")){ eval("document."+formname+".elements[fieldname].focus();"); }}
function SpellCheck() {
	var speller = new spellChecker();
	speller.spellCheckAll();
}
function DisableButtonImg(obj) {
  obj.src          = '/images/loading.gif';
  obj.disabled     = true;
  obj.style.border = 'none';
}
function DisableButtonTxt(obj) {
  obj.value        = 'Processing...';
  obj.disabled     = true;
  obj.style.border = 'none';
}
function  DisableInput(obj) {
	obj.value        = 'Processing...';
	obj.disabled     = true;
 
}
function SubmitForm(obj, form_action) {
  // disable button
 // DisableButtonTxt(obj);
  DisableInput(obj);
  // get elements
  var frm = document.forms[obj.form.name];
  var act = frm.elements['form_action'];
  
  // set form action
  act.value = form_action;
  
  // submit form
  frm.submit();
}
function HideOutput() {
  // check for previous reponses/errors
  if ($('flash')) { Element.hide('flash'); }
}
function ToggleElement(id) {
  if ($(id)) { Element.toggle(id); }
}