/*
Auto center window script- Eric King (http://redrival.com/eak/index.shtml)
Permission granted to Dynamic Drive to feature script in archive
For full source, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/

var win = null;
function NewWindow(url,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
decomwindow = window.open(url,myname,settings)
}
/* To add more options to the windows add or remove the following options at the end of the settings line
   ,directories   -   ,location   -   ,menubar   -   ,resizable    -    ,status    -    ,toolbar
*/



<!--
/*  Copyright Eric King : http://www.eak.homeip.net - © 2000 - 2002
    This script is free to use for any non profit website as long as this info is left in  */

function NewWindow2(u,n,w,h,f,p,x,y)
{var ws=window.screen?1:0,
	 m=Math,
	 C='center',
	 R='random',
	 M='custom',
	 sw=screen.availWidth,
	 sh=screen.availHeight,
	 T=(p==C&&ws)?(sh-h)/2:(p==R&&ws)?(m.floor(m.random()*(sh-h))):(p==M)?y:100,L=(p==C&&ws)?(sw-w)/2:(p==R&&ws)?(m.floor(m.random()*(sw-w))):(p==M)?x:100,s='width='+w+',height='+h+',top='+T+',left='+L;s+=(!f||f=='')?'':','+f;win=window.open(u,n,s);if(win.focus)win.focus();}
/* 
   u = url of the page to open
   n = name of the window
   w = width of the new window
   h = height of the new window
   f = features, options are: 'scrollbars,location,directories,status,menubar,toolbar,resizable'
   p = position of the window, options are: 'center' or 'random' or 'custom',x,y in custom x and y represent the upper left corner
*/
// -->

