function popupWindow(id_str, settings_obj) {

	/*
	Example:

		popupWindow("sendtoafriend", {width: 300, height: 200, url: "sendtoafriend.asp", scrollbars: "no"});


	settings_obj example:
	{width: 300, height: 200, scrollbars: "yes", toolbar: "no", resizeable: "yes", url: "thing.html"}

	Note:	All these settings are optional. 
			If nothing is set, a default is used (see below). 
			If no URL is set, "popup/"+id_str+".html" is used.
	*/

	var popSettings_obj = {
		width: 400,
		height: 300,
		scrollbars: "yes",
		toolbar: "no",
		resizeable: "yes",
		url: "popup/"+id_str+".html"
	}

	if (settings_obj) {
		for (var item in settings_obj) {
			if (popSettings_obj[item]) {
				popSettings_obj[item] = settings_obj[item];
				//alert(item);
			}
		}
	}

	window.status="launching pop-up window";
	this.popWindow = window.open(popSettings_obj["url"], id_str, 'width='+popSettings_obj["width"]+',height='+popSettings_obj["height"]+',resizable='+popSettings_obj["resizeable"]+',scrollbars='+popSettings_obj["scrollbars"]+', toolbar='+popSettings_obj["toolbar"]);
	if (this.popWindow) {
		this.popWindow.focus();
		window.status="done";
		return true;
	} else {
		window.status="popup blocked";
		return false;
	}
}
