/* Script to use abbr in IE */
function styleAbbr() {
  var oldBodyText, newBodyText, reg
  if (isIE) {
    oldBodyText = document.body.innerHTML;
    reg = /<ABBR([^>]*)>([^<]*)<\/ABBR>/g;
    newBodyText = oldBodyText.replace(reg, '<ABBR $1><SPAN class=\"abbr\" $1>$2</SPAN></ABBR>');
    document.body.innerHTML = newBodyText;
  }
}

window.onload = function(){
  styleAbbr()
};

var isIE = (document.all) ? true:false;

/* Script to checkRequired (simpliest form) */
function getLabelForId(id) {
 var label, labels = document.getElementsByTagName('label');
 for (var i = 0; (label = labels[i]); i++) {
   if (label.htmlFor == id) {
     return label;
   }
 }
 return false;
}
function checkRequired(id) {
 var formfield = document.getElementById(id);
 var label = getLabelForId(id);
 if (formfield.value.length == 0) {
   label.className = 'problem';
 } else {
   label.className = 'completed';
 }
} 

/* Script to use on focus in forms for IE */
