function popup(url, name, width, height, raise, toolbar, location, directories, status, menubar, scrollbars, resizeable) {
	var options = new Array();
	var option;
	var win;

	if ( width != null ) options.push("width="+width);
	if ( height != null ) options.push("height="+height);

	option = (toolbar != null && toolbar) ? 1 : 0;
	options.push("toolbar="+toolbar);

	option = (location != null && location) ? 1 : 0;
	options.push("location="+option);

	option = (directories != null && directories) ? 1 : 0;
	options.push("directories="+option);

	option = (status != null && status) ? 1 : 0;
	options.push("status="+option);

	option = (menubar != null && menubar) ? 1 : 0;
	options.push("menubar="+option);

	option = (scrollbars != null && scrollbars) ? 1 : 0;
	options.push("scrollbars="+option);

	option = (resizeable != null && resizeable) ? 1 : 0;
	options.push("resizeable="+option);

	win = window.open(url, name, options.join(","));
	if ( raise != null && raise ) win.focus();
}
