﻿// JScript File

// onload event functions:

// http://www.scottandrew.com/weblog/articles/cbs-events
function addEvent2(obj, evType, fn, useCapture){
  if (obj.addEventListener){
    obj.addEventListener(evType, fn, useCapture);
    return true;
  } else if (obj.attachEvent){
    var r = obj.attachEvent("on"+evType, fn);
    return r;
  } else {
    alert("Handler could not be attached");
  }
} 

   function removeEvent(obj, evType, fn, useCapture){
  if (obj.removeEventListener){
    obj.removeEventListener(evType, fn, useCapture);
    return true;
  } else if (obj.detachEvent){
    var r = obj.detachEvent("on"+evType, fn);
    return r;
  } else {
    alert("Handler could not be removed");
  }
}      
        
        
        
// http://simonwillison.net/2004/May/26/addLoadEvent/
    function addLoadEvent(func) {
      var oldonload = window.onload;
      if (typeof window.onload != 'function') {
        window.onload = func;
      } else {
        window.onload = function() {
          if (oldonload) {
            oldonload();
          }
          func();
        }
      }
    }


// mailto: somebody at celltrust.com function
function em(to){
    addr = 'mailto:' + to + '&#64;bellasirena.com';
    window.open(addr,'_self');}
function emgrs(to){
	addr = 'mailto:' + to + '&#64;globalresultspr.com';
window.open(addr,'_self');}
function emtmc(to){
	addr = 'mailto:' + to + '&#64;tmc.com';
window.open(addr,'_self');}
function emabc(to){
	addr = 'mailto:' + to + '&#64;urbacs.com';
window.open(addr,'_self');}


