
function openWindowHelper(url, name, params)
{
	if (typeof params == "undefined")
		params = "status=yes,resizable=yes,menubar=yes,scrollbars=yes,location=yes,toolbar=yes";
		
	var w = window.open(url, name, params);
	var success = false;
	if (url.indexOf("http") == 0 && url.indexOf("http://" + document.domain) != 0) {
		// This is an external URL, so we can't access the new window due to cross-domain
		// restrictions. So we can only use the less reliable method of checking whether
		// window.open returned a non-null value.
		success = (w != null);
	} else {
		// This is a local URL, so we can use the more reliable method of accessing a property
		// on the window.  Some pop-up blockers allow the window to open, but then close
		// it immediately.  This covers that situation.
		try {
			w.name;
			success = true;
		} catch (e) { }
	}
	
	if (!success) {
		alert(js_txt_Not_Open_Window);		
		return null;
	}
	return w;
}

function openWindow(url, name, params)
{
	var w = openWindowHelper(url, name, params);
}
