function accordion( slide, fade )
{
	new Ajax.Updater( slide, '?list='+ slide, { onComplete:function(){ appear( slide, fade ); }, asynchronous:true });
}

function accordion_back( appear )
{
	new Effect.Fade( 'text_'+ appear, { duration: .4 } );
	setTimeout( "appear_back('"+ appear +"')", 300 );
}


function appear( slide, fade )
{
	new Effect.BlindDown( slide, { duration: .7 } );
	new Effect.Appear( slide, { duration: .4 } );
	new Effect.BlindUp( fade, { duration: .7 } );
	new Effect.Fade( fade, {duration: .6} );
	new Effect.Fade( 'text_reisen', {duration: .3} );
	new Effect.Fade( 'text_trans', {duration: .3} );
}

function appear_back( appear )
{
	new Effect.Appear( 'list_'+ appear, { duration: .7 } );
}

function content( content, fade, id )
{
	var div = document.getElementById( 'text_'+ fade );
	switch( content ) {
		case "gruppen":
			div.style.backgroundColor = "#45A02E";
			break;
		case "programm":
			div.style.backgroundColor = "#3A9B31";
			break;
		case "mehrtagesausfluege":
			div.style.backgroundColor = "#309634";
			break;
		case "tagesausfluege":
			div.style.backgroundColor = "#309634";
			break;
		case "taxi":
			div.style.backgroundColor = "#259137";
			break;
		case "busflotte":
			div.style.backgroundColor = "#259137";
			break;
		case "kontakt":
			div.style.backgroundColor = "#1B8C3A";
			break;
		case "fotoalbum":
			div.style.backgroundColor = "#11873D";
			break;
		case "transporte":
			div.style.backgroundColor = "#1E8E3C";
			break;
		case "erdbewegung":
			div.style.backgroundColor = "#369A38";
			break;
		case "kieswerk":
			div.style.backgroundColor = "#4EA634";
			break;
		case "fuhrpark":
			div.style.backgroundColor = "#66B231";
			break;
		case "kontakttrans":
			div.style.backgroundColor = "#7EBE2D";
			break;
		case "fototrans":
			div.style.backgroundColor = "#96CA29";
			break;
		default:
			div.style.backgroundColor = "#fff";
			break;
	}
	
	new Effect.BlindUp( 'list_'+ fade, {duration: .3} );
	new Effect.Fade( 'list_'+ fade, {duration: .6} );
	new Ajax.Updater( 'text_'+ fade, '?id='+ id, { onComplete:function(){ new Effect.Appear('text_'+ fade);}, asynchronous:true });
}






function popup( id )
{
	var popup
	var ns4up = (document.layers) ? 1 : 0
	var ie4up = (document.all) ? 1 : 0
	var xsize = screen.width
	var ysize = screen.height
	var width = 630
	var height = 520
	var xpos=(xsize-width)/2
	var ypos=(ysize-height)/2
	
	popup = window.open("photo.php?id="+ id, "", "scrollbars=no,status=no,toolbar=no,location=no,directories=no,resizable=no,menubar=no,width="+ width +",height="+ height +",screenX="+ xpos +",screenY="+ ypos +",top="+ ypos +",left="+ xpos)
}

function big( id )
{
	var popup
	var ns4up = (document.layers) ? 1 : 0
	var ie4up = (document.all) ? 1 : 0
	var xsize = screen.width
	var ysize = screen.height
	var width = 350
	var height = 400
	var xpos=(xsize-width)/2
	var ypos=(ysize-height)/2
	
	popup = window.open("big.php?id="+ id, "scrollbars=no,status=no,toolbar=no,location=no,directories=no,resizable=no,menubar=no,width="+ width +",height="+ height +",screenX="+ xpos +",screenY="+ ypos +",top="+ ypos +",left="+ xpos)
}