/* ##### seminareFuncs.js ##### */
var seminarePre, lehrgaenge, seminare, tSeiten;
var seminarObjs = {}, lehrgangObjs = {}, termineObjs = {};
function lehrgang(id, title, urlFunc, preisTyp, preis, dauer, moduleArr, idsSeminare4Sel){
	 this.id = id;
	 this.title = title;
	 this.ttip = this.title+" - Module auswählen ...";
	 this.urlFunc = urlFunc;
	 this.preisTyp = preisTyp;
	 this.preis = preis;
	 this.dauer = dauer;
	 this.preisDauer = this.preis + " f&uuml;r " + this.dauer;
	 this.moduleArr = moduleArr;
	 var usedSeminareArr = [];
	 for(x=0; x<moduleArr.length; x++){
	 	var tmpArr = moduleArr[x].split("#url:");
	 	var tmpArrStrs = tmpArr[0].split("#");
	 	usedSeminareArr[x] = { title: tmpArrStrs[0], ttip: tmpArrStrs[0], dauer: tmpArrStrs[1], urlFunc: tmpArr[1] }
	 }
	 this.usedSeminareArr = usedSeminareArr;
	 this.idsSeminare4Sel = idsSeminare4Sel; // auszuwŠhlende Seminare/Module
	 this.boxTitle = boxTitlePre + this.title;
	 this.boxDescr = boxDescr.split("|anz|").join(this.usedSeminareArr.length);
	 lehrgangObjs[this.id] = this;
}
function seminar(id, title, urlFunc, dauer, preis, termineArr){
	this.id = id;
	this.title = title;
	this.ttip = this.title;
	this.urlFunc = urlFunc;
	this.termine = termineArr;
	this.termineArr = [selTerminStr].concat(this.termine); // "datum" oder "datum1#datum2"
	this.cntAnAbReisen = (this.termineArr[1].split("#")).length;
	this.dauer = dauer;
	this.preis = preis;
	this.dauerPreisStr = this.dauer + " | " + this.preis;
	seminarObjs[this.id] = this;
}
function tSeite(id, typ, title, descr, ort, terminePre, termineArr){
	this.id = id;
	this.typ = typ;
	this.title = title;
	this.descr = descr;
	this.ort = ort ? ort : "Veranstaltungsort: Heidelberg";
	this.terminePre = terminePre ? terminePre : "";
	this.termineArr = termineArr;
	this.isSeminar = seminarObjs[this.id] ? 1 : 0;
	this.dauer = (this.isSeminar ? seminarObjs[this.id].dauer : lehrgangObjs[this.id].dauer);
	this.preis = (this.isSeminar ? seminarObjs[this.id].preis : lehrgangObjs[this.id].preis);
	this.dauerPreisStr = this.dauer + " " +this.preis + " + Mwst.";
	termineObjs[this.id] = this;
}
var lgHTML;
function ret_seminareAusw(idsList){
	roomTyps = roomTyps.split(",")
	var idsArr = idsList.split(",");
	var classChk = top.IE55 ? "chkIE5" : "chk";
	var html = "<!-- ##### SEMINARE-LEHRGAENGE ... ##### -->\n";
	html += "\t\t"+'<div style="width: 520px; height: auto;">'+"\n"+
			"\t\t\t"+'<div class="listItem fg_dBlau b">'+auswahlPre+'</div>'+"\n";
	html += "\t\t\t"+'<div style="margin-left: 7px;">'+"\n";
	html += "\t\t\t\t"+top.ret_iBox("lgs_")+"\n";
	
	html += "\t\t\t\t\t"+'<div style="padding: 12px 14px 3px 13px; background-color: #FFFFEE;">'+"\n"+
			"\t\t\t\t\t\t"+'<span class="b">'+lehrgaengePre+'</span>'+"\n"+
			"\t\t\t\t\t\t"+'<div style="margin: 8px 0 0 13px;">'+"\n"+
			"\t\t\t\t\t\t\t"+'<table cellspacing="2" cellpadding="0" border="0"><tr>'+"\n";
	for(l=0; l<lehrgaenge.length; l++){
		var lID = lehrgaenge[l].id, title = lehrgaenge[l].title;
		var preisStr = lehrgaenge[l].preisTyp + ":<br>" + lehrgaenge[l].preis + ' + Mwst.<br>für ' + lehrgaenge[l].dauer;
		if(l!=0) html += "\t\t\t\t\t\t\t\t"+'<td width="10" nowrap>&nbsp;</td>'+"\n";
		html += "\t\t\t\t\t\t\t\t"+'<td id="td_'+lID+'">'+"\n";
		html += "\t\t\t\t\t\t\t\t\t"+'<div id="lehrg_'+lID+'" onclick="auswBoxLehrgang(\''+lID+'\')" class="listItem fg_dBlau b"><a href="javascript://" '+"\n"+
				"\t\t\t\t\t\t\t\t\t"+'title="'+title+'">'+title+'</a></div>'+"\n"+
				"\t\t\t\t\t\t\t\t\t"+'<div class="listText">'+preisStr+'</div>'+"\n";
		html += "\t\t\t\t\t\t\t\t"+'</td>'+"\n";
	}
	html += "\t\t\t\t\t\t\t</tr>"+
			'<tr><td colspan="3" style="height: 1px; width: auto;"><div id="auswModuleHolder" style="position: absolute;"></div></td></tr>'+	
			"</table>\n"+
			"\t\t\t\t\t\t</div>\n"+
			"\t\t\t\t\t</div>\n"
	html += "\t\t\t\t"+top.ret_iBox()+"\n";
	html += "\t\t\t"+'</div>'+"\n"+
			"<!-- ##### SEMINARE-AUSWAHL ... ##### -->\n"+
			"\t\t\t"+'<div style="margin-left: 13px; height: auto; width: auto;">'+"\n";
	/* ##### seminare-x-auswahl ##### */
	for(x=0; x<idsArr.length; x++){
		var sID = idsArr[x];
		var semObj = seminarObjs[sID];
		var title = semObj.title.split("#").join("<br>");
		var ttip = semObj.ttip;
		html += "<!-- sem. "+sID+" ... -->\n"+
				"\t\t\t\t"+'<div class="hLine" style="height: 18px;"><img class="ph_1x1" /></div>'+"\n";
		/* ##### checkbox seminar-titel ... ##### */
		html += "\t\t\t\t"+'<div class="chkBox divSemTitle">'+"\n"+
				"\t\t\t\t\t"+'<div class="chkDiv"><input type="checkbox" id="semCHK_chk_'+sID+'" name="semCHK_chk_'+sID+'" value="" class="'+classChk+'" '+"\n"+
				"\t\t\t\t\t"+'onmouseout="chgChk(this.id, 0)" onmouseover="chgChk(this.id, 1)" onclick="chgChk(this.id, 2)" title="'+ttip+'"><input '+"\n"+
				"\t\t\t\t\t"+'id="semCHK_hf_'+sID+'" name="semCHK_hf_'+sID+'" type="hidden" value=""></div>'+"\n"+
				"\t\t\t\t\t"+'<div id="semCHK_txt_'+sID+'" class="chkTitle fg_dBlau b" '+"\n"+
				"\t\t\t\t\t"+'onmouseout="chgChk(this.id, 0)" onmouseover="chgChk(this.id, 1)" onclick="chgChk(this.id, 2)" title="'+ttip+'"'+"\n"+
				"\t\t\t\t\t"+'>'+title+'</div><div class="clearer"><img class="ph_1x1" /></div>'+"\n"+
				"\t\t\t\t"+'</div>'+"\n";
		/* hAbst */
		html += "\t\t\t\t"+'<div class="hAbst" style="height: 5px;"><img class="ph_1x1" /></div>'+"\n";
		/* ##### str dauer | preis ##### */
		html += "\t\t\t\t"+'<div id="dauerPreis_'+sID+'" class="divDauerPreis"><span id="dauer_'+sID+'">'+semObj.dauer+'</span> | <span id="preis_'+sID+'">'+semObj.preis+' + Mwst.</span></div>'+"\n";
		/* ##### select termine ##### */
		html += "\t\t\t\t"+'<div id="selTermine_'+sID+'" class="hide /* selTermine */">'+"\n"+
				"\t\t\t\t\t"+'<select id="termine_'+sID+'" name="termine_'+sID+'" onchange="chgSel(this.id)">'+"\n";
		html += ret_select(semObj.termineArr, "\t\t\t\t\t\t");
		html += "\t\t\t\t\t"+'</select>'+"\n"+
				"\t\t\t\t"+'</div>'+"\n";
		/* ##### checkbox - zimmerreservierung ##### */
		html += "\t\t\t\t"+'<div id="reservPre_'+sID+'" class="hide">'+"\n"+
				"\t\t\t\t\t"+'<div class="chkBox" style="margin: 0 0 3px 17px">'+"\n"+
				"\t\t\t\t\t\t"+'<div class="chkDiv"><input type="checkbox" id="preRES_chk_'+sID+'" name="preRES_chk_'+sID+'" value="" class="'+classChk+'" '+"\n"+
				"\t\t\t\t\t\t"+'onmouseout="chgChk(this.id, 0)" onmouseover="chgChk(this.id, 1)" onclick="chgChk(this.id, 2)" title="'+chkZiResText+'"><input '+"\n"+
				"\t\t\t\t\t\t"+'id="preRES_hf_'+sID+'" name="preRES_hf_'+sID+'" type="hidden" value=""></div>'+"\n"+
				"\t\t\t\t\t\t"+'<div id="preRES_txt_'+sID+'" class="chkText" '+"\n"+
				"\t\t\t\t\t\t"+'onmouseout="chgChk(this.id, 0)" onmouseover="chgChk(this.id, 1)" onclick="chgChk(this.id, 2)" title="'+chkZiResText+'"'+"\n"+
				"\t\t\t\t\t\t"+'>'+chkZiResText+'</div><div class="clearer"><img class="ph_1x1" /></div>'+"\n"+
				"\t\t\t\t\t"+'</div>'+"\n"+
				"\t\t\t\t"+'</div>'+"\n";
		/* ##### box-reservierung ##### */
		html += "\t\t\t\t"+'<div id="reservBox_'+sID+'" class="hide">'+"\n"+
				"\t\t\t\t\t"+top.ret_iBox("res"+sID)+"\n"+
				"\t\t\t\t\t\t"+'<div>'+"\n"+
				"\t\t\t\t\t\t\t"+'<div id="reservAll_PM" class="resAll">'+"\n"+
				/* txt-zimmer-reserv. */
				"\t\t\t\t\t\t\t\t"+'<div class="ziResText">'+(ziResText.split("#").join("<br>"))+'</div>'+"\n"+
				/* einzel/doppel-zi. */
				"\t\t\t\t\t\t\t\t"+'<div id="roomTyp" class="chkBox roomTyp">'+"\n"+
				"\t\t\t\t\t\t\t\t\t"+'<div class="chkDiv"><input type="checkbox" id="zi_radio_'+sID+'_0" name="zi_radio_'+sID+'" value="'+roomTyps[0]+'" class="'+classChk+'" '+"\n"+
				"\t\t\t\t\t\t\t\t\t"+'onmouseout="chgRadio(this.id, 0, 2)" onmouseover="chgRadio(this.id, 1, 2)" onclick="chgRadio(this.id, 2, 2)" '+"\n"+
				"\t\t\t\t\t\t\t\t\t"+'title="'+roomTyps[0]+'"></div><div id="zi_txt_'+sID+'_0" class="chkLabel fg_dBlau" '+"\n"+
				"\t\t\t\t\t\t\t\t\t"+'onmouseout="chgRadio(this.id, 0, 2)" onmouseover="chgRadio(this.id, 1, 2)" onclick="chgRadio(this.id, 2, 2)" '+"\n"+
				"\t\t\t\t\t\t\t\t\t"+'title="'+roomTyps[0]+'">'+roomTyps[0]+'</div>'+"\n"+
				"\t\t\t\t\t\t\t\t\t"+'<div style="float: left; width: 10px; height: 10px;"></div>'+"\n"+
				"\t\t\t\t\t\t\t\t\t"+'<div class="chkDiv"><input type="checkbox" id="zi_radio_'+sID+'_1" name="zi_radio_'+sID+'" value="'+roomTyps[1]+'" class="'+classChk+'" '+"\n"+
				"\t\t\t\t\t\t\t\t\t"+'onmouseout="chgRadio(this.id, 0, 2)" onmouseover="chgRadio(this.id, 1, 2)" onclick="chgRadio(this.id, 2, 2)" '+"\n"+
				"\t\t\t\t\t\t\t\t\t"+'title="'+roomTyps[1]+'"></div><div id="zi_txt_'+sID+'_1" class="chkLabel fg_dBlau" '+"\n"+
				"\t\t\t\t\t\t\t\t\t"+'onmouseout="chgRadio(this.id, 0, 2)" onmouseover="chgRadio(this.id, 1, 2)" onclick="chgRadio(this.id, 2, 2)" '+"\n"+
				"\t\t\t\t\t\t\t\t\t"+'title="'+roomTyps[1]+'">'+roomTyps[1]+'</div>'+"\n"+
				"\t\t\t\t\t\t\t\t\t"+'<input id="zi_hf_'+sID+'" name="zi_hf_'+sID+'" type="hidden" value="">'+"\n"+
				"\t\t\t\t\t\t\t\t\t"+'<div class="clearer"><img class="ph_1x1" /></div>'+"\n"+
				"\t\t\t\t\t\t\t\t"+'</div>'+"\n"+
				/* ##### an/abreisedatum o. 1. & 2.an-/abreisedatum##### */
				"\t\t\t\t\t\t\t\t"+'<div id="anAbReise" class="anAbReise">'+"\n";
				var cntAnAbReisen = semObj.cntAnAbReisen;
				for(a=0; a<cntAnAbReisen; a++){
					if(a) html += "\t\t\t\t\t\t\t\t\t"+'<div class="hAbst" style="height: 6px;"><img class="ph_1x1" /></div>'+"\n";
					var nr = 1+a, classN = top.IE55 ? "inpDatumIE5" : "inpDatum";
					var anDatum = cntAnAbReisen == 1 ? "Anreisedatum" : nr+". Anreisedatum";
					var abDatum = cntAnAbReisen == 1 ? "Abreisedatum" : nr+". Abreisedatum";
					html += "\t\t\t\t\t\t\t\t\t"+'<div class="floatLeft labelFld">'+anDatum+'</div>'+"\n"+
							"\t\t\t\t\t\t\t\t\t"+'<div class="floatLeft"><input id="anreise_'+nr+'_'+sID+'" name="anreise_'+nr+'_'+sID+'" type="text" value="" class="'+classN+'"></div>'+"\n"+
							"\t\t\t\t\t\t\t\t\t"+'<div class="floatLeft labelFld">'+abDatum+'</div>'+"\n"+
							"\t\t\t\t\t\t\t\t\t"+'<div class="floatLeft"><input id="abreise_'+nr+'_'+sID+'" name="abreise_'+nr+'_'+sID+'" type="text" value="" class="'+classN+'"></div>'+"\n"+
							"\t\t\t\t\t\t\t\t\t"+'<div class="floatLeft"></div>'+"\n"+
							"\t\t\t\t\t\t\t\t\t"+'<div class="clearer"><img class="ph_1x1" /></div>'+"\n";
				}
				
				
		html += "\t\t\t\t\t\t\t\t"+'</div>'+"\n"
				
		html += "\t\t\t\t\t\t\t"+'</div>'+"\n"+
				"\t\t\t\t\t\t"+'</div>'+"\n"+
				"\t\t\t\t\t"+top.ret_iBox()+"\n"+
				"\t\t\t\t"+'</div>'+"\n";
		
		html += "<!-- ... sem. "+idsArr[x]+" -->\n";
	}
	
	html += "\t\t\t"+'</div>'+"\n"+
			"<!-- ##### ... SEMINARE-AUSWAHL ##### -->\n";
			/* "\t\t\t"+'<div class="hLine" style="height: 15px;"><img class="ph_1x1" /></div>'+"\n"; */
	html += "\t\t"+'</div>'+"\n" +
			"<!-- ##### ... SEMINARE-LEHRGAENGE ##### -->\n";
	/* ##### .... </div><input id="Auswahl" name="Auswahl" type="text" value=""> ##### */

	// alert(html);
	
	return html;
}
function ret_select(arr, preTabs){
	preTabs = preTabs ? preTabs : "\t"; var tmp = '';
	for(s=0; s<arr.length; s++){
		var txt = arr[s].split("#").join(" und ");
		tmp += preTabs + '<option value="'+(s ? txt : "")+'">'+txt+'</option>'+"\n";
	}
	return tmp;
}
function create_LGAuswBoxen(){
	html = '';
	for(x=0; x<lehrgaenge.length; x++){
		var id = lehrgaenge[x].id, objLG = lehrgangObjs[id];
		var ttipLG = objLG.title;
		var urlFuncLG = objLG.urlFunc ? objLG.urlFunc : false;
		if(urlFuncLG) urlFuncLG = '<a href="' + ( urlFuncLG.split("javascript:").length == 2 ? urlFunc + '">': top.rootPath+urlFuncLG+'" target="new" title="'+ttipLG+'">' );
		var lnkLG = urlFuncLG ? urlFuncLG : "";
		lehrgangObjs[id].objID = objID = 'AuswModule_'+id+'_';
		html += '<div id="'+objID+'PREHOLDER" class="" style="position: absolute; top: -10px; width: auto; height: auto;">'+"\n";
		boxCont  = '<span id="'+objID+'PRE" class="hide_">'+"\n"+
				'<!-- container ... --><table class="container"><tr><td>'+"\n";
		boxCont += '<div id="msgCont_'+id+'" class="msgCont">'+"\n"+
				'<div class="top">'+"\n" +
				'	<div class="title">'+objLG.boxTitle+'</div><div class="clear"></div>'+"\n"+
				'</div>'+"\n"+
				'<div class="body" style="padding: 15px 15px 10px 15px;">'+"\n"+
				'	<div class="listItem fg_dBlau b">'+lnkLG+objLG.title+(lnkLG?"</a>":"")+'</div>'+"\n"+
				'	<table cellspacing="0" cellpadding="0" border="0" class="list">'+"\n"+
				'		<tr><td colspan="2" style="padding: 4px 0 7px 12px;" nowrap>'+objLG.boxDescr+'</td></tr>'+"\n";
		for(y=0; y<objLG.usedSeminareArr.length; y++){
			var ttip = ' title="'+objLG.usedSeminareArr[y].ttip+'"';
			var urlFunc = objLG.usedSeminareArr[y].urlFunc ? objLG.usedSeminareArr[y].urlFunc : false;
			if(urlFunc) urlFunc = '<a href="' + ( urlFunc.split("javascript:").length == 2 ? urlFunc + '">': top.rootPath+urlFunc+'" target="new" title="'+ttip+'>' );
			var lnk = urlFunc ? urlFunc : "";
			boxCont += '		<tr>'+"\n"+
					'			<td style="padding-left: 13px;" nowrap><div class="listItem fg_dBlau b"'+ttip+'>'+
					lnk + objLG.usedSeminareArr[y].title+(lnk?'</a>':'')+'</div></td>'+"\n"+
					'			<td align="right" nowrap><div class="listText">'+objLG.usedSeminareArr[y].dauer+'</div></td>'+"\n"+
					'		</tr>'+"\n";
		}
		boxCont += '		<tr><td colspan="2" nowrap>'+"\n"+
				'	<div class="hLine" style="height: 22px;"><img class="ph_1x1" /></div>'+"\n"+
				'	<div style="text-align: center;">'+"\n"+
				'		<button type="button" id="HE_btn'+id+'Auswahl" name="HE_btn'+id+'Auswahl" onclick="preSelectModule(\''+id+'\')">&nbsp;Module ausw&auml;hlen&nbsp;</button>&nbsp;&nbsp;&nbsp;'+"\n"+
				'		<button type="button" id="HE_btn'+id+'CPMCancel" name="HE_btn'+id+'Cancel" onclick="hideShowObj(\''+objID+'PREHOLDER\')">&nbsp;Abbrechen&nbsp;</button>'+"\n"+
				'	</div>'+"\n"+
				'	</td></tr></table>'+"\n"+
				'</div>'+"\n"
		boxCont += '<!-- ENDE container --></td></tr></table></span>';
		html += '<!-- BOX '+objID+' ... -->'+top.ret_box(objID, 0, 0, boxCont) + top.ret_box() +'<!-- ENDE BOX '+objID+' -->';
		html += '</div>'+"\n\n";
	} // alert(html)
	document.getElementById("auswModuleHolder").innerHTML += html;
	for(b=0; b<lehrgaenge.length; b++){ 
		resize_box(lehrgaenge[b].objID);
		hideShowObj( lehrgaenge[b].objID+'PREHOLDER' )
	}
}
function preSelectModule(lgID){
	hideShowObj( 'AuswModule_'+lgID+'_PREHOLDER', 0 );
	chgChk(lgID, 3)
}
function auswBoxLehrgang(id){
	for(x=0; x<lehrgaenge.length; x++){ hideShowObj( 'AuswModule_'+lehrgaenge[x].id+'_PREHOLDER' ); }
	hideShowObj( 'AuswModule_'+id+'_PREHOLDER', 1 );
}
function ret_termine_1(id, listTab1_h){ // id => semID ... KA, PM etc.
	var html = '', tObj = termineObjs[id];
	html += '<div class="descr">'+
			'	<div class="descrLi">'+tObj.typ+'&nbsp;</div>'+
			'	<div class="descrRe b fg_dBlau">'+tObj.title+'</div>'+
			'</div>'+
			'<div class="hLine" style="height: 15px;"><img class="ph_1x1" /></div>'+
			'<div class="descr">'+
			'	<div class="descrLi">';
	return html;
}
function ret_termine_2(id, listTab1_h){
	var html = '', tObj = termineObjs[id];
	var semObj = seminarObjs[id] ? seminarObjs[id] : lehrgangObjs[id]; // CPM <= abweichend
	var preisDauer = semObj.dauer+" "+semObj.preis+" + Mwst.";
	var descr = tObj.descr;
	if( (descr.split("#")).length > 1 || (descr.split("|br|")).length > 1 || (descr.split("|sp-|")).length > 1) {
		descr = (descr.split("#")).join('</div><div class="listItem b">');
		descr = (descr.split("|lbr|")).join('<br>');
		descr = (descr.split("|sp-|")).join('<span>');
		descr = (descr.split("|-sp|")).join('</span>');
	}
	var terminePre = tObj.terminePre;
	if( (terminePre.split("#")).length > 1 ) terminePre = (terminePre.split("#")).join("<br>")
	var termineArr = tObj.termineArr;
	for(x=0; x<termineArr.length; x++){
		if( (termineArr[x].split("#")).length == 2 ){
			var tmp = termineArr[x].split("#");
			if( (tmp[1].split("url:")).length == 2){
				var url_ = top.rootPath+(tmp[1].split("url:"))[1]
				termineArr[x] = '<a href="'+url_+'" title="'+tmp[0]+'" style="line-height: 23px;">' + tmp[0] + '</a>';
			} else {
				termineArr[x] = tmp[0] + ' <i class="b fg_dBlau">' + tmp[1] + "</i>";
			}
		}
	}
	var termine = tObj.termineArr.join("<br>");
	html += '		</div>'+
			'		<div class="descrRe">'+
			'			<table id="descrRe_hoehe" cellspacing="0" cellpadding="0" border="0" height="'+(listTab1_h ? listTab1_h+12 : 90+12)+'"><tr><td vAlign="bottom">'+
			'				<table cellspacing="0" cellpadding="0" border="0"><tr><td>'+
			'					<div class="listItem b">'+descr+'</div>'+
			'					<div class="listItem b">'+tObj.ort+'</div>'+
			'					<div class="listItem">'+preisDauer+'</div>'+
			'				</td></tr></table>'+
			'			</td></tr></table>'+
			'		</div>'+
			'	</div>'+
			'	<div class="hLine" style="height: 15px;"><img class="ph_1x1" /></div>'+
			'	<div id="termine_KA">'+
			'		<div class="descr">'+
			'			<div class="descrLi">Termine:&nbsp;</div>'+
			'			<div class="descrRe"><div style="padding-bottom: 5px">'+terminePre+'</div></div>'+
			'		</div>'+
			'		<div class="descr">'+
			'			<div class="descrLi">&nbsp;</div>'+
			'			<div class="descrRe listItemsBg">'+
			'				'+termine+
			'			</div>'+
			'		</div>'+
			'	</div>';
	return html;
}
function onChgAusw(id){
/* 
	function direkt an senden anbinden!!!
	seminar[x].dauer + .preis
	select "termine_semID"
	zimmerreservierung ? preRES_hf_semID.value ?
	zimmertyp ? zi_radio_semID_0 o. zi_radio_semID_1 (einzel o. doppel)
	anreise_1_semID / abreise_1_semID / erstes termin-paar
	anreise_2_semID / abreise_2_semID / zweites termin-paar
*/
	var auswStrs = [];
	var fAuswahl = document.forms.fAuswahl;
	var fAngaben = document.forms.fAngaben;
	var sems = seminare;
	for(x=0; x<sems.length; x++){
		var semID = sems[x].id;
		/* ist chk-title && termin ausgewŠhlt? 
		semCHK_chk_id
		*/
		var sem_isSel = document.getElementById("semCHK_chk_"+semID).checked
		if(sem_isSel) {
			var termineStr;
			var termine_idx = document.getElementById("termine_"+semID).selectedIndex;
			termineStr = termine_idx ? fAuswahl.elements["termine_"+semID].options[termine_idx].text : 0;
			if(termineStr){
				var title = (sems[x].title.split("#")).join("LnBr")
				// auf reservierung testen ...
				var ziReserv = document.getElementById("preRES_hf_"+semID).value;
				var roomTyp = 0, reserv = "";
				if(ziReserv){
					var roomTyp_1 = document.getElementById("zi_radio_"+semID+"_0").checked;
					var roomTyp_2 = document.getElementById("zi_radio_"+semID+"_1").checked;
					if(roomTyp_1) roomTyp = roomTyps[0]
					else if(roomTyp_2) roomTyp = roomTyps[1]
					roomTyp = (roomTyp ? roomTyp : "Zimmer")+"-Reservierung";
					// an-/abreise-termine, checken ob termin-paare
					var reservTermine; var anAbTermine = [];
					anAbTermine.push(document.getElementById("anreise_1_"+semID).value ? document.getElementById("anreise_1_"+semID).value : "Keine Angabe");
					anAbTermine.push(document.getElementById("abreise_1_"+semID).value ? document.getElementById("abreise_1_"+semID).value : "Keine Angabe");
					if(document.getElementById("anreise_2_"+semID)){
						anAbTermine.push(document.getElementById("anreise_2_"+semID).value ? document.getElementById("anreise_2_"+semID).value : "Keine Angabe");
						anAbTermine.push(document.getElementById("abreise_2_"+semID).value ? document.getElementById("abreise_2_"+semID).value : "Keine Angabe");
					}
					anAbTermine = anAbTermine.join("___")
					reserv += roomTyp+"___"+anAbTermine;
				} else {
					reserv += "Keine Zimmer-Reservierung";
				}
				var semArr_x = [];
				semArr_x.push(sems[x].id);
				semArr_x.push(title);
				semArr_x.push(sems[x].preis + " + Mwst.");
				semArr_x.push(sems[x].dauer);
				semArr_x.push(termineStr);
				semArr_x.push(sems[x].urlFunc);
				if(reserv)semArr_x.push(reserv);
				
				auswStrs.push(semArr_x.join("|"))
			}
		}
	}
	var sonstiges = document.getElementById("sonstiges");
	if(sonstiges){
		if(sonstiges.value){
			var sonstigesTitle = document.getElementById("sonstigesTitle").value;
			var sonstigesWert = (sonstiges.value.split("\n")).join("LnBr");
			auswStrs.push("SONSTIGES:|"+sonstigesTitle+"|"+sonstigesWert)
		}
	}
	fAngaben.elements["Auswahl"].value = auswStrs.join("") ? "SEMINARANMELDUNG###"+auswStrs.join("#") : "";
	/* fld "Auswahl" ...
	
	SEMINARANMELDUNG:
	#PM|Praxis und Arbeitstechniken des Produktmanagements.|1.680,- Euro|4 Tage|14. - 15. Oktober und 11. - 12. November 2008|seminare/pm/index.html|Doppelzimmer-Reservierung___an1___ab1___Keine Angabe___Keine Angabe
	#KA|So analysieren Sie Ihre Konkurrenz.|1.475,- Euro|2 Tage|23. und 24. Oktober 2008|seminare/konkurrenzanalyse/index.html|Doppelzimmer-Reservierung___an___ab
	#SONSTIGES:|Sonstige WŸnsche und Hinweise.|1
	
	SEMINARANMELDUNG:
	#PM|Praxis und Arbeitstechniken des Produktmanagements.|1.680,- Euro|4 Tage|14. - 15. Oktober und 11. - 12. November 2008|seminare/pm/index.html|Doppelzimmer-Reservierung___an1___ab1___Keine Angabe___Keine Angabe
	#KA|So analysieren Sie Ihre Konkurrenz.|1.475,- Euro|2 Tage|23. und 24. Oktober 2008|seminare/konkurrenzanalyse/index.html|Doppelzimmer-Reservierung___an___ab
	(ohne sonstiges)
	
	id | title | preis | dauer | termine | url | reserv  (ein- oder mehrfach)		(permanente werte)
	title | text 																	(sonstiges optional) 
	*/
}


