<!--

function noemailspam(adrs,dmain,nme,clss) {      	
    // Function made by TheHPage DOT com
    
    // ### MAKE VARS ###
    var first = 'ma';
    var second = 'il';
    var third = 'to:';
    
    // ### MAILTO-PART ###
    ausgabe = '<a href="';
    ausgabe = ausgabe+first+second+third;
    ausgabe = ausgabe+adrs+'&#64'+dmain;
    ausgabe = ausgabe+'">';
    
    // Check: Insert Style-Class? PART 1
    if(clss != ''){
        ausgabe = ausgabe+'<span class="'+clss+'">';    
    }
    
    // ### Check: Show E-Mail or Name? ###
    if(nme != ''){
        ausgabe = ausgabe+nme;
    } else {
        ausgabe = ausgabe+adrs+'&#64'+dmain;
    }    
    
    // Check: Insert Style-Class? PART 2
    if(clss != ''){
        ausgabe = ausgabe+'</span>';
    }
    
    // ### FINISH IT ###    
    ausgabe = ausgabe+'<\/a>';
    document.write(ausgabe);
}  

function bildanzeigen(fenster,name,weite,hoehe) {
	
// Version 1.2 vom 07.02.2006

		var g_fIsSP2 = false; //Für IE mit SP2.
		var xpos = screen.availWidth/2 - (weite/2);
		var ypos = screen.availHeight/2 - (hoehe/2);
		weite += 6;	
		
		if (navigator.appName.indexOf("Explorer") != -1) { 
			
	 		hoehe += 29; 	
	 		status = "no";
	 
	 		g_fIsSP2 = (window.navigator.userAgent.indexOf("SV1") != -1); //SP2?
   				if (g_fIsSP2)
   					{
   						hoehe += 27; //Für IE mit SP2. Kann Statusbar nicht ausblenden
   						status = "yes";
   					}
		}
		else { hoehe += 45; status = "yes"; } // alle anderen
			
	
  		
		
        img = window.open('/zoom.php?image='+name,fenster,'width='+weite+',height='+hoehe+',menubar=no,locationbar=no,statusbar='+status+',screenX='+xpos+',screenY='+ypos+',scrollbars=no');
		
		img.resizeTo(weite,hoehe);
		img.focus()
		
	  	if (img) return false;
  		else return true;
} 


function info_popup(datei) {
    window.open(datei,'Info_Fenster','width=550,height=450,menubar=no,locationbar=no,screenX=0,screenY=0,scrollbars=yes');
}




var calendarActive = false;
var tmpMonth = 0;
var tmpYear = 0;

var selDay = 0;
var selMonth = 0;
var selYear = 0;

var aMonths = Array('Januar',
                    'Februar',
                    'M&auml;rz',
                    'April',
                    'Mai',
                    'Juni',
                    'Juli',
                    'August',
                    'Septemb.',
                    'Oktober',
                    'November',
                    'Dezember'
                    );

function showCalendar(sId,sImagedir) {
  if(document.getElementById('calendar_'+sId)) {
    cal = document.getElementById('calendar_'+sId);

    cal.onmouseover = function() {
      calendarActive = true; 
    }
    
    cal.onmouseout = function() {
      calendarActive = false;  
    }

    cal.style.display = "block";

    oMonth = document.getElementById('span_'+sId+'_monat');
    oMonth.innerHTML = document.getElementById(sId+'_monat').value;
    
    document.body.onmousedown = function() {
      hideCalendar(sId);
    } 
    
    iDay = eval(document.getElementById(sId+"_tag").value);
	  iMonth = eval(document.getElementById(sId+"_monat").value);
	  iYear = eval(document.getElementById(sId+"_jahr").value);
	  
	  oDate = new Date();
	  if(iDay == undefined) {
	    iDay = oDate.getDate();
	  }
	  
	  if(iMonth == undefined) {
	    iMonth = oDate.getMonth() + 1;  
	  }
	  
	  if(iYear == undefined) {
	    iYear = oDate.getFullYear();  
	  }
	  
	  selDay = iDay;
	  selMonth = iMonth;
	  selYear = iYear;
	  
  	tmpMonth = iMonth;
  	tmpYear = iYear;

    drawCalendar(sId,iMonth,iYear,sImagedir);
  }
}

function hideCalendar(sId) {
  if(calendarActive == false) {
    if(document.getElementById('calendar_'+sId)) {
      cal = document.getElementById('calendar_'+sId);
      cal.style.display = "none";    
    }
  }
}

function getDate(sId) {
  matches = document.getElementById(sId).value.split(".");
  return {day : matches[0], month : matches[1], year : matches[2]};
}

function setDate(sId, day, month, year) {
  day = (day != undefined && day != '')?eval(day):eval(document.getElementById(sId+"_tag").value);
	month = (month != undefined && month != '')?eval(month):eval(document.getElementById(sId+"_monat").value);
	year = (year != undefined && year != '')?eval(year):eval(document.getElementById(sId+"_jahr").value);

	if(month > 12) {	month = 12; }
  if(month < 10) { month = '0' + month;	}

  daysInMonth = 32 - new Date(year, (month-1), 32).getDate();

	if(day > daysInMonth) { day = daysInMonth;	}
  if(day < 10) { day = '0' + day;	}
  sel = document.getElementById(sId+"_monat");
  for(i=0;i<sel.length;i++) {
    if(sel[i].value == month) {
      sel.selectedIndex = i;
    }
  }

  document.getElementById(sId+"_tag").value = day
  document.getElementById(sId+"_jahr").value = year;
  document.getElementById("datum_tmp_"+sId).value = day + "." + month + "." + year;

  calendarActive = false; 

  hideCalendar(sId);
}

function drawCalendar(sId,iMonth,iYear,sImagedir) {
  sMonth = aMonths[iMonth-1];
  if(iMonth < 10) { iMonth = '0' + iMonth;	}
  
  oMonth = document.getElementById('span_'+sId+'_monat');
  oMonth.innerHTML = sMonth + ' ' + iYear;

  iTotalDays = getDaysInMonth(iMonth);
  iLastDays = getDaysInMonth(iMonth-1);
  iWeekDay = getWeekDay(2,iMonth,iYear);
  iCount = 0;
  
  listDays = '<ul>';
  for(i=1;i<=iWeekDay;i++) {
    iNow = iLastDays - (iWeekDay - (i+1));
    listDays += '<li class="inactive"><span>'+iNow+'</span></li>';
    iCount++;
  }
  for(i=1;i<=iTotalDays;i++) {
    if(i == selDay && iMonth == selMonth && iYear == selYear) {
      sStyle = ' style="background: #ffcc00 !important; color: #000;"'; 
    } else {
      sStyle = ''; 
    }
    listDays += '<li><a href="javascript:setDate(\''+sId+'\',\''+i+'\',\''+iMonth+'\',\''+iYear+'\')"'+sStyle+'>'+i+'</a></li>';
    iCount++;
  }
  
  iLast = (Math.ceil(iCount/7)*7)-iCount;
  for(i=1;i<=iLast;i++) {
    listDays += '<li class="inactive"><span>'+i+'</span></li>';
  }
  listDays += '</ul>';
  listDays += '<div class="clearboth"><img src="'+sImagedir+'blank.gif" width="0" height="0" alt="" /></div>';

  oDays = document.getElementById('div_'+sId+'_days');
  oDays.innerHTML = listDays;
  
}

function getDaysInMonth(iMonth) {
  if(iMonth == '01' || iMonth == '03' || iMonth == '05' || iMonth == '07' || iMonth == '08' || iMonth == '10' || iMonth == '12') {
    iDaysInMonth = 31; 
  } else if(iMonth == '02') {
    if(((iYear % 4 == 0 && iYear % 100 != 0)  || iYear % 400 == 0)) {
      iDaysInMonth = 29;
    } else {
      iDaysInMonth = 28;
    }  
  } else {
    iDaysInMonth = 30; 
  }
  
  return iDaysInMonth;
}

function getWeekDay(iDay, iMonth, iYear) {

  oDate = new Date(iYear, iMonth - 1, 1);
  return oDate.getDay()-1 >= 0 ? oDate.getDay()-1 : 6;
  /*
  startDays = Array(0, 3, 1, 5, 0, 3, 5, 1, 4, 6, 2, 4);
  iYear -= iMonth < 3;
  aDays = Array('mo','di','mi','do','fr','sa','so');
  iRet = Math.floor((iYear + iYear/4 - iYear/100 + iYear/400 + startDays[iMonth-1] + iDay) % 7);
  
  iRet -= 1;
  if(iRet < 0) {
    iRet = 6; 
  }
  
  return iRet;  
    */
    
}

function setMonth(sDir,sId,sImagedir) {

	if(sDir == 'left') {
	  if(tmpMonth > 1) {
	    tmpMonth--;
	    tmpYear = tmpYear;
	  } else {
	    tmpMonth = 12;
	    tmpYear--; 
	  }
	} else {
	  if(tmpMonth < 12) {
	    tmpMonth++;
	    tmpYear = tmpYear;
	  } else {
	    tmpMonth = 1;
	    tmpYear++; 
	  }
	}  
  drawCalendar(sId,tmpMonth,tmpYear,sImagedir);
}


//-->
