function open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';
  popup = window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
  popup.focus();
}

function open_popup(url) {
	open_window('popup', url, 20, 20, 620, 510, 0, 0, 0, 1, 0);
}

function showContent(contentNo) {
	// alle Contents verstecken
	for (var i = 1; i <= 10; i++) {
		var j = 1;
		while (true) {
			var ref = document.getElementById("cont"+i+"_"+j);
			if (ref != null)
				ref.className="cHidden";
			else break;
			j++;
		}
	}
	// selektierten Content anzeigen
	var j = 1;
	while (true) {
		var ref = document.getElementById("cont"+contentNo+"_"+j);
		if (ref != null)
			ref.className="";
		else break;
		j++;
	}
}

function switchContentTemporarly(showContentNo, hideContentNo, duration) {
	switchContent(showContentNo, hideContentNo);
	window.setTimeout(switchContent, duration, hideContentNo, showContentNo);
}

function switchContent(showContentNo, hideContentNo) {
	// selektierten Content verstecken
	var j = 1;
	while (true) {
		var ref = document.getElementById("cont"+hideContentNo+"_"+j);
		if (ref != null)
			ref.className="cHidden";
		else break;
		j++;
	}
	// selektierten Content anzeigen
	var j = 1;
	while (true) {
		var ref = document.getElementById("cont"+showContentNo+"_"+j);
		if (ref != null)
			ref.className="";
		else break;
		j++;
	}
}
