<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function show_calendar(field, div, iframe, type, field_before){
	if (type == '2'){
		document.getElementById(''+iframe+'').src='static_pgs/de/calendar.php?dateField='+field+'&dateStart='+document.getElementById(''+field_before+'').value+'&cal_div='+div+'';
	}else{
		document.getElementById(''+iframe+'').src='static_pgs/de/calendar.php?dateField='+field+'&cal_div='+div+'';
	}
	document.getElementById(''+div+'').style.display='block';
}

function get_rules(){
	var div_content = document.getElementById('indexedsearch_rules_typo').innerHTML;
	document.getElementById('search_rule').innerHTML = div_content;
}

/*MAIL SPAM */ 
function print_email(domain, user, output, klasse){ 
	var send_to = user + "@" + domain; 
	document.write('<a href="mailto:'+send_to+'" class="'+klasse+'">E-Mail</a>');
}
/*MAIL SPAM END */ 

function CreaOggetto(){
	var richiesta;
	var browser = navigator.appName;
	if(browser == "Microsoft Internet Explorer"){
		richiesta = new ActiveXObject("Microsoft.XMLHTTP");
	}else{
		richiesta = new XMLHttpRequest();
	}
	return richiesta;
}

var http = new Array();
http = CreaOggetto();

function start_contactform_small(email,lang,count){
	document.getElementById('div_contactform_small_'+count).style.display='none';
	document.getElementById('div_contactform_small_'+count).style.display='block';
	contactform_small(email,lang,count);
}

function remove_contactform_small(count){
	document.getElementById('div_contactform_small_'+count).style.display='none';
	document.getElementById('div_contactform_small_'+count).innerHTML = '';
}

function contactform_small(email,lang,count){
		http.open('get','fileadmin/files/box_contact_contactform.php?send_to_email='+email+'&lang='+lang+'&action=&count='+count+'');
		http.onreadystatechange = function () { 
		//alert(count);
		if(http.readyState == 4){
				var response = http.responseText;
				document.getElementById('div_contactform_small_'+count).innerHTML = response;
			}
		};
		http.send(null);
}

/*function contactform_small_result(count){
	
	
}*/

function contactform_small_2(action,send_to_email,lang,anrede,vorname,name,email,bemerkungen,count){
	//document.getElementById('div_contactform_small').style.display='block';
	//alert(action);
	//alert(count);
	http.open('get','fileadmin/files/box_contact_contactform.php?send_to_email='+send_to_email+'&lang='+lang+'&action='+action+'&anrede='+anrede+'&vorname='+vorname+'&name='+name+'&email='+email+'&bemerkungen='+bemerkungen+'&count='+count+'');
	http.onreadystatechange = function () { 
		if(http.readyState == 4){
				var response = http.responseText;
				document.getElementById('div_contactform_small_'+count).innerHTML = response;
			}
		};
	http.send(null);
}

function contactform_small_result_2(count){
	if(http.readyState == 4){
		var response = http.responseText;
		document.getElementById('div_contactform_small_'+count).innerHTML = response;
		//document.getElementById('div_contactform_small').style.display='block';
	}
}

function send_contactform_small(action,count){
	var send_to_email = document.getElementById('send_to_email_'+count).value;
	var lang = document.getElementById('lang_'+count).value;
	
	if (action == 'Zurück' || action == 'Bestätigen'){
		var anrede = document.getElementById('anrede_'+count).value;
	}else{
		var anrede = "";
		if (document.getElementById('anrede_herr_'+count).checked == true){
			var anrede = "Herr";	
		}
		if (document.getElementById('anrede_frau_'+count).checked == true){
			var anrede = "Frau";
		}	
	}
	var vorname = document.getElementById('vorname_'+count).value;	
	var name = document.getElementById('name_'+count).value;	
	var email = document.getElementById('email_'+count).value;	
	var bemerkungen = document.getElementById('bemerkungen_'+count).value;
	contactform_small_2(action,send_to_email,lang,anrede,vorname,name,email,bemerkungen,count);
}

// Header Image Slideshow

window.addEvent("domready", function(event){
	if (document.getElementById('headerimg_wrapper')) {
    		var slidephoto = new viewer($$('#header_pic img)'),{
    			mode: 'alpha',    			           
            	fxOptions: {duration:1000},
    				interval: 5000
    		            });
    		slidephoto.play(true);
    	}
									 });
-->
