function SDDotCom()
{
  this.addLoadEvent = function(func)
  {
    var oldonload = window.onload;
    window.onload = function()
    {
      if (typeof(oldonload) == "function")
        oldonload();
      if (typeof(func)=="function")
        func();
      else if(typeof(func)=="string")
        eval(func);
    }
  }

  this.addUnLoadEvent = function(func)
  {
    var oldunonload = window.load;
    window.onunload = function()
    {
      if (typeof(oldunonload)=="function")
        oldunonload();
      if (typeof(func)=="function")
        func();
      else if (typeof(func)=="string")
        eval(func);
    }
  }

  this.$ = function(sId)
	{
		if (!sId) {
			return null;
		}
		var returnObj = document.getElementById(sId);
		if (!returnObj && document.all) {
			returnObj = document.all[sId];
		}
		return returnObj;
	}
}

var sdcom = new SDDotCom();

