var scwDateNow=new Date(Date.parse(new Date().toDateString()));
var scwBaseYear=scwDateNow.getFullYear()-10;
var scwDropDownYears=20;
var scwLanguage;
function scwSetDefaultLanguage(){
try{
scwSetLanguage();
}
catch(exception){
scwToday="Today:";
scwDrag="click here to drag";
scwArrMonthNames=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];
scwArrWeekInits=["S","M","T","W","T","F","S"];
scwInvalidDateMsg="The entered date is invalid.\n";
scwOutOfRangeMsg="The entered date is out of range.";
scwDoesNotExistMsg="The entered date does not exist.";
scwInvalidAlert=["Invalid date (",") ignored."];
scwDateDisablingError=["Error "," is not a Date object."];
scwRangeDisablingError=["Error "," should consist of two elements."];
}
}
var scwWeekStart=1;
var scwWeekNumberDisplay=false;
var scwWeekNumberBaseDay=4;
var scwShowInvalidDateMsg=true,scwShowOutOfRangeMsg=true,scwShowDoesNotExistMsg=true,scwShowInvalidAlert=true,scwShowDateDisablingError=true,scwShowRangeDisablingError=true;
var scwArrDelimiters=["/","-",".",","," "];
var scwDateDisplayFormat="dd/mm/yyyy";
var scwDateOutputFormat="dd/mm/yyyy";
var scwZindex=99;
var scwBlnStrict=false;
var scwEnabledDay=[true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true];
var scwDisabledDates=new Array();
var scwActiveToday=true;
var scwOutOfMonthDisable=false;
var scwOutOfMonthHide=false;
var scwOutOfRangeDisable=true;
var scwFormatTodayCell=true;
var scwTodayCellBorderColour="red";
var scwAllowDrag=false;
var scwClickToHide=false;
document.writeln("<style type=\"text/css\">"+".scw           {padding:1px;vertical-align:middle;}"+"iframe.scw     {position:absolute;z-index:"+scwZindex+";top:0px;left:0px;visibility:hidden;"+"width:1px;height:1px;}"+"table.scw      {padding:0px;visibility:hidden;"+"position:absolute;cursor:default;"+"width:200px;top:0px;left:0px;"+"z-index:"+(scwZindex+1)+";text-align:center;}"+"</style>");
document.writeln("<style type=\"text/css\">"+"/* IMPORTANT:  The SCW calendar script requires all "+"               the classes defined here."+"*/"+"table.scw      {padding:       1px;"+"vertical-align:middle;"+"border:        ridge 2px;"+"font-size:     10pt;"+"font-family:   "+"Verdana,Arial,Helvetica,Sans-Serif;"+"font-weight:   bold;}"+"td.scwDrag,"+"td.scwHead                 {padding:       0px 0px;"+"text-align:    center;}"+"td.scwDrag                 {font-size:     8pt;}"+"select.scwHead             {margin:        3px 1px;"+"text-align:    center;}"+"input.scwHead              {height:        22px;"+"width:         22px;"+"vertical-align:middle;"+"text-align:    center;"+"margin:        2px 1px;"+"font-weight:   bold;"+"font-size:     10pt;"+"font-family:   fixedSys;}"+"td.scwWeekNumberHead,"+"td.scwWeek                 {padding:       0px;"+"text-align:    center;"+"font-weight:   bold;}"+"td.scwFoot,"+"td.scwFootHover,"+"td.scwFoot:hover,"+"td.scwFootDisabled         {padding:       0px;"+"text-align:    center;"+"font-weight:   normal;}"+"table.scwCells             {text-align:    right;"+"font-size:     8pt;"+"width:         96%;}"+"td.scwCells,"+"td.scwCellsHover,"+"td.scwCells:hover,"+"td.scwCellsDisabled,"+"td.scwCellsExMonth,"+"td.scwCellsExMonthHover,"+"td.scwCellsExMonth:hover,"+"td.scwCellsExMonthDisabled,"+"td.scwCellsWeekend,"+"td.scwCellsWeekendHover,"+"td.scwCellsWeekend:hover,"+"td.scwCellsWeekendDisabled,"+"td.scwInputDate,"+"td.scwInputDateHover,"+"td.scwInputDate:hover,"+"td.scwInputDateDisabled,"+"td.scwWeekNo,"+"td.scwWeeks                {padding:           3px;"+"width:             16px;"+"height:            16px;"+"border-width:      1px;"+"border-style:      solid;"+"font-weight:       bold;"+"vertical-align:    middle;}"+"/* Blend the colours into your page here...    */"+"/* Calendar background */"+"table.scw                  {background-color:  #002d51;}"+"/* Drag Handle */"+"td.scwDrag                 {background-color:  #9999CC;"+"color:             #CCCCFF;}"+"/* Week number heading */"+"td.scwWeekNumberHead       {color:             #002d51;}"+"/* Week day headings */"+"td.scwWeek                 {color:             #ffffff;}"+"/* Week numbers */"+"td.scwWeekNo               {background-color:  #776677;"+"color:             #ffffff;}"+"/* Enabled Days */"+"/* Week Day */"+"td.scwCells                {background-color:  #ffffff;"+"color:             #000000;}"+"/* Day matching the input date */"+"td.scwInputDate            {background-color:  #002d51;"+"color:             #ffffff;}"+"/* Weekend Day */"+"td.scwCellsWeekend         {background-color:  #ffffff;"+"color:             #002d51;}"+"/* Day outside the current month */"+"td.scwCellsExMonth         {background-color:  #ffffff;"+"color:             #666666;}"+"/* Today selector */"+"td.scwFoot                 {background-color:  #002d51;"+"color:             #FFFFFF;}"+"/* MouseOver/Hover formatting "+"       If you want to \"turn off\" any of the formatting "+"       then just set to the same as the standard format"+"       above."+" "+"       Note: The reason that the following are"+"       implemented using both a class and a :hover"+"       pseudoclass is because Opera handles the rendering"+"       involved in the class swap very poorly and IE6 "+"       (and below) only implements pseudoclasses on the"+"       anchor tag."+"*/"+"/* Active cells */"+"td.scwCells:hover,"+"td.scwCellsHover           {background-color:  #002d51;"+"cursor:            pointer;"+"color:             #000000;}"+"/* Day matching the input date */"+"td.scwInputDate:hover,"+"td.scwInputDateHover       {background-color:  #002d51;"+"cursor:            pointer;"+"color:             #000000;}"+"/* Weekend cells */"+"td.scwCellsWeekend:hover,"+"td.scwCellsWeekendHover    {background-color:  #002d51;"+"cursor:            pointer;"+"color:             #000000;}"+"/* Day outside the current month */"+"td.scwCellsExMonth:hover,"+"td.scwCellsExMonthHover    {background-color:  #002d51;"+"cursor:            pointer;"+"color:             #000000;}"+"/* Today selector */"+"td.scwFoot:hover,"+"td.scwFootHover            {color:             #FFFFFF;"+"cursor:            pointer;"+"font-weight:       bold;}"+"/* Disabled cells */"+"/* Week Day */"+"/* Day matching the input date */"+"td.scwInputDateDisabled    {background-color:  #999999;"+"color:             #000000;}"+"td.scwCellsDisabled        {background-color:  #999999;"+"color:             #000000;}"+"/* Weekend Day */"+"td.scwCellsWeekendDisabled {background-color:  #999999;"+"color:             #002d51;}"+"/* Day outside the current month */"+"td.scwCellsExMonthDisabled {background-color:  #999999;"+"color:             #666666;}"+"td.scwFootDisabled         {background-color:  #002d51;"+"color:             #FFFFFF;}"+"</style>");
var scwTargetEle,scwTriggerEle,scwMonthSum=0,scwBlnFullInputDate=false,scwPassEnabledDay=new Array(),scwSeedDate=new Date(),scwParmActiveToday=true,scwWeekStart=scwWeekStart%7,scwToday,scwDrag,scwArrMonthNames,scwArrWeekInits,scwInvalidDateMsg,scwOutOfRangeMsg,scwDoesNotExistMsg,scwInvalidAlert,scwDateDisablingError,scwRangeDisablingError;
Date.prototype.scwFormat=function(_1){
var _2=0,codeChar="",result="";
for(var i=0;i<=_1.length;i++){
if(i<_1.length&&_1.charAt(i)==codeChar){
_2++;
}else{
switch(codeChar){
case "y":
case "Y":
result+=(this.getFullYear()%Math.pow(10,_2)).toString().scwPadLeft(_2);
break;
case "m":
case "M":
result+=(_2<3)?(this.getMonth()+1).toString().scwPadLeft(_2):scwArrMonthNames[this.getMonth()];
break;
case "d":
case "D":
result+=this.getDate().toString().scwPadLeft(_2);
break;
default:
while(_2-->0){
result+=codeChar;
}
}
if(i<_1.length){
codeChar=_1.charAt(i);
_2=1;
}
}
}
return result;
};
String.prototype.scwPadLeft=function(_4){
var _5="";
for(var i=0;i<(_4-this.length);i++){
_5+="0";
}
return (_5+this);
};
Function.prototype.runsAfterSCW=function(){
var _7=this,args=new Array(arguments.length);
for(var i=0;i<args.length;++i){
args[i]=arguments[i];
}
return function(){
for(var i=0;i<arguments.length;++i){
args[args.length]=arguments[i];
}
return (args.shift()==scwTriggerEle)?_7.apply(this,args):null;
};
};
function scwID(id){
return document.getElementById(id);
}
var scwNextActionReturn,scwNextAction;
function showCal(_b,_c){
scwShow(_b,_c);
}
function scwShow(_d,_e){
if(!_e){
_e=window.event;
}
var _f=(_e.target)?_e.target:_e.srcElement;
if(_e.stopPropagation){
_e.stopPropagation();
}else{
_e.cancelBubble=true;
}
scwTriggerEle=_f;
scwParmActiveToday=true;
for(var i=0;i<7;i++){
scwPassEnabledDay[(i+7-scwWeekStart)%7]=true;
for(var j=2;j<arguments.length;j++){
if(arguments[j]==i){
scwPassEnabledDay[(i+7-scwWeekStart)%7]=false;
if(scwDateNow.getDay()==i){
scwParmActiveToday=false;
}
}
}
}
scwSeedDate=scwDateNow;
var _12="";
if(_d.value){
_12=_d.value.replace(/^\s+/,"").replace(/\s+$/,"");
}else{
if(typeof _d.value=="undefined"){
var _13=_d.childNodes;
for(var i=0;i<_13.length;i++){
if(_13[i].nodeType==3){
_12=_13[i].nodeValue.replace(/^\s+/,"").replace(/\s+$/,"");
if(_12.length>0){
scwTriggerEle.scwTextNode=_13[i];
scwTriggerEle.scwLength=_13[i].nodeValue.length;
break;
}
}
}
}
}
scwSetDefaultLanguage();
scwID("scwDragText").innerHTML=scwDrag;
scwID("scwMonths").options.length=0;
for(var i=0;i<scwArrMonthNames.length;i++){
scwID("scwMonths").options[i]=new Option(scwArrMonthNames[i],scwArrMonthNames[i]);
}
scwID("scwYears").options.length=0;
for(var i=0;i<scwDropDownYears;i++){
scwID("scwYears").options[i]=new Option((scwBaseYear+i),(scwBaseYear+i));
}
for(var i=0;i<scwArrWeekInits.length;i++){
scwID("scwWeekInit"+i).innerHTML=scwArrWeekInits[(i+scwWeekStart)%scwArrWeekInits.length];
}
if(scwID("scwFoot")){
scwID("scwFoot").innerHTML=scwToday+" "+scwDateNow.scwFormat(scwDateDisplayFormat);
}
if(_12.length==0){
scwBlnFullInputDate=false;
if((new Date(scwBaseYear+scwDropDownYears,0,0))<scwSeedDate||(new Date(scwBaseYear,0,1))>scwSeedDate){
scwSeedDate=new Date(scwBaseYear+Math.floor(scwDropDownYears/2),5,1);
}
}else{
function scwInputFormat(){
var _18=new Array(),scwArrInput=_12.split(new RegExp("[\\"+scwArrDelimiters.join("\\")+"]+","g"));
if(scwArrInput[0]!=null){
if(scwArrInput[0].length==0){
scwArrInput.splice(0,1);
}
if(scwArrInput[scwArrInput.length-1].length==0){
scwArrInput.splice(scwArrInput.length-1,1);
}
}
scwBlnFullInputDate=false;
scwDateOutputFormat=scwDateOutputFormat.toUpperCase();
var _19=["D","M","Y"];
var _1a=new Array();
for(var i=0;i<_19.length;i++){
if(scwDateOutputFormat.search(_19[i])>-1){
_1a[scwDateOutputFormat.search(_19[i])]=_19[i];
}
}
var _1c=_1a.join("");
switch(scwArrInput.length){
case 1:
if(scwDateOutputFormat.indexOf("Y")>-1&&scwArrInput[0].length>scwDateOutputFormat.lastIndexOf("Y")){
_18[0]=parseInt(scwArrInput[0].substring(scwDateOutputFormat.indexOf("Y"),scwDateOutputFormat.lastIndexOf("Y")+1),10);
}else{
_18[0]=0;
}
if(scwDateOutputFormat.indexOf("M")>-1&&scwArrInput[0].length>scwDateOutputFormat.lastIndexOf("M")){
_18[1]=scwArrInput[0].substring(scwDateOutputFormat.indexOf("M"),scwDateOutputFormat.lastIndexOf("M")+1);
}else{
_18[1]="6";
}
if(scwDateOutputFormat.indexOf("D")>-1&&scwArrInput[0].length>scwDateOutputFormat.lastIndexOf("D")){
_18[2]=parseInt(scwArrInput[0].substring(scwDateOutputFormat.indexOf("D"),scwDateOutputFormat.lastIndexOf("D")+1),10);
}else{
_18[2]=1;
}
if(scwArrInput[0].length==scwDateOutputFormat.length){
scwBlnFullInputDate=true;
}
break;
case 2:
_18[0]=parseInt(scwArrInput[_1c.replace(/D/i,"").search(/Y/i)],10);
_18[1]=scwArrInput[_1c.replace(/D/i,"").search(/M/i)];
_18[2]=1;
break;
case 3:
_18[0]=parseInt(scwArrInput[_1c.search(/Y/i)],10);
_18[1]=scwArrInput[_1c.search(/M/i)];
_18[2]=parseInt(scwArrInput[_1c.search(/D/i)],10);
scwBlnFullInputDate=true;
break;
default:
_18[0]=0;
_18[1]=0;
_18[2]=0;
}
var _1d=new RegExp("^(0?[1-9]|[1-2][0-9]|3[0-1])$"),scwExpValMonth=new RegExp("^(0?[1-9]|1[0-2]|"+scwArrMonthNames.join("|")+")$","i"),scwExpValYear=new RegExp("^([0-9]{1,2}|[0-9]{4})$");
if(scwExpValYear.exec(_18[0])==null||scwExpValMonth.exec(_18[1])==null||_1d.exec(_18[2])==null){
if(scwShowInvalidDateMsg){
alert(scwInvalidDateMsg+scwInvalidAlert[0]+_12+scwInvalidAlert[1]);
}
scwBlnFullInputDate=false;
_18[0]=scwBaseYear+Math.floor(scwDropDownYears/2);
_18[1]="6";
_18[2]=1;
}
return _18;
}
scwArrSeedDate=scwInputFormat();
if(scwArrSeedDate[0]<100){
scwArrSeedDate[0]+=(scwArrSeedDate[0]>50)?1900:2000;
}
if(scwArrSeedDate[1].search(/\d+/)!=0){
month=scwArrMonthNames.join("|").toUpperCase().search(scwArrSeedDate[1].substr(0,3).toUpperCase());
scwArrSeedDate[1]=Math.floor(month/4)+1;
}
scwSeedDate=new Date(scwArrSeedDate[0],scwArrSeedDate[1]-1,scwArrSeedDate[2]);
}
if(isNaN(scwSeedDate)){
if(scwShowInvalidDateMsg){
alert(scwInvalidDateMsg+scwInvalidAlert[0]+_12+scwInvalidAlert[1]);
}
scwSeedDate=new Date(scwBaseYear+Math.floor(scwDropDownYears/2),5,1);
scwBlnFullInputDate=false;
}else{
if((new Date(scwBaseYear,0,1))>scwSeedDate){
if(scwBlnStrict&&scwShowOutOfRangeMsg){
alert(scwOutOfRangeMsg);
}
scwSeedDate=new Date(scwBaseYear,0,1);
scwBlnFullInputDate=false;
}else{
if((new Date(scwBaseYear+scwDropDownYears,0,0))<scwSeedDate){
if(scwBlnStrict&&scwShowOutOfRangeMsg){
alert(scwOutOfRangeMsg);
}
scwSeedDate=new Date(scwBaseYear+Math.floor(scwDropDownYears)-1,11,1);
scwBlnFullInputDate=false;
}else{
if(scwBlnStrict&&scwBlnFullInputDate&&(scwSeedDate.getDate()!=scwArrSeedDate[2]||(scwSeedDate.getMonth()+1)!=scwArrSeedDate[1]||scwSeedDate.getFullYear()!=scwArrSeedDate[0])){
if(scwShowDoesNotExistMsg){
alert(scwDoesNotExistMsg);
}
scwSeedDate=new Date(scwSeedDate.getFullYear(),scwSeedDate.getMonth()-1,1);
scwBlnFullInputDate=false;
}
}
}
}
for(var i=0;i<scwDisabledDates.length;i++){
if(!((typeof scwDisabledDates[i]=="object")&&(scwDisabledDates[i].constructor==Date))){
if((typeof scwDisabledDates[i]=="object")&&(scwDisabledDates[i].constructor==Array)){
var _1f=true;
if(scwDisabledDates[i].length!=2){
if(scwShowRangeDisablingError){
alert(scwRangeDisablingError[0]+scwDisabledDates[i]+scwRangeDisablingError[1]);
}
_1f=false;
}else{
for(var j=0;j<scwDisabledDates[i].length;j++){
if(!((typeof scwDisabledDates[i][j]=="object")&&(scwDisabledDates[i][j].constructor==Date))){
if(scwShowRangeDisablingError){
alert(scwDateDisablingError[0]+scwDisabledDates[i][j]+scwDateDisablingError[1]);
}
_1f=false;
}
}
}
if(_1f&&(scwDisabledDates[i][0]>scwDisabledDates[i][1])){
scwDisabledDates[i].reverse();
}
}else{
if(scwShowRangeDisablingError){
alert(scwDateDisablingError[0]+scwDisabledDates[i]+scwDateDisablingError[1]);
}
}
}
}
scwMonthSum=12*(scwSeedDate.getFullYear()-scwBaseYear)+scwSeedDate.getMonth();
scwID("scwYears").options.selectedIndex=Math.floor(scwMonthSum/12);
scwID("scwMonths").options.selectedIndex=(scwMonthSum%12);
scwID("scwDrag").style.display=(scwAllowDrag)?"":"none";
scwShowMonth(0);
scwTargetEle=_d;
var _21=parseInt(_d.offsetTop,10)+parseInt(_d.offsetHeight,10),offsetLeft=parseInt(_d.offsetLeft,10);
if(!window.opera){
while(_d.tagName!="BODY"&&_d.tagName!="HTML"){
_21-=parseInt(_d.scrollTop,10);
offsetLeft-=parseInt(_d.scrollLeft,10);
_d=_d.parentNode;
}
_d=scwTargetEle;
}
do{
_d=_d.offsetParent;
_21+=parseInt(_d.offsetTop,10);
offsetLeft+=parseInt(_d.offsetLeft,10);
}while(_d.tagName!="BODY"&&_d.tagName!="HTML");
scwID("scw").style.top=_21+"px";
scwID("scw").style.left=offsetLeft+"px";
scwID("scwIframe").style.top=_21+"px";
scwID("scwIframe").style.left=offsetLeft+"px";
scwID("scwIframe").style.width=(scwID("scw").offsetWidth-(scwID("scwIE")?2:4))+"px";
scwID("scwIframe").style.height=(scwID("scw").offsetHeight-(scwID("scwIE")?2:4))+"px";
scwID("scwIframe").style.visibility="inherit";
scwID("scw").style.visibility="inherit";
}
function scwHide(){
scwID("scw").style.visibility="hidden";
scwID("scwIframe").style.visibility="hidden";
if(typeof scwNextAction!="undefined"&&scwNextAction!=null){
scwNextActionReturn=scwNextAction();
scwNextAction=null;
}
}
function scwCancel(_22){
if(scwClickToHide){
scwHide();
}
scwStopPropagation(_22);
}
function scwStopPropagation(_23){
if(_23.stopPropagation){
_23.stopPropagation();
}else{
_23.cancelBubble=true;
}
}
function scwBeginDrag(_24){
var _25=scwID("scw");
var _26=_24.clientX,deltaY=_24.clientY,offsetEle=_25;
do{
_26-=parseInt(offsetEle.offsetLeft,10);
deltaY-=parseInt(offsetEle.offsetTop,10);
offsetEle=offsetEle.offsetParent;
}while(offsetEle.tagName!="BODY"&&offsetEle.tagName!="HTML");
if(document.addEventListener){
document.addEventListener("mousemove",moveHandler,true);
document.addEventListener("mouseup",upHandler,true);
}else{
_25.attachEvent("onmousemove",moveHandler);
_25.attachEvent("onmouseup",upHandler);
_25.setCapture();
}
scwStopPropagation(_24);
function moveHandler(_27){
if(!_27){
_27=window.event;
}
_25.style.left=(_27.clientX-_26)+"px";
_25.style.top=(_27.clientY-deltaY)+"px";
scwID("scwIframe").style.left=(_27.clientX-_26)+"px";
scwID("scwIframe").style.top=(_27.clientY-deltaY)+"px";
scwStopPropagation(_27);
}
function upHandler(_28){
if(!_28){
_28=window.event;
}
if(document.removeEventListener){
document.removeEventListener("mousemove",moveHandler,true);
document.removeEventListener("mouseup",upHandler,true);
}else{
_25.detachEvent("onmouseup",upHandler);
_25.detachEvent("onmousemove",moveHandler);
_25.releaseCapture();
}
scwStopPropagation(_28);
}
}
function scwShowMonth(_29){
var _2a=new Date(Date.parse(new Date().toDateString())),scwStartDate=new Date();
_2a.setHours(12);
scwSelYears=scwID("scwYears");
scwSelMonths=scwID("scwMonths");
if(scwSelYears.options.selectedIndex>-1){
scwMonthSum=12*(scwSelYears.options.selectedIndex)+_29;
if(scwSelMonths.options.selectedIndex>-1){
scwMonthSum+=scwSelMonths.options.selectedIndex;
}
}else{
if(scwSelMonths.options.selectedIndex>-1){
scwMonthSum+=scwSelMonths.options.selectedIndex;
}
}
_2a.setFullYear(scwBaseYear+Math.floor(scwMonthSum/12),(scwMonthSum%12),1);
scwID("scwWeek_").style.display=(scwWeekNumberDisplay)?"":"none";
if(window.opera){
scwID("scwMonths").style.display="inherit";
scwID("scwYears").style.display="inherit";
}
scwTemp=(12*parseInt((_2a.getFullYear()-scwBaseYear),10))+parseInt(_2a.getMonth(),10);
if(scwTemp>-1&&scwTemp<(12*scwDropDownYears)){
scwSelYears.options.selectedIndex=Math.floor(scwMonthSum/12);
scwSelMonths.options.selectedIndex=(scwMonthSum%12);
scwCurMonth=_2a.getMonth();
_2a.setDate((((_2a.getDay()-scwWeekStart)<0)?-6:1)+scwWeekStart-_2a.getDay());
var _2b=new Date(_2a.getFullYear(),_2a.getMonth(),_2a.getDate()).valueOf();
scwStartDate=new Date(_2a);
if(scwID("scwFoot")){
var _2c=scwID("scwFoot");
function scwFootOutput(){
scwSetOutput(scwDateNow);
}
if(scwDisabledDates.length==0){
if(scwActiveToday&&scwParmActiveToday){
_2c.onclick=scwFootOutput;
_2c.className="scwFoot";
if(scwID("scwIE")){
_2c.onmouseover=scwChangeClass;
_2c.onmouseout=scwChangeClass;
}
}else{
_2c.onclick=null;
_2c.className="scwFootDisabled";
if(scwID("scwIE")){
_2c.onmouseover=null;
_2c.onmouseout=null;
}
if(document.addEventListener){
_2c.addEventListener("click",scwStopPropagation,false);
}else{
_2c.attachEvent("onclick",scwStopPropagation);
}
}
}else{
for(var k=0;k<scwDisabledDates.length;k++){
if(!scwActiveToday||!scwParmActiveToday||((typeof scwDisabledDates[k]=="object")&&(((scwDisabledDates[k].constructor==Date)&&scwDateNow.valueOf()==scwDisabledDates[k].valueOf())||((scwDisabledDates[k].constructor==Array)&&scwDateNow.valueOf()>=scwDisabledDates[k][0].valueOf()&&scwDateNow.valueOf()<=scwDisabledDates[k][1].valueOf())))){
_2c.onclick=null;
_2c.className="scwFootDisabled";
if(scwID("scwIE")){
_2c.onmouseover=null;
_2c.onmouseout=null;
}
if(document.addEventListener){
_2c.addEventListener("click",scwStopPropagation,false);
}else{
_2c.attachEvent("onclick",scwStopPropagation);
}
break;
}else{
_2c.onclick=scwFootOutput;
_2c.className="scwFoot";
if(scwID("scwIE")){
_2c.onmouseover=scwChangeClass;
_2c.onmouseout=scwChangeClass;
}
}
}
}
}
function scwSetOutput(_2e){
if(typeof scwTargetEle.value=="undefined"){
scwTriggerEle.scwTextNode.replaceData(0,scwTriggerEle.scwLength,_2e.scwFormat(scwDateOutputFormat));
}else{
scwTargetEle.value=_2e.scwFormat(scwDateOutputFormat);
}
scwHide();
}
function scwCellOutput(_2f){
var _30=scwEventTrigger(_2f),scwOutputDate=new Date(scwStartDate);
if(_30.nodeType==3){
_30=_30.parentNode;
}
scwOutputDate.setDate(scwStartDate.getDate()+parseInt(_30.id.substr(8),10));
scwSetOutput(scwOutputDate);
}
function scwChangeClass(_31){
var _32=scwEventTrigger(_31);
if(_32.nodeType==3){
_32=_32.parentNode;
}
switch(_32.className){
case "scwCells":
_32.className="scwCellsHover";
break;
case "scwCellsHover":
_32.className="scwCells";
break;
case "scwCellsExMonth":
_32.className="scwCellsExMonthHover";
break;
case "scwCellsExMonthHover":
_32.className="scwCellsExMonth";
break;
case "scwCellsWeekend":
_32.className="scwCellsWeekendHover";
break;
case "scwCellsWeekendHover":
_32.className="scwCellsWeekend";
break;
case "scwFoot":
_32.className="scwFootHover";
break;
case "scwFootHover":
_32.className="scwFoot";
break;
case "scwInputDate":
_32.className="scwInputDateHover";
break;
case "scwInputDateHover":
_32.className="scwInputDate";
}
return true;
}
function scwEventTrigger(_33){
if(!_33){
_33=event;
}
return _33.target||_33.srcElement;
}
function scwWeekNumber(_34){
var _35=new Date(_34);
_35.setDate(_35.getDate()-_35.getDay()+scwWeekNumberBaseDay+((_34.getDay()>scwWeekNumberBaseDay)?7:0));
var _36=new Date(_35.getFullYear(),0,1);
_36.setDate(_36.getDate()-_36.getDay()+scwWeekNumberBaseDay);
if(_36<new Date(_35.getFullYear(),0,1)){
_36.setDate(_36.getDate()+7);
}
var _37=new Date(_36-scwWeekNumberBaseDay+_34.getDay());
if(_37>_36){
_37.setDate(_37.getDate()-7);
}
var _38="0"+(Math.round((_35-_36)/604800000,0)+1);
return _38.substring(_38.length-2,_38.length);
}
var _39=scwID("scwCells");
for(i=0;i<_39.childNodes.length;i++){
var _3a=_39.childNodes[i];
if(_3a.nodeType==1&&_3a.tagName=="TR"){
if(scwWeekNumberDisplay){
scwTmpEl=_3a.childNodes[0];
scwTmpEl.innerHTML=scwWeekNumber(_2a);
scwTmpEl.style.borderColor=(scwTmpEl.currentStyle)?scwTmpEl.currentStyle["backgroundColor"]:(window.getComputedStyle)?document.defaultView.getComputedStyle(scwTmpEl,null).getPropertyValue("background-color"):"";
scwTmpEl.style.display="";
}else{
_3a.childNodes[0].style.display="none";
}
for(j=1;j<_3a.childNodes.length;j++){
var _3b=_3a.childNodes[j];
if(_3b.nodeType==1&&_3b.tagName=="TD"){
_3a.childNodes[j].innerHTML=_2a.getDate();
var _3c=_3a.childNodes[j],scwDisabled=((scwOutOfRangeDisable&&(_2a<(new Date(scwBaseYear,0,1,_2a.getHours()))||_2a>(new Date(scwBaseYear+scwDropDownYears,0,0,_2a.getHours()))))||(scwOutOfMonthDisable&&(_2a<(new Date(_2a.getFullYear(),scwCurMonth,1,_2a.getHours()))||_2a>(new Date(_2a.getFullYear(),scwCurMonth+1,0,_2a.getHours())))))?true:false;
_3c.style.visibility=(scwOutOfMonthHide&&(_2a<(new Date(_2a.getFullYear(),scwCurMonth,1,_2a.getHours()))||_2a>(new Date(_2a.getFullYear(),scwCurMonth+1,0,_2a.getHours()))))?"hidden":"inherit";
for(var k=0;k<scwDisabledDates.length;k++){
if((typeof scwDisabledDates[k]=="object")&&(scwDisabledDates[k].constructor==Date)&&_2b==scwDisabledDates[k].valueOf()){
scwDisabled=true;
}else{
if((typeof scwDisabledDates[k]=="object")&&(scwDisabledDates[k].constructor==Array)&&_2b>=scwDisabledDates[k][0].valueOf()&&_2b<=scwDisabledDates[k][1].valueOf()){
scwDisabled=true;
}
}
}
if(scwDisabled||!scwEnabledDay[j-1+(7*((i*_39.childNodes.length)/6))]||!scwPassEnabledDay[(j-1+(7*(i*_39.childNodes.length/6)))%7]){
_3a.childNodes[j].onclick=null;
if(scwID("scwIE")){
_3a.childNodes[j].onmouseover=null;
_3a.childNodes[j].onmouseout=null;
}
_3c.className=(_2a.getMonth()!=scwCurMonth)?"scwCellsExMonthDisabled":(scwBlnFullInputDate&&_2a.toDateString()==scwSeedDate.toDateString())?"scwInputDateDisabled":(_2a.getDay()%6==0)?"scwCellsWeekendDisabled":"scwCellsDisabled";
_3c.style.borderColor=(scwFormatTodayCell&&_2a.toDateString()==scwDateNow.toDateString())?scwTodayCellBorderColour:(_3c.currentStyle)?_3c.currentStyle["backgroundColor"]:(window.getComputedStyle)?document.defaultView.getComputedStyle(_3c,null).getPropertyValue("background-color"):"";
}else{
_3a.childNodes[j].onclick=scwCellOutput;
if(scwID("scwIE")){
_3a.childNodes[j].onmouseover=scwChangeClass;
_3a.childNodes[j].onmouseout=scwChangeClass;
}
_3c.className=(_2a.getMonth()!=scwCurMonth)?"scwCellsExMonth":(scwBlnFullInputDate&&_2a.toDateString()==scwSeedDate.toDateString())?"scwInputDate":(_2a.getDay()%6==0)?"scwCellsWeekend":"scwCells";
_3c.style.borderColor=(scwFormatTodayCell&&_2a.toDateString()==scwDateNow.toDateString())?scwTodayCellBorderColour:(_3c.currentStyle)?_3c.currentStyle["backgroundColor"]:(window.getComputedStyle)?document.defaultView.getComputedStyle(_3c,null).getPropertyValue("background-color"):"";
}
_2a.setDate(_2a.getDate()+1);
_2b=new Date(_2a.getFullYear(),_2a.getMonth(),_2a.getDate()).valueOf();
}
}
}
}
}
if(window.opera){
scwID("scwMonths").style.display="inline";
scwID("scwYears").style.display="inline";
scwID("scw").style.visibility="hidden";
scwID("scw").style.visibility="inherit";
}
}
document.writeln("<!--[if IE]><div id='scwIE'></div><![endif]-->");
document.writeln("<!--[if lt IE 7]><div id='scwIElt7'></div><![endif]-->");
document.write("<iframe class='scw' "+(scwID("scwIElt7")?"src='/scwblank.html '":"")+"id='scwIframe' name='scwIframe' frameborder='0'>"+"</iframe>"+"<table id='scw' class='scw'>"+"<tr class='scw'>"+"<td class='scw'>"+"<table class='scwHead' id='scwHead' width='100%' "+"cellspacing='0' cellpadding='0'>"+"<tr id='scwDrag' style='display:none;'>"+"<td colspan='4' class='scwDrag' "+"onmousedown='scwBeginDrag(event);'>"+"<div id='scwDragText'></div>"+"</td>"+"</tr>"+"<tr class='scwHead' >"+"<td class='scwHead'>"+"<input class='scwHead' id='scwHeadLeft' type='button' value='<' "+"onclick='scwShowMonth(-1);'  /></td>"+"<td class='scwHead'>"+"<select id='scwMonths' class='scwHead' "+"onchange='scwShowMonth(0);'>"+"</select>"+"</td>"+"<td class='scwHead'>"+"<select id='scwYears' class='scwHead' "+"onchange='scwShowMonth(0);'>"+"</select>"+"</td>"+"<td class='scwHead'>"+"<input class='scwHead' id='scwHeadRight' type='button' value='>' "+"onclick='scwShowMonth(1);' /></td>"+"</tr>"+"</table>"+"</td>"+"</tr>"+"<tr class='scw'>"+"<td class='scw'>"+"<table class='scwCells' align='center'>"+"<thead>"+"<tr><td class='scwWeekNumberHead' id='scwWeek_' ></td>");
for(i=0;i<7;i++){
document.write("<td class='scwWeek' id='scwWeekInit"+i+"'></td>");
}
document.write("</tr>"+"</thead>"+"<tbody id='scwCells' "+"onClick='scwStopPropagation(event);'>");
for(i=0;i<6;i++){
document.write("<tr>"+"<td class='scwWeekNo' id='scwWeek_"+i+"'></td>");
for(j=0;j<7;j++){
document.write("<td class='scwCells' id='scwCell_"+(j+(i*7))+"'></td>");
}
document.write("</tr>");
}
document.write("</tbody>");
if((new Date(scwBaseYear+scwDropDownYears,0,0))>scwDateNow&&(new Date(scwBaseYear,0,0))<scwDateNow){
document.write("<tfoot class='scwFoot'>"+"<tr class='scwFoot'>"+"<td class='scwFoot' id='scwFoot' colspan='8'>"+"</td>"+"</tr>"+"</tfoot>");
}
document.write("</table>"+"</td>"+"</tr>"+"</table>");
if(document.addEventListener){
scwID("scw").addEventListener("click",scwCancel,false);
scwID("scwHeadLeft").addEventListener("click",scwStopPropagation,false);
scwID("scwMonths").addEventListener("click",scwStopPropagation,false);
scwID("scwMonths").addEventListener("change",scwStopPropagation,false);
scwID("scwYears").addEventListener("click",scwStopPropagation,false);
scwID("scwYears").addEventListener("change",scwStopPropagation,false);
scwID("scwHeadRight").addEventListener("click",scwStopPropagation,false);
}else{
scwID("scw").attachEvent("onclick",scwCancel);
scwID("scwHeadLeft").attachEvent("onclick",scwStopPropagation);
scwID("scwMonths").attachEvent("onclick",scwStopPropagation);
scwID("scwMonths").attachEvent("onchange",scwStopPropagation);
scwID("scwYears").attachEvent("onclick",scwStopPropagation);
scwID("scwYears").attachEvent("onchange",scwStopPropagation);
scwID("scwHeadRight").attachEvent("onclick",scwStopPropagation);
}
if(document.addEventListener){
document.addEventListener("click",scwHide,false);
}else{
document.attachEvent("onclick",scwHide);
}


