// -------- START: popupExtWin
// popup opener function, used for popups from content
function popupExtWin(wurl, wname, size, resize, navi) {
	size=new String(size);
	if (navi == 0) {
		var wfeatures = 'toolbar=no,location=no,directories=no,status=no,menubar=no,';
	} else {
		var wfeatures = 'toolbar=yes,menubar=yes,location=yes,status=yes,directories=yes,';
	}
	
	if (resize == 0) {
		wfeatures = wfeatures + 'scrollbars=no,resizable=no,'
		widthOffSet = 0;
	} else {
		wfeatures = wfeatures + 'scrollbars=yes,resizable=yes,'
		widthOffSet = 16;
	}
	
	newWinSize = size.charAt(0);
	switch(parseInt(newWinSize)) {
		case 0: 
			theFirst	= size.indexOf("-");
			theSecond	= size.lastIndexOf("-");
			winWidth	= size.slice(theFirst+1,theSecond) ;
			winHeight	= size.slice(theSecond+1) ;
			break;
		case 1:
			// 5 columns - old: width=400,height=400
			winWidth	= 390;
			winHeight	= 393;
			break;
		case 2:
			// 7 columns - old: width=600,height=500
			winWidth	= 546;
			winHeight	= 493;
			break;
		case 3:
			// 8 columns - old: width=800,height=600
			winWidth	= 624;
			winHeight	= 493;
			break;
		case 4:
			// ?
			winWidth	= 1024;
			winHeight	= 768;
			break;
		default:
			// 8 columns is default - old: width=800,height=600
			winWidth	= 624;
			winHeight	= 493;
			break;
	} 
	wfeatures = wfeatures + 'width=' + (parseInt(winWidth)+parseInt(widthOffSet)) + ',height=' + winHeight
	jetzt = new Date();
	windowName = "newExtPopupWin" + jetzt.getHours() + jetzt.getMinutes() + jetzt.getSeconds();

	//now we need to escape th wurl afer the second questionmark. this could be when a visuaal scope is used
	wurllist = wurl.split('?');
	newwurlback = '';
	i = 2;
	while ( i < wurllist.length) {
		newwurlback = newwurlback + '?' + wurllist[i];
		i++;
	}
	
	newwurlback = escape(newwurlback);
	wurl = wurllist[0];
	
	if (wurllist.length > 1) {wurl = wurl + '?' + wurllist[1];}
	wurl = wurl + newwurlback;
    
	newCmd = windowName + "= window.open(wurl, windowName, wfeatures);";
	eval(newCmd);
}
// -------- END: popupExtWin

function termsPopUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=600,height=500');");
}