﻿// JScript File

function showhide(id)
{ 
    if (document.getElementById)
    { 
        obj = document.getElementById(id); 
        if (obj.style.display == "none")
        { 
            obj.style.display = ""; 
        } 
        else 
        { 
            obj.style.display = "none"; 
        } 
    } 
} 

// Next 2 functions came from: http://www.codeproject.com/aspnet/spambot.asp
// open the client email with the specified address
function sendEmail(encodedEmail)
{
  // do the mailto: link
  location.href = "mailto:" + decodeEmail(encodedEmail);
}

// return the decoded email address
function decodeEmail(encodedEmail)
{
  // holds the decoded email address
  var email = "";

  // go through and decode the email address
  for (i=0; i < encodedEmail.length;)
  {
    // holds each letter (2 digits)
    var letter = "";
    letter = encodedEmail.charAt(i) + encodedEmail.charAt(i+1)

    // build the real email address
    email += String.fromCharCode(parseInt(letter,16));
    i += 2;
  }
  
  return email;
}    
