// Browser detect

var ie4 = (document.all && !document.getElementById) ? true:false;
var ns4 = (document.layers) ? true:false;


/****************************************************************
pop-up window functionality
*****************************************************************/
window.onerror=null;
var win = null;

function newWindow(mypage, myname, w, h, scroll) {
closePopWin();
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',noresize';
win = window.open(mypage, myname, winprops);
}

function closePopWin() {
     if(win != null) {
          if(!win.closed) {
              win.close();
              win = null;
          } else {
              win = null;
          }
     }
}
/****************************************************************
pop-up window functionality
*****************************************************************/