cfx_versions["hotwin"] = "1.1";

function cfx_hotwin() {
	// args: url,name,wid,hei,flags
	// scrolling, locbar, menubar, resize, statusbar, full, bare
	var url = cfx_hotwin.arguments[0];
	var name = cfx_hotwin.arguments[1];
	var width = cfx_hotwin.arguments[2];
	var height = cfx_hotwin.arguments[3];
	var setfocus = false;
	var scrolling = "no";
	var locbar = "no";
	var menubar = "no";
	var tlbar = "no";
	var resize = "no";
	var statbar = "no";
	if (cfx_hotwin.arguments.length > 4) {
		for (var i = 4; i < cfx_hotwin.arguments.length; i++) {
			var currentarg = cfx_hotwin.arguments[i].toLowerCase();
			if (currentarg == "scrolling") {
				scrolling = "yes";
			} //endif
			if (currentarg == "locbar") {
				locbar = "yes";
			} //endif
			if (currentarg == "menubar") {
				menubar = "yes";
			} //endif
			if (currentarg == "resize") {
				resize = "yes";
			} //endif
			if (currentarg == "statusbar") {
				statbar = "yes";
			} //endif
			if (currentarg == "toolbar") {
				tlbar = "yes";
			} //endif
			if (currentarg == "focus") {
				setfocus = true;
			} //endif
			if (currentarg == "full") {
					tlbar = "yes";
					scrolling = "yes";
					locbar = "yes";
					menubar = "yes";
					resize = "yes";
					statbar = "yes";
					i = cfx_hotwin.arguments.length+1;
			} //endif
			if (currentarg == "bare") {
					tlbar = "no";
					scrolling = "no";
					locbar = "no";
					menubar = "no";
					resize = "no";
					statbar = "no";
					i = cfx_hotwin.arguments.length+1;
			} //endif
		} //endfor
	} //endif
	var flags = "width=" + width;
	flags += ",height=" + height;
	flags += ",scrollbars=" + scrolling;
	flags += ",location=" + locbar;
	flags += ",menubar=" + menubar;
	flags += ",resizable=" + resize;
	flags += ",toolbar=" + tlbar;
	flags += ",status=" + statbar;
	newwin = window.open(url,name,flags);
	if (setfocus) {
		window.setTimeout("newwin.focus();",100);
	} //endif
} //endfunction

function cfx_backlink(url) {
	window.opener.location = url;
	window.opener.focus();
	window.close();
} //endfunction
