function checkboxwahl(form_nr){for(i=0;i<document.forms[form_nr].elements.length;i++){document.forms[form_nr].elements[i].checked=true;}}
function ersetzen_an(){if(document.forms[0].stellen_nr.childNodes.length==0){hStellen_Nr=document.forms[0].stellen_nr}else{hStellen_Nr=document.forms[0].stellen_nr.options[document.forms[0].stellen_nr.selectedIndex]}if(document.forms[0].veranstalter_id.options[document.forms[0].veranstalter_id.selectedIndex].value==document.forms[0].va_id.value ||  document.forms[0].veranstalter_id.options[document.forms[0].veranstalter_id.selectedIndex].id!=hStellen_Nr.value){document.forms[0].aendern.disabled=true;document.forms[0].durch.value="";}else{document.forms[0].aendern.disabled=false;document.forms[0].durch.value=document.forms[0].veranstalter_id.options[document.forms[0].veranstalter_id.selectedIndex].text;}}
function wechsel_monat(monat_nr){document.forms[0].monat_ter.value=monat_nr;window.document.forms[0].submit();}
function gemeinde_auswahl(){if(document.forms[0].ge_id.options[document.forms[0].ge_id.selectedIndex].value!=0){document.forms[0].veranstaltungsort.value=document.forms[0].ge_id.options[document.forms[0].ge_id.selectedIndex].text;}else{document.forms[0].veranstaltungsort.value="";}}
function wechsel_zuordnung(){if(arguments[0])arguments[0].form.submit();else window.document.forms[0].submit();}
function suche_zuordnung(){if(arguments[0])arguments[0].form.submit();else document.forms[0].submit();}
function send_selectbox(form){for(i=0;i<form.length;i++){form.options[i].selected=true;}window.document.forms[0].bund_send.value="send";window.document.forms[0].submit();}
function send_selectbox_all(){for(n=0;n<arguments.length;n++){if(arguments[n]){for(i=0;i<arguments[n].length;i++){arguments[n].options[i].selected=true;}}}}
function send_selectbox_zuordnung(){for(n=0;n<arguments.length;n++){if(arguments[n]){for(i=0;i<arguments[n].length;i++){arguments[n].options[i].selected=true;}}}window.document.forms[0].submit();}
function select_auswahl(obj){obj.options[0].selected=true;}
function setVarHidden(nummer,from){if(from.length)from[0].value=nummer; else from.value=nummer;}

function send_var_all(hAction){window.document.getElementById("send_data").action=hAction;window.document.getElementById("send_data").submit();}
function send_var_all_admin(hAction){window.document.getElementById("termin").action=hAction;window.document.getElementById("termin").submit();}

function changeTrBG(objekt,e){(e.type == "mouseout")?objekt.style.backgroundColor = '#e5e5e5' : objekt.style.backgroundColor = '#eef1fc';}
function checkboxwahl(obj){for(i=0;i<obj.elements.length;i++){if(obj.elements[i].checked==true)	obj.elements[i].checked=false; else	obj.elements[i].checked=true;}}
function open_popup(url){
if(url!=0)
	NewWin =  window.open(url,"extern",'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=780,height=440');               

}
function open_karte(url,obj){
if(url!=0)
{
	var h_pos=v_pos=0;
	if(obj.form.hpos.value)
		h_pos=obj.form.hpos.value
	if(obj.form.vpos.value)
		v_pos=obj.form.vpos.value;
	url=url+"?hpos="+h_pos+"&vpos="+v_pos;
	NewWin =  window.open(url,"karte",'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=780,height=440');               
}
}
function openMapview(url,obj){
		var h_pos=v_pos=0;
		if(obj.form.hpos.value)
			h_pos=obj.form.hpos.value
		if(obj.form.vpos.value)
			v_pos=obj.form.vpos.value;
		var description = obj.form.titel.value;
	url=url+"?hpos="+h_pos+"&vpos="+v_pos+"&description="+description;
	window.open(url,'map','width=552,height=468,scrollbars=0,status=1,resizable=0');
	}
function open_map(url){
	window.open(url,'map','width=552,height=468,scrollbars=0,status=1,resizable=0');
	}
function clear_karte(obj){
		obj.form.hpos.value='';
		obj.form.vpos.value='';
		obj.form.karte_ansicht.disabled=true;
		obj.form.karte_clear.disabled=true;
	}
function changeTrWhiteBG(objekt,e){
	// Aufruf
	(e.type == "mouseout")?objekt.style.backgroundColor = '#ffffff' : objekt.style.backgroundColor = '#eef1fc';	
}
function pruef_zeichen(obj_text,obj_anzeige,anzahl){if(anzahl<obj_text.value.length) obj_text.value=obj_text.value.substr(0,anzahl);if(obj_anzeige) obj_anzeige.value=obj_text.value.length;}
function wechsel_ort(obj){if(obj.options[0].selected==true)window.document.forms[0].submit();}
var getElements = new Array; 		
function ini(){for(i=0;i<(document.images.length);i++){getElements[i]=document.images[i].src;}}	
function ChangeImage(which,image,e){if(which!=status){if(e.type=='mouseover' || e.type=='mouseout'){document.images[which].src= image;}if(e.type=='click'){for (i=0;i<(document.images.length);i++){document.images[i].src=getElements[i];}document.images[which].src=image;status=which;}}}
