/****************************************************************************************/
/*																						*/
/*	Accordent Link Menu v2.02															*/
/*	=========================															*/
/*																						*/
/*	Last Edited: 5/12/2008																*/
/*	Please send all comments & bug reports to: support@accordent.com					*/
/*																						*/
/****************************************************************************************/

var openThumbPage = false;

function openThumbWindow() {
	if (openThumbPage.window){
		openThumbPage.focus();
	} else {
		openThumbPage=window.open('thumbs.htm','thumbpage','scrollbars=yes,resizable=yes,width=194,height=640');
		openThumbPage.focus();
	}
}

function closeThumbWindow() {
	if (openThumbPage.window){
		openThumbPage.window.close();
	}
}

function hasP25() {
	var P25 = false;
	var plugin = navigator.mimeTypes && navigator.mimeTypes["application/x-ms-wmp"];
	var FFcheck = navigator.userAgent.indexOf("Firefox");
	if (plugin && FFcheck != -1)
		P25 = true;
	return P25;
}

function isBrowserIeWin() {
	var iewin = false;
	var ua = navigator.userAgent.toLowerCase();
	if ((ua.indexOf('ie') > -1) & (ua.indexOf('win') > -1))
		iewin = true;
	return iewin;
}

function MenuCheck() {
	var onDemand = 'visible';
	var P25 = false;
	var plugin = navigator.mimeTypes && navigator.mimeTypes["application/x-ms-wmp"];
	var FFcheck = navigator.userAgent.indexOf("Firefox");
	if (plugin && FFcheck != -1)
		P25 = true;
		
	try{
		if ((!isBrowserIeWin() && P25 != true) || onDemand != 'visible')	// hide chapters from non-windows os and non-ie browsers
			document.getElementById('chapters').style.display = 'none';

		var emailHtml = '';
		var emailTo = '';
		var chkNoTag = emailTo.indexOf("<@");
		if (emailTo != '' & chkNoTag < 0) {	// email address
			var ty4 = "Bilanz-Pressekonferenz";
			var ty4a = escape(ty4);
			emailHtml = '<a href=\"mailto:' + emailTo + '?subject=' + ty4a + '\">Email</a>';
		}
		document.getElementById('email').innerHTML = emailHtml;

		var downloadFile = '';
		chkNoTag = downloadFile.indexOf("<@");
		if (downloadFile == '' || chkNoTag > -1)	// no downloadable file
			document.getElementById('download').style.display = 'none';
	} catch(e) {}
}

function bgCheck() {
	var customBG = '';
	var chkNocustomBGTag = customBG.indexOf("<@");
	if(chkNocustomBGTag > -1)
		return;
	else if(customBG != '')
		document.getElementById("bgHolder").style.backgroundImage = "url()";
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function Lvl_openWin(u,n,w,h,l,t,c,f) {
  var x=((screen.width-w)/2);if(c==1){l=x;t=(screen.height-h)/2;}if(c==2){l=x}
	f+=',top='+t+',left='+l;LvlWin=window.open(u,n,f);LvlWin.focus();
}



