function showTicker(type, title, w, h, lang) 
{ 
	add = (type!='hb_mem' && type!='oly_wi' && type!='eh_mwm' && type!='fb_mwm') ? 'index_digibet.html' : '';
	height = (!h) ? 600 : h;
	width = (!w) ? 750 : w;
	lang = (!lang) ? '' : '?language='+lang;
	
	url = encodeURI('http://redaktion.digibet.tv/digibet.info/flashticker/data/my_'+type+'/html_php/'+add+lang);
	
	window.open('http://www.etracker.de/lnkcnt.php?et=7PKES9&url='+url+'&lnkname=DigibetInfo-'+title, title,'location=no,scrollbars=no,directories=no,menubar=no,toolbar=no,status=no,resizeable=no,width='+width+',height='+height+',screenX=0,screenY=0,left=0,top=0'); 
}

function showRC()
{
	el = document.getElementById('rc');
	(el && el.style.display == 'none') ? el.style.display = 'block' : el.style.display = 'none';
}

function openMulti(url)
{
	var width = 1050;
	var height = 750;
	var attribs = 'left=0,top=0,width=' + width + ',height=' + height + ', location=no, toolbar=no, scrollbars=yes,resizable=yes,left='+screen.availWidth/4+',top='+screen.availHeight/4;
	multi = window.open(url, 'Multicast', attribs);
	multi.focus;

	return false;
}

function popUp(url, w, h, text, hasOwnContent)
{
	sb = (!hasOwnContent) ? 'no' : 'yes';
	
	var tools = "resizable,toolbar=no,location=no,scrollbars="+sb+",width="+w+",height="+h+",left="+screen.availWidth/4+",top="+screen.availHeight/4;
	newWin = window.open(url, 'newWin', tools);
	
	if(!hasOwnContent)
	{
		newWin.document.writeln('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">');
		newWin.document.writeln('<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">');
		newWin.document.writeln('<meta http-equiv="imagetoolbar" content="no">');
		newWin.document.writeln('<title> digibet.info - '+text+' </title>');
		newWin.document.writeln('<style type="text/css">');
		newWin.document.writeln('<!--');
		newWin.document.writeln('body { margin: 0; padding: 0; color: #000; background: #f0f0f0; font: 12px Verdana, sans-serif; }');
		newWin.document.writeln('img { margin: 0 auto; padding: 0; border: none; }');
		newWin.document.writeln('p.text { padding: 0 10px; text-align: center; }');
		newWin.document.writeln('-->');
		newWin.document.writeln('</style> </head>');
		newWin.document.write('<body> <p>');
		newWin.document.write('<a href="#" onclick="javascript:window.close();"> <img src="'+url+'" alt="'+text+'"> </a>');
		newWin.document.writeln('</p>');
		newWin.document.writeln('<p class="text">'+text+'</p>');
		newWin.document.writeln('</body>');
		newWin.document.write('</html>');
		newWin.document.close();
	}
	
	newWin.focus();
	return false;
}

function openStats(id, lang, user)
{
	width = 820;
	height = 600;
	if(!user) user='digibet';
	
	url = 'http://www.stats.betradar.com/statistics/'+user+'/?language=' + lang + '&tournamentid=' + id;
	attribs = 'left=0,top=0,width=' + width + ',height=' + height + ',scrollbars=yes,resizable=yes';
	stats = window.open(url, 'Statistics', attribs);
	stats.focus;
	
	return false;
}

// old stuff. just in for backwards comp
function bl() { window.open('http://www.etracker.de/lnkcnt.php?et=7PKES9&url=http://redaktion.digibet.tv/digibet.info/flashticker/data/my_fb_mbl/html_php/index_digibet.html&lnkname=DigibetInfo-BLLiveticker','LiveTicker','location=no,scrollbars=no,directories=no,menubar=no,toolbar=no,status=no,resizeable=no,width=750,height=600,screenX=0,screenY=0,left=0,top=0'); }
function bltv() { window.open('http://www.etracker.de/lnkcnt.php?et=7PKES9&url=http%3A%2F%2Fredaktion.digibet.tv%2Fdigibet.info%2Fflashticker%2Fdata%2Fmy_fb_btv%2Fhtml_php%2Findex_digibet.html&lnkname=digibetInfo_BLLiveticker-TV','LiveTicker','location=no,scrollbars=no,directories=no,menubar=no,toolbar=no,status=no,resizeable=no,width=750,height=600,screenX=0,screenY=0,left=0,top=0'); }
function pl() { window.open('http://www.etracker.de/lnkcnt.php?et=7PKES9&url=http://redaktion.digibet.tv/digibet.info/flashticker/data/my_fb_mpl/html_php/index_digibet.html&lnkname=DigibetInfo-PLLiveticker','LiveTicker','location=no,scrollbars=no,directories=no,menubar=no,toolbar=no,status=no,resizeable=no,width=750,height=600,screenX=0,screenY=0,left=0,top=0'); }
function em() { window.open('http://www.etracker.de/lnkcnt.php?et=7PKES9&url=http://redaktion.digibet.tv/digibet.info/flashticker/data/my_fb_mem/html_php/index_digibet.html&lnkname=DigibetInfo-EMLiveticker','LiveTicker','location=no,scrollbars=no,directories=no,menubar=no,toolbar=no,status=no,resizeable=no,width=750,height=600,screenX=0,screenY=0,left=0,top=0'); }
function emgb() { window.open('http://www.etracker.de/lnkcnt.php?et=7PKES9&url=http://redaktion.digibet.tv/digibet.info/flashticker/data/my_fb_mgm/html_php/index_digibet.html&lnkname=DigibetInfo-EMLiveticker','LiveTicker','location=no,scrollbars=no,directories=no,menubar=no,toolbar=no,status=no,resizeable=no,width=750,height=600,screenX=0,screenY=0,left=0,top=0'); }
function oly() { window.open('http://www.etracker.de/lnkcnt.php?et=7PKES9&url=http://redaktion.digibet.tv/digibet.info/flashticker/data/my_oly_so/html_php/index_digibet.html&lnkname=DigibetInfo-OLLiveticker','LiveTicker','location=no,scrollbars=no,directories=no,menubar=no,toolbar=no,status=no,resizeable=no,width=750,height=600,screenX=0,screenY=0,left=0,top=0'); }
function olygb() { window.open('http://www.etracker.de/lnkcnt.php?et=7PKES9&url=http://redaktion.digibet.tv/digibet.info/flashticker/data/my_oly_gb/html_php/index_digibet.html&lnkname=DigibetInfo-OLLiveticker-GB','LiveTicker','location=no,scrollbars=no,directories=no,menubar=no,toolbar=no,status=no,resizeable=no,width=750,height=600,screenX=0,screenY=0,left=0,top=0'); }
function olyes() { window.open('http://www.etracker.de/lnkcnt.php?et=7PKES9&url=http://redaktion.digibet.tv/digibet.info/flashticker/data/my_oly_es/html_php/index_digibet.html&lnkname=DigibetInfo-OLLiveticker-ES','LiveTicker','location=no,scrollbars=no,directories=no,menubar=no,toolbar=no,status=no,resizeable=no,width=750,height=600,screenX=0,screenY=0,left=0,top=0'); }