function click_inputbox(clickNode,idname) {	
	var idname;
	var inputBox = document.getElementById(idname);

  if(clickNode.checked == true)
    inputBox.disabled = true;
  else
    inputBox.disabled = false;  
	
}

function delete_by_index (select_id) {
	//alert(select_id);
	var oselect=document.getElementById(select_id);
	var helper=document.getElementById(select_id+'_hidden');
	var option_values= new Array();
	if (typeof(oselect.selectedIndex)=="number") {
		if (oselect.selectedIndex == -1) alert ('Bitte erst eine Datei zum löschen markieren.');
		else {
			oselect.options[oselect.selectedIndex]=null;
			for (var i = 0; i < oselect.options.length; i++) option_values.push(oselect.options[i].value);
			helper.value=option_values.join(',');
			}
		}
	}
	
function insertone(wert,name,select_id) {
	var in_select=false;
	var option_values= new Array();
	var select=document.getElementById(select_id);
	var helper=document.getElementById(select_id+'_hidden');
	option = new Option(name,wert);
	for (var i = 0; i < select.options.length; i++) {
		option_values.push(select.options[i].value);
		if (select.options[i].value==wert) {
			in_select=true;
			alert('Diese Datei wurde bereits hinzugefügt.');
			return false;
			}
		}
	if (in_select==false) {
		select.options[select.length] = option;
		option_values.push(wert);
		}
	// alert(option_values.join(','));
	helper.value=option_values.join(',');
	return true;
	}

function wrap_add_dozentitem(i_id,i_title) {
	if (opener.insertone(i_id,i_title,'dfu_files')) show_file_message('Datei <span class="file">'+i_title+'</span> hinzugefügt.');
	}	
	
var dcs_popup=0;
function show_popup (URLStr,width, height) {
	if(dcs_popup) if(!dcs_popup.closed) dcs_popup.close();
	
	var left;
	var top;
	
	if (screen.availWidth) left=screen.availWidth-width;	
	else left=100;
	if (screen.availHeight) top=(screen.availHeight-height)/2;
	else top=100;
	dcs_popup = open(URLStr, 'dcs_popup','dependent=yes,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
	}

