/**
 * IOTA
 *
 * 
 * Copyright (c)	James Benson - All rights reserved
 * 
 * You may not use or redistribute this code without prior written permission from the author, all other rights reserved
 *
 *
 *
 * @package			IOTA
 * @copyright		All Rights Reserved
 * @author			James Benson <james@jamesbenson.net>
 * @link			http://www.jamesbenson.co.uk
 */
function popup(url, width, height, left, top)
{
	if(!width)
	{
		width = 850;
	}
	
	if(!height)
	{
		height = 600;
	}
	
	
	if(!left)
	{
		var left = (screen.width-width)/2;
	}
	
	if(!top)
	{
		var top = (screen.height-height)/2;
	}
	
	var settings ='height='+height+',';
	settings +='width='+width+',';
	settings +='top='+top+',';
	settings +='left='+left+',';
	settings +='scrollbars=yes,';
	settings +='resizable=yes';
	settings +=',location=yes,toolbar=yes';
	
	win = window.open(url, '', settings);
	
	if(parseInt(navigator.appVersion) >= 4)
	{
		win.window.focus();
	}
	
}
