var datePickerController;
(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.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){
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;
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 _28=document.createElement("tbody");
var _29=document.createElement("thead");
_29.className="date-picker-frame";
var _2a=document.createElement("tfoot");
var _2b=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);
_29.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);
_29.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 _3b=0;_3b<7;_3b++){
row=document.createElement("tr");
row.className="date-picker-day-header";
colW=(_3b==0)?document.createElement("th"):document.createElement("td");
if(_3b!=0){
var _3c=document.createElement("td");
_3c.appendChild(document.createTextNode(" "));
_3c.className="date-picker-day-KW";
row.appendChild(_3c);
}else{
var _3c=document.createElement("th");
_3c=(_3b==0)?document.createElement("th"):document.createElement("td");
_3c.appendChild(document.createTextNode(datePicker_CalendarWeekShort));
_3c.className="date-picker-day-KW";
row.appendChild(_3c);
}
for(var _3d=0;_3d<7;_3d++){
col=(_3b==0)?document.createElement("th"):document.createElement("td");
if(_3b!=0){
col.appendChild(document.createTextNode(_2b));
}else{
col.appendChild(document.createTextNode(weekDays[_3d]));
col.title=datePicker_fullDay[_3d];
if(_3d<5){
col.className="date-picker-day-header";
}else{
col.className="date-picker-day-headerH";
}
}
row.appendChild(col);
}
if(_3b!=0){
_28.appendChild(row);
}else{
_29.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);
_2a.appendChild(tr);
o._table.appendChild(_29);
o._table.appendChild(_28);
o._table.appendChild(_2a);
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;
}
}
if(dte.match(/[0-9]{4}/)){
if(dte>1900&&dte<2030){
dte="01"+o._dividor+"06"+o._dividor+date;
}
}
var _3f=dte.split(o._dividor);
if(_3f.length!=3){
o._date=new Date();
return;
}
var dt;
if(o._europeanFormat){
dt=_3f[1]+"/"+_3f[0]+"/"+_3f[2];
}else{
dt=_3f[0]+"/"+_3f[1]+"/"+_3f[2];
}
if(new Date(dt)=="Invalid\tDate"){
o._date=new Date();
return;
}
if(!_15){
o._date.setMonth(o._europeanFormat?_3f[1]-1:_3f[0]-1);
}else{
o._date.setMonth(o._europeanFormat?_3f[1]:_3f[0]);
}
o._date.setYear(_3f[2]);
o._date.setDate(o._europeanFormat?_3f[0]:_3f[1]);
};
o.returnFormattedDate=function(){
var d=0;
var m=1;
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 _43=o._date.getFullYear();
if(o._threeIn){
o._elem.value=d;
if(o._monyeart){
var _44=m+"_"+_43;
o._elemMon.value=_44;
o._elemYea.value=_44;
}else{
o._elemMon.value=m;
o._elemYea.value=_43;
}
}else{
if(o._europeanFormat){
o._elem.value=d+o._dividor+m+o._dividor+_43;
}else{
o._elem.value=m+o._dividor+d+o._dividor+_43;
}
}
o._elem.focus();
if(o._elem.onchange){
o._elem.onchange();
}
};
o.compareDate=function(_45,_46){
if(_45.getDate()==_46.getDate()&&_45.getMonth()==_46.getMonth()&&_45.getFullYear()==_46.getFullYear()){
return 0;
}else{
if(_45.getDate()<_46.getDate()&&_45.getMonth()==_46.getMonth()&&_45.getFullYear()==_46.getFullYear()||_45.getMonth()<_46.getMonth()&&_45.getFullYear()==_46.getFullYear()||_45.getFullYear()<_46.getFullYear()){
return -1;
}else{
return 1;
}
}
};
o.updateTable=function(){
var i;
var str="";
var _49=6;
var _4a=7;
var _4b=0;
var _4c=String.fromCharCode(160);
var _4d=new Array(_49);
o._matrix=new Array(_49);
for(i=0;i<_49;i++){
_4d[i]=new Array(_4a);
o._matrix[i]=new Array(_4a);
}
var _4e=new Date(o._date.getFullYear(),o._date.getMonth(),1);
var _4f=new Date();
var _50=datePicker_months[o._date.getMonth()]+_4c+o._date.getFullYear();
while(o._titleBar.firstChild){
o._titleBar.removeChild(o._titleBar.firstChild);
}
o._titleBar.appendChild(document.createTextNode(_50));
for(i=1;i<32;i++){
_4e.setDate(i);
var _51=(_4e.getDay()+6)%7;
var _52=(_51+(o._firstDayOfWeek)+7)%7;
if(_4e.getMonth()==o._date.getMonth()){
_4d[_4b][_52+1]={text:"",className:""};
if(o.compareDate(o._date,_4e)==0&&o.compareDate(o._date,_4f)>=0){
_4d[_4b][_52+1].className+="\tdate-picker-selected";
}
if(o.compareDate(_4e,_4f)==0){
_4d[_4b][_52+1].className+="\tdate-picker-today";
}
for(d=0;d<o._highlightDays.length;d++){
if(_52==o._highlightDays[d]){
if(o._noOldDates&&o.compareDate(_4e,_4f)<0||o._noFutureDates&&o.compareDate(_4e,_4f)>0){
_4d[_4b][_52+1].className+="\tdate-picker-highpast";
}else{
_4d[_4b][_52+1].className+="\tdate-picker-highlight";
}
}
}
if(o._noOldDates&&o.compareDate(_4e,_4f)<0||o._noFutureDates&&o.compareDate(_4e,_4f)>0){
_4d[_4b][_52+1].className+="\tdate-picker-past";
}
_4d[_4b][_52+1].text=o._matrix[_4b][_52]=_4e.getDate();
_4d[_4b][_52+1].outOfTime=(o._noOldDates&&(o.compareDate(_4e,_4f)<0)||o._noFutureDates&&o.compareDate(_4e,_4f)>0);
if(_51==0||i==1){
_4d[_4b][0]={text:_4e.getWeekNumber(),className:"\tdate-picker-KW"};
}
if(_52==6){
_4b++;
}
}
}
var trs=o._table.getElementsByTagName("tbody")[0].getElementsByTagName("tr");
var _54;
for(var y=0;y<_49;y++){
var tds=trs[y].getElementsByTagName("td");
for(var x=0;x<_4a+1;x++){
_54=tds[x];
while(_54.firstChild){
_54.removeChild(_54.firstChild);
}
if(typeof _4d[y][x]!="undefined"){
_54.className=_4d[y][x].className;
_54.appendChild(document.createTextNode(_4d[y][x].text));
if(x>0){
if(!_4d[y][x].outOfTime){
_54.onmouseover=o.events.onmouseover;
_54.onmouseout=o.events.onmouseout;
_54.onclick=o.events.onclick;
}else{
_54.onmouseover=_54.onmouseout=_54.onclick=null;
}
}
}else{
if(x==0){
_54.className="date-picker-KW";
}else{
_54.className="";
}
_54.appendChild(document.createTextNode(_4c));
_54.onmouseover=_54.onmouseout=null;
_54.onclick=function(){
o.hide();
};
}
}
}
};
o.init=function(){
o.resize();
o.setDateFromInput();
o.ieHack(true);
};
o.ieHack=function(_58){
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(_58){
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 _5a;
var _5b;
if(o._iePopUp){
_5b=window.event.clientY+document.body.scrollTop;
_5a=window.event.clientX+document.body.scrollLeft;
}else{
_5b=ev.clientY+window.scrollY;
_5a=ev.clientX+window.scrollX;
}
var st=o._div.style;
o._xOffs=_5a-parseInt(st.left);
o._yOffs=_5b-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 _5e;
var _5f;
if(o._iePopUp){
_5f=window.event.clientY+document.body.scrollTop;
_5e=window.event.clientX+document.body.scrollLeft;
}else{
_5e=ev.pageX;
_5f=ev.pageY;
}
var st=o._div.style;
st.left=(_5e-o._xOffs)+"px";
st.top=(_5f-o._yOffs)+"px";
if(o._iePopUp){
var st=o._iePopUp.style;
st.left=(_5e-o._xOffs)+"px";
st.top=(_5f-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(_62){
for(var i=0,dp;dp=datePickerController.datePickers[i];i++){
if(i!=_62){
dp.hide();
}
}
},resizeAll:function(){
for(var i=0,dp;dp=datePickerController.datePickers[i];i++){
dp.resize();
}
},create:function(){
var _65=document.getElementsByTagName("input");
var _66=/date-picker/g;
var _67=/start-day-([0-6]){1}/g;
var _68=/highlight-days-([0-6]){1,7}/g;
var _69=/stle-([a-z,A-Z]){1,15}/g;
var _6a=/footer='.+'/g;
var _6b=/imgpath='.+?'/g;
var _6c=/imgclassname='.+?'/g;
var _6d=/imgalt='.+?'/g;
var _6e=/formname='.+?'/g;
var _6f,imgclassname,imgalt,imgpath,ownFooter,europeanFormat,dividor,firstDayOfWeek,highlightDays,cssStyle,threeInputs,ys,allsel,noOldDates,noFutureDates;
for(var i=0,inp;inp=_65[i];i++){
if(inp.className&&inp.className.search(_66)!=-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,_6a,/footer='/);
imgpath=getStringInQuotes(inp,_6b,/imgpath='/);
imgclassname=getStringInQuotes(inp,_6c,/imgclassname='/);
imgalt=getStringInQuotes(inp,_6d,/imgalt='/);
_6f=getStringInQuotes(inp,_6e,/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/);
if(inp.className.search(_67)!=-1){
var tmp=inp.className.match(_67);
firstDayOfWeek=parseInt(tmp[0].replace(/start-day-/,""));
}else{
firstDayOfWeek=0;
}
if(inp.className.search(_68)!=-1){
var tmp=inp.className.match(_68);
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(_69)!=-1){
var tmp=inp.className.match(_69);
tmp=tmp[0].replace(/stle-/,"");
cssStyle="";
for(var j=0;j<tmp.length;j++){
cssStyle+=tmp.charAt(j);
}
inp.className=cssStyle;
}
var _74=inp;
origName=inp.getAttribute("name");
origId=inp.getAttribute("id");
if(origName==""){
origName=origId;
}
var _75=inp;
var _76;
var _77;
var _78=false;
if(threeInputs){
if(!notgendyn){
dte=inp.value;
var _79=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=_79[0];
_76=document.createElement("input");
_76.setAttribute("type","text");
_76.className=cssStyle;
_76.style.marginRight="5px";
_76.setAttribute("name",origName+"_M");
_76.setAttribute("id",origId+"_M");
_76.setAttribute("size","1");
_76.setAttribute("maxlength","2",false);
_76.value=_79[1];
_76.onchange=inp.onchange;
if(!ys){
_77=document.createElement("input");
_77.setAttribute("type","text");
_77.className=cssStyle;
_77.style.marginRight="5px";
_77.setAttribute("name",origName+"_Y");
_77.setAttribute("id",origId+"_Y");
_77.setAttribute("size","4");
_77.setAttribute("maxlength","4",false);
_77.value=_79[2];
_77.onchange=inp.onchange;
}else{
_77=document.createElement("select");
_77.className=cssStyle;
_77.style.marginRight="5px";
_77.setAttribute("name",origName+"_Y");
_77.setAttribute("id",origId+"_Y");
cDte=new Date();
opCnt=0;
if(!noOldDates){
_77.options[opCnt++]=new Option(cDte.getFullYear()-2,cDte.getFullYear()-2);
_77.options[opCnt++]=new Option(cDte.getFullYear()-1,cDte.getFullYear()-1);
}
_77.options[opCnt++]=new Option(cDte.getFullYear(),cDte.getFullYear());
_77.options[opCnt++]=new Option(cDte.getFullYear()+1,cDte.getFullYear()+1);
_77.options[opCnt++]=new Option(cDte.getFullYear()+2,cDte.getFullYear()+2);
_77.value=_79[2];
_77.onchange=inp.onchange;
}
_74=_77;
if(inp.nextSibling){
inp.parentNode.insertBefore(_77,inp.nextSibling);
inp.parentNode.insertBefore(_76,inp.nextSibling);
}else{
inp.parentNode.appendChild(_76);
_76.parentNode.appendChild(_77);
}
}else{
var _7a=eval("document."+_6f+"."+origName+"_Y");
var _7b=eval("document."+_6f+"."+origName+"_M");
var _7c=eval("document."+_6f+"."+origName+"_D");
if(_7b.value.indexOf("_")!=-1){
_7a=_7b;
_78=true;
}
inp.setAttribute("name",origName+"_L");
inp.setAttribute("id",origId+"_L");
inp.setAttribute("size","1");
inp.setAttribute("maxlength","2",false);
inp.style.marginRight="5px";
_75=_7c;
_76=_7b;
_77=_7a;
_74=inp;
}
}
datePickerController.datePickers[len]=new datePicker(_75,europeanFormat,dividor,firstDayOfWeek,highlightDays,noOldDates,noFutureDates,threeInputs,_76,_77,ownFooter,convtoscoutdate,_78);
var but=null;
if(!showimgstartlink){
but=document.createElement("button");
but.setAttribute("type","button");
but.className="calBtn";
but._value=len;
but.appendChild(document.createTextNode("..."));
}else{
but=document.createElement("a");
but.setAttribute("href","javascript:void(0)");
but._value=len;
var img=document.createElement("img");
img.setAttribute("alt",imgalt);
img.setAttribute("src",imgpath);
img.className=imgclassname;
but.appendChild(img);
}
but.onclick=function(){
datePickerController.hideAll(this._value);
datePickerController.datePickers[this._value].show();
this.blur();
return false;
};
if(_74.nextSibling){
inp.parentNode.insertBefore(but,_74.nextSibling);
}else{
_74.parentNode.appendChild(but);
}
}
}
addEvent(window,"resize",datePickerController.resizeAll,true);
datePickerController.resizeAll();
}};
})();
addEvent(window,"load",datePickerController.create,true);
function getDim(obj){
var _80=0;
var _81=0;
var _82=obj;
if(obj.offsetParent){
while(obj.offsetParent){
obj=obj.offsetParent;
}
_80=obj.offsetWidth;
maxheight=obj.offsetHeight;
}
return [_80,maxheight];
}
function getStringInQuotes(_83,_84,_85){
var _86=null;
if(_83.className.search(_84)!=-1){
var tmp=_83.className.match(_84);
_86=tmp[0].replace(_85,"");
_86=_86.replace(/'/,"");
}
return _86;
}
function getBoolean(_88,_89){
var _8a=false;
if(_88.className.search(_89)!=-1){
_8a=true;
}
return _8a;
}
function findPosition(obj){
var _8c=0;
var _8d=obj;
if(obj.offsetParent){
while(obj.offsetParent){
_8c+=obj.offsetLeft;
obj=obj.offsetParent;
}
}else{
if(obj.x){
_8c+=obj.x;
}
}
obj=_8d;
var _8e=0;
if(obj.offsetParent){
while(obj.offsetParent){
_8e+=obj.offsetTop;
obj=obj.offsetParent;
}
}else{
if(obj.y){
_8e+=obj.y;
}
}
return [_8c,_8e];
}
function addEvent(obj,_90,fn,_92){
if(obj.addEventListener){
obj.addEventListener(_90,fn,_92);
return true;
}else{
if(obj.attachEvent){
var r=obj.attachEvent("on"+_90,fn);
return r;
}
}
return false;
}
function removeEvent(obj,_95,fn,_97){
if(obj.removeEventListener){
obj.removeEventListener(_95,fn,_97);
return true;
}else{
if(obj.detachEvent){
var r=obj.detachEvent("on"+_95,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;
};


