//---------------------------------------------------------------------------------
//fckPopUp.js
//
//Provides functionality to create a link (within the FCK-Editor) which leads to
//a PopUp as Target-Window.
//
//This is standard-Day-Code! Under a standard CQ 4.1 Playground-Installation you 
//will find it in this file -> /apps/Components/richtexteditor/script.esp
//(and because it`s originally NOT located in the libs-folder we didn`t find this
//javascript-functionality in our ktzh-sourceCode) ;o)
//
//To make sure you can call this function from every page, this javascript is
//included in the files:
// /apps/global/templates/head.jsp and
// /apps/internet/templates/global/head.jsp
//
//Autor: Patrik Hipp
//Last Change: 31.08.2006
//---------------------------------------------------------------------------------


function CFC_popup(/*String*/ url, /*String*/ name, /*String*/ features)
	{
	var defaultWidth = 500;
	var defaultHeight = 400;
	

	//if (url.indexOf("/") == 0) url = "<%= context %>" + url;
	if (features.indexOf("width") == -1) features += ",width=" + defaultWidth;
	if (features.indexOf("height") == -1) features += ",height=" + defaultHeight;
	var w = window.open(url, name, features);
	w.focus();
	}
