//function ct(obj) {
//	obj.target = "_blank";
//  }

function correct_layout() {
	if(document.getElementById('main_content').offsetHeight) {
	  var div_heights = new Array(
		document.getElementById('main_content').offsetHeight,
		document.getElementById('main_navigation').offsetHeight
	  );
	  div_heights = div_heights.reverse(div_heights.sort(num_sort));
	  var style_height = div_heights[0] + "px";
	  document.getElementById('main_navigation').style.height = style_height;
	  document.getElementById('main_content').style.height = style_height;
	}
  }

function num_sort(a,b) {
	return a-b;
 }


//	Adapted from
//	Content-swapping using the DOM
//	Dave Shuck, www.daveshuck.com
//	19 October 2006

var swap = new Array()
swap[1] = "swap-1"
swap[2] = "swap-2"
swap[3] = "swap-3"
swap[4] = "swap-4"
swap[5] = "swap-5"
swap[6] = "swap-6"
swap[7] = "swap-7"
swap[8] = "swap-8"
swap[9] = "swap-9"

// this function hides the content by assigning display none
function hideElement(elementId){
	var obj = document.getElementById(elementId);
	document.getElementById(elementId).style.display="none";
}

// this function sends any child objects back into the 'hold' div
function writeContent(swap){
	// define the containers
	// this is the display container
	var contentContainer = document.getElementById("swap");
	document.getElementById("swap").style.display="block";
	// this is a repository for divs not currently in the display
	var contentHolding = document.getElementById("hold");
	// send any children objects currently in the display to the holding div
	while(contentContainer.firstChild) {
		contentHolding.appendChild(contentContainer.firstChild);
	}
	// this is the active content
	var contentObject = document.getElementById(swap);
	// put the active content in the display div
	contentContainer.appendChild(contentObject);
}

// this function reloads the page in order to reset to the initial state
function reloadPage(){
	window.location.reload()
}



function ZusatzdatenKlappen(idself, idother)
			{
				if(document.getElementById(idself).style.display=="none") {
					document.getElementById(idself).style.display="block";
					document.getElementById(idother).style.display="none";
				}
				else {
					document.getElementById(idself).style.display="block";
				}
			}


function sitemap(count, id) {
	document.getElementById(id).style.display="none";

}
