// this function is deprecated, included for backward compatibility only function getFormVars(form) { str='&'+$("#"+form).serialize(); return str; } function formCalendar(id, calType){ this.calType=calType; this.id=id; this.monthNames=new Array('Januar','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'); this.weekdayNames=new Array('Mo','Di','Mi','Do','Fr','Sa','So'); this.timeName="Zeit"; this.todayName="Jetzt"; window[id+"Obj"] = this; this.name=id+"Obj"; this.setToday=function(){ var todaydate=new Date(); if(this.calType=="date" || this.calType=="fulldate"){ document.getElementById(this.id+"calDay").value=todaydate.getDate(); document.getElementById(this.id+"calMonth").value=todaydate.getMonth()+1; document.getElementById(this.id+"calYear").value=todaydate.getFullYear(); } if(this.calType=="fullDate"){ document.getElementById(this.id+"calHours").value=todaydate.getHours(); document.getElementById(this.id+"calMinutes").value=todaydate.getMinutes(); } this.send(); } this.setDay=function(x){ document.getElementById(this.id+"calDay").value=x; this.send(); } this.getFullDays = function(m, y) { for(var x=28; x<=31; ++x) { if(new Date(y,m-1,x).getMonth()!=new Date(y,m-1,1).getMonth()) break; } return x-1; } this.send=function(){ if(this.calType=="fullDate"){ h=parseInt(document.getElementById(this.id+"calHours").value); i=parseInt(document.getElementById(this.id+"calMinutes").value); if(i>60){ i-=60; h+=1; } if(i<0){ i+=60; h-=1; } } if(this.calType=="date" || this.calType=="fullDate"){ d=parseInt(document.getElementById(this.id+"calDay").value); m=parseInt(document.getElementById(this.id+"calMonth").value); y=parseInt(document.getElementById(this.id+"calYear").value); if(d>this.getFullDays(m,y)){ d-=this.getFullDays(m,y); m+=1; } if(d<=0){ m-=1; d+=this.getFullDays(m,y); } if(m>12){ m-=12; y+=1; } if(m<=0){ m+=12; y-=1; } } if(this.calType=="time" || this.calType=="fullDate"){ if(h<10)h='0'+h; if(i<10)i='0'+i; } if(this.calType=="fullDate"){ if(d<10)d='0'+d; if(m<10)m='0'+m; } if(this.calType=="fullDate"){ document.getElementById(this.id).value=d+'.'+m+'.'+y+' '+h+':'+i; this.build(parseInt(d),parseInt(m),parseInt(y),h,i); } if(this.calType=="date"){ document.getElementById(this.id).value=d+'.'+m+'.'+y; this.build(parseInt(d),parseInt(m),parseInt(y)); } $('#'+this.id+'Calendar').css("display","none"); } this.build=function(d, m, y, h, min){ var t='
'; if(document.getElementById(this.id+"Calendar")){ var temp=document.getElementById(this.id+"Calendar").style.display; document.getElementById(this.id+"CalDiv").innerHTML=t; document.getElementById(this.id+"Calendar").style.display=temp; }else{ document.getElementById(this.id+"CalDiv").innerHTML=t; } } } function editor(name){ this.name=name; this.before=''; this.after='