var _text = new Object();
_text.contact = "Bandkontakt: <a href=\\\"mailto:info@monkey4s.de\\\">info@monkey4s.de</a><br/><br/>Nat&uuml;rlich gerne via myspace oder facebook";	  	
_text.news = "Ahoi,<br/>wir sind Monkey4s aus Marl/Bochum.<br/>Falls jemand Bühne und unerschrockenes Publikum kennt -> einfach melden, wir sind dabei ;-)<br/><br/>monkey4s<br/>[gitarrenmusik]";	  	
_text.twitter = "http://twitter.com/monkey4s";	  	
_text.myspace = "http://myspace.com/monkey4s";	  	
_text.facebook = "http://www.facebook.com/pages/Monkey4s/171373246210302";
_text.aehndi = "aehndi maltr&auml;tiert:<br/><li>den billig warwick (der so alt ist dass es eben kein noch rockbass ist)<li>auf nem warwick prophet 3.2<li>und ner thomann 4x10er box<li>in der Regel mit den Fingern";
_text.pats = "pats nutzt:<li>seine stimme<li>mit dem guten shure mic<li>manchmal auch aehndis stimme<li>daf&uuml;r dann ohne das shure<br/>";
_text.massi = "massi haut:<br/><li>n \"Battlefield Drums\" set</a><li>au&szlig;erdem ne brass snare<li>und ausgesuchtes blech schlagwerk<li>...";
_text.fabi = "fabi spielt:<br/><li>die gute yamaha pacifica<br/><li>auf nem peavey valveking 212";
var _headline = new Object();
_headline.contact = "contact";	  	
_headline.news = "news";	  	
_headline.twitter = "twitter";	  	
_headline.myspace = "myspace";	  	
_headline.facebook = "facebook";	  	

var _colors = new Array('#ffb0b0','#f8edc2','#ffff77','#a8ff93','#91ffff','#a6a6ff','#ffaafd','#6699ff');
var _themes = new Array();
_themes[0] 	= new Array(_colors[0],_colors[1],'#ffffff');
_themes[1] 	= new Array(_colors[1],_colors[2],'#000000');
_themes[2] 	= new Array(_colors[2],_colors[3],'#000000');
_themes[3] 	= new Array(_colors[3],_colors[4],'#000000');
_themes[4] 	= new Array(_colors[4],_colors[5],'#000000');
_themes[5] 	= new Array(_colors[5],_colors[6],'#ffffff');
_themes[6] 	= new Array(_colors[6],_colors[7],'#ffffff');




var inHeight = 1;
var inWidth = 1;
var imgHeight = 150;

function init(){
	if(!window.innerHeight){
		inHeight = document.body.clientHeight;
		inWidth = document.body.clientWidth;
	}else{
		inHeight = window.innerHeight;
		inWidth = window.innerWidth;
	}
	addTextToInfo("news");
	addLinkToInfo("myspace");
	addLinkToInfo("twitter");
	addLinkToInfo("facebook");
	addTextToInfo("contact");
	changeColors();
	
}

function changeColors(){
	var i = (Math.random()*(_themes.length-1)).toFixed(0);
	switchColor(_themes[i][0], _themes[i][1], _themes[i][2]);
	//window.setTimeout('changeColors()', 5000);
	//document.getElementById("headline").innerHTML = i;
}

function showText(headlineText, text){
	var content = document.getElementById('content');
	var headline = document.getElementById('headline');
	showHeadline();
	showContent();
	headline.innerHTML = headlineText;
	content.innerHTML = text;
}
function showHeadline(){
	var headline = document.getElementById('headline');
	headline.style.display='block';
}

function showContent(){
	var content = document.getElementById('content');
	content.style.display='block';
}

function hideContent(){
	var content = document.getElementById('content');
	content.style.display='none';
}

function hideHeadline(){
	var headline = document.getElementById('headline');
	headline.style.display='none';
}

function resizeHandler(){
	init();
	hideContent();
	hideHeadline();
}

function addTextToInfo(name){
	if(!document.getElementById(name)){
		var container = document.getElementById("info");
		var toAdd = document.createElement("span");
		toAdd["id"] = name;
		toAdd["innerHTML"] = '<a href=\'javascript:showText("'+_headline[name]+'","'+_text[name]+'")\')>'+_headline[name]+'</a>';
		container.appendChild(toAdd);
	}
}

function addLinkToInfo(name){
	if(!document.getElementById(name)){
		var container = document.getElementById("info");
		var toAdd = document.createElement("span");
		toAdd["id"] = name;
		toAdd["innerHTML"] = "<a href=\""+_text[name]+"\" target=_blank\">"+_headline[name]+"</a>";
		container.appendChild(toAdd);
	}
}

function clearPage(){
	hideContent();
	hideHeadline();
}

function switchColor(body, logo, font){
	if(body)
	document.getElementById("body").style.backgroundColor=body;
	if(logo)
	document.getElementById("logo").style.backgroundColor=logo;
	if(font){
	document.getElementById("info").style.color=font;
	document.getElementById("content").style.color=font;
	document.getElementById("headline").style.color=font;
	for(var i = document.getElementsByTagName("a").length -1; i>=0; i--){
		document.getElementsByTagName("a")[i].style.color=font;
	}
	}
	
}

