/*
Various Javascript functions.
To use these functions on a page use the cut the following text and paste it in the HEAD tag of the page.

<SCRIPT LANGUAGE="JavaScript" src=/jscript/helpers.js></SCRIPT>

*/


/*
getmail function 

Meant to obfuscate the email addresses to prevent them from being culled by bots.
To use this place the following text where you want the address to appear and change 
the username to the appropriate string.

<script language=javascript>getmail("username")</script>

*/
function getmail(usrnm)

{
var domain = "kctcs.edu"
document.write("<A HREF=" + "mail" + "to:" + usrnm + "@" + domain + ">" + usrnm + "@" + domain + "</A>") 
}

function getmail2(usrnm,dm)

{
var domain = dm
document.write("<A HREF=" + "mail" + "to:" + usrnm + "@" + domain + ">" + usrnm + "@" + domain + "</A>") 
}

/* 
setclass function

This function sets the class of a particular tag to the string entered.  
This function is used specifically to control the look of the current page
in the mainmenu section of the page. 

myElement - This should be the ID attribute of the element whose class 
is to be changed

myClass - This is the class to set the element to.
 */ 
function setClass(myElement, myClass) {

  document.getElementById(myElement).className = myClass;

}

