var bName = navigator.appName;
var bVersion = parseInt(navigator.appVersion);
var NS4 = (bName == "Netscape" && bVersion >= 4);
var IE4 = (bName == "Microsoft Internet Explorer" && bVersion >= 4);

function checkchars(form) {
var maxdef=2000;
var maxitem=100;
var maxemail=200;
if (form.definition.value.length > maxdef) {
alert("Please do not enter more than 15 characters.  Please shorten your entry and submit again.");
return false;
   }
if (form.email.value.length > maxemail) {
alert("Your email address seems too long. Please check it for accuracy.");
return false;
   }
else return true;
}

// Function 1
function swapClass(text, spName, urlName, oldName, clName, over) 
{
  if (bVersion < 4) 
    return;

  var str = "<A CLASS='" + clName + "' HREF='" + urlName + "'";

  if (over) 
  {
    str += " onMouseOut=\"swapClass(\'" + text + "\', \'" + spName + "\', \'" + urlName + "\', \'" + clName + "\', \'" + oldName + "\', false)\">";
  } else {
    str += " onMouseOver=\"swapClass(\'" + text + "\', \'" + spName + "\', \'" + urlName + "\', \'" + clName + "\', \'" + oldName + "\', true)\">";
  }

  str += text + "</A>";
  display(spName, str); 
}


// function 2
function display(id, str) 
{
  if (NS4 || IE4) 
  { 
    if (NS4) 
    { 
      with (document[id].document) 
      {
        open(); 
        write(str); 
        close(); 
      }
    } else { 
      document.all[id].innerHTML = str; 
    }
  }
}

// Function 3
function swapClass2(text, urlName, oldName, clName, over) 
{
  if (bVersion < 4) 
    return;

  var str = "<A CLASS='" + clName + "' HREF='" + urlName + "'";

  if (over) 
  {
    str += " onMouseOut=\"swapClass2(\'" + text + "\', \'" + urlName + "\', \'" + clName + "\', \'" + oldName + "\', false)\">";
  } else {
    str += " onMouseOver=\"swapClass2(\'" + text + "\', \'" + urlName + "\', \'" + clName + "\', \'" + oldName + "\', true)\">";
  }

  str += text + "</A>";
  display2(str); 
}


// function 4
function display2(str) 
{
  if (NS4 || IE4) 
  { 
    if (NS4) 
    { 
      with (document.document) 
      {
        open(); 
        write(str); 
        close(); 
      }
    } else { 
      document.all.innerHTML = str; 
    }
  }
}