function init(){
	//Config file is included in the index.html
	//configfile: dd_config.js
	contentName = 'content2';  //content name
	
	document.getElementById('text').innerHTML = seiten[0][0]; /* First element in the Array */
	document.getElementById('mainflag').src = flag_path+seiten[0][2]; /* First flag of the first element in the Array */
	document.getElementById(contentName).style.display = 'none'; /* Hide the content div. in the content div, there are all elements from the Array */
	document.getElementById(contentName).style.backgroundColor = bgColorContent; /* Set the background-color from the Content Div */
	document.getElementById(contentName).style.width = contentWidth+'px'; /* content Width */
	document.getElementById('select').style.width = contentWidth+7+'px'; /* content Width */
	
	/* reed the array in the config file. make all jumpmenu's */
	for(var i=0;i<seiten.length;i++){
		document.getElementById(contentName).innerHTML += '<div id="dorpdownId'+i+'" class="dropdowna" onclick="SetNewValue(\''+seiten[i][0]+'\',\''+seiten[i][2]+'\'); StoreValue(\''+seiten[i][1]+'\');" onmouseover="ChangeBgColorAuswahl(\'dorpdownId'+i+'\',1);" onmouseout="ChangeBgColorAuswahl(\'dorpdownId'+i+'\',0);"><div class="flag" style="float:left;"><img id="flag" src="'+flag_path+seiten[i][2]+'" height="12" width="18" /></div><span class="content-text"><nobr>'+seiten[i][0]+'</nobr></span></div>';
	}
	
	//global vars define
	adress =seiten[0][1]; /* is needed to keep the first adress in a variable */
}


// the main dropdown function. first click = open; second click = close
var clicked = false; //is the element clicked?
function dropdown(){
	if(!clicked){
		document.getElementById(contentName).style.display = "block"; //show the contentDiv element
		clicked = true;
	}else{
		document.getElementById(contentName).style.display = "none"; //hide the contentDiv element
		clicked = false;
	}
}

//Change bgcolor from the div's in content: OnMouseOver
//act is a variable from the onmousover event
function ChangeBgColorAuswahl(div,act){
	if(act == 1){
		document.getElementById(div).style.backgroundColor = bgColorContentHover; //changes the backgroundcolor to the color, that is in the config file defined. it seems like  a hover
	}
	else{
		document.getElementById(div).style.backgroundColor = bgColorContent; //turn the hoverEffect back to the bgcolor from the ContentDiv element
	}
}

//Set the new value's into the Select div
//the vlaueId Variable is from the onclick event
function SetNewValue(valueId,flag){
	document.getElementById('text').innerHTML = valueId; //change the text in the select bar
	document.getElementById('mainflag').src = flag_path+flag; //change the main flag thaht is displayed
	document.getElementById(contentName).style.display = "none"; //hide the contentDiv element
	clicked = false;
}

//keep the current value in the variable adress
//value is from the onclick event
function StoreValue(value){
	adress=value;
}


//foreward to the choosen page
function Go(){
	window.location.href = 'http://'+adress;
}


