<!--
var timer;

function zeigeBild(id, hoehe, breite)
{
		hoehe = parseInt(hoehe) + 100;
		breite = parseInt(breite) + 100;
		w = window.open("bild_extra.php?bild="+id+"", "Bild", "dependent=no, directories=no, height="+hoehe+", width="+breite+", location=no, menubar=no, resizable=no, scrollbars=yes, status=no, toolbar=no, left=300,top=100");
}

function openPics(id)
{
    if ( id )
    {
        var li = document.getElementById(id);
        
        if ( li )
        {
            if ( li.style.display == 'none' )
            {
                li.style.display = 'inline';
            }
            else
            {
                li.style.display = 'none';
            } 
        }
    }
}


function scroll(outerDiv, innerDiv, direction, speed) 
{
	lay = document.getElementById(innerDiv);
	layer = document.getElementById(outerDiv);

//	alert(lay.style.top);
//	speed = speed  + 10;
	
	speed = parseInt(speed);
	
//alert(speed);
	var layertop = parseInt(lay.style.top);
	var scrollheight = (layer.offsetHeight - lay.offsetHeight);
	
//alert(layertop);
	if (direction == "down" && layertop - 0 > scrollheight) 
	{
		lay.style.top = (layertop - speed) + "px";
	}
	else if (direction == "up" && layertop < 0 ) 
	{
		lay.style.top = (layertop + speed) + "px";
	}

    timer = setTimeout("scroll('" + outerDiv + "','" + innerDiv + "','" + direction + "', '" + speed + "')", 20);
}

function scrollStop()
{
	clearTimeout(timer);		
}
function scrollInit(outLayer, inLayer, value)
{
	lay = document.getElementById(inLayer);
	layer = document.getElementById(outLayer);
	rang = parseInt(value);


	if(rang == 1 || rang == 2)
	{
		value = 0;
	}
	else
	{
		value = -(17 * (rang - 2));
	}
	
//	alert(lay.offsetHeight);
	
//	alert(lay.offsetHeight);
//	alert(layer.style.height);
	
	if(-(lay.offsetHeight - parseInt(layer.style.height)) > value)
	{		
		value = -lay.offsetHeight + parseInt(layer.style.height);
	}
	
//	alert(value);
	
	lay.style.top = value + "px";
}


function showPic(id, text, width, height)
{
    var div = document.getElementById('bild_gross');

    while ( div.hasChildNodes() )
    {
        div.removeChild(div.firstChild);
    }

    var img = document.createElement('IMG');
    img.src = 'bild.php?bild=' + id + '&x=' + width + '&y=' + height;
    img.onclick = function () { div.style.display = 'none'; }
    
    var left = (screen.width - width) / 2;
    var top  = 10;
    
    div.style.left = left  + 'px';
    div.style.top  = top   + 'px'; 

    div.appendChild(img);
    
    
    if ( text.length > 0)
    {
        var p = document.createElement('P');
        p.innerHTML = text;
        div.appendChild(p);        
    }
    
    
    div.style.display = 'block';
}


function exportSpielplan()
{
    var selects = document.getElementsByTagName('select');
    
    if ( selects && selects.length > 1)    
    {
        liga = selects[1];
        
        if ( liga )
        {            
            liga_id = liga.options[liga.options.selectedIndex].value;
        
            location.href = 'export/spielplan.php?tsv=0&liga=' + liga_id
        }   
    }
}

-->
