function newWindow(mypage,myname,w,h,features) {
  if(screen.width){ 
  var winl = (screen.width-w)/2; 
  var wint = (screen.height-h)/2;
  }else{winl = 0;wint =0;}
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=' + h + ',';
  settings += 'width=' + w + ',';
  settings += 'top=' + wint + ',';
  settings += 'left=' + winl + ',';
  settings += features;
  win = window.open(mypage,myname,settings);
  win.window.focus();
}

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 popup(url,winName,W,H,X,Y) {
if(W == undefined) W = 300; if(H == undefined) H = 221; 
if(X == undefined) X = screen.width/2-W/2; 
if(Y == undefined) Y = screen.height/2-H/2; 
winprops = 'height='+H+',width='+W+',top='+X+',left='+Y+',scrollbars=no'; 
win = window.open(url, winName, winprops); 
if (parseInt(navigator.appVersion) >= 4) {win.window.focus(); } 
}