// Script source: W. Shultz
// Copyright 2004
// Do not remove this notice
// Modified for simpler inclusion into pages by JHP Jr 12-29-07
// global variables to form addresses
var at1 = "@";
var dot = ".";
var id1 = "webmaster";
var id2 = "sales";
var id3 = "membership"
var id4 = "archives"
var typ = "org";
var url = "erielackhs";

// Mail obfuscation assembler for erielackhs.org addys that is MUCH easier to use in pages
// Construct the email hyperlink as follows:
// <a href="mailto:address" onclick="elhsM(this,'Subject: of mail')">Shown link text</a>
// "address"    ^^^^^^^^^ is replaced with portion of email addy BEFORE the @erielackhs.org
// If you really want to learn how this works or how to use it, email Henry
// JHP Jr 12-29-07
function elhsM (obj1,obj2)
{
  obj1.href = obj1 + at1 + url + dot + typ + "?subject=" + obj2;
  return true;
}

// Will Shultz' obfuscation methods are below this line
// Used for forms
function FixBusi (obj1) {  // PayPal FORM business value
  if (obj1.business)       // see what is in this form
    obj1.business.value = id2 + at1 + url + dot + typ;
  if (obj1.receiver_email)
  	obj1.receiver_email = id2 + at1 + url + dot + typ;
  return true;             // make it work...
}

function FixBusiMem (obj1) {  // PayPal FORM business value
  if (obj1.business)       // see what is in this form
    obj1.business.value = id3 + at1 + url + dot + typ;
  if (obj1.receiver_email)
  	obj1.receiver_email = id3 + at1 + url + dot + typ;
  return true;             // make it work...
}

function FixBusiArch (obj1) {  // PayPal FORM business value
  if (obj1.business)       // see what is in this form
    obj1.business.value = id4 + at1 + url + dot + typ;
  if (obj1.receiver_email)
  	obj1.receiver_email = id4 + at1 + url + dot + typ;
  return true;             // make it work...
}

function FixLink (obj1) {  // fix any link on page
  tmp = obj1.href;         // link contents
  ary = tmp.split ("elhs4u");       // fake value
  tmp = ary.join  (id1);         // real value
  ary = tmp.split ("yahoo.com");           // fake URL
  tmp = ary.join  (url + typ);  // real URL
  obj1.href = tmp;
}

function FixMail (obj1) {  // fix a hyperlink mail addr for webmaster
  obj1.href = "mailto:" + id1 + at1 + url + dot + typ + "?subject=" + whereibe;
  return true;
}

function FixSalesMail (obj1) {  // fix a hyperlink mail addr for sales
  obj1.href = "mailto:" + id2 + at1 + url + dot + typ + "?subject=ELHS Sales Inquiry";
  return true;
}

function FixMemMail (obj1) {  // fix a hyperlink mail addr for sales
  obj1.href = "mailto:" + id3 + at1 + url + dot + typ + "?subject=ELHS Membership Inquiry";
  return true;
}

function FixMemMailv (obj1) {  // fix a hyperlink mail addr for sales
  obj1.href = "mailto:" + id3 + at1 + url + dot + typ + "?subject=" + whereibe;
  return true;
}

function FixArchMail (obj1) {  // fix a hyperlink mail addr for archives
  obj1.href = "mailto:" + id4 + at1 + url + dot + typ + "?subject=ELHS Archives";
  return true;
}

function FixArchMailv (obj1) {  // fix a hyperlink mail addr for archives
  obj1.href = "mailto:" + id4 + at1 + url + dot + typ + "?subject=" + whereibe;
  return true;
}

