// global variables to form email addresses
var pref = ""; // subdomain, or ""
var at1 = "@";
var dot = ".";
var typ = "com";
var id1=new Array("","off","ni");    // real id1 for email
var id2=new Array("","ice","cki");    // real id2 for eamil
var url = "shamanicjourneys";       // real email domain


// We call this with onclick="FixMail(this,x);" in the a tag, where x is the index to a list of email addresses

function FixMail (obj1,x) {  // fix a hyperlink mail addr
var tmp;
  tmp = obj1.href;
  if (tmp.indexOf('?') > -1) {  // look for parameters to pass along
	  params = tmp.split('?');
	  obj1.href = "mailto:" + id1[x] + id2[x] + at1 + url + dot + typ + '?' + params[1];
	  }
	  else {
	  obj1.href = "mailto:" + id1[x] + id2[x] + at1 + url + dot + typ;
	  }
  return true;             // make it work...
}

function setEmail(obj1,name,dom) {
	var tmp;
  tmp = obj1.href;
  if (tmp.indexOf('?') > -1) {  // look for parameters to pass along
	  params = tmp.split('?');
	  obj1.href = "mailto:" + name + at1 + dom + '?' + params[1];
	  }
	  else {
	  obj1.href = "mailto:" + name + at1 + dom;
	  }
  return true;             // make it work...
}
	
