function fn_mail(to,cc,bcc,subject,body) {
	while (to.match('!at!')) {
		to = to.replace('!at!','@');
	}
	string = 'mailto:'+to
	fragezeichen = false;
	if (cc !='') {
		while(cc.match('!at!')) {
			cc = cc.replace('!at!','@');
		}
		if (! fragezeichen) {string = string + '?';}
		else {string = string + '&';}
		string = string + 'cc=' + cc;
		fragezeichen = true;
	}
	if (bcc !='') {
		while(bcc.match('!at!')) {
			bcc = bcc.replace('!at!','@');
		}
		if (! fragezeichen) {string = string + '?';}
		else {string = string + '&';}
		string = string + 'bcc=' + bcc;
		fragezeichen = true;
	}
	if (subject !='') {
		if (! fragezeichen) {string = string + '?';}
		else {string = string + '&';}
		string = string + 'subject=' + subject;
		fragezeichen = true;
	}
	if (body !='') {
		if (! fragezeichen) {string = string + '?';}
		else {string = string + '&';}
		string = string + 'body=' + body;
		fragezeichen = true;
	}

	schliessen = open(string,'schliessen');
	if (window.schliessen)
		window.schliessen.close();
}

function fn_changeselect(vonObject,nachObject,Objectleeren, Objectnewarray) {
	var sourceid = vonObject[vonObject.selectedIndex].value;
	//alert('von='+vonObject.name+' nach='+nachObject.name+' sourceid='+sourceid);
	var i, j;

	// die options im Objectleeren rausschmeissen
	if (Objectleeren.name != '')
		//alert(Objectleeren.name + ' leeren');
		for (i = Objectleeren.options.length - 1; i >= 0; i--)
		{
			Objectleeren.options[i] = null;
		}

	// Remove all elements from options - den ersten stehen lassen
	for (i = nachObject.options.length - 1; i >= 0; i--)
	{
		nachObject.options[i] = null;
	}

	//alert(Objectnewarray.name);
	var newarray = Objectnewarray

	for (i = 0, j = 0; i < newarray.length; i++) {
		var selectvalue = newarray[i];
		if (selectvalue[0] == sourceid) {
			nachObject.options[j] = new Option(selectvalue[1], selectvalue[2], "", "");
			j++;
		}
	}
}

function fn_select_id(imObject,id) {
	//alert(imObject.name + ' ' + id + '-' + imObject.length);
	for (i = 0; i < imObject.length; i++) {
			//alert(i + '-' + imObject.options[i].value);
			if (imObject.options[i].value == id) {
				var optionid = i;
			}
		}
	//alert(imObject.options[optionid].text);
	imObject.options[optionid].selected = true;
}


function fn_highlight_film(filmheadid,aktion){
	//alert(filmheadid + ' - ' + aktion);
	switch(aktion) {
		case "ein":
			for (var i = 0; i <= 100; i++)
				if (document.getElementById('film'+filmheadid+i)) {
					document.getElementById('film'+filmheadid+i).className = "highlight";
				}
		break;
		case "aus":
			for (var i = 0; i <= 100; i++)
				if (document.getElementById('film'+filmheadid+i)) {
					document.getElementById('film'+filmheadid+i).className = "film";
				}
		break;
		default:
		break;
	}
}

function fn_show_div(divstatus, divid){
	switch(divstatus) {
		case "ein":
			if (document.getElementById(divid)){
				document.getElementById(divid).style.visibility = "visible";
			}
		break;
		case "aus":
			if (document.getElementById(divid)){
				document.getElementById(divid).style.visibility = "hidden";
			}
		break;
		default:
		break;
	}
}



