// Sets the email address for the selected affiliate.  Requires a <div> with
// an ID of "affiliateEmail" to be present on the page that calls this routine.
// @auther Steven Alhadef
function setAffiliateEmail(dropdown)
{
    // The list of email addresses -- same order at the drop down menu
    var emailAddresses = new Array(32)
    emailAddresses[0] = "";
    emailAddresses[1] = "cindihabitatarchuleta@centurytel.net"
    emailAddresses[2] = "volunteer@berthoudhabitat.org"
    emailAddresses[3] = "sbrubaker@bluesprucehabitat.org"
    emailAddresses[4] = "kim@chaffeehabitat.org"
    emailAddresses[5] = "frdav01@gmail.com"
    emailAddresses[6] = "kalie@habitatvailvalley.org"
    emailAddresses[7] = "emularz1124@aol.com"
    emailAddresses[8] = "eteague@flatironshabitat.org"
    emailAddresses[9] = "fchabitat@bresnan.net"
    emailAddresses[10] = "dpyles@fortcollinshabitat.org"
    emailAddresses[11] = "grandhabitat@earthlink.net"
    emailAddresses[12] = "volunteerghfh@yahoo.com"
    emailAddresses[13] = "gunnisonvalleyhabitat@gunnison.com"
    emailAddresses[14] = "jen@habitatdurango.org"
    emailAddresses[15] = "suggarfoote@msn.com"
    emailAddresses[16] = "marjie@lovelandhabitatforhumanity.org"
    emailAddresses[17] = "volunteer@hfhmesa.org"
    emailAddresses[18] = "jeanne@habitatmetrodenver.org"
    emailAddresses[19] = "loveincpat@yahoo.com"
    emailAddresses[20] = "jed1946@q.com"
    emailAddresses[21] = "hfhm@montrose.net"
    emailAddresses[22] = "jenny@pikespeakhabitat.org"
    emailAddresses[23] = "habitatofpueblo@gmail.com"
    emailAddresses[24] = "habitatrfv@gmail.com"
    emailAddresses[25] = "tlweeden@msn.com"
    emailAddresses[26] = "slvhabitat@yahoo.com"
    emailAddresses[27] = "jweyerman@stvrainhfh.org"
    emailAddresses[28] = "nsshockey@hotmail.com"
    emailAddresses[29] = "robbiripley@msn.com"
    emailAddresses[30] = "ninakothe@centurytel.net"
    emailAddresses[31] = "publius1787@comcast.net"

    // Determine the email based on the selected item
    var userIndex = dropdown.selectedIndex;
    var email = emailAddresses[userIndex];

    // Update the page to display the randomly selected image
    var affiliateEmail = document.getElementById("affiliateEmail");
    affiliateEmail.innerHTML = "<a href=\"mailto:" + email + "?Subject=Volunteer%20Inquiry\">" + email + "</a>";

    return true;
}