<!--

function openwin(URL, name, width, height) {
	var w = window.open(URL, name, 'width='+width+',height='+height+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes, resizable=no,copyhistory=no');
	w.focus;
}

function go_nav(url) {
	window.location.href = url;	
}	

function change_nav_bg(id,colorcode) {
	if (colorcode == "white") {
		document.getElementById(id).style.background = "white";		
		return;
	}
	
	if (colorcode == "gruen") {
		document.getElementById(id).style.background = "#E5F2CB";
	} else if (colorcode == "rot") {
		document.getElementById(id).style.background = "#FFE3DA";
	} else if (colorcode == "gelb") {
		document.getElementById(id).style.background = "#FCF1C5";
	} else if (colorcode == "tuerkis") {
		document.getElementById(id).style.background = "#DAEBEB";
	} else if (colorcode == "orange") {
		document.getElementById(id).style.background = "#FDE3C6";
	} else if (colorcode == "blau") {
		document.getElementById(id).style.background = "#D4E2EF";
	} else if (colorcode == "ocker") {
		document.getElementById(id).style.background = "#F5EBC2";
	} else if (colorcode == "braun") {
		document.getElementById(id).style.background = "#F1DFCB";
	}				
}	


function toggleOptions(type) {
	type ='#'+type;
	$(type).toggle();
	$(type+'On').toggle();
	$(type+'Off').toggle();
}

function togglePerformance (elem) {
	if (elem.checked) {
		$('#performanceOptions').show();
		$('#performanceOptionsOn').hide();
		$('#performanceOptionsOff').show();
	} else {
		$('#performanceOptions').hide();
		$('#performanceOptionsOn').show();
		$('#performanceOptionsOff').hide();		
	}
}

function toggleDetails(type, onoff) {
	type = '#'+type;
	$(type+'On').toggle();
	$(type+'Off').toggle();
	
	if (onoff == 'on') {
		$('#priceOptions').show();
		$('#priceOptionsOn').hide();
		$('#priceOptionsOff').show();
		$('#performanceOptions').show();	
		$('#performanceOptionsOn').hide();
		$('#performanceOptionsOff').show();		
	} else {
		$('#priceOptions').hide();
		$('#priceOptionsOn').show();
		$('#priceOptionsOff').hide();				
		$('#performanceOptions').hide();
		$('#performanceOptionsOn').show();
		$('#performanceOptionsOff').hide();				
	}
}

function checkFormular(form) {
	$('#minusBalanceError').hide();
	$('#plusBalanceError').hide();
	ok = 1;
	if ( $('#minusBalance').is(':checked') && $('#minusBalanceSum').val()=="") {
		$('#minusBalanceError').show();
		ok=0;	
	}
	if ( $('#plusBalance').is(':checked') && $('#plusBalanceSum').val()=="") {
		$('#plusBalanceError').show();
		ok=0;	
	}			 
	if (ok) $('#maincompass').submit();
}

function uncheckAll(str) {
	$("INPUT[type='checkbox']").each(function(){
		if ( this.id.match(str) ) {
			this.checked = false;
		}
	});
}


function toggleBalance(element, id) {
	id = '#'+id;
	if( element.checked!=1 ) {
		$(id).value='';
		$(id).removeClass('active');
		$(id).addClass('inactive'); 
	} else {
		$(id).addClass('active'); 
		$(id).removeClass('inactive'); 	
	}
}

function setHeight() {
	test = $("#sidebar .block:last .content");
	test.attr('style','height:auto;');

	test = $("#content .block:last .content");
	test.attr('style','height:auto;');
	
	var b=$("#mainCardscout").height(); 
	$("#content").height(b+50);
	
	TFT.Ext.FOL.layoutFixesGrid();
}


//-->
