//------------------------------------------------- // opens a new browser window with the size of // of 400 x 300. The menubar & scroll bars are // disabled. // // url - target url source // name - window name ) // //------------------------------------------------- function openPopupWindow(url,name) { window.open(url, name, "location=no,status=no,toolbar=no,menubar=no,directories=no,scrollbars=yes,resizable=no,width=400,height=300"); } //------------------------------------------------- // opens a new browser window with the size // set by the w/h parameters. // // url - target url source // name - window name // w - width // h - height // args - window preference arguments (optional) // center - center window on screen (true/false) // //------------------------------------------------- function openWindow(url,name,w,h, args, center ) { if ( center ) { myleft=(screen.width)?(screen.width-w)/2:100; mytop=(screen.height)?(screen.height-h)/2:100; args = "width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,menubar=no," + args ; } if ( args == null ) args = "location=no,status=no,toolbar=no,directories=no,location=no,scrollbars=yes,resizable=no,width="+w+",height="+h; newwin= window.open(url,name,args); if ( newwin != null ) newwin.focus(); return newwin; }