function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}

/*	Bookmark Script */
function addBookmark(title, url) {
	if (window.sidebar) {
		window.sidebar.addPanel(title, url, "");
	}
	else if (document.all) {
		window.external.AddFavorite(url, title);
	}
	else if (window.opera && window.print) {
		return true;
	}
}

function winOpen(w,h,t,p) {
	if (!w) w=600;
	if (!h) h=400;
	if (!t) t='_win';
	if (!p) p=',resizable=1,scrollbars=1,menubar=1,status=1,toolbar=1,location=0';
	var newWin = window.open('',t,'width=' + w +',height='+ h + p);
	newWin.focus();
	return true;
}

/* grab Elements from the DOM by className
function getElementsByClass(searchClass,node,tag) {
	var classElements = new Array();
	if ( node == null )
		node = document;
	if ( tag == null )
		tag = '*';
	var els = node.getElementsByTagName(tag);
	var elsLen = els.length;
	var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
	for (i = 0, j = 0; i < elsLen; i++) {
		if ( pattern.test(els[i].className) ) {
			classElements[j] = els[i];
			j++;
		}
	}
	return classElements;
}*/
/*
function doButtonBoundaryFix() {
  var buttons = getElementsByClass("Button");
  var inputButtons = getElementsByClass("ButtonInput");

  for( var i = 0; i < buttons.length; i++) {
    buttons[i].onclick = function() {
      window.location = this.getElementsByTagName("a")[0].href;
    }
    buttons[i].onmouseover = function() {
      this.style.cursor = "pointer";
    }
  }
  the input button logic is a little different
     in that it needs to find the parent form element
     and attach a submit to the onclick
  for( var i = 0; i < inputButtons.length; i++) {
    inputButtons[i].onclick = function() {
      var parentForm = this.parentNode;
      while (parentForm.nodeName != "FORM") {
        parentForm = parentForm.parentNode;
      }

      parentForm.submit();
    }
    inputButtons[i].onmouseover = function() {
      this.style.cursor = "pointer";
    }
  }
}

addLoadEvent(doButtonBoundaryFix);*/