/*

	Script Information:

		Original: Eric King (http://redrival.com/eak/)
		Modifications: Ryan Martinsen (http://blog.ryanware.com/)
	
	Usage:
	
		<a href="http://www.industrialmedia.ca/" onClick="popupWindow(this.href,'name'); return false;">450x470 popup window positioned at x 25, y 25</a>
		<a href="http://www.industrialmedia.ca/" onClick="popupWindow(this.href,'name','','','',600); return false;">450x470 popup window positioned at x 25, y 600</a>
		<a href="http://www.industrialmedia.ca/" onClick="popupWindow(this.href,'name','',100);return false;">450×100 popup window positioned at x 25, y 25</a>
		<a href="http://www.industrialmedia.ca/" onClick="popupWindow(this.href,'name',500,600,350,450);return false;">500×600 popup window positioned at x 350, y 450</a>
		<a href="http://www.industrialmedia.ca/" onClick="popupWindow(this.href,'name','',700,'',600);return false;">450×700 popup window positioned at x 25, y 600</a>

*/

function popupWindow(url, name, w, h, x, y) {
	if (!w) w = 550;
	if (!h) h = 400;
	if (!x) x = 25;
	if (!y) y = 25;
	
	 winprops = 'toolbar=no,location=no,' +
    'directories=no,status=no,menubar=no,scrollbars=yes,' +
    'resizable=no,copyhistory=no,width='+w+',height='+h+',' +
    'screenX='+x+',screenY='+y+',top='+x+',left='+y	
	
	win = window.open(url, name, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}