function openNewWindow(url,name,features) { 
  if (features && (navigator.appName=="Netscape" || document.body)) {
    width=height="";
    s=features.indexOf("width")+5; n=0;
    while (n!=2 && (ch=features.charAt(s++)))
      if (ch>="0" && ch<="9") { width+=ch; n=1; } else n<<=1;
    s=features.indexOf("height")+5; n=0;
    while (n!=2 && (ch=features.charAt(s++)))
      if (ch>="0" && ch<="9") { height+=ch; n=1; } else n<<=1;
    leftpos=(navigator.appName=="Netscape"?
	     window.outerWidth/2+window.screenX:document.body.offsetWidth/2+window.screenLeft)-width/2;
    toppos= (navigator.appName=="Netscape"?
	     window.outerHeight/2+window.screenY:screen.height/2.5)-height/2;
    features+=",left="+leftpos+",top="+toppos+",screenX="+leftpos+",screenY="+toppos;
  } 
  newWindow=features?window.open(url,name,features):window.open(url,name);
}
