function addEvent(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;
  }
}

function popChrome(url){
var uLink = window.open(url,'newWin','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=yes, width=800, height=600,left=45,top=45,screenX=45,screenY=45');
window.moveTo(0,0);
uLink.focus();
	}
function popUp(url, name, width, height, bars, chrome){
var x = (screen.availWidth - width) / 2;
var y = (screen.availHeight - height) / 2;
var popup = window.open(url,name,'scrollbars='+bars+',width='+width+',height='+ height+',left=' +x+',top='+y+',screenX='+x+',screenY=' + y);
popup.resizeTo(width, height);
popup.focus();
}


