<!--
/*
Examples of Including the javascript file. Place this in the <head> section 
of your webpage or template:
  <script src="/js/safe_ma_il.js"></script>
Examples of function calls. Place in body of webpage. 
Display Name:
	<script>safe_ma_il("joe.blow","inter.net","Joe Blow")</script>
Display Address:
	<script>safe_ma_il("joe.blow","inter.net")</script>
Display Graphic:
	<script>safe_ma_il("joe.blow","inter.net","<img src=joeblow.gif>")</script>
No Operation:
	<script>safe_ma_il("")</script>
*/
function safe_ma_il(name, domain, display) {
if (typeof(name)=="undefined") { return; }
if (name == "") { return; }
domain_d=(typeof(domain)=="undefined") ? "ewp.rpi.edu" : domain
if (domain_d == "e") { domain_d = "ewp.rpi.edu"; }
if (domain_d == "ewp") { domain_d = "ewp.rpi.edu"; }
if (domain_d == "r") { domain_d = "rpi.edu"; }
if (domain_d == "rpi") { domain_d = "rpi.edu"; }
if (domain_d == "h") { domain_d = "ewp.rpi.edu"; }
if (domain_d == "hartford") { domain_d = "ewp.rpi.edu"; }
displayed=(typeof(display)=="undefined") ? name+"@"+domain_d : display
document.write('<a href=ma' + 'ilto:' + name + '@' + domain_d + '>' + displayed + '</a>');
}

function safe_ma_il_2(name, domain, display) {
if (typeof(name)=="undefined") { return; }
if (name == "") { return; }
domain_d=(typeof(domain)=="undefined") ? "ewp.rpi.edu" : domain
if (domain_d == "e") { domain_d = "ewp.rpi.edu"; }
if (domain_d == "ewp") { domain_d = "ewp.rpi.edu"; }
if (domain_d == "r") { domain_d = "rpi.edu"; }
if (domain_d == "rpi") { domain_d = "rpi.edu"; }
if (domain_d == "h") { domain_d = "ewp.rpi.edu"; }
if (domain_d == "hartford") { domain_d = "ewp.rpi.edu"; }
at_char = "@";
displayed=(typeof(display)=="undefined") ? name + at_char + domain_d : display
//bh
displayed="<img STYLE='border:none;' src='http://www.ewp.rpi.edu/tis/glyphs/08.gif' width='9' height='11'/><img STYLE='border:none;' src='http://www.ewp.rpi.edu/tis/glyphs/08.gif' width='9' height='11'/>"
document.write('<a href=ma' + 'ilto:' + name + at_char + domain_d + '>' + displayed + '</a>');
}

function reloadCAPTCHA() {

  document.getElementById('CAPTCHA').src='http://www.ewp.rpi.edu/cgi-bin/form-captcha/captcha.cgi?randomnumber?'+Date();

}
// -->
