function printWindow(){
	var toHide = "adv1,adv2,adv3,adv7,adv8,affili,affili2,divLogout,divCalc,divBuchen,divViews,divPrint,divConfigure,divHome";
	var con = confirm("Zum Ausdrucken können unrelevante Elemente ausgeblendet werden. Diese würden nach 7 Sekunden wieder eingeblendet.\n\nSollen die Elemente ausgeblendet werden?");
	
	if(con === true){
		hideAdvs(toHide);
		window.print();
		setTimeout("showAdvs('" + toHide + "');",7000);
	} else {
		window.print();
	}
	
}

function hideAdvs(ids){
	var a = ids.split(",");
	for(var i=0;i<a.length;i++){
		if(document.getElementById(a[i])){
			document.getElementById(a[i]).style.display = 'none';
		}
	}
}

function showAdvs(ids){
	var a = ids.split(",");
	for(var i=0;i<a.length;i++){
		if(document.getElementById(a[i])){
			document.getElementById(a[i]).style.display = 'block';
		}
	}
}

function calc(){
	if(document.getElementById('divCalc')){
		hideCalc();
	} else {
		showCalc();
	}
}

function showCalc(){
	//document.getElementById('divCalc').style.display = 'block';
	inSession("CALC",1,1);
}

function hideCalc(){
	//document.getElementById('divCalc').style.display = 'none';
	inSession("CALC",0,1);
}

function help(){
	if(document.getElementById('helponoff').value == 1){
		inSession("showToolTipps",0,1);
		document.getElementById('helponoff').value = 0;
	} else {
		inSession("showToolTipps",1,1);
		document.getElementById('helponoff').value = 1;
	}
	
}

function slipsSaved(){
	if(document.getElementById('slipsSavedon').value == 1){
		inSession("showslips",0,1);
		document.getElementById('slipsSavedon').value = 0;
	} else {
		inSession("showslips",1,1);
		document.getElementById('slipsSavedon').value = 1;
	}
	
}

function slipsSplit(){
	if(document.getElementById('slipsSpliton').value == 1){
		inSession("slipsplitt",0,1);
		document.getElementById('slipsSpliton').value = 0;
	} else {
		inSession("slipsplitt",1,1);
		document.getElementById('slipsSpliton').value = 1;
	}
	
}

function setMouse(id){
	document.getElementById(id).style.cursor = 'pointer';
}

function getLinks(){
	var links = document.getElementsByTagName('a');
	
	var s = '';
	for(var i=70;i<links.length;i++){
		s += links[i].href+"\n";
	}
	alert(s);
}
