function openWindow(theURL,winName,features) {
	window.open(theURL,winName,features);
}

// laurin
function clearLrnTitle(lrnTitle) {
	aSEARCH = new Array('\\xa0','\\xae','&reg;','%','®','\\.','Ä','Ö','Ü','ä','ö','ü','ß','`','´','&nbsp;','&', '\\x3f','<i>','<\\/i>','<b>','<\\/b>','<I>','<\\/I>','<B>','<\\/B>', '\\/', '<br>', '<BR>','  ', ' ', '___', '__','\\xa0','\\(','\\)');
	aREPLACE = new Array('','','','','','','Ae','Oe','Ue','ae','oe','ue','ss','','','_','_', '', '', '', '', '', '','','','','_','_','_','_','_','_','_','_','_','_');
	
	for (a=0; a<aSEARCH.length; a++) {
		eval('lrnTitle = lrnTitle.replace(/'+aSEARCH[a]+'/g, "'+aREPLACE[a]+'");');
	}
	return lrnTitle;
}

function veranstaltungZeigen(verNum) {
	veranstaltungenWin=window.open(webroot+'/index.php'+querystring_separator+'fuseaction/veranstaltungen/veranstaltungs_id/'+verNum,'veranstaltungen',openWindowParam);
}

function elwin(elwinID,elwinW,elwinH,elwinURL,elwinOptions) {
	o = new Array();
	// DEFINE DEFAULTS
	o['r'] = 'no'; // resizable = no
	o['s'] = 'no'; // scrollbars = no
	if (elwinOptions == 's') {
		for (c=0; c<elwinOptions.length; c++) {
			o[elwinOptions.charAt(c)] = 'yes';
		}
	}
	elWindow=window.open(elwinURL,'elwindow'+elwinID,'width='+elwinW+',height='+elwinH+',resizable='+o['r']+',scrollbars='+o['s']);
	elWindow.focus();
}

function scaleup(scaleupID,scaleupW,scaleupH,scaleupURL,scaleupOptions) {
	o = new Array();
	// DEFINE DEFAULTS
	o['r'] = 'yes'; // resizable = no
	o['s'] = 'no'; // scrollbars = no
	if (scaleupOptions == 's') {
		for (c=0; c<scaleupOptions.length; c++) {
			o[scaleupOptions.charAt(c)] = 'yes';
		}
	}
	scaleupWindow=window.open(scaleupURL,'scaleupwindow'+scaleupID,'width='+scaleupW+',height='+scaleupH+',resizable='+o['r']+',scrollbars='+o['s']);
	scaleupWindow.focus();
}

function slideInElwin(elwinID,elwinW,elwinH,elwinURL) {
	elWindow=window.open(elwinURL,'elwindow'+elwinID,'width='+elwinW+',height='+elwinH+',resizable=yes,scrollbars=no');
	elWindow.focus();
}

function printPage(printUrl) {
	//if (!lrnPath) printUrl=document.location.href; else printUrl=lrnPath;
	//printUrl=printUrl.replace(/index\.php/,"index.php/fuseaction/print");
	//if (document.location.search) printUrl=printUrl+document.location.search;
	printWin=window.open(printUrl,'printWindow','width=720, height=520,menubar=yes,status=yes,resizable=yes,scrollbars=yes');
}

function tellafriend(id) {
	mailWin=window.open(webroot+'/index.php'+querystring_separator+'fuseaction/tellafriend/id/'+id,'mailWindow','width=480, height=480,resizable=yes,scrollbars=yes');
}

function glossary(showHide,gURL) {
	gwin=window.open(gURL,'gwin','width=480, height=360,resizable=yes,scrollbars=yes');
	gwin.focus();
	/*	if (gURL != '') gtarget.document.location.href=gURL;
		if (!nav){
			var gd = document.getElementById('glossarylayer');
			if (gd) {
				gd.style.left = tempX-200;
				gd.style.top  = tempY-100;
			}
		} else {
			document.glossarylayer.left = tempX-200;
	 		document.glossarylayer.top  = tempY-100;
		}
		MM_showHideLayers('glossarylayer','',showHide);
	}*/
}


// Browser Check
function browserCheck() {
	UA = new Array();
	browserPlatform = navigator.platform;
	ua = navigator.userAgent;
	an = navigator.appName;
	ua = ua.toLowerCase();
	ua_msie = ua.indexOf('msie');
	ua_netscape = ua.indexOf('netscape');
	ua_mozilla = ua.indexOf('mozilla');
	ua_opera = ua.indexOf('opera');
	userAgent = 'other';
	if (ua_msie != -1 && ua_opera == -1) userAgent = 'MSIE';
	if (ua_opera != -1) userAgent = 'Opera';
	if (ua_msie == -1 && ua_opera == -1) {
		userAgent = 'Netscape';
		browserVersion = parseFloat(ua.substr(8, 4));
		if (browserVersion >= 5) { // Netscape 6 or higher
			pos = ua.indexOf('netscape');
			if (pos != -1) browserVersion = parseFloat(ua.substr(pos+9, 4));
		}
	}
	if (userAgent == 'MSIE') browserVersion = parseFloat(ua.substr(ua_msie + 5, 5));
	if (userAgent == 'Opera') browserVersion = parseFloat(ua.substr(ua_opera + 6, 4));
	UA[0] = userAgent;
	UA[1] = browserVersion;
	UA[2] = browserPlatform;
	return UA;
}
userAgent = browserCheck();

// ROSENTHAL KATALOG NAVIGATION
function rNAV(rLEVEL) {
	lc = '';
	for (r=1;r<=katnav[rLEVEL].length-1;r++) {
		path=katnav[rLEVEL][r]['id'];
		if (katnav[rLEVEL][r]['id'] == katpath.substr(0,path.length)) lc += '<b>';
		lc += '&gt; <a href="'+webroot+'/'+katpage+'R'+path+'/'+katnav[rLEVEL][r]['link']+'.htm">';
		lc += katnav[rLEVEL][r]['name'];
		lc += '</a>';
		if (katnav[rLEVEL][r]['id'] == katpath.substr(0,path.length)) lc += '</b>';
		lc += '<br>';
	}
	lc = '<table cellpadding="4" cellspacing="0" bgcolor="#f5f5f5" border="0"><tr><td>'+lc+'</td></tr></table>';
	xx_position(-20,10);
	MM_setTextOfLayer('menuLayer','',escape(lc));
	MM_showHideLayers('menuLayer','','show');
}

