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;
};
function datePicker(_a,_b,_c,_d,_e,_f,_10,_11,_12,_13,_14,_15,_16,_17){
if(!_a){
return;
}
this._elem=_a;
this._created=false;
this._visible=false;
this._date=new Date();
this._europeanFormat=_b;
this._dividor=_c?"-":".";
this._firstDayOfWeek=_d?_d:0;
this._matrix=[[],[],[],[],[],[],[]];
this._highlightDays=_e;
this._threeIn=_11;
this._noOldDates=_f;
this._noFutureDates=_10;
this._ownFooter=_14;
this._convtoscoutdate=_15;
this._corSelE=_17;
if(_11){
this._elemMon=_12;
this._elemYea=_13;
}
this._monyeart=_16;
this._div;
this._table;
this._dragging=false;
this._xOffs;
this._yOffs;
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 d=new Date(o._date);
var n=Number(el.firstChild.data);
if(isNaN(n)){
o.hide();
return;
}
d.setDate(n);
o._date=d;
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 _29=document.createElement("tbody");
var _2a=document.createElement("thead");
_2a.className="date-picker-frame";
var _2b=document.createElement("tfoot");
var _2c=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=document.createElement("td");
o._titleBar.setAttribute("colSpan","6");
o._titleBar.className="title";
o._titleBar.style.fontWeight="bold";
tr.appendChild(o._titleBar);
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);
_2a.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","4");
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);
_2a.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 _3c=0;_3c<7;_3c++){
row=document.createElement("tr");
row.className="date-picker-day-header";
colW=(_3c==0)?document.createElement("th"):document.createElement("td");
if(_3c!=0){
var _3d=document.createElement("td");
_3d.appendChild(document.createTextNode(" "));
_3d.className="date-picker-day-KW";
row.appendChild(_3d);
}else{
var _3d=document.createElement("th");
_3d=(_3c==0)?document.createElement("th"):document.createElement("td");
_3d.appendChild(document.createTextNode(datePicker_CalendarWeekShort));
_3d.className="date-picker-day-KW";
row.appendChild(_3d);
}
for(var _3e=0;_3e<7;_3e++){
col=(_3c==0)?document.createElement("th"):document.createElement("td");
if(_3c!=0){
col.appendChild(document.createTextNode(_2c));
}else{
col.appendChild(document.createTextNode(weekDays[_3e]));
col.title=datePicker_fullDay[_3e];
if(_3e<5){
col.className="date-picker-day-header";
}else{
col.className="date-picker-day-headerH";
}
}
row.appendChild(col);
}
if(_3c!=0){
_29.appendChild(row);
}else{
_2a.appendChild(row);
}
}
var tr=document.createElement("tr");
var td=document.createElement("td");
td.className="title";
td.setAttribute("colSpan","8");
if(o._ownFooter!=null){
td.appendChild(document.createTextNode(o._ownFooter));
}else{
td.appendChild(document.createTextNode(datePicker_FOOTER));
}
tr.appendChild(td);
_2b.appendChild(tr);
o._table.appendChild(_2a);
o._table.appendChild(_29);
o._table.appendChild(_2b);
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=_a.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 _40={formatLength:"medium",locale:djConfig["locale"],selector:"date"};
inDate=dojo.date.locale.parse(dte,_40);
if(inDate!=null){
o._dfmt=true;
o._date=inDate;
o._elem.style.width="16ex";
return;
}
}
var _41=dte.split(o._dividor);
if(_41.length!=3){
o._date=new Date();
return;
}
var dt;
if(o._europeanFormat){
dt=_41[1]+"/"+_41[0]+"/"+_41[2];
}else{
dt=_41[0]+"/"+_41[1]+"/"+_41[2];
}
if(new Date(dt)=="Invalid Date"){
o._date=new Date();
return;
}
if(!_15){
o._date.setMonth(o._europeanFormat?_41[1]-1:_41[0]-1);
}else{
o._date.setMonth(o._europeanFormat?_41[1]:_41[0]);
}
o._date.setYear(_41[2]);
o._date.setDate(o._europeanFormat?_41[0]:_41[1]);
};
o.returnFormattedDate=function(){
var d=0;
var m=1;
if(_17){
if(!_15){
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 _45=o._date.getFullYear();
if(o._threeIn){
if(o._monyeart){
var _46=m+"_"+_45;
var _47=datePicker.getMonthFromMonthYear(o._elemMon.options[o._elemMon.length-1].value);
var _48=datePicker.getYearFromMonthYear(o._elemMon.options[o._elemMon.length-1].value);
if(_45>_48){
}else{
if(_45==_48){
if(m>_47){
}else{
o._elemMon.value=_46;
o._elemYea.value=_46;
var _49=datePicker.getDaysPerMonth(m,_45);
for(var i=(o._elem.options.length+1);i<=_49;i++){
var _4b=new Date(_45,m-1,i);
var _4c=i+", "+datePicker.allWeekdays[_4b.getDay()];
o._elem.options[o._elem.options.length]=new Option(_4c,i);
}
}
}else{
o._elemMon.value=_46;
o._elemYea.value=_46;
var _49=datePicker.getDaysPerMonth(m,_45);
for(var i=(o._elem.options.length+1);i<=_49;i++){
var _4b=new Date(_45,m-1,i);
var _4c=i+", "+datePicker.allWeekdays[_4b.getDay()];
o._elem.options[o._elem.options.length]=new Option(_4c,i);
}
}
}
}else{
if(_45>_48){
}else{
if(_45==_48){
if(m>_47){
}else{
o._elemMon.value=m;
o._elemYea.value=_45;
}
}else{
o._elemMon.value=m;
o._elemYea.value=_45;
}
}
}
}else{
if(o._europeanFormat){
o._elem.value=d+o._dividor+m+o._dividor+_45;
}else{
o._elem.value=m+o._dividor+d+o._dividor+_45;
}
}
o._elem.focus();
if(_45>_48){
}else{
if(_45==_48){
if(m>_47){
}else{
o._elem.value=d;
}
}else{
o._elem.value=d;
}
}
if(o._elem.onchange){
o._elem.onchange();
}
}else{
if(!_15){
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 _45=o._date.getFullYear();
if(o._threeIn){
o._elem.value=d;
if(o._monyeart){
var _46=m+"_"+_45;
o._elemMon.value=_46;
o._elemYea.value=_46;
}else{
o._elemMon.value=m;
o._elemYea.value=_45;
}
}else{
if(dojo&&o._dfmt){
var _4d={formatLength:"medium",locale:djConfig["locale"],selector:"date"};
o._elem.value=dojo.date.locale.format(o._date,_4d);
}else{
if(o._europeanFormat){
o._elem.value=d+o._dividor+m+o._dividor+_45;
}else{
o._elem.value=m+o._dividor+d+o._dividor+_45;
}
}
}
o._elem.focus();
if(o._elem.onchange){
o._elem.onchange();
}
}
};
o.compareDate=function(_4e,_4f){
if(_4e.getDate()==_4f.getDate()&&_4e.getMonth()==_4f.getMonth()&&_4e.getFullYear()==_4f.getFullYear()){
return 0;
}else{
if(_4e.getDate()<_4f.getDate()&&_4e.getMonth()==_4f.getMonth()&&_4e.getFullYear()==_4f.getFullYear()||_4e.getMonth()<_4f.getMonth()&&_4e.getFullYear()==_4f.getFullYear()||_4e.getFullYear()<_4f.getFullYear()){
return -1;
}else{
return 1;
}
}
};
o.updateTable=function(){
var i;
var str="";
var _52=6;
var _53=7;
var _54=0;
var _55=String.fromCharCode(160);
var _56=new Array(_52);
o._matrix=new Array(_52);
for(i=0;i<_52;i++){
_56[i]=new Array(_53);
o._matrix[i]=new Array(_53);
}
var _57=new Date(o._date.getFullYear(),o._date.getMonth(),1);
var _58=new Date();
var _59=datePicker_months[o._date.getMonth()]+_55+o._date.getFullYear();
while(o._titleBar.firstChild){
o._titleBar.removeChild(o._titleBar.firstChild);
}
o._titleBar.appendChild(document.createTextNode(_59));
for(i=1;i<32;i++){
_57.setDate(i);
var _5a=(_57.getDay()+6)%7;
var _5b=(_5a+(o._firstDayOfWeek)+7)%7;
if(_57.getMonth()==o._date.getMonth()){
_56[_54][_5b+1]={text:"",className:""};
if(o.compareDate(o._date,_57)==0&&o.compareDate(o._date,_58)>=0){
_56[_54][_5b+1].className+=" date-picker-selected";
}
if(o.compareDate(_57,_58)==0){
_56[_54][_5b+1].className+=" date-picker-today";
}
for(d=0;d<o._highlightDays.length;d++){
if(_5b==o._highlightDays[d]){
if(o._noOldDates&&o.compareDate(_57,_58)<0||o._noFutureDates&&o.compareDate(_57,_58)>0){
_56[_54][_5b+1].className+=" date-picker-highpast";
}else{
_56[_54][_5b+1].className+=" date-picker-highlight";
}
}
}
if(o._noOldDates&&o.compareDate(_57,_58)<0||o._noFutureDates&&o.compareDate(_57,_58)>0){
_56[_54][_5b+1].className+=" date-picker-past";
}
_56[_54][_5b+1].text=o._matrix[_54][_5b]=_57.getDate();
_56[_54][_5b+1].outOfTime=(o._noOldDates&&(o.compareDate(_57,_58)<0)||o._noFutureDates&&o.compareDate(_57,_58)>0);
if(_5a==0||i==1){
_56[_54][0]={text:_57.getWeekNumber(),className:" date-picker-KW"};
}
if(_5b==6){
_54++;
}
}
}
var trs=o._table.getElementsByTagName("tbody")[0].getElementsByTagName("tr");
var _5d;
for(var y=0;y<_52;y++){
var tds=trs[y].getElementsByTagName("td");
for(var x=0;x<_53+1;x++){
_5d=tds[x];
while(_5d.firstChild){
_5d.removeChild(_5d.firstChild);
}
if(typeof _56[y][x]!="undefined"){
_5d.className=_56[y][x].className;
_5d.appendChild(document.createTextNode(_56[y][x].text));
if(x>0){
if(!_56[y][x].outOfTime){
_5d.onmouseover=o.events.onmouseover;
_5d.onmouseout=o.events.onmouseout;
_5d.onclick=o.events.onclick;
}else{
_5d.onmouseover=_5d.onmouseout=_5d.onclick=null;
}
}
}else{
if(x==0){
_5d.className="date-picker-KW";
}else{
_5d.className="";
}
_5d.appendChild(document.createTextNode(_55));
_5d.onmouseover=_5d.onmouseout=null;
_5d.onclick=function(){
o.hide();
};
}
}
}
};
o.init=function(){
o.resize();
o.setDateFromInput();
o.ieHack(true);
};
o.ieHack=function(_61){
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(_61){
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 _63;
var _64;
if(o._iePopUp){
_64=window.event.clientY+document.body.scrollTop;
_63=window.event.clientX+document.body.scrollLeft;
}else{
_64=ev.clientY+window.scrollY;
_63=ev.clientX+window.scrollX;
}
var st=o._div.style;
o._xOffs=_63-parseInt(st.left);
o._yOffs=_64-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 _67;
var _68;
if(o._iePopUp){
_68=window.event.clientY+document.body.scrollTop;
_67=window.event.clientX+document.body.scrollLeft;
}else{
_67=ev.pageX;
_68=ev.pageY;
}
var st=o._div.style;
st.left=(_67-o._xOffs)+"px";
st.top=(_68-o._yOffs)+"px";
if(o._iePopUp){
var st=o._iePopUp.style;
st.left=(_67-o._xOffs)+"px";
st.top=(_68-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(_6b){
for(var i=0,dp;dp=datePickerController.datePickers[i];i++){
if(i!=_6b){
dp.hide();
}
}
},resizeAll:function(){
for(var i=0,dp;dp=datePickerController.datePickers[i];i++){
dp.resize();
}
},create:function(){
var _6e=document.getElementsByTagName("input");
var _6f=/date-picker/g;
var _70=/start-day-([0-6]){1}/g;
var _71=/highlight-days-([0-6]){1,7}/g;
var _72=/stle-([a-z,A-Z]){1,15}/g;
var _73=/footer='.+'/g;
var _74=/imgpath='.+?'/g;
var _75=/imgclassname='.+?'/g;
var _76=/imgalt='.+?'/g;
var _77=/formname='.+?'/g;
var _78=/btnTpl=([a-z,A-Z]){1,15}/g;
var _79,tmplate,imgclassname,imgalt,imgpath,ownFooter,europeanFormat,dividor,firstDayOfWeek,highlightDays,cssStyle,threeInputs,ys,allsel,noOldDates,noFutureDates,corSelE;
for(var i=0,inp;inp=_6e[i];i++){
if(inp.className&&inp.className.search(_6f)!=-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,_73,/footer='/);
template=inp.className.match(_78);
if(inp.className.search(_78)!=-1){
var tmp=inp.className.match(_78);
tmp=tmp[0].replace(/btnTpl=/,"");
template="";
for(var j=0;j<tmp.length;j++){
template+=tmp.charAt(j);
}
}
imgpath=getStringInQuotes(inp,_74,/imgpath='/);
imgclassname=getStringInQuotes(inp,_75,/imgclassname='/);
imgalt=getStringInQuotes(inp,_76,/imgalt='/);
_79=getStringInQuotes(inp,_77,/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(_70)!=-1){
var tmp=inp.className.match(_70);
firstDayOfWeek=parseInt(tmp[0].replace(/start-day-/,""));
}else{
firstDayOfWeek=0;
}
if(inp.className.search(_71)!=-1){
var tmp=inp.className.match(_71);
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(_72)!=-1){
var tmp=inp.className.match(_72);
tmp=tmp[0].replace(/stle-/,"");
cssStyle="";
for(var j=0;j<tmp.length;j++){
cssStyle+=tmp.charAt(j);
}
inp.className=cssStyle;
}
var _7e=inp;
origName=inp.getAttribute("name");
origId=inp.getAttribute("id");
if(origName==""){
origName=origId;
}
var _7f=inp;
var tr;
var _81;
var _82;
var _83=false;
if(threeInputs){
if(!notgendyn){
dte=inp.value;
var _84=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=_84[0];
_81=document.createElement("input");
_81.setAttribute("type","text");
_81.className=cssStyle;
_81.style.marginRight="5px";
_81.setAttribute("name",origName+"_M");
_81.setAttribute("id",origId+"_M");
_81.setAttribute("size","1");
_81.setAttribute("maxlength","2",false);
_81.value=_84[1];
_81.onchange=inp.onchange;
if(!ys){
_82=document.createElement("input");
_82.setAttribute("type","text");
_82.className=cssStyle;
_82.style.marginRight="5px";
_82.setAttribute("name",origName+"_Y");
_82.setAttribute("id",origId+"_Y");
_82.setAttribute("size","4");
_82.setAttribute("maxlength","4",false);
_82.value=_84[2];
_82.onchange=inp.onchange;
}else{
_82=document.createElement("select");
_82.className=cssStyle;
_82.style.marginRight="5px";
_82.setAttribute("name",origName+"_Y");
_82.setAttribute("id",origId+"_Y");
cDte=new Date();
opCnt=0;
if(!noOldDates){
_82.options[opCnt++]=new Option(cDte.getFullYear()-2,cDte.getFullYear()-2);
_82.options[opCnt++]=new Option(cDte.getFullYear()-1,cDte.getFullYear()-1);
}
_82.options[opCnt++]=new Option(cDte.getFullYear(),cDte.getFullYear());
_82.options[opCnt++]=new Option(cDte.getFullYear()+1,cDte.getFullYear()+1);
_82.options[opCnt++]=new Option(cDte.getFullYear()+2,cDte.getFullYear()+2);
_82.value=_84[2];
_82.onchange=inp.onchange;
}
_7e=_82;
if(inp.nextSibling){
inp.parentNode.insertBefore(_82,inp.nextSibling);
inp.parentNode.insertBefore(_81,inp.nextSibling);
}else{
inp.parentNode.appendChild(_81);
_81.parentNode.appendChild(_82);
}
}else{
var _85=eval("document."+_79+"."+origName+"_Y");
var _86=eval("document."+_79+"."+origName+"_M");
var _87=eval("document."+_79+"."+origName+"_D");
if(_86.value.indexOf("_")!=-1){
_85=_86;
_83=true;
}
inp.setAttribute("name",origName+"_L");
inp.setAttribute("id",origId+"_L");
inp.setAttribute("size","1");
inp.setAttribute("maxlength","2",false);
inp.style.marginRight="5px";
_7f=_87;
_81=_86;
_82=_85;
_7e=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(_7e.nextSibling){
inbef=_7e.nextSibling;
par=_7e.parentNode;
_7e=par.removeChild(_7e);
td.appendChild(_7e);
par.insertBefore(tab,inbef);
}else{
par=_7e.parentNode;
_7e=par.removeChild(_7e);
td.appendChild(_7e);
par.appendChild(tab);
}
}
datePickerController.datePickers[len]=new datePicker(_7f,europeanFormat,dividor,firstDayOfWeek,highlightDays,noOldDates,noFutureDates,threeInputs,_81,_82,ownFooter,convtoscoutdate,_83,corSelE);
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(_7e.nextSibling){
if(tr){
td=document.createElement("td");
td.appendChild(but);
tr.appendChild(td);
}else{
inp.parentNode.insertBefore(but,_7e.nextSibling);
}
}else{
if(tr){
td=document.createElement("td");
td.appendChild(but);
tr.appendChild(td);
}else{
_7e.parentNode.appendChild(but);
}
}
}
}
addEvent(window,"resize",datePickerController.resizeAll,true);
datePickerController.resizeAll();
}};
})();
addEvent(window,"load",datePickerController.create,true);
function getDim(obj){
var _8c=0;
var _8d=0;
var _8e=obj;
if(obj.offsetParent){
while(obj.offsetParent){
obj=obj.offsetParent;
}
_8c=obj.offsetWidth;
maxheight=obj.offsetHeight;
}
return [_8c,maxheight];
}
function getStringInQuotes(_8f,_90,_91){
var _92=null;
if(_8f.className.search(_90)!=-1){
var tmp=_8f.className.match(_90);
_92=tmp[0].replace(_91,"");
_92=_92.replace(/'/,"");
}
return _92;
}
function getBoolean(_94,_95){
var _96=false;
if(_94.className.search(_95)!=-1){
_96=true;
}
return _96;
}
function findPosition(obj){
var _98=0;
var _99=obj;
if(obj.offsetParent){
while(obj.offsetParent){
_98+=obj.offsetLeft;
obj=obj.offsetParent;
}
}else{
if(obj.x){
_98+=obj.x;
}
}
obj=_99;
var _9a=0;
if(obj.offsetParent){
while(obj.offsetParent){
_9a+=obj.offsetTop;
obj=obj.offsetParent;
}
}else{
if(obj.y){
_9a+=obj.y;
}
}
return [_98,_9a];
}
function addEvent(obj,_9c,fn,_9e){
if(obj.addEventListener){
obj.addEventListener(_9c,fn,_9e);
return true;
}else{
if(obj.attachEvent){
var r=obj.attachEvent("on"+_9c,fn);
return r;
}
}
return false;
}
function removeEvent(obj,_a1,fn,_a3){
if(obj.removeEventListener){
obj.removeEventListener(_a1,fn,_a3);
return true;
}else{
if(obj.detachEvent){
var r=obj.detachEvent("on"+_a1,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;
};


