	
	// script for filling goods-basket
	// mod = table
	// tbl_type = shop
	
	
  function schicken(WEEK) {
	  
		document.kursergebnis.overview.value = WEEK;
		document.kursergebnis.submit();
		
	}
	
	function MM_openBrWindow(theURL,winName,features) { //v2.0
  
		window.open(theURL,winName,features);
	
	}	
	
	function fill (PAGE_ID, TBL_ID, TD_ID) {
		
		var quantity = document.getElementById('qua' + TD_ID).value;
		
		document.location.href = 'index.php?page_id=' + PAGE_ID + '&action=filltd&tbl_id=' + TBL_ID + '&td_id=' + TD_ID + '&quantity=' + quantity;
	
	}
	
	function cookie_save() {
		
		if (!document.tbl_order)
			return;
		
		var FORM	 = document.tbl_order;
		
		for (var num = 0; num < FORM.length; num++) {
			document.cookie = FORM[num].name + "=" + FORM[num].value + ";";
		}
	}
	
	function cookie_load() {
		
  	var COOKIE = document.cookie.split(";");
  	
  	for (var cn = 0; cn < COOKIE.length; cn++) {
  		
  		var TEMP 				= COOKIE[cn].split("=");
  		var TEMP_COOKIE = TEMP[0].replace(/ /, "");
  		
  		if (document.getElementById(TEMP_COOKIE) && TEMP[1])
  			eval('document.tbl_order.' + TEMP_COOKIE + '.value = "' + TEMP[1] + '";');
  	
  	}
  }
	
	function browse(DIRECTION) {
		
		document.browse_form.action.value = 'browse' + DIRECTION + 'td';
		document.browse_form.submit();
		
	}
	
	function browse_link(UP, DOWN) {
	
		document.getElementById('bup').style.display 		= (UP == 1) ? 'inline' : 'none' ;
		document.getElementById('bdown').style.display 	= (DOWN == 1) ? 'inline' : 'none' ;
		
	}
	
	function select_field(FIELD_NUM) {
		
		show_prog('KursProgramm/index.php', true);
		
		var color = '';
		
		switch (FIELD_NUM) {
			
			case 1:
				color = 'yellow';
				break;
				
			case 2:
				color = 'orange';
				break;
		
			case 3:
				color = 'green';
				break;
		
			case 4:
				color = 'red';
				break;
		
			case 5:
				color = 'blue';
				break;
		
		}
		
		document.getElementById('back_1').src 				= "filefactory/content/pictures/back_1_" + color + ".gif";
		document.getElementById('back_2').background 	= "filefactory/content/pictures/back_2_" + color + ".gif";
		
		document.prog_search.elements['fachbereich[1]'].value = "";
		document.prog_search.elements['fachbereich[2]'].value = "";
		document.prog_search.elements['fachbereich[3]'].value = "";
		document.prog_search.elements['fachbereich[4]'].value = "";
		document.prog_search.elements['fachbereich[5]'].value = "";
		
		
		document.prog_search.elements['fachbereich[' + FIELD_NUM + ']'].value = FIELD_NUM;
		document.prog_search.submit();
		
	}
		
	function show_prog(FILE_NAME, FOC) {
		
		if (FILE_NAME == '' || document.prog_search.tpl_mode.value == 'edit' || document.prog_search.tpl_mode.value == 'preview')
			return;
			
		document.getElementById('programm').src = './' + FILE_NAME;
		
		document.getElementById('divcontent').style.display 	= 'none';
		document.getElementById('divkurs').style.display 		= 'inline';
		
		if (FILE_NAME == 'KursProgramm/index.php' && FOC != true)
				document.getElementById('divkurs').form[0].elements[0].focus();
		
	}
	
	function print_content() {
  	
		if (document.getElementById('divkurs').style.display == 'inline') {
  		
  	  document.programm.focus();
      document.programm.print();
  		
		}
		else {
			
			window.print();
		
		}
	}