function toggle_layer( id ){
	if( document.getElementById(id).style.display == 'block' )
		document.getElementById(id).style.display = 'none';
	else
		document.getElementById(id).style.display = 'block';
}

var myimages = new Array();
function preload(){
	for (x=0; x<preload.arguments.length; x++){
		myimages[x] = new Image();
		myimages[x].src = 'http://www.treehousesem.com/images/' + preload.arguments[x];
	}
}
preload(
		"navigation/dropdown.png",
		"layout/office1.png",
		"layout/office2.png",
		"headlines/Treehouse-Provides-Complete.png");

function tick(headlines){
	if( current == 3 ) current = 0;
	headlines = headlines.split(",");
	var string 	= headlines[current++];
	fade( string, '' );
}

function fade( text, src ){
	new Effect.Fade('headline');
	setTimeout( function(){
		$('headline').innerHTML = ( src != '' ) ? '<a href="'+src+'">'+text+'</a>': text;
		new Effect.Appear('headline');
	}, 1000 );
}


