function neuesFenster(mypage, myname, w, h) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+', directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no'
	win = window.open(mypage, myname, winprops)
}

function openSelectedOption (link, form) {
	var linkIt = null;
	
	// liste mit einbeziehen, wenn vorhanden
	if (form.list != undefined) linkIt = form.list.options[form.list.selectedIndex].value;
  	
  	// sortierung mit einbeziehen, wenn vorhanden
  	if (form.listSort != undefined) linkIt = linkIt + "&listSort=" + form.listSort.options[form.listSort.selectedIndex].value;
  	
  	if (linkIt != null) location.href = link + linkIt;
}

function openSelectedOption2 (link, form) {
  	var list = form.koop;
  	for (i = 0; i < list.length; ++i){
    	if (list.options[i].selected == true)	    	
    		location.href=link+(list.options[i].value);
    }
}	

function openListPageCount (link) {
  	for (i = 0; i < document.vw_plist.pcount.length; ++i){
    	if (document.vw_plist.pcount.options[i].selected == true)	    	
    		location.href=link+(document.vw_plist.pcount.options[i].value);
    }
}

function sendMailWindow (Adresse, name, width, height) {
  PleaseWaitWindow = window.open(Adresse, name, 'width='+width+', height='+height+', left=400, top=400, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no');
  PleaseWaitWindow.focus();
  window.setTimeout("document.vw_newsl.submit()",1000);
  
}	

function closeMailWindow (Adresse, name, width, height) {
  var plw = window.open(Adresse, name, 'width='+width+', height='+height+', left=400, top=400, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no');
  if(plw.closed == false){
  	plw.close();
  }
}	

function isChecked(checkbox, kriteriumID) {
	if (checkbox=='f'){
		if(document.getElementById('r_'+kriteriumID).checked==true){
			document.getElementById(checkbox+'_'+kriteriumID).checked=false;
			alert('Ein Kriterium kann nur "freigegeben" oder "abgewiesen" werden!');
		}		
	}
	if (checkbox=='r'){
		if(document.getElementById('f_'+kriteriumID).checked==true){
			document.getElementById(checkbox+'_'+kriteriumID).checked=false;
			alert('Ein Kriterium kann nur "freigegeben" oder "abgewiesen" werden!');
		}		
	}		
}	
