var datePickerController;
if(typeof dojo!="undefined"){
dojo.require("dojo.date");
dojo.require("dojo.date.locale");
}
(function(){
datePicker.isSupported=typeof document.createElement!="undefined"&&typeof document.documentElement!="undefined"&&typeof document.documentElement.offsetWidth=="number";
datePicker.daysPerMonth=[31,28,31,30,31,30,31,31,30,31,30,31];
datePicker.dateFormats=[new RegExp(/([0-9]{1,2})\/([0-9]{1,2})\/([0-9]{4})/),new RegExp(/([0-9]{1,2})\-([0-9]{1,2})\-([0-9]{4})/)];
datePicker.getDaysPerMonth=function(_1,_2){
_1=(_1+12)%12;
var _3=datePicker.daysPerMonth[_1];
if(_1==1){
_3+=_2%4==0&&!(_2%400==0)?1:0;
}
return _3;
};
datePicker.allWeekdays=["So","Mo","Di","Mi","Do","Fr","Sa"];
datePicker.getMonthFromMonthYear=function(_4){
var i=_4.indexOf("_");
var _6=_4.substring(0,i);
return _6;
};
datePicker.getYearFromMonthYear=function(_7){
var i=_7.indexOf("_");
var _9=_7.substring((i+1),_7.length);
return _9;
};
datePicker.parseJDates=function(_a){
if(_a==null){
return new Array();
}
var _b=new Array();
var _c=_a.split(",");
for(var i=0;i<_c.length;i++){
if(_c[i].indexOf("-")>0){
_b[_b.length]={"from":parseInt(_c[i].substring(0,_c[i].indexOf("-"))),"to":parseInt(_c[i].substring(_c[i].indexOf("-")+1,_c[i].length))};
}else{
_b[_b.length]={"from":parseInt(_c[i]),"to":parseInt(_c[i])};
}
}
return _b;
};
function datePicker(_e,_f,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_1a,_1b,_1c,_1d,_1e){
if(!_e){
return;
}
this._elem=_e;
this._created=false;
this._visible=false;
this._date=new Date();
this._europeanFormat=_f;
this._dividor=_10?"-":".";
this._firstDayOfWeek=_11?_11:0;
this._matrix=[[],[],[],[],[],[],[]];
this._highlightDays=_12;
this._threeIn=_16;
this._hideDaysBefore=_13;
this._hideDaysAfter=_14;
this._dates2exclude=datePicker.parseJDates(_15);
this._ownFooter=_19;
this._convtoscoutdate=_1a;
this._fromId=_1d;
this._toId=_1e;
this._corSelE=_1c;
if(_16){
this._elemMon=_17;
this._elemYea=_18;
}
this._monyeart=_1b;
this._div;
this._table;
this._dragging=false;
this._xOffs;
this._yOffs;
this._elem.tisCal=this;
var o=this;
appendHover=function(td){
td.onmouseover=function(e){
this.className+=" button_td_hover";
};
td.onmouseout=function(e){
this.className=this.className.replace(/button_td_hover/g,"");
};
td.onmousedown=function(e){
this.className+=" button_td_click";
};
td.onmouseup=function(e){
this.className=this.className.replace(/button_td_click/g,"");
};
};
o.events={onmousedown:function(ev){
if(ev==null){
ev=document.parentWindow.event;
}
var el=ev.target!=null?ev.target:ev.srcElement;
o.dragStart(ev);
if(el.tagName.toUpperCase()=="BUTTON"||(el.tagName.toUpperCase()=="TD"&&el.className!="")){
return false;
}
datePickerController.hideAll();
},onmouseover:function(e){
this.className+=" date-picker-hover";
},onmouseout:function(e){
this.className=this.className.replace(/date-picker-hover/g,"");
},onclick:function(e){
if(e==null){
e=document.parentWindow.event;
}
var el=e.target!=null?e.target:e.srcElement;
while(el.nodeType!=1){
el=el.parentNode;
}
var n=Number(el.firstChild.data);
if(isNaN(n)){
o.hide();
return;
}
var d=new Date(el.year,el.month,n);
o._date=d;
if(o._toId){
var _2d=document.getElementById(o._toId);
if(_2d&&_2d.tisCal){
if(_2d.tisCal._date<o._date){
_2d.tisCal._date=o._date;
_2d.tisCal.returnFormattedDate();
_2d.tisCal._hideDaysBefore=o._date;
}
}
}
o.returnFormattedDate();
o.hide();
}};
o.resize=function(){
if(!o._created||!o._elem){
return;
}
var pos=findPosition(o._elem);
var dm=getDim(o._elem);
if((pos[1]+o._div.offsetHeight)<dm[1]||pos[1]<o._div.offsetHeight){
o._div.style.top=(pos[1]+o._elem.offsetHeight+1)+"px";
}else{
o._div.style.top=(pos[1]-o._div.offsetHeight-3)+"px";
}
if((pos[0]+o._div.offsetWidth)<dm[0]){
o._div.style.left=pos[0]+"px";
}else{
var el=o._elem;
if(o._threeIn){
el=o._elemYea;
pos=findPosition(el);
}
o._div.style.left=(pos[0]+el.offsetWidth-o._div.offsetWidth)+"px";
}
if(o._iePopUp){
o._iePopUp.style.top=(o._div.offsetTop+3)+"px";
o._iePopUp.style.left=o._div.offsetLeft+"px";
}
o._div.style.width=o._table.style.width="240px";
};
o.create=function(){
if(o._created){
return;
}
if(document.all&&!window.opera&&window.createPopup){
o._iePopUp=document.createElement("iframe");
o._iePopUp.setAttribute("className","iehack");
o._iePopUp.src="/common/blank.html";
o._iePopUp.scrolling="no";
o._iePopUp.frameBorder="0";
document.body.appendChild(o._iePopUp);
}
o._div=document.createElement("div");
o._div.className="datePicker";
o._div.style.zIndex=9999;
o._div.style.top="-200px";
var _31=document.createElement("tbody");
var _32=document.createElement("thead");
_32.className="date-picker-frame";
var _33=document.createElement("tfoot");
var _34=String.fromCharCode(160);
o._table=document.createElement("table");
o._table.className="datePicker";
o._table.cellSpacing=0;
var tr=document.createElement("tr");
var td=document.createElement("td");
td.className="button_tdsym";
td.appendChild(document.createTextNode("?"));
td.title=datePicker_titles[4];
td.onclick=function(e){
alert(datePicker_Info);
};
appendHover(td);
tr.appendChild(td);
o._titleBar=new Array();
o._titleBar[0]=document.createElement("td");
o._titleBar[0].setAttribute("colSpan","7");
o._titleBar[0].className="title";
o._titleBar[0].style.fontWeight="bold";
tr.appendChild(o._titleBar[0]);
o._titleBar[1]=document.createElement("td");
o._titleBar[1].setAttribute("colSpan","7");
o._titleBar[1].className="title";
o._titleBar[1].style.fontWeight="bold";
tr.appendChild(o._titleBar[1]);
td=document.createElement("td");
td.className="button_tdsym";
td.appendChild(document.createTextNode("x"));
td.title=datePicker_titles[5];
td.onclick=function(e){
datePickerController.hideAll();
};
appendHover(td);
tr.appendChild(td);
_32.appendChild(tr);
tr=document.createElement("tr");
td=document.createElement("td");
td.className="button_tdsym";
td.appendChild(document.createTextNode("<<"));
td.title=datePicker_titles[0];
td.onclick=function(e){
var d=new Date(o._date);
d.setDate(Math.min(d.getDate(),datePicker.getDaysPerMonth(d.getMonth()-1,d.getFullYear())));
if(d.getYear()>1900){
d.setYear(d.getYear()-1);
}else{
d.setYear(1900+d.getYear()-1);
}
o._date=d;
o.updateTable();
};
appendHover(td);
tr.appendChild(td);
td=document.createElement("td");
td.className="button_tdsym";
td.appendChild(document.createTextNode("<"));
td.title=datePicker_titles[1];
td.onclick=function(e){
var d=new Date(o._date);
d.setDate(Math.min(d.getDate(),datePicker.getDaysPerMonth(d.getMonth()-1,d.getFullYear())));
d.setMonth(d.getMonth()-1);
o._date=d;
o.updateTable();
};
appendHover(td);
tr.appendChild(td);
td=document.createElement("td");
td.className="button_td";
td.setAttribute("colSpan","12");
td.appendChild(document.createTextNode(datePicker_titles[6]));
td.title=datePicker_titles[6];
td.onclick=function(e){
var d=new Date();
o._date=d;
o.updateTable();
};
appendHover(td);
tr.appendChild(td);
td=document.createElement("td");
td.className="button_tdsym";
td.appendChild(document.createTextNode(">"));
td.title=datePicker_titles[2];
td.onclick=function(e){
var d=new Date(o._date);
d.setDate(Math.min(d.getDate(),datePicker.getDaysPerMonth(d.getMonth()+1,d.getFullYear())));
d.setMonth(d.getMonth()+1);
o._date=d;
o.updateTable();
};
appendHover(td);
tr.appendChild(td);
td=document.createElement("td");
td.className="button_tdsym";
td.appendChild(document.createTextNode(">>"));
td.title=datePicker_titles[3];
td.onclick=function(e){
var d=new Date(o._date);
d.setDate(Math.min(d.getDate(),datePicker.getDaysPerMonth(d.getMonth()+1,d.getFullYear())));
if(d.getYear()>1900){
d.setYear(d.getYear()+1);
}else{
d.setYear(1900+d.getYear()+1);
}
o._date=d;
o.updateTable();
};
appendHover(td);
tr.appendChild(td);
_32.appendChild(tr);
var row,col;
weekDays=new Array(7);
for(i=0;i<7;i++){
weekDays[i]=datePicker_fullDay[(i+(7-o._firstDayOfWeek))%7].substr(0,2);
}
for(var _44=0;_44<7;_44++){
row=document.createElement("tr");
row.className="date-picker-day-header";
for(var _45=0;_45<16;_45++){
if(_45==0||_45==8){
var _46=(_44==0)?document.createElement("th"):document.createElement("td");
if(_44!=0){
_46.appendChild(document.createTextNode(" "));
_46.className="date-picker-day-KW";
row.appendChild(_46);
}else{
_46.appendChild(document.createTextNode(datePicker_CalendarWeekShort));
_46.className="date-picker-day-KW";
row.appendChild(_46);
}
}else{
col=(_44==0)?document.createElement("th"):document.createElement("td");
if(_44!=0){
col.appendChild(document.createTextNode(_34));
}else{
col.appendChild(document.createTextNode(weekDays[parseInt((_45-1)%8)]));
col.title=datePicker_fullDay[parseInt((_45-1)%8)];
if(parseInt((_45-1)%8)<5){
col.className="date-picker-day-header";
}else{
col.className="date-picker-day-headerH";
}
}
row.appendChild(col);
}
}
if(_44!=0){
_31.appendChild(row);
}else{
_32.appendChild(row);
}
}
var tr=document.createElement("tr");
var td=document.createElement("td");
td.className="title";
td.setAttribute("colSpan","16");
if(o._ownFooter!=null){
td.appendChild(document.createTextNode(o._ownFooter));
}else{
td.appendChild(document.createTextNode(datePicker_FOOTER));
}
tr.appendChild(td);
_33.appendChild(tr);
o._table.appendChild(_32);
o._table.appendChild(_31);
o._table.appendChild(_33);
o._div.appendChild(o._table);
o._created=true;
document.getElementsByTagName("body")[0].appendChild(o._div);
};
o.setDateFromInput=function(){
var dte=o._elem.value;
if(o._threeIn){
if(o._monyeart){
dte+=o._dividor+datePicker.getMonthFromMonthYear(o._elemMon.value)+o._dividor+datePicker.getYearFromMonthYear(o._elemYea.value);
}else{
dte+=o._dividor+o._elemMon.value+o._dividor+o._elemYea.value;
}
}else{
var _48=_e.value.length;
if(_48==0){
_48=8;
}
o._elem.style.width=_48+4+"ex";
}
var _49=Date.getDateFromString(dte,!o._europeanFormat);
if(!_1a){
o._date.setMonth(_49.getMonth());
}else{
o._date.setMonth(_49.getMonth()+1);
}
o._date.setYear(_49.getFullYear());
o._date.setDate(_49.getDate());
};
o.returnFormattedDate=function(){
var d=0;
var m=1;
if(_1c){
if(!_1a){
d=(o._date.getDate()<10)?"0"+o._date.getDate():o._date.getDate();
m=((o._date.getMonth()+1)<10)?"0"+(o._date.getMonth()+1):o._date.getMonth()+1;
}else{
d=o._date.getDate();
m=o._date.getMonth();
}
var _4c=o._date.getFullYear();
if(o._threeIn){
if(o._monyeart){
var _4d=m+"_"+_4c;
var _4e=datePicker.getMonthFromMonthYear(o._elemMon.options[o._elemMon.length-1].value);
var _4f=datePicker.getYearFromMonthYear(o._elemMon.options[o._elemMon.length-1].value);
if(_4c>_4f){
}else{
if(_4c==_4f){
if(m>_4e){
}else{
o._elemMon.value=_4d;
o._elemYea.value=_4d;
var _50=datePicker.getDaysPerMonth(m,_4c);
for(var i=(o._elem.options.length+1);i<=_50;i++){
var _52=new Date(_4c,m-1,i);
var _53=i+", "+datePicker.allWeekdays[_52.getDay()];
o._elem.options[o._elem.options.length]=new Option(_53,i);
}
}
}else{
o._elemMon.value=_4d;
o._elemYea.value=_4d;
var _50=datePicker.getDaysPerMonth(m,_4c);
for(var i=(o._elem.options.length+1);i<=_50;i++){
var _52=new Date(_4c,m-1,i);
var _53=i+", "+datePicker.allWeekdays[_52.getDay()];
o._elem.options[o._elem.options.length]=new Option(_53,i);
}
}
}
}else{
if(_4c>_4f){
}else{
if(_4c==_4f){
if(m>_4e){
}else{
o._elemMon.value=m;
o._elemYea.value=_4c;
}
}else{
o._elemMon.value=m;
o._elemYea.value=_4c;
}
}
}
}else{
if(o._europeanFormat){
o._elem.value=d+o._dividor+m+o._dividor+_4c;
}else{
o._elem.value=m+o._dividor+d+o._dividor+_4c;
}
}
o._elem.focus();
if(_4c>_4f){
}else{
if(_4c==_4f){
if(m>_4e){
}else{
o._elem.value=d;
}
}else{
o._elem.value=d;
}
}
if(o._elem.onchange){
o._elem.onchange();
}
}else{
if(!_1a){
d=(o._date.getDate()<10)?"0"+o._date.getDate():o._date.getDate();
m=((o._date.getMonth()+1)<10)?"0"+(o._date.getMonth()+1):o._date.getMonth()+1;
}else{
d=o._date.getDate();
m=o._date.getMonth();
}
var _4c=o._date.getFullYear();
if(o._threeIn){
o._elem.value=d;
if(o._monyeart){
var _4d=m+"_"+_4c;
o._elemMon.value=_4d;
o._elemYea.value=_4d;
}else{
o._elemMon.value=m;
o._elemYea.value=_4c;
}
}else{
if(typeof dojo!="undefined"&&typeof djConfig!="undefined"&&o._dfmt){
var _54={formatLength:"medium",locale:djConfig["locale"],selector:"date"};
o._elem.value=dojo.date.locale.format(o._date,_54);
}else{
if(o._europeanFormat){
o._elem.value=d+o._dividor+m+o._dividor+_4c;
}else{
o._elem.value=m+o._dividor+d+o._dividor+_4c;
}
}
}
o._elem.focus();
if(o._elem.onchange){
o._elem.onchange();
}
}
};
o.validDate=function(dte){
if(o.compareDate(dte,o._hideDaysBefore)<0||o.compareDate(dte,o._hideDaysAfter)>0){
return false;
}
for(var i=0;i<o._dates2exclude.length;i++){
if(dte.toJulDate()>=o._dates2exclude[i].from&&dte.toJulDate()<=o._dates2exclude[i].to){
return false;
}
}
return true;
};
o.compareDate=function(_57,_58){
if(_57==null||_58==null||_57.getDate()==_58.getDate()&&_57.getMonth()==_58.getMonth()&&_57.getFullYear()==_58.getFullYear()){
return 0;
}else{
if(_57.getDate()<_58.getDate()&&_57.getMonth()==_58.getMonth()&&_57.getFullYear()==_58.getFullYear()||_57.getMonth()<_58.getMonth()&&_57.getFullYear()==_58.getFullYear()||_57.getFullYear()<_58.getFullYear()){
return -1;
}else{
return 1;
}
}
};
o.updateTable=function(){
var i;
var str="";
var _5b=6;
var _5c=15;
var _5d=String.fromCharCode(160);
var _5e=new Array(_5b);
o._matrix=new Array(_5b);
for(i=0;i<_5b;i++){
_5e[i]=new Array(_5c);
o._matrix[i]=new Array(_5c);
}
for(var mon=0;mon<2;mon++){
var _60=new Date(o._date.getFullYear(),o._date.getMonth(),1).addMonth(mon);
var _61=_60.getMonth();
var _62=0;
var _63=new Date();
var _64=datePicker_months[_60.getMonth()%12]+_5d+_60.getFullYear();
while(o._titleBar[mon].firstChild){
o._titleBar[mon].removeChild(o._titleBar[mon].firstChild);
}
o._titleBar[mon].appendChild(document.createTextNode(_64));
for(var i=1;i<32;i++){
_60.setDate(i);
var _65=(_60.getDay()+6)%7;
var _66=(_65+(o._firstDayOfWeek)+7)%7+mon*8;
if(_60.getMonth()==_61){
_5e[_62][_66+1]={text:"",className:""};
if(o.compareDate(o._date,_60)==0&&o.compareDate(o._date,_63)>=0){
_5e[_62][_66+1].className+=" date-picker-selected";
}
if(o.compareDate(_60,_63)==0){
_5e[_62][_66+1].className+=" date-picker-today";
}
for(var d=0;d<o._highlightDays.length;d++){
if(_66%8==o._highlightDays[d]){
if(!o.validDate(_60)){
_5e[_62][_66+1].className+=" date-picker-highpast";
}else{
_5e[_62][_66+1].className+=" date-picker-highlight";
}
}
}
if(!o.validDate(_60)){
_5e[_62][_66+1].className+=" date-picker-past";
}
_5e[_62][_66+1].text=o._matrix[_62][_66]=_60.getDate();
_5e[_62][_66+1].month=o._matrix[_62][_66]=_60.getMonth();
_5e[_62][_66+1].year=o._matrix[_62][_66]=_60.getFullYear();
_5e[_62][_66+1].outOfTime=!o.validDate(_60);
if(_65%8==0||i==1){
_5e[_62][mon*8]={text:_60.getWeekNumber(),className:" date-picker-KW"};
_5e[_62][mon*8].outOfTime=true;
}
if(_66%8==6){
_62++;
}
}
}
var trs=o._table.getElementsByTagName("tbody")[0].getElementsByTagName("tr");
var _69;
for(var y=0;y<_5b;y++){
var tds=trs[y].getElementsByTagName("td");
for(var x=0;x<_5c+1;x++){
_69=tds[x];
while(_69.firstChild){
_69.removeChild(_69.firstChild);
}
if(typeof _5e[y][x]!="undefined"){
_69.className=_5e[y][x].className;
_69.appendChild(document.createTextNode(_5e[y][x].text));
_69.month=_5e[y][x].month;
_69.year=_5e[y][x].year;
if(x>0){
if(!_5e[y][x].outOfTime){
_69.onmouseover=o.events.onmouseover;
_69.onmouseout=o.events.onmouseout;
_69.onclick=o.events.onclick;
}else{
_69.onmouseover=_69.onmouseout=_69.onclick=null;
}
}
}else{
if(x==0||x==8){
_69.className="date-picker-KW";
}else{
_69.className="";
}
_69.appendChild(document.createTextNode(_5d));
_69.onmouseover=_69.onmouseout=null;
_69.onclick=function(){
o.hide();
};
}
}
}
}
};
o.init=function(){
o.resize();
o.setDateFromInput();
o.ieHack(true);
};
o.ieHack=function(_6d){
if(o._iePopUp){
o._iePopUp.style.display="block";
o._iePopUp.style.top=(o._div.offsetTop+3)+"px";
o._iePopUp.style.left=o._div.offsetLeft+"px";
o._iePopUp.style.width=(o._div.clientWidth)+"px";
o._iePopUp.style.height=(o._div.clientHeight-3)+"px";
if(_6d){
o._iePopUp.style.display="none";
}
o._div.style.display="none";
}else{
if(o._div){
o._div.style.display="none";
}
}
};
o.show=function(){
if(o._elem.disabled||o._visible){
return;
}
o.create();
o.setDateFromInput();
o.updateTable();
o.ieHack(false);
addEvent(document,"mousedown",o.events.onmousedown,true);
if(!o._visible){
o._div.style.display="block";
o.resize();
o._visible=true;
}
};
o.hide=function(){
if(o._visible){
o._div.style.display="none";
}
removeEvent(document,"mousedown",o.events.onmousedown,true);
if(o._iePopUp){
o._iePopUp.style.display="none";
}
o._visible=false;
};
o.dragStart=function(ev){
if(o._dragging){
return;
}
o._dragging=true;
var _6f;
var _70;
if(o._iePopUp){
_70=window.event.clientY+document.body.scrollTop;
_6f=window.event.clientX+document.body.scrollLeft;
}else{
_70=ev.clientY+window.scrollY;
_6f=ev.clientX+window.scrollX;
}
var st=o._div.style;
o._xOffs=_6f-parseInt(st.left);
o._yOffs=_70-parseInt(st.top);
with(o){
addEvent(document,"mousemove",dragIt,true);
addEvent(document,"mouseup",dragEnd,true);
}
};
o.dragIt=function(ev){
if(!o._dragging){
return false;
}
var _73;
var _74;
if(o._iePopUp){
_74=window.event.clientY+document.body.scrollTop;
_73=window.event.clientX+document.body.scrollLeft;
}else{
_73=ev.pageX;
_74=ev.pageY;
}
var st=o._div.style;
st.left=(_73-o._xOffs)+"px";
st.top=(_74-o._yOffs)+"px";
if(o._iePopUp){
var st=o._iePopUp.style;
st.left=(_73-o._xOffs)+"px";
st.top=(_74-o._yOffs)+"px";
}
return false;
};
o.dragEnd=function(ev){
o._dragging=false;
with(o){
removeEvent(document,"mousemove",dragIt,true);
removeEvent(document,"mouseup",dragEnd,true);
}
};
o.init();
addEvent(window,"resize",o.resize,true);
addEvent(o,"drag",o.drag,true);
}
datePickerController={datePickers:[],hideAll:function(_77){
for(var i=0,dp;dp=datePickerController.datePickers[i];i++){
if(i!=_77){
dp.hide();
}
}
},resizeAll:function(){
for(var i=0,dp;dp=datePickerController.datePickers[i];i++){
dp.resize();
}
},create:function(){
var _7a=document.getElementsByTagName("input");
var _7b=/date-picker/g;
var _7c=/start-day-([0-6]){1}/g;
var _7d=/highlight-days-([0-6]){1,7}/g;
var _7e=/stle-([a-z,A-Z]){1,15}/g;
var _7f=/footer='.+'/g;
var _80=/imgpath='.+?'/g;
var _81=/imgclassname='.+?'/g;
var _82=/imgalt='.+?'/g;
var _83=/formname='.+?'/g;
var _84=/btnTpl=([a-z,A-Z]){1,15}/g;
var _85,tmplate,imgclassname,imgalt,imgpath,ownFooter,europeanFormat,dividor,firstDayOfWeek,highlightDays,cssStyle,threeInputs,ys,allsel,noOldDates,noFutureDates,corSelE;
for(var i=0,inp;inp=_7a[i];i++){
if(inp.className&&inp.className.search(_7b)!=-1&&(inp.type=="text"||inp.type=="hidden")){
var len=datePickerController.datePickers.length;
europeanFormat=!getBoolean(inp,/date-american/);
dividor=getBoolean(inp,/dash-dividor/);
ownFooter=getStringInQuotes(inp,_7f,/footer='/);
template=inp.className.match(_84);
if(inp.className.search(_84)!=-1){
var tmp=inp.className.match(_84);
tmp=tmp[0].replace(/btnTpl=/,"");
template="";
for(var j=0;j<tmp.length;j++){
template+=tmp.charAt(j);
}
}
imgpath=getStringInQuotes(inp,_80,/imgpath='/);
imgclassname=getStringInQuotes(inp,_81,/imgclassname='/);
imgalt=getStringInQuotes(inp,_82,/imgalt='/);
_85=getStringInQuotes(inp,_83,/formname='/);
noOldDates=getBoolean(inp,/no-old/);
noFutureDates=getBoolean(inp,/no-future/);
threeInputs=getBoolean(inp,/d-3/);
ys=getBoolean(inp,/y-sel/);
notgendyn=getBoolean(inp,/notgendyn/);
convtoscoutdate=getBoolean(inp,/convtoscoutdate/);
showimgstartlink=getBoolean(inp,/showimgstartlink/);
corSelE=getBoolean(inp,/corSelE/);
if(inp.className.search(_7c)!=-1){
var tmp=inp.className.match(_7c);
firstDayOfWeek=parseInt(tmp[0].replace(/start-day-/,""));
}else{
firstDayOfWeek=0;
}
if(inp.className.search(_7d)!=-1){
var tmp=inp.className.match(_7d);
tmp=tmp[0].replace(/highlight-days-/,"");
highlightDays=new Array();
for(var j=0;j<tmp.length;j++){
highlightDays[highlightDays.length]=tmp.charAt(j);
}
}else{
highlightDays=new Array(5,6);
}
if(inp.className.search(_7e)!=-1){
var tmp=inp.className.match(_7e);
tmp=tmp[0].replace(/stle-/,"");
cssStyle="";
for(var j=0;j<tmp.length;j++){
cssStyle+=tmp.charAt(j);
}
inp.className=cssStyle;
}
var _8a=inp;
origName=inp.getAttribute("name");
origId=inp.getAttribute("id");
if(origName==""){
origName=origId;
}
var _8b=inp;
var tr;
var _8d;
var _8e;
var _8f=false;
if(threeInputs){
if(!notgendyn){
dte=inp.value;
var _90=dte.split(dividor?"-":".");
inp.setAttribute("name",origName+"_D");
inp.setAttribute("id",origId+"_D");
inp.setAttribute("size","1");
inp.setAttribute("maxlength","2",false);
inp.style.marginRight="5px";
inp.value=_90[0];
_8d=document.createElement("input");
_8d.setAttribute("type","text");
_8d.className=cssStyle;
_8d.style.marginRight="5px";
_8d.setAttribute("name",origName+"_M");
_8d.setAttribute("id",origId+"_M");
_8d.setAttribute("size","1");
_8d.setAttribute("maxlength","2",false);
_8d.value=_90[1];
_8d.onchange=inp.onchange;
if(!ys){
_8e=document.createElement("input");
_8e.setAttribute("type","text");
_8e.className=cssStyle;
_8e.style.marginRight="5px";
_8e.setAttribute("name",origName+"_Y");
_8e.setAttribute("id",origId+"_Y");
_8e.setAttribute("size","4");
_8e.setAttribute("maxlength","4",false);
_8e.value=_90[2];
_8e.onchange=inp.onchange;
}else{
_8e=document.createElement("select");
_8e.className=cssStyle;
_8e.style.marginRight="5px";
_8e.setAttribute("name",origName+"_Y");
_8e.setAttribute("id",origId+"_Y");
cDte=new Date();
opCnt=0;
if(!noOldDates){
_8e.options[opCnt++]=new Option(cDte.getFullYear()-2,cDte.getFullYear()-2);
_8e.options[opCnt++]=new Option(cDte.getFullYear()-1,cDte.getFullYear()-1);
}
_8e.options[opCnt++]=new Option(cDte.getFullYear(),cDte.getFullYear());
_8e.options[opCnt++]=new Option(cDte.getFullYear()+1,cDte.getFullYear()+1);
_8e.options[opCnt++]=new Option(cDte.getFullYear()+2,cDte.getFullYear()+2);
_8e.value=_90[2];
_8e.onchange=inp.onchange;
}
_8a=_8e;
if(inp.nextSibling){
inp.parentNode.insertBefore(_8e,inp.nextSibling);
inp.parentNode.insertBefore(_8d,inp.nextSibling);
}else{
inp.parentNode.appendChild(_8d);
_8d.parentNode.appendChild(_8e);
}
}else{
var _91=eval("document."+_85+"."+origName+"_Y");
var _92=eval("document."+_85+"."+origName+"_M");
var _93=eval("document."+_85+"."+origName+"_D");
if(_92.value.indexOf("_")!=-1){
_91=_92;
_8f=true;
}
inp.setAttribute("name",origName+"_L");
inp.setAttribute("id",origId+"_L");
inp.setAttribute("size","1");
inp.setAttribute("maxlength","2",false);
inp.style.marginRight="5px";
_8b=_93;
_8d=_92;
_8e=_91;
_8a=inp;
}
}else{
tab=document.createElement("table");
tab.style.display="inline";
tab.style.verticalAlign="middle";
tbody=document.createElement("tbody");
tr=document.createElement("tr");
td=document.createElement("td");
tr.appendChild(td);
tbody.appendChild(tr);
tab.appendChild(tbody);
if(_8a.nextSibling){
inbef=_8a.nextSibling;
par=_8a.parentNode;
_8a=par.removeChild(_8a);
td.appendChild(_8a);
par.insertBefore(tab,inbef);
}else{
par=_8a.parentNode;
_8a=par.removeChild(_8a);
td.appendChild(_8a);
par.appendChild(tab);
}
}
var _94=(noOldDates)?new Date():null;
var _95=(noFutureDates)?new Date():null;
if(_95==null&&(_95=inp.getAttribute("toJulDate"))!=null){
_95=Date.fromJulDate(_95);
}
if(_94==null&&(_94=inp.getAttribute("fromJulDate"))!=null){
_94=Date.fromJulDate(_94);
}
var _96=inp.getAttribute("datesExcluded");
var _97=inp.getAttribute("fromId");
var _98=inp.getAttribute("toId");
datePickerController.datePickers[len]=new datePicker(_8b,europeanFormat,dividor,firstDayOfWeek,highlightDays,_94,_95,_96,threeInputs,_8d,_8e,ownFooter,convtoscoutdate,_8f,corSelE,_97,_98);
var but=null;
if(template!=null){
var tpl=document.getElementById(template);
but=tpl.cloneNode(true);
but.id="";
tpl.style.display="";
}else{
if(!showimgstartlink){
but=document.createElement("button");
but.setAttribute("type","button");
but.className="calBtn";
but.appendChild(document.createTextNode("..."));
}else{
but=document.createElement("a");
but.setAttribute("href","javascript:void(0)");
var img=document.createElement("img");
img.setAttribute("alt",imgalt);
img.setAttribute("src",imgpath);
img.className=imgclassname;
but.appendChild(img);
}
}
but._value=len;
but.onclick=function(){
datePickerController.hideAll(this._value);
datePickerController.datePickers[this._value].show();
this.blur();
return false;
};
if(_8a.nextSibling){
if(tr){
td=document.createElement("td");
td.appendChild(but);
tr.appendChild(td);
}else{
inp.parentNode.insertBefore(but,_8a.nextSibling);
}
}else{
if(tr){
td=document.createElement("td");
td.appendChild(but);
tr.appendChild(td);
}else{
_8a.parentNode.appendChild(but);
}
}
}
}
for(var i=0;i<datePickerController.datePickers.length;i++){
if(datePickerController.datePickers[i]._toId){
var _9c=document.getElementById(datePickerController.datePickers[i]._toId);
if(_9c&&_9c.tisCal){
_9c.tisCal._hideDaysBefore=datePickerController.datePickers[i]._date;
}
}
}
addEvent(window,"resize",datePickerController.resizeAll,true);
datePickerController.resizeAll();
}};
})();
addEvent(window,"load",datePickerController.create,true);
function getDim(obj){
var _9e=0;
var _9f=0;
var _a0=obj;
if(obj.offsetParent){
while(obj.offsetParent){
obj=obj.offsetParent;
}
_9e=obj.offsetWidth;
maxheight=obj.offsetHeight;
}
return [_9e,maxheight];
}
function getStringInQuotes(_a1,_a2,_a3){
var _a4=null;
if(_a1.className.search(_a2)!=-1){
var tmp=_a1.className.match(_a2);
_a4=tmp[0].replace(_a3,"");
_a4=_a4.replace(/'/,"");
}
return _a4;
}
function getBoolean(_a6,_a7){
var _a8=false;
if(_a6.className.search(_a7)!=-1){
_a8=true;
}
return _a8;
}
function findPosition(obj){
var _aa=0;
var _ab=obj;
if(obj.offsetParent){
while(obj.offsetParent){
_aa+=obj.offsetLeft;
obj=obj.offsetParent;
}
}else{
if(obj.x){
_aa+=obj.x;
}
}
obj=_ab;
var _ac=0;
if(obj.offsetParent){
while(obj.offsetParent){
_ac+=obj.offsetTop;
obj=obj.offsetParent;
}
}else{
if(obj.y){
_ac+=obj.y;
}
}
return [_aa,_ac];
}
function addEvent(obj,_ae,fn,_b0){
if(obj.addEventListener){
obj.addEventListener(_ae,fn,_b0);
return true;
}else{
if(obj.attachEvent){
var r=obj.attachEvent("on"+_ae,fn);
return r;
}
}
return false;
}
function removeEvent(obj,_b3,fn,_b5){
if(obj.removeEventListener){
obj.removeEventListener(_b3,fn,_b5);
return true;
}else{
if(obj.detachEvent){
var r=obj.detachEvent("on"+_b3,fn);
return r;
}
}
return false;
}
if(!String.prototype.trim){
String.prototype.trim=function(){
return this.replace(/^\s*/,"").replace(/\s*$/,"");
};
}
Date.prototype.getWeekNumber=function(){
var d=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);
var DoW=d.getDay();
d.setDate(d.getDate()-(DoW+6)%7+3);
var ms=d.valueOf();
d.setMonth(0);
d.setDate(4);
return Math.round((ms-d.valueOf())/(7*86400000))+1;
};
Date.prototype.toJulDate=function(){
var day=this.getDate();
var _bb=this.getMonth();
var _bc=this.getFullYear();
var mm;
if(_bb>1){
mm=_bb-2;
}else{
mm=_bb+10;
_bc--;
}
var c=parseInt(_bc/100);
var ya=parseInt(_bc%100);
var _c0=parseInt((146097*c)/4+(1461*ya)/4+(153*mm+2)/5+day+1721119);
return _c0;
};
Date.fromJulDate=function(_c1){
var _c2;
var _c3;
var _c4;
var day;
_c1=_c1-1721119;
_c2=parseInt((4*_c1-1)/146097);
_c1=_c1*4-146097*_c2-1;
_c1=parseInt(_c1/4);
_c3=parseInt((4*_c1+3)/1461);
_c1=4*_c1+3-1461*_c3;
_c3=parseInt(_c2*100+_c3);
_c1=parseInt((_c1+4)/4);
_c4=parseInt((5*_c1-3)/153);
_c1=5*_c1-3-153*_c4;
day=parseInt((_c1+5)/5);
if(_c4<10){
_c4+=2;
}else{
_c4-=10;
_c3++;
}
return new Date(_c3,_c4,day);
};
Date.prototype.addMonth=function(_c6){
if(_c6==0){
return this;
}
var _c7=parseInt((this.getMonth()+_c6)/12);
return new Date(this.getFullYear()+_c7,(this.getMonth()+_c6)%12,this.getDate());
};
Date.getDateFromString=function(dte,_c9){
if(dte.match(/[0-9]{4}/)){
if(dte>1900&&dte<2030){
dte="01.06."+dte;
}
}
if(typeof dojo!="undefined"&&typeof djConfig!="undefined"){
var _ca={formatLength:"medium",locale:djConfig["locale"],selector:"date"};
var _cb=dojo.date.locale.parse(dte,_ca);
if(_cb!=null){
return _cb;
}
}
dte.replace(/\W/g,".");
var _cc=dte.split(".");
if(_cc.length!=3){
return new Date();
}
var dt;
if(!_c9){
dt=_cc[1]+"/"+_cc[0]+"/"+_cc[2];
}else{
dt=_cc[0]+"/"+_cc[1]+"/"+_cc[2];
}
var _cb=new Date(dt);
if(_cb=="Invalid Date"){
return new Date();
}
return _cb;
};

