function _$(v) { return(document.getElementById(v)); }
function $S(v) { return(_$(v).style); }
function agent(v) { return(Math.max(navigator.userAgent.toLowerCase().indexOf(v),0)); }
function isset(v) { return((typeof(v)=='undefined' || v.length==0)?false:true); }
function intellidesk_XYwin(v) { var z=agent('msie')?Array(document.body.clientHeight,document.body.clientWidth):Array(window.innerHeight,window.innerWidth); return(isset(v)?z[v]:z); }
function intellidesk_TOG() { document.onclick=function(){ $S('intellidesk_BG').display='none'; $S('intellidesk_BOX').display='none'; document.onclick=function(){}; }; }
function intellidesk_loadingdone() { $S('intellidesk_loading').display='none'; }
function intellidesk_BOX(b) { 
	var i_url = "//radiostream.intellidesk.de/tickets/box/form";
	var doclen = Math.max(
                Math.max(document.body.scrollHeight, document.documentElement.scrollHeight),
                Math.max(document.body.offsetHeight, document.documentElement.offsetHeight),
                Math.max(document.body.clientHeight, document.documentElement.clientHeight));
	var toppos = window.pageYOffset || document.documentElement.scrollTop  || document.body.scrollTop;

	$S('intellidesk_BOX').top = toppos + 50 + 'px';
//	$S('intellidesk_BG').height=intellidesk_XYwin(0)+'px'; 
	$S('intellidesk_BG').height=doclen+'px';
	$S('intellidesk_BG').display='block'; 
	setTimeout("intellidesk_TOG()",100); 

	_$('intellidesk_BOX').innerHTML='<div id="intellidesk_innerBOX"><div class="intellidesk_X">'+intellidesk.box_header+'<a href="#" onclick="$S(\'intellidesk_BG\').display=\'none\'; $S(\'intellidesk_BOX\').display=\'none\';"> × </a></div>'+
			'<div id="intellidesk_loading"><img src="//radiostream.intellidesk.de/images/loading2.gif"> Laden...</div>' + 
			'<div class="intellidesk_BOX">' +
			'<iframe src="' + i_url + '" id="intellidesk_iframe" frameborder="0" scrolling="yes" allowTransparency="true" style="border:0; display:block; overflow-x: hidden;"></iframe>' +
			'</div></div>'; 
	$S('intellidesk_BOX').left=Math.round((intellidesk_XYwin(1)-b)/2)+'px'; 
	$S('intellidesk_BOX').width=b+'px'; 
	$S('intellidesk_BOX').display='block'; 

      if (_$('intellidesk_iframe').attachEvent) {
        _$('intellidesk_iframe').attachEvent("onload", intellidesk_loadingdone);
      } else if (_$('intellidesk_iframe').addEventListener) {
        _$('intellidesk_iframe').addEventListener("load", intellidesk_loadingdone, false);
      }
}

var prot = ("https:" == document.location.protocol) ? 'https:' : 'http:';
document.write(
 "<style type=\"text/css\">" +
 "@import url('"+prot+"//radiostream.intellidesk.de/assets/15/box.css');" +
 "</style>" +
 "<div id=\"intellidesk_BG\"></div>" +
 "<div id=\"intellidesk_BOX\" onmousedown=\"document.onclick=function(){};\" ></div>" +
 "<a id=\"intellidesk_ticketbox_a\" style=\"top: "+intellidesk.box_position+"\" href=\"#\" onclick=\"intellidesk_BOX('650'); return false;\"><img src=\""+prot+"//radiostream.intellidesk.de/assets/15/a_service.png\"></a>"
);