function sbwin_closed(w){ var ua = navigator.userAgent; if(!!w){ if(ua.indexOf('MSIE 4')!=-1 && ua.indexOf('Win')!=-1) return w.closed; else return typeof w.document != 'object'; }else return true } function openWin(url,wid,hgt,opt,name){ if(!name) name="subwindow"; if(!wid) wid=400; if(!hgt) hgt=600; if(!opt) opt="toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,left=0,top=0"; if(window.open){ if(sbwin_closed(name)) var w = window.open(url,name,"width="+wid+",height="+hgt+","+opt); else name.location.href=url; w.focus(); } else location.href=url; }