function showTab(paraTargetId, paraSourceObj, paraClass) {
	childs = document.getElementById(paraTargetId).parentNode.childNodes;
	
	for (x = 0; x < childs.length; x++) {
		if(childs[x].nodeType == 1)
		if(childs[x].id == paraTargetId) {
			childs[x].style.display = 'block';
		}else{
			childs[x].style.display = 'none';
		}
	}
	
	setSourceTabStyle (paraSourceObj, paraClass)
}

function showTopreiseTab(paraSourceId, paraTargetId) {
	/* headline highlight */
	childs = document.getElementById(paraSourceId).parentNode.childNodes;
		
	for (x = 0; x < childs.length; x++) {
		//if(childs[x].nodeType == 1)
		
		if(childs[x].id == paraSourceId) {
			childs[x].className = 'topreise_headline_act';
		}else{
			childs[x].className = 'topreise_headline_na';
		}
	}
	
	
	/* Tabs ein- und ausblenden */
	childs = document.getElementById(paraTargetId).parentNode.childNodes
	
	for (x = 0; x < childs.length; x++) {
		if(childs[x].nodeType == 1)
		if(childs[x].id == paraTargetId) {
			childs[x].style.display = 'block';
		}else{
			childs[x].style.display = 'none';
		}
	}
}

function showReiseGarantieTab(paraSourceId, paraTargetId) {
	/* headline highlight */
	childs = document.getElementById(paraSourceId).parentNode.childNodes;
		
	for (x = 0; x < childs.length; x++) {
		//if(childs[x].nodeType == 1)
		
		if(childs[x].id == paraSourceId) {
			childs[x].className = 'reise_garantie_headline_act';
		}else{
			childs[x].className = 'reise_garantie_headline_na';
		}
	}
	
	
	/* Tabs ein- und ausblenden */
	childs = document.getElementById(paraTargetId).parentNode.childNodes
	
	for (x = 0; x < childs.length; x++) {
		if(childs[x].nodeType == 1)
		if(childs[x].id == paraTargetId) {
			childs[x].style.display = 'block';
		}else{
			childs[x].style.display = 'none';
		}
	}
}

function setSourceTabStyle (paraSourceObj, paraClass) {
	tabs = new Array("trmanager_detail_tab_1", "trmanager_detail_tab_2", "trmanager_detail_tab_3" );
	
	for (x = 0; x < tabs.length; x++) {
		if(tabs[x] == paraSourceObj.id) {
			document.getElementById( tabs[x] ).className = paraClass + "act";
		} else {
			document.getElementById( tabs[x] ).className = paraClass + "na";
		}
	}
}

function setQuickinfo( paraId ) {
	document.getElementById('quickinfo').innerHTML = document.getElementById(paraId).innerHTML;
}

function unsetQuickinfo( ) {
	document.getElementById('quickinfo').innerHTML = '';
}

function showInfoLayer(paraID, paraBoolean) {

	if (paraBoolean == true) {
		document.getElementById(paraID).style.display = "block";
	} else {
		document.getElementById(paraID).style.display = "none";
	}
}

function printLayer(paraID) {
	if (paraID == "") return false;
	
	Obj = document.getElementById( paraID );
	if (Obj == "") return false;
	
	popup = window.open("", "Druckansicht", "width=600,height=400,status=no,menubar=yes,toolbar=yes,scrollbars=yes,resizable=yes");
	popup.document.write( '<html><head><base href="' + document.getElementsByTagName("base")[0].href + '" /><link rel="stylesheet" type="text/css" href="fileadmin/templates/css/print_style.css"></head><body>' );
	popup.document.write( Obj.innerHTML );
	popup.document.write(  );
	popup.document.write( '</body></html>' );
	popup.document.close();

}

function openpopup (url) {
 		   fenster = window.open(url, "ReiseMerken", "width=590,height=500,status=yes,scrollbars=yes,resizable=yes");
		   fenster.focus();
}

function imgPopup (url, width, height) {
		width += 20;
		height += 20;
		fenster = window.open(url, "Detailbild", "width=" + width + ",height=" + height + ",status=no,scrollbars=auto,resizable=yes");
		fenster.focus();

		if (fenster) return false;
		else return true;
		return false;
}

function jumpTo(paraTarget) {
	if (paraTarget != "") {
		window.location.hash = paraTarget;
	}
}
