function addEvent(obj, evt, func) {
  if (obj.attachEvent) {
	return obj.attachEvent(("on"+evt), func);
  } else if (obj.addEventListener) {
	obj.addEventListener(evt, func, true);
	return true;
  }
  return false;
}

function XMLHTTPRequest() {
  try {
	return new XMLHttpRequest(); // FF, Safari, Konqueror, Opera, ...
  } catch(ee) {
	try {
	  return new ActiveXObject("Msxml2.XMLHTTP"); // activeX (IE5.5+/MSXML2+)
	} catch(e) {
	  try {
		return new ActiveXObject("Microsoft.XMLHTTP"); // activeX (IE5+/MSXML1)
	  } catch(E) {
		return false; // doesn't support
	  }
	}
  }
}
