function showCurrentDate(a){var b=new Date();var c=b.getDate();var d=b.getMonth();var e=b.getYear();if(c<10)c='0'+c;if(d<10)d='0'+d;if(e<999)e+=1900;a=a.toLowerCase();var f=a;if(a.search(/d/)!=-1){var f=f.replace(/d/,c)}if(a.search(/m/)!=-1){var f=f.replace(/m/,d)}if(a.search(/y/)!=-1){var f=f.replace(/y/,e)}return f}function showCurrentTime(a){var b=new Date();var c=b.getHours();var d=b.getMinutes();a=a.toLowerCase();var e=a;if(a.search(/h/)!=-1){var e=e.replace(/h/,c)}if(a.search(/i/)!=-1){var e=e.replace(/i/,d)}return e}function mkCalender(a,b,c,d,e,f,g,h){if(g==0&&(c==""||d=="")){c=260;d=170}else if(g!=0&&(c==""||d=="")){c=260;d=190}var i=a+'?timemode='+e+'&datefield='+f+'&timefield='+g+'&startweek='+h;var j=(screen.width-c)/2;var k=(screen.height-d)/2-60;var l='width='+c+',height='+d+',top='+k+',left='+j;var m=window.open(i,b,l);m.focus()}function SetValueIntoTextfield(a,b,c){if(opener.document.getElementsByName(b)[0]){opener.document.getElementsByName(b)[0].value=a;opener.document.getElementsByName(b)[0].focus();if(c==1){window.close()}}}function ParseUrl(a){var b='';var c=new Array();var d=location.search;if(d.indexOf('?')!=-1){d=d.substring(1,d.length)}c=new Object();while(d!=''){var e=d.substring(0,d.indexOf('='));var f=d.substring(d.indexOf('=')+1,d.indexOf('&'));if(d.indexOf('&')==-1){f=d.substring(d.indexOf('=')+1,d.length)}var g=a.length-1;for(var s=0;s<=g;s++){if(e==a[s]){c[a[s]]=unescape(f);break}}if(d.indexOf('&')==-1){d=''}else{d=d.substring(d.indexOf('&')+1,d.length)}}return c}function GetMonthDetail(a,b,c){var d=31;if(a==3||a==5||a==8||a==10){d--}if(a==1){d=28;if(b%4==0)d=29;if(b%100==0)d=28;if(b%400==0)d=29}c=c-c*2;var e=new Date(b,a,c);if(navigator.appName=="Microsoft Internet Explorer"){if(b<999){var f=e.getDay()+2}else{var f=e.getDay()}}else{var f=e.getDay()}return new Array(d,f,b)}function GetRowNum(a,b,c){var d=7;if(b<29)d=6;var e=Math.ceil(b/d);if(c==6)e++;if(c==5&&b==31)e++;return e}function ShowCalenderHeader(a,b,c,d,e){var f=b['month'];var g=b['year'];if(f!=0){document.write(' <a href="'+a+'?startweek='+b['startweek']+'&day='+b['day']+'&month='+(parseInt(f-1))+'&year='+g+'&datefield='+b['datefield']+'&timefield='+b['timefield']+'&timemode='+b['timemode']+'&hour='+b['hour']+'&minute='+b['minute']+'"><img src="'+brodos.config.get('WDIR')+'/images/m_zurueck.gif" border="0"></a> ')}else{document.write(' <a href="'+a+'?startweek='+b['startweek']+'&day='+b['day']+'&month=11&year='+(g-1)+'&datefield='+b['datefield']+'&timefield='+b['timefield']+'&timemode='+b['timemode']+'&hour='+b['hour']+'&minute='+b['minute']+'"><img src="'+brodos.config.get('WDIR')+'/images/m_zurueck.gif" border="0"></a> ')}document.write(" <select name='month' onchange='form.submit();'> ");for(var h=0;h<=11;h++){if(h==b['month']){document.write('<option value="'+h+'" selected>'+c[h]+'</option>')}else{document.write('<option value="'+h+'">'+c[h]+'</option>')}}document.write("</select> ");document.write(' <select name="year" onchange="form.submit();"> ');for(var i=d;i<=e;i++){if(i!=b['year']){document.write('<option value="'+i+'">'+i+'</option>')}else{document.write('<option value="'+i+'" selected>'+i+'</option>')}}document.write("</select> ");f++;if(g!=2099||f!=12){if(f!=12){document.write('<a href="'+a+'?startweek='+b['startweek']+'&day='+b['day']+'&month='+f+'&year='+g+'&datefield='+b['datefield']+'&timefield='+b['timefield']+'&timemode='+b['timemode']+'&hour='+b['hour']+'&minute='+b['minute']+'"><img src="'+brodos.config.get('WDIR')+'/images/m_weiter.gif" border="0"></a> ')}else{document.write('<a href="'+a+'?startweek='+b['startweek']+'&day='+b['day']+'&month=0&year='+(parseInt(g)+1)+'&datefield='+b['datefield']+'&timefield='+b['timefield']+'&timemode='+b['timemode']+'&hour='+b['hour']+'&minute='+b['minute']+'"><img src="'+brodos.config.get('WDIR')+'/images/m_weiter.gif" border="0"></a> ')}}}function ShowMainCalender(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){var r=1;var s=1;var t="";var u="";var v,TmpMonth,TmpTime,TmpHour;if(k>3500)k-=1900;e=(e+1)-c;var w=((6+(7-parseInt(f)))%7);var x=((7+(7-parseInt(f)))%7);if(w==0)w=7;if(x==0)x=7;w-=1;x-=1;if(n==0&&(o==""||o==undefined)){o=0}else{if(o[0]!=0&&o<10)o='0'+o;if(o<10){o=o.replace(/00/,"0")}}document.write('<table class="cal-Table" border="0" cellpadding="1" cellspacing="1" width="100%">');for(var y=0;y<=6;y++){document.write('<td align="center" class="cal-HeadCell" valign="middle">'+a[y]+'</td>')}for(var z=0;z<b;z++){document.write("<tr>");for(var A=0;A<=6;A++){var B="cal-DayLink";if((A==w||A==x)){t="cal-WeekendCell"}else{t="cal-DayCell"}if(r==g&&j==h&&k==i){t="cal-Today";B="cal-Today"}if(r==q[0]&&h==(q[1]-1)&&i==q[2]){t="cal-Selected";B="cal-Selected"}if(r<=d){if(z==0&&A<c){document.write('<td align="center" class="cal-GreyDate" valign="middle">'+e+'</td>');e++}else{if(parseInt(h)+1<10)TmpMonth='0'+(parseInt(h)+1);else TmpMonth=parseInt(h)+1;if(r<10)v='0'+r;else v=r;u=v+'.'+TmpMonth+'.'+i;if(n==1)u+=' '+o+':'+p+':00';if(n!=2){document.write('<td style="cursor:pointer" onclick="SetValueIntoTextfield(\''+u+'\', \'',l,'\', 1);" align="center" class="'+t+'" valign="middle"><a class="'+B+'" href="javascript:SetValueIntoTextfield(\''+u+'\', \'',l,'\', 1);">'+r+'</a></td>');r++}else if(n==2){TmpTime=o+':'+p+':00';document.write('<td style="cursor:pointer" onclick="SetValueIntoTextfield(\''+u+'\', \'',l,'\', 0);SetValueIntoTextfield(\''+TmpTime+'\', \'',m,'\', 1);" align="center" class="'+t+'" valign="middle"><a class="'+B+'" href="javascript:SetValueIntoTextfield(\''+u+'\', \'',l,'\', 0);SetValueIntoTextfield(\''+TmpTime+'\', \'',m,'\', 1);">'+r+'</a></td>');r++}}}else{document.write('<td align="center" class="cal-GreyDate" valign="middle">'+s+'</td>');s++}}document.write("</tr>")}document.write("</table>")}function SendHour(){box=document.forms[0].hours;destination=box.options[box.selectedIndex].value;if(destination)location.href=destination}function SendMinute(){box=document.forms[0].minutes;destination=box.options[box.selectedIndex].value;if(destination)location.href=destination}function ShowTimeSelect(a,b){if(b['hour'][0]!=0&&b['hour']<10)b['hour']='0'+b['hour'];if(b['hour']<10){b['hour']=b['hour'].replace(/00/,"0")}document.write("<select name='hours' onchange='SendHour();'> ");for(var c=0;c<=23;c++){if(c<10)c='0'+c;if(c==b['hour']){document.write('<option value="'+a+'?startweek='+b['startweek']+'&day='+b['day']+'&month='+b['month']+'&year='+b['year']+'&datefield='+b['datefield']+'&timefield='+b['timefield']+'&timemode='+b['timemode']+'&hour='+c+'&minute='+b['minute']+'" selected>'+c+'</option>')}else{document.write('<option value="'+a+'?startweek='+b['startweek']+'&day='+b['day']+'&month='+b['month']+'&year='+b['year']+'&datefield='+b['datefield']+'&timefield='+b['timefield']+'&timemode='+b['timemode']+'&hour='+c+'&minute='+b['minute']+'">'+c+'</option>')}}document.write("</select>");document.write(" <select name='minutes' onchange='SendMinute();'> ");for(var d=0;d<=59;d++){if(d%10==0){if(d<10)d="0"+d;if(d==b['minute']){document.write('<option value="'+a+'?startweek='+b['startweek']+'&day='+b['day']+'&month='+b['month']+'&year='+b['year']+'&datefield='+b['datefield']+'&timefield='+b['timefield']+'&timemode='+b['timemode']+'&hour='+b['hour']+'&minute='+d+'" selected>'+d+'</option>')}else{document.write('<option value="'+a+'?startweek='+b['startweek']+'&day='+b['day']+'&month='+b['month']+'&year='+b['year']+'&datefield='+b['datefield']+'&timefield='+b['timefield']+'&timemode='+b['timemode']+'&hour='+b['hour']+'&minute='+d+'">'+d+'</option>')}}}document.write("</select>")}