/////////////////////////////////////////////////////////////////////////
// mailto-hider.js
//
// This Javascript file contains functions that will embed "mailto"s in
// a web page;  the hope is that webcrawling bots (1) won't execute the
// Javascript and (2) therefore won't find the e-mail addresses and 
// (3) therefore we'll get less spam e-mail.
//
/////////////////////////////////////////////////////////////////////////


/////////////////////////////////////////////////////////////////////////
//
// The following strings are to be used as the address_part for the 
// function calls.  This way, we can change an address everywhere by
// changing just this variable.
//
/////////////////////////////////////////////////////////////////////////

var hide_awards       = "awards_comm"
var hide_director     = "director"
var hide_fundraising  = "fundraising"
var hide_judging      = "judging"
var hide_pres         = "pres"
var hide_promotions   = "promotions"
var hide_pubs         = "pubs"
var hide_src          = "src"
var hide_treasury     = "treasury"
var hide_volunteering = "volunteering"
var hide_webmaster    = "web_master"

var default_domain = "eisef.org"
var at_sign = "@"

/////////////////////////////////////////////////////////////////////////

function mailto_with_text( address_part,
                           descriptive_text ) {


   var full_address = address_part + at_sign + default_domain

   document.write( "<a href=\"mailto:" + full_address + "\">" );
   document.write( descriptive_text );
   document.write( "</a>" );
}

/////////////////////////////////////////////////////////////////////////

function mailto_show_address( address_part ) {

   var full_address = address_part + at_sign + default_domain
   mailto_with_text( address_part, full_address );
}
