function ladeanzeige(onoff)
{
/*
  if(onoff == 1) {
    var ladeovl = document.layers ? document.layers['loading'] : document.getElementById ?  document.getElementById('loading').style : document.all['loading'].style;
    var ladw = window.innerWidth ? window.innerWidth : window.document.body.clientWidth;
    var ladh = window.innerHeight ? window.innerHeight : window.document.body.clientHeight;
    //ladeovl.width = Math.round(w/5) + "px";
    //ladeovl.height = Math.round(h/5) + "px";
    var ladx = Math.round(ladw/2)-80;
    var lady = Math.round(ladh/2)-50;
    ladeovl.left = ladx + "px";
    ladeovl.top = lady + "px";
    ladeovl.visibility = document.layers ? ("show") : ("visible");
  } else {
    var ladeovl = document.layers ? document.layers['loading'] : document.getElementById ?  document.getElementById('loading').style : document.all['loading'].style;
    ladeovl.visibility = document.layers ? ("hide") : ("hidden");
  }
  */
} 
function togglemenu(menuid, onoff)
{
    var obj = document.layers ? document.layers[menuid] :
    document.getElementById ?  document.getElementById(menuid).style :
    document.all[menuid].style;
    obj.visibility = document.layers ? (onoff ? "show" : "hide") :
    (onoff ? "visible" : "hidden");
}
function vattkopen(site) {
  x = screen.availWidth/2-1024/2;
  y = screen.availHeight/2-600/2;
  pop = window.open(site,'','scrollbars=yes,status=yes,resizable=yes,width=1024,height=600,left='+x+',top='+y+',screenX='+x+',screenY='+y);
  return (pop) ? false : true;
}
function togglesettings(aussen, innen, onoff)
{
	//var menuid1 = "tcf_settings";
	//var menuid2 = "tcf_settings_inner";
	//alert('settings');
    var obj = document.layers ? document.layers[aussen] :
    document.getElementById ?  document.getElementById(aussen).style :
    document.all[aussen].style;
	//var obj2 = document.layers ? document.layers[menuid2] : document.getElementById ? document.getElementById(menuid2).style : document.all[menuid2].style;
    //obj1.height = (onoff ? "auto" : "100px");
	obj.visibility = document.layers ? (onoff ? "show" : "hide") :
    (onoff ? "visible" : "hidden");
	//obj2.height = (onoff ? "auto" : "0px");
	
}
function countdown( endDate, title )
{
	now = Math.round(new Date().getTime() / 1000);
	remain = endDate - now;
	if( remain > 60 ) remain = Math.floor(remain / 60) + 'm ' + (remain - Math.floor(remain / 60)*60) + 's';
	if( remain < 1 ) remain = "loading...";
	
	document.title = title + ' ( ' + remain + ' )';
	setTimeout('countdown(' + endDate + ',"'+ title +'")',500);
}
function initCountdown( secs, title )
{
	now = Math.round(new Date().getTime() / 1000);
	endDate = now + secs;
	//document.title = endDate;
	//title = document.title;
	setTimeout('countdown(' + endDate + ',"' + title + '")',10000);
}

