var datePickerController;
var dojo=null;
try{
dojo=top.dojo;
var djConfig=top.djConfig;
if(dojo){
dojo.require("dojo.date");
dojo.require("dojo.date.locale");
}
}
catch(e){
}
(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._fromId){
var _2d=document.getElementById(o._fromId);
if(_2d&&_2d.tisCal){
_2d.tisCal._hideDaysAfter=o._date;
}
}
if(o._toId){
var _2d=document.getElementById(o._toId);
if(_2d&&_2d.tisCal){
_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{
o._elem.style.width=_e.value.length+4+"ex";
}
if(dte.match(/[0-9]{4}/)){
if(dte>1900&&dte<2030){
dte="01"+o._dividor+"06"+o._dividor+dte;
}
}
if(dojo&&!o._threeIn){
var _48={formatLength:"medium",locale:djConfig["locale"],selector:"date"};
inDate=dojo.date.locale.parse(dte,_48);
if(inDate!=null){
o._dfmt=true;
o._date=inDate;
o._elem.style.width="16ex";
return;
}
}
var _49=dte.split(o._dividor);
if(_49.length!=3){
o._date=new Date();
return;
}
var dt;
if(o._europeanFormat){
dt=_49[1]+"/"+_49[0]+"/"+_49[2];
}else{
dt=_49[0]+"/"+_49[1]+"/"+_49[2];
}
if(new Date(dt)=="Invalid Date"){
o._date=new Date();
return;
}
if(!_1a){
o._date.setMonth(o._europeanFormat?_49[1]-1:_49[0]-1);
}else{
o._date.setMonth(o._europeanFormat?_49[1]:_49[0]);
}
o._date.setYear(_49[2]);
o._date.setDate(o._europeanFormat?_49[0]:_49[1]);
};
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 _4d=o._date.getFullYear();
if(o._threeIn){
if(o._monyeart){
var _4e=m+"_"+_4d;
var _4f=datePicker.getMonthFromMonthYear(o._elemMon.options[o._elemMon.length-1].value);
var _50=datePicker.getYearFromMonthYear(o._elemMon.options[o._elemMon.length-1].value);
if(_4d>_50){
}else{
if(_4d==_50){
if(m>_4f){
}else{
o._elemMon.value=_4e;
o._elemYea.value=_4e;
var _51=datePicker.getDaysPerMonth(m,_4d);
for(var i=(o._elem.options.length+1);i<=_51;i++){
var _53=new Date(_4d,m-1,i);
var _54=i+", "+datePicker.allWeekdays[_53.getDay()];
o._elem.options[o._elem.options.length]=new Option(_54,i);
}
}
}else{
o._elemMon.value=_4e;
o._elemYea.value=_4e;
var _51=datePicker.getDaysPerMonth(m,_4d);
for(var i=(o._elem.options.length+1);i<=_51;i++){
var _53=new Date(_4d,m-1,i);
var _54=i+", "+datePicker.allWeekdays[_53.getDay()];
o._elem.options[o._elem.options.length]=new Option(_54,i);
}
}
}
}else{
if(_4d>_50){
}else{
if(_4d==_50){
if(m>_4f){
}else{
o._elemMon.value=m;
o._elemYea.value=_4d;
}
}else{
o._elemMon.value=m;
o._elemYea.value=_4d;
}
}
}
}else{
if(o._europeanFormat){
o._elem.value=d+o._dividor+m+o._dividor+_4d;
}else{
o._elem.value=m+o._dividor+d+o._dividor+_4d;
}
}
o._elem.focus();
if(_4d>_50){
}else{
if(_4d==_50){
if(m>_4f){
}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 _4d=o._date.getFullYear();
if(o._threeIn){
o._elem.value=d;
if(o._monyeart){
var _4e=m+"_"+_4d;
o._elemMon.value=_4e;
o._elemYea.value=_4e;
}else{
o._elemMon.value=m;
o._elemYea.value=_4d;
}
}else{
if(dojo&&o._dfmt){
var _55={formatLength:"medium",locale:djConfig["locale"],selector:"date"};
o._elem.value=dojo.date.locale.format(o._date,_55);
}else{
if(o._europeanFormat){
o._elem.value=d+o._dividor+m+o._dividor+_4d;
}else{
o._elem.value=m+o._dividor+d+o._dividor+_4d;
}
}
}
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(_58,_59){
if(_58==null||_59==null||_58.getDate()==_59.getDate()&&_58.getMonth()==_59.getMonth()&&_58.getFullYear()==_59.getFullYear()){
return 0;
}else{
if(_58.getDate()<_59.getDate()&&_58.getMonth()==_59.getMonth()&&_58.getFullYear()==_59.getFullYear()||_58.getMonth()<_59.getMonth()&&_58.getFullYear()==_59.getFullYear()||_58.getFullYear()<_59.getFullYear()){
return -1;
}else{
return 1;
}
}
};
o.updateTable=function(){
var i;
var str="";
var _5c=6;
var _5d=15;
var _5e=String.fromCharCode(160);
var _5f=new Array(_5c);
o._matrix=new Array(_5c);
for(i=0;i<_5c;i++){
_5f[i]=new Array(_5d);
o._matrix[i]=new Array(_5d);
}
for(var mon=0;mon<2;mon++){
var _61=new Date(o._date.getFullYear(),o._date.getMonth(),1).addMonth(mon);
var _62=_61.getMonth();
var _63=0;
var _64=new Date();
var _65=datePicker_months[_61.getMonth()%12]+_5e+_61.getFullYear();
while(o._titleBar[mon].firstChild){
o._titleBar[mon].removeChild(o._titleBar[mon].firstChild);
}
o._titleBar[mon].appendChild(document.createTextNode(_65));
for(var i=1;i<32;i++){
_61.setDate(i);
var _66=(_61.getDay()+6)%7;
var _67=(_66+(o._firstDayOfWeek)+7)%7+mon*8;
if(_61.getMonth()==_62){
_5f[_63][_67+1]={text:"",className:""};
if(o.compareDate(o._date,_61)==0&&o.compareDate(o._date,_64)>=0){
_5f[_63][_67+1].className+=" date-picker-selected";
}
if(o.compareDate(_61,_64)==0){
_5f[_63][_67+1].className+=" date-picker-today";
}
for(var d=0;d<o._highlightDays.length;d++){
if(_67%8==o._highlightDays[d]){
if(!o.validDate(_61)){
_5f[_63][_67+1].className+=" date-picker-highpast";
}else{
_5f[_63][_67+1].className+=" date-picker-highlight";
}
}
}
if(!o.validDate(_61)){
_5f[_63][_67+1].className+=" date-picker-past";
}
_5f[_63][_67+1].text=o._matrix[_63][_67]=_61.getDate();
_5f[_63][_67+1].month=o._matrix[_63][_67]=_61.getMonth();
_5f[_63][_67+1].year=o._matrix[_63][_67]=_61.getFullYear();
_5f[_63][_67+1].outOfTime=!o.validDate(_61);
if(_66%8==0||i==1){
_5f[_63][mon*8]={text:_61.getWeekNumber(),className:" date-picker-KW"};
_5f[_63][mon*8].outOfTime=true;
}
if(_67%8==6){
_63++;
}
}
}
var trs=o._table.getElementsByTagName("tbody")[0].getElementsByTagName("tr");
var _6a;
for(var y=0;y<_5c;y++){
var tds=trs[y].getElementsByTagName("td");
for(var x=0;x<_5d+1;x++){
_6a=tds[x];
while(_6a.firstChild){
_6a.removeChild(_6a.firstChild);
}
if(typeof _5f[y][x]!="undefined"){
_6a.className=_5f[y][x].className;
_6a.appendChild(document.createTextNode(_5f[y][x].text));
_6a.month=_5f[y][x].month;
_6a.year=_5f[y][x].year;
if(x>0){
if(!_5f[y][x].outOfTime){
_6a.onmouseover=o.events.onmouseover;
_6a.onmouseout=o.events.onmouseout;
_6a.onclick=o.events.onclick;
}else{
_6a.onmouseover=_6a.onmouseout=_6a.onclick=null;
}
}
}else{
if(x==0||x==8){
_6a.className="date-picker-KW";
}else{
_6a.className="";
}
_6a.appendChild(document.createTextNode(_5e));
_6a.onmouseover=_6a.onmouseout=null;
_6a.onclick=function(){
o.hide();
};
}
}
}
}
};
o.init=function(){
o.resize();
o.setDateFromInput();
o.ieHack(true);
};
o.ieHack=function(_6e){
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(_6e){
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 _70;
var _71;
if(o._iePopUp){
_71=window.event.clientY+document.body.scrollTop;
_70=window.event.clientX+document.body.scrollLeft;
}else{
_71=ev.clientY+window.scrollY;
_70=ev.clientX+window.scrollX;
}
var st=o._div.style;
o._xOffs=_70-parseInt(st.left);
o._yOffs=_71-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 _74;
var _75;
if(o._iePopUp){
_75=window.event.clientY+document.body.scrollTop;
_74=window.event.clientX+document.body.scrollLeft;
}else{
_74=ev.pageX;
_75=ev.pageY;
}
var st=o._div.style;
st.left=(_74-o._xOffs)+"px";
st.top=(_75-o._yOffs)+"px";
if(o._iePopUp){
var st=o._iePopUp.style;
st.left=(_74-o._xOffs)+"px";
st.top=(_75-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(_78){
for(var i=0,dp;dp=datePickerController.datePickers[i];i++){
if(i!=_78){
dp.hide();
}
}
},resizeAll:function(){
for(var i=0,dp;dp=datePickerController.datePickers[i];i++){
dp.resize();
}
},create:function(){
var _7b=document.getElementsByTagName("input");
var _7c=/date-picker/g;
var _7d=/start-day-([0-6]){1}/g;
var _7e=/highlight-days-([0-6]){1,7}/g;
var _7f=/stle-([a-z,A-Z]){1,15}/g;
var _80=/footer='.+'/g;
var _81=/imgpath='.+?'/g;
var _82=/imgclassname='.+?'/g;
var _83=/imgalt='.+?'/g;
var _84=/formname='.+?'/g;
var _85=/btnTpl=([a-z,A-Z]){1,15}/g;
var _86,tmplate,imgclassname,imgalt,imgpath,ownFooter,europeanFormat,dividor,firstDayOfWeek,highlightDays,cssStyle,threeInputs,ys,allsel,noOldDates,noFutureDates,corSelE;
for(var i=0,inp;inp=_7b[i];i++){
if(inp.className&&inp.className.search(_7c)!=-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,_80,/footer='/);
template=inp.className.match(_85);
if(inp.className.search(_85)!=-1){
var tmp=inp.className.match(_85);
tmp=tmp[0].replace(/btnTpl=/,"");
template="";
for(var j=0;j<tmp.length;j++){
template+=tmp.charAt(j);
}
}
imgpath=getStringInQuotes(inp,_81,/imgpath='/);
imgclassname=getStringInQuotes(inp,_82,/imgclassname='/);
imgalt=getStringInQuotes(inp,_83,/imgalt='/);
_86=getStringInQuotes(inp,_84,/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(_7d)!=-1){
var tmp=inp.className.match(_7d);
firstDayOfWeek=parseInt(tmp[0].replace(/start-day-/,""));
}else{
firstDayOfWeek=0;
}
if(inp.className.search(_7e)!=-1){
var tmp=inp.className.match(_7e);
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(_7f)!=-1){
var tmp=inp.className.match(_7f);
tmp=tmp[0].replace(/stle-/,"");
cssStyle="";
for(var j=0;j<tmp.length;j++){
cssStyle+=tmp.charAt(j);
}
inp.className=cssStyle;
}
var _8b=inp;
origName=inp.getAttribute("name");
origId=inp.getAttribute("id");
if(origName==""){
origName=origId;
}
var _8c=inp;
var tr;
var _8e;
var _8f;
var _90=false;
if(threeInputs){
if(!notgendyn){
dte=inp.value;
var _91=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=_91[0];
_8e=document.createElement("input");
_8e.setAttribute("type","text");
_8e.className=cssStyle;
_8e.style.marginRight="5px";
_8e.setAttribute("name",origName+"_M");
_8e.setAttribute("id",origId+"_M");
_8e.setAttribute("size","1");
_8e.setAttribute("maxlength","2",false);
_8e.value=_91[1];
_8e.onchange=inp.onchange;
if(!ys){
_8f=document.createElement("input");
_8f.setAttribute("type","text");
_8f.className=cssStyle;
_8f.style.marginRight="5px";
_8f.setAttribute("name",origName+"_Y");
_8f.setAttribute("id",origId+"_Y");
_8f.setAttribute("size","4");
_8f.setAttribute("maxlength","4",false);
_8f.value=_91[2];
_8f.onchange=inp.onchange;
}else{
_8f=document.createElement("select");
_8f.className=cssStyle;
_8f.style.marginRight="5px";
_8f.setAttribute("name",origName+"_Y");
_8f.setAttribute("id",origId+"_Y");
cDte=new Date();
opCnt=0;
if(!noOldDates){
_8f.options[opCnt++]=new Option(cDte.getFullYear()-2,cDte.getFullYear()-2);
_8f.options[opCnt++]=new Option(cDte.getFullYear()-1,cDte.getFullYear()-1);
}
_8f.options[opCnt++]=new Option(cDte.getFullYear(),cDte.getFullYear());
_8f.options[opCnt++]=new Option(cDte.getFullYear()+1,cDte.getFullYear()+1);
_8f.options[opCnt++]=new Option(cDte.getFullYear()+2,cDte.getFullYear()+2);
_8f.value=_91[2];
_8f.onchange=inp.onchange;
}
_8b=_8f;
if(inp.nextSibling){
inp.parentNode.insertBefore(_8f,inp.nextSibling);
inp.parentNode.insertBefore(_8e,inp.nextSibling);
}else{
inp.parentNode.appendChild(_8e);
_8e.parentNode.appendChild(_8f);
}
}else{
var _92=eval("document."+_86+"."+origName+"_Y");
var _93=eval("document."+_86+"."+origName+"_M");
var _94=eval("document."+_86+"."+origName+"_D");
if(_93.value.indexOf("_")!=-1){
_92=_93;
_90=true;
}
inp.setAttribute("name",origName+"_L");
inp.setAttribute("id",origId+"_L");
inp.setAttribute("size","1");
inp.setAttribute("maxlength","2",false);
inp.style.marginRight="5px";
_8c=_94;
_8e=_93;
_8f=_92;
_8b=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(_8b.nextSibling){
inbef=_8b.nextSibling;
par=_8b.parentNode;
_8b=par.removeChild(_8b);
td.appendChild(_8b);
par.insertBefore(tab,inbef);
}else{
par=_8b.parentNode;
_8b=par.removeChild(_8b);
td.appendChild(_8b);
par.appendChild(tab);
}
}
var _95=(noOldDates)?new Date():null;
var _96=(noFutureDates)?new Date():null;
var _97=inp.getAttribute("datesExcluded");
var _98=inp.getAttribute("fromId");
var _99=inp.getAttribute("toId");
datePickerController.datePickers[len]=new datePicker(_8c,europeanFormat,dividor,firstDayOfWeek,highlightDays,_95,_96,_97,threeInputs,_8e,_8f,ownFooter,convtoscoutdate,_90,corSelE,_98,_99);
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(_8b.nextSibling){
if(tr){
td=document.createElement("td");
td.appendChild(but);
tr.appendChild(td);
}else{
inp.parentNode.insertBefore(but,_8b.nextSibling);
}
}else{
if(tr){
td=document.createElement("td");
td.appendChild(but);
tr.appendChild(td);
}else{
_8b.parentNode.appendChild(but);
}
}
}
}
for(var i=0;i<datePickerController.datePickers.length;i++){
if(datePickerController.datePickers[i]._fromId){
var _9d=document.getElementById(datePickerController.datePickers[i]._fromId);
if(_9d&&_9d.tisCal){
_9d.tisCal._hideDaysAfter=datePickerController.datePickers[i]._date;
}
}
if(datePickerController.datePickers[i]._toId){
var _9d=document.getElementById(datePickerController.datePickers[i]._toId);
if(_9d&&_9d.tisCal){
_9d.tisCal._hideDaysBefore=datePickerController.datePickers[i]._date;
}
}
}
addEvent(window,"resize",datePickerController.resizeAll,true);
datePickerController.resizeAll();
}};
})();
addEvent(window,"load",datePickerController.create,true);
function getDim(obj){
var _9f=0;
var _a0=0;
var _a1=obj;
if(obj.offsetParent){
while(obj.offsetParent){
obj=obj.offsetParent;
}
_9f=obj.offsetWidth;
maxheight=obj.offsetHeight;
}
return [_9f,maxheight];
}
function getStringInQuotes(_a2,_a3,_a4){
var _a5=null;
if(_a2.className.search(_a3)!=-1){
var tmp=_a2.className.match(_a3);
_a5=tmp[0].replace(_a4,"");
_a5=_a5.replace(/'/,"");
}
return _a5;
}
function getBoolean(_a7,_a8){
var _a9=false;
if(_a7.className.search(_a8)!=-1){
_a9=true;
}
return _a9;
}
function findPosition(obj){
var _ab=0;
var _ac=obj;
if(obj.offsetParent){
while(obj.offsetParent){
_ab+=obj.offsetLeft;
obj=obj.offsetParent;
}
}else{
if(obj.x){
_ab+=obj.x;
}
}
obj=_ac;
var _ad=0;
if(obj.offsetParent){
while(obj.offsetParent){
_ad+=obj.offsetTop;
obj=obj.offsetParent;
}
}else{
if(obj.y){
_ad+=obj.y;
}
}
return [_ab,_ad];
}
function addEvent(obj,_af,fn,_b1){
if(obj.addEventListener){
obj.addEventListener(_af,fn,_b1);
return true;
}else{
if(obj.attachEvent){
var r=obj.attachEvent("on"+_af,fn);
return r;
}
}
return false;
}
function removeEvent(obj,_b4,fn,_b6){
if(obj.removeEventListener){
obj.removeEventListener(_b4,fn,_b6);
return true;
}else{
if(obj.detachEvent){
var r=obj.detachEvent("on"+_b4,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 _bc=this.getMonth();
var _bd=this.getFullYear();
var mm;
if(_bc>1){
mm=_bc-2;
}else{
mm=_bc+10;
_bd--;
}
var c=parseInt(_bd/100);
var ya=parseInt(_bd%100);
var _c1=parseInt((146097*c)/4+(1461*ya)/4+(153*mm+2)/5+day+1721119);
return _c1;
};
Date.prototype.addMonth=function(_c2){
if(_c2==0){
return this;
}
var _c3=parseInt((this.getMonth()+_c2)/12);
return new Date(this.getFullYear()+_c3,(this.getMonth()+_c2)%12,this.getDate());
};

