// global variables to form MY addresses

var pref = "";
var at1 = "@";
var dot = ".";
var typ = "com";
var ppid = "sa";        // real paypal id
var ppid2 = "les";    // real paypal id
var id1 = "in";        // real id1
var id2 = "fo";    // real id2
var url = "slickrockweb";       // real URL
var fid1 = "883";      // fake id1
var fid2 = "44"    // fake id2
var furl = "slickrock-marketing";    // fake URL
var idem1 = "in";        // real id1
var idem2 = "fo";    // real id2
var urlem = "slickrockweb";       // real URL
var wfid = "cgi-";        // real id1
var wfid2 = "bin";    // real id2
var wfid3 = "srwform";    // real id2
var ext = ".pl";       // real id3
var arg = "";       // trailing info
// Add rel="nofollow" to any links on the HTML page that won't contain the arg variable, trailing info

function FixBusi (obj1) {  // PayPal FORM business value
var tmp;
  if (obj1.business) {     // see what is in this form 
    tmp = obj1.business.value;
    obj1.business.value = ppid + ppid2 + at1 + url + dot + typ;
//    alert ("Fake business was ... \n   " + tmp + "\n\n\n" +
//           "Real business is  ... \n   " + obj1.business.value);
  }
  return true;             // make it work...
}

function Fixline (obj1) {  // FORM value
var tmp;
  if (obj1.testform.action.value) {     // see what is in this form 
    tmp = obj1.testform.action.value;
    obj1.testform.action.value = wfid + wfid2 + "/" + wfid3 + ext;
   alert ("Fake business was ... \n   " + tmp + "\n\n\n" + "Real business is  ... \n   " + obj1.testform.action.value);
  }
  return true;             // make it work...
}

function FixLink (obj1) {  // fix any link in calling FORM
var tmp,org,ary=new Array();
  for (i=0; i<obj1.length; i++) {  // run whole FORM
    obj = obj1.elements[i];        // address an element
// alert(obj.name);
    org = obj.value;
    tmp = org;  // place holder
    ary = tmp.split (furl);  // do we have a fake
    if (ary.length > 1) {    // still a fake
      tmp = ary.join (pref + url);
      obj.value = tmp;
// alert("Fix URL... \n\n" + obj.name + " value was ... \n   " + org + "\n\n\n" + "New value IS  ... \n   " + tmp);
    }
    org = tmp;  // any more stuff to fix?
    ary = tmp.split (fid1 + fid2);  // have a fake ID here?
    if (ary.length > 1) {    // still a fake
      tmp = ary.join (id1 + id2);
      obj.value = tmp;
// alert("Fix ID... \n\n" + obj.name + " value was ... \n   " + org + "\n\n\n" + "New value IS  ... \n   " + tmp);
    }
  }
}

function FixMail (obj1) {  // fix a hyperlink mail addr
var tmp;
  tmp = obj1.href;
  if (obj1.rel) {
    obj1.href = "mailto:" + idem1 + idem2 + at1 + urlem + dot + typ;
  }
  else {
    obj1.href = "mailto:" + idem1 + idem2 + at1 + urlem + dot + typ + arg;
	}
//  alert ("Fake E-mail address was ... \n   " + tmp + "\n\n\n" +
//         "Real E-mail address is  ... \n   " + obj1.href);
  return true;             // make it work...
}
