	

    var scwDateNow_next = new Date(Date.parse(new Date().toDateString()));

    var scwBaseYear_next        = scwDateNow_next.getFullYear();

    var scwDropDownYears_next   = 20;


    var scwToday_next               = 'Today:',
        scwDrag_next                = 'click here to drag',
        scwInvalidDateMsg_next      = 'The entered date is invalid.\n',
        scwOutOfRangeMsg_next       = 'The entered date is out of range.',
        scwDoesNotExistMsg_next     = 'The entered date does not exist.',
        scwInvalidAlert_next        = ['Invalid date (',') ignored.'],
        scwDateDisablingError_next  = ['Error ',' is not a Date object.'],
        scwRangeDisablingError_next = ['Error ',' should consist of two elements.'],
        scwArrMonthNames_next       = ['Jan','Feb','Mar','Apr','May','Jun',
                                  'Jul','Aug','Sep','Oct','Nov','Dec'],
        scwArrWeekInits_next        = ['S','M','T','W','T','F','S'];
		srcArrDays_next             = ['Mon','Tue','Wed','Thu','Fri','Sat','Sun'];


    var scwWeekStart_next       =    1;


    var scwWeekNumberDisplay_next    = false;


    var scwWeekNumberBaseDay_next    = 4;


    var scwArrDelimiters_next   = ['/','-','.',',',' '];


    var scwDateDisplayFormat_next = 'DD-MM-YYYY';        // e.g. 'MMM-DD-YYYY' for the US


   ////////// var scwDateOutputFormat_next  = 'MMM-DD-YYYY';   // e.g. 'MMM-DD-YYYY' for the US
   
    var scwDateOutputFormat_next  = 'DD-MM-YYYY';   // e.g. 'MMM-DD-YYYY' for the US

    // The input date is fully parsed so a format is not required,
    // but there is no way to differentiate the sequence reliably.
    //
    // e.g. Is 05/08/03     5th August 2003,
    //                      8th May    2003 or even
    //                      3rd August 2005?
    //
    // So, you have to state how the code should interpret input dates.
    //
    // The sequence should always contain one D, one M and one Y only,
    // in any order.

    var scwDateInputSequence_next = 'DMY';           // e.g. 'MDY' for the US

    // Note: Because the user may select a date then trigger the
    //       calendar again to select another, it is necessary to
    //       have the input date sequence in the same order as the
    //       output display format.  To allow the flexibility of having
    //       a full input date and a partial (e.g. only Month and Year)
    //       output, the input sequence is set separately.
    //
    //       The same reason determines that the delimiters used should
    //       be in scwArrDelimiters_next.

    // scwZindex_next controls how the pop-up calendar interacts with the rest
    // of the page.  It is usually adequate to leave it as 1 (One) but I
    // have made it available here to help anyone who needs to alter the
    // level in order to ensure that the calendar displays correctly in
    // relation to all other elements on the page.

    var scwZindex_next          = 1;

    // Personally I like the fact that entering 31-Sep-2005 displays
    // 1-Oct-2005, however you may want that to be an error.  If so,
    // set scwBlnStrict_next = true.  That will cause an error message to
    // display and the selected month is displayed without a selected
    // day. Thanks to Brad Allan for his feedback prompting this feature.

    var scwBlnStrict_next       = false;

    // If you wish to disable any displayed day, e.g. Every Monday,
    // you can do it by setting the following array.  The array elements
    // match the displayed cells.
    //
    // You could put something like the following in your calling page
    // to disable all weekend days;
    //
    //  for (var i=0;i<scwEnabledDay_next.length;i++)
    //      {if (i%7%6==0) scwEnabledDay_next[i] = false;}
    //
    // The above approach will allow you to disable days of the week
    // for the whole of your page easily.  If you need to set different
    // disabled days for a number of date input fields on your page
    // there is an easier way: You can pass additional arguments to
    // scwShow. The syntax is described at the top of this script in
    // the section:
    //    "How to use the Calendar once it is defined for your page:"
    //
    // It is possible to use these two approaches in combination.

    var scwEnabledDay_next      = [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];

    // You can disable any specific date (e.g. 24-Jan-2006 or Today) by
    // creating an element of the array scwDisabledDates_next as a date object
    // with the value you want to disable.  Date ranges can be disabled
    // by placing an array of two values (Start and End) into an element
    // of this array.

    var scwDisabledDates_next   = new Array();

    // e.g. To disable 10-Dec-2005:
    //          scwDisabledDates_next[0] = new Date(2005,11,10);
    //
    //      or a range from 2004-Dec-25 to 2005-Jan-01:
    //          scwDisabledDates_next[1] = [new Date(2004,11,25),new Date(2005,0,1)];
    //
    // Remember that Javascript months are Zero-based.

    // The disabling by date and date range does prevent the current day
    // from being selected.  Disabling days of the week does not so you can set
    // the scwActiveToday_next value to false to prevent selection.

    var scwActiveToday_next = true;

    // Dates that are out of the specified range can be displayed at the start
    // of the very first month and end of the very last.  Set
    // scwOutOfRangeDisable_next to  true  to disable these dates (or  false  to
    // allow their selection).

    var scwOutOfRangeDisable_next = true;

    // You can allow the calendar to be dragged around the screen by
    // using the setting scwAllowDrag_next to true.
    // I can't say I recommend it because of the danger of the user
    // forgetting which date field the calendar will update when there
    // are multiple date fields on a page.

    var scwAllowDrag_next = false;

    // Closing the calendar by clicking on it (rather than elsewhere on the
    // main page) can be inconvenient.  The scwClickToHide_next boolean value
    // controls this feature.

    var scwClickToHide_next = false;

    /* Standard Calender Color Setting
	-----------------------------------------
	Blend the colours into your page here...

    var scwBackground_next           = '#6666CC';    // Calendar background
    var scwHeadText_next             = '#CCCCCC';    // Colour of week headings

    // If you want to "turn off" any of the highlighting then just
    // set the highlight colours to the same as the un-higlighted colours.

    // Today string
    var scwTodayText_next            = '#FFFFFF',
        scwTodayHighlight_next       = '#FFFF00';

    // Active Cell
    var scwHighlightText_next        = '#000000',
        scwHighlightBackground_next  = '#FFFF00';

    // Drag Handle
    var scwDragText_next             = '#CCCCFF',
        scwDragBackground_next       = '#9999CC';

    // Week Numbering
    var scwWeekNumberText_next       = '#CCCCCC',
        scwWeekNumberBackground_next = '#776677';

    // Enabled Days

    // Weekend Days
    var scwWeekendText_next          = '#CC6666',
        scwWeekendBackground_next    = '#CCCCCC';

    // Days out of current month
    var scwExMonthText_next          = '#666666',
        scwExMonthBackground_next    = '#CCCCCC';

    // Current month's weekdays
    var scwCellText_next             = '#000000',
        scwCellBackground_next       = '#CCCCCC';

    // Input date
    var scwInDateText_next           = '#FF0000',
        scwInDateBackground_next     = '#FFCCCC';

    // Disabled days

    // Weekend Days
    var scwDisabledWeekendText_next          = '#CC6666',
        scwDisabledWeekendBackground_next    = '#999999';

    // Days out of current month
    var scwDisabledExMonthText_next          = '#666666',
        scwDisabledExMonthBackground_next    = '#999999';

    // Current month's weekdays
    var scwDisabledCellText_next             = '#000000',
        scwDisabledCellBackground_next       = '#999999';

    // Input date
    var scwDisabledInDateText_next           = '#FF0000',
        scwDisabledInDateBackground_next     = '#CC9999';
	*/
	
	// Blend the colours into your page here...
	// Required Color Setting
    var scwBackground_next           = '#8CA3C2';    // Calendar background
    var scwHeadText_next             = '#CCCCCC';    // Colour of week headings

    // If you want to "turn off" any of the highlighting then just
    // set the highlight colours to the same as the un-higlighted colours.

    // Today string
    var scwTodayText_next            = '#FFFFFF',
        scwTodayHighlight_next       = '#FFFF00';

    // Active Cell
    var scwHighlightText_next        = '#000000',
        scwHighlightBackground_next  = '#FFFF00';

    // Drag Handle
    var scwDragText_next             = '#CCCCFF',
        scwDragBackground_next       = '#9999CC';

    // Week Numbering
    var scwWeekNumberText_next       = '#CCCCCC',
        scwWeekNumberBackground_next = '#776677';

    // Enabled Days

    // Weekend Days
    var scwWeekendText_next          = '#CC6666',
        scwWeekendBackground_next    = '#CCCCCC';

    // Days out of current month
    var scwExMonthText_next          = '#666666',
        scwExMonthBackground_next    = '#CCCCCC';

    // Current month's weekdays
    var scwCellText_next             = '#000000',
        scwCellBackground_next       = '#CCCCCC';

    // Input date
    var scwInDateText_next           = '#FF0000',
        scwInDateBackground_next     = '#FFCCCC';

    // Disabled days

    // Weekend Days
    var scwDisabledWeekendText_next          = '#CC6666',
        scwDisabledWeekendBackground_next    = '#999999';

    // Days out of current month
    var scwDisabledExMonthText_next          = '#666666',
        scwDisabledExMonthBackground_next    = '#999999';

    // Current month's weekdays
    var scwDisabledCellText_next             = '#000000',
        scwDisabledCellBackground_next       = '#999999';

    // Input date
    var scwDisabledInDateText_next           = '#FF0000',
        scwDisabledInDateBackground_next     = '#CC9999';
		
    // I have made every effort to isolate the pop-up script from any
    // CSS defined on the main page but if you have anything set that
    // affects the pop-up (or you may want to change the way it looks)
    // then you can address it here.
    //
    // The classes are;
    //      scw_next         Overall
    //      scwHead_next     The Selection buttons/drop-downs
    //      scwDrag_next     The Drag handle  (if using the drag feature)
    //      scwWeek_next     The Day Initials (Column Headings)
    //      scwCells_next    The Individual days
    //      scwFoot_next     The "Today" selector

    document.writeln("<style>");
    document.writeln(   '.scw_next       {padding:1px;vertical-align:middle;}');
    document.writeln(   'iframe.scw_next {position:absolute;z-index:' + scwZindex_next   +
                                    ';top:0px;left:0px;visibility:hidden;'     +
                                    'width:1px;height:1px;}');
    document.writeln(   'table.scw_next  {padding:0px;visibility:hidden;'           +
                                    'position:absolute;width:200px;'           +
                                    'top:0px;left:0px;z-index:' +(scwZindex_next+1) +
                                    ';text-align:center;cursor:default;'       +
                                    'padding:1px;vertical-align:middle;'       +
                                    'background-color:' + scwBackground_next        +
                                    ';border:ridge 2px;font-size:10pt;'        +
                                    'font-family:Arial,Helvetica,Sans-Serif;'  +
                                    'font-weight:bold;}');
    document.writeln(   'td.scwDrag_next {text-align:center;font-size:8pt;' +
                                    'background-color:'  + scwDragBackground_next +
                                    ';padding:0px 0px;color:' + scwDragText_next  +
                                    "}");
    document.writeln(   'td.scwHead_next {padding:0px 0px;text-align:center;}');
    document.writeln(   'select.scwHead_next {margin:3px 1px;}');
    document.writeln(   'input.scwHead_next  {height:22px;width:22px;'              +
                                        'vertical-align:middle;'               +
                                        'text-align:center;margin:2px 1px;'    +
                                        'font-size:10pt;font-family:fixedSys;' +
                                        'font-weight:bold;}');
    document.writeln(   'td.scwWeekNumberHead_next '                                +
                                        '{text-align:center;font-weight:bold;' +
                                        'padding:0px;color:'                   +
                                            scwBackground_next + ';}');
    document.writeln(   'td.scwWeek_next     {text-align:center;font-weight:bold;'  +
                                        'padding:0px;color:'                   +
                                            scwHeadText_next + ';}');
    document.writeln(   'table.scwCells_next {text-align:right;font-size:8pt;'      +
                                        'width:96%;font-family:'               +
                                        'Arial,Helvetica,Sans-Serif;}');
    document.writeln(   'td.scwCells_next    {padding:3px;vertical-align:middle;'   +
                                        'width:16px;height:16px;'              +
                                        'font-weight:bold;color:'              +
                                            scwCellText_next                        +
                                        ';background-color:'                   +
                                            scwCellBackground_next                  +
                                        '}');
    document.writeln(   'td.scwWeekNo_next   {padding:3px;vertical-align:middle;'   +
                                        'width:16px;height:16px;'              +
                                        'font-weight:bold;color:'              +
                                            scwWeekNumberText_next                  +
                                        ';background-color:'                   +
                                            scwWeekNumberBackground_next            +
                                        '}');
    document.writeln(   'td.scwWeeks {padding:3px;vertical-align:middle;'      +
                                     'width:16px;height:16px;'                 +
                                     'font-weight:bold;color:' + scwCellText_next   +
                                     ';background-color:' + scwCellBackground_next  +
                                     '}');
    document.writeln(   'td.scwFoot_next  {padding:0px;text-align:center;'          +
                                     'font-weight:normal;color:'               +
                                      scwTodayText_next + ';}');
    document.writeln("</style>");

//******************************************************************************
//------------------------------------------------------------------------------
// End of customisation section
//------------------------------------------------------------------------------
//******************************************************************************

//  Variables required by both scwShow and scwShowMonth_next

    var scwTargetEle_next, scwTriggerEle_next,
        scwMonthSum_next         = 0,
        scwBlnFullInputDate_next = false,
        scwPassEnabledDay_next   = new Array(),
        scwSeedDate_next         = new Date(),
        scwParmActiveToday_next  = true,
        scwWeekStart_next        = scwWeekStart_next%7;

    // Add a method to format a date into the required pattern

    Date.prototype.scwFormat_next =
        function(scwFormat_next)
            {var charCount = 0,
                 codeChar  = '',
                 result    = '';

             for (var i=0;i<=scwFormat_next.length;i++)
                {if (i<scwFormat_next.length && scwFormat_next.charAt(i)==codeChar)
                        {// If we haven't hit the end of the string and
                         // the format string character is the same as
                         // the previous one, just clock up one to the
                         // length of the current element definition
                         charCount++;
                        }
                 else   {
					 switch (codeChar)
                            {case 'y': case 'Y':
                                result += (this.getFullYear()%Math.
                                            pow(10,charCount)).toString().
                                            scwPadLeft(charCount);
                                break;
                             case 'm': case 'M':
                                // If we find an M, check the number of them to
                                // determine whether to get the month number or
                                // the month name.
                                result += (charCount<3)?(this.getMonth()+1).toString().scwPadLeft(charCount):scwArrMonthNames_next[this.getMonth()];
                                break;
                             case 'd': case 'D':
                                // If we find a D, get the date and format it
                                result += this.getDate().toString().
                                            scwPadLeft(charCount);
                                break;
                             default:
                                // Copy any unrecognised characters across
                                while (charCount-- > 0) {result += codeChar;}
                            }

                         if (i<scwFormat_next.length)
                            {// Store the character we have just worked on
                             codeChar  = scwFormat_next.charAt(i);
                             charCount = 1;
                            }
                        }
                }
             return result;
            }

    // Add a method to left pad zeroes

    String.prototype.scwPadLeft =
        function(padToLength)
            {var result = '';
             for (var i=0;i<(padToLength - this.length);i++) {result += '0';}
             return (result + this);
            }

    // Set up a closure so that any next function can be triggered
    // after the calendar has been closed AND that function can take
    // arguments.

    Function.prototype.runsAfterSCW =
        function()  {var func = this,
                         args = new Array(arguments.length);

                     for (var i=0;i<args.length;++i)
                        {args[i] = arguments[i];}

                     return function()
                        {// concat/join the two argument arrays
                         for (var i=0;i<arguments.length;++i)
                            {args[args.length] = arguments[i];}

                         return (args.shift()==scwTriggerEle_next)
                                    ?func.apply(this, args):null;
                        }
                    };

    // Use a global variable for the return value from the next action
    // IE fails to pass the function through if the target element is in
    // a form and scwNextAction_next is not defined.

    var scwNextActionReturn_next, scwNextAction_next;

// ****************************************************************************
// Start of Function Library
//
//  Exposed functions:
//
//      scwShow             Entry point for display of calendar,
//                              called in main page.
//      showCal_next             Legacy name of scwShow:
//                              Passes only legacy arguments,
//                              not the optional day disabling arguments.
//
//      scwShowMonth_next        Displays a month on the calendar,
//                              Called when a month is set or changed.
//
//      scwBeginDrag_next        Controls calendar dragging.
//
//      scwCancel_next           Called when the calendar background is clicked:
//                              Calls scwStopPropagation_next and may call scwHide_next.
//      scwHide_next             Hides the calendar, called on various events.
//      scwStopPropagation_next  Stops the propagation of an event.
//
// ****************************************************************************

    function showCal_next(scwEle_next,scwSourceEle_next)    {next(scwEle_next,scwSourceEle_next);}
    function next(scwEle_next,scwSourceEle_next)
        {scwTriggerEle_next = scwSourceEle_next;

         // Take any parameters that there might be from the third onwards as
         // day numbers to be disabled 0 = Sunday through to 6 = Saturday.

         scwParmActiveToday_next = true;

         for (var i=0;i<7;i++)
            {scwPassEnabledDay_next[(i+7-scwWeekStart_next)%7] = true;
             for (var j=2;j<arguments.length;j++)
                {if (arguments[j]==i)
                    {scwPassEnabledDay_next[(i+7-scwWeekStart_next)%7] = false;
                     if (scwDateNow_next.getDay()==i) scwParmActiveToday_next = false;
                    }
                }
            }

         //   If no value is preset then the seed date is
         //      Today (when today is in range) OR
         //      The middle of the date range.

         scwSeedDate_next = scwDateNow_next;

         // Strip space characters from start and end of date input
         scwEle_next.value = scwEle_next.value.replace(/^\s+/,'').replace(/\s+$/,'');

         if (scwEle_next.value.length==0)
            {// If no value is entered and today is within the range,
             // use today's date, otherwise use the middle of the valid range.

             scwBlnFullInputDate_next=false;

             if ((new Date(scwBaseYear_next+scwDropDownYears_next-1,11,31))<scwSeedDate_next ||
                 (new Date(scwBaseYear_next,0,1))                     >scwSeedDate_next
                )
                {scwSeedDate_next = new Date(scwBaseYear_next +
                                        Math.floor(scwDropDownYears_next / 2), 5, 1);
                }
            }
         else
            {function scwInputFormat_next(scwEleValue)
                {var scwArrSeed = new Array(),
                     scwArrInput = scwEle_next.value.
                                    split(new RegExp('[\\'+scwArrDelimiters_next.
                                                        join('\\')+']+','g'));

                 // "Escape" all the user defined date delimiters above -
                 // several delimiters will need it and it does no harm for
                 // the others.

                 // Strip any empty array elements (caused by delimiters)
                 // from the beginning or end of the array. They will
                 // still appear in the output string if in the output
                 // format.

                 if (scwArrInput[0].length==0) scwArrInput.splice(0,1);

                 if (scwArrInput[scwArrInput.length-1].length==0)
                    scwArrInput.splice(scwArrInput.length-1,1);

                 scwBlnFullInputDate_next = false;

                 switch (scwArrInput.length)
                    {case 1:
                        {// Year only entry
                         scwArrSeed[0] = parseInt(scwArrInput[0],10);   // Year
                         scwArrSeed[1] = '6';                           // Month
                         scwArrSeed[2] = 1;                             // Day
                         break;
                        }
                     case 2:
                        {// Year and Month entry
                         scwArrSeed[0] =
                             parseInt(scwArrInput[scwDateInputSequence_next.
                                                    replace(/D/i,'').
                                                    search(/Y/i)],10);  // Year
                         scwArrSeed[1] = scwArrInput[scwDateInputSequence_next.
                                                    replace(/D/i,'').
                                                    search(/M/i)];      // Month
                         scwArrSeed[2] = 1;                             // Day
                         break;
                        }
                     case 3:
                        {// Day Month and Year entry

                         scwArrSeed[0] =
                             parseInt(scwArrInput[scwDateInputSequence_next.
                                                    search(/Y/i)],10);  // Year
                         scwArrSeed[1] = scwArrInput[scwDateInputSequence_next.
                                                    search(/M/i)];      // Month
                         scwArrSeed[2] =
                             parseInt(scwArrInput[scwDateInputSequence_next.
                                                    search(/D/i)],10);  // Day

                         scwBlnFullInputDate_next = true;
                         break;
                        }
                     default:
                        {// A stuff-up has led to more than three elements in
                         // the date.
                         scwArrSeed[0] = 0;     // Year
                         scwArrSeed[1] = 0;     // Month
                         scwArrSeed[2] = 0;     // Day
                        }
                    }

                 // These regular expressions validate the input date format
                 // to the following rules;
                 //         Day   1-31 (optional zero on single digits)
                 //         Month 1-12 (optional zero on single digits)
                 //                     or case insensitive name
                 //         Year  One, Two or four digits

                 // Months names are as set in the language dependent
                 // definitions and delimiters are set just below there

                 var scwExpValDay    = /^(0?[1-9]|[1-2]\d|3[0-1])$/,
                     scwExpValMonth  = new RegExp("^(0?[1-9]|1[0-2]|"        +
                                                  scwArrMonthNames_next.join("|") +
                                                  ")$","i"),
                     scwExpValYear   = /^(\d{1,2}|\d{4})$/;

                 // Apply validation and report failures

                 if (scwExpValYear.exec(scwArrSeed[0])  == null ||
                     scwExpValMonth.exec(scwArrSeed[1]) == null ||
                     scwExpValDay.exec(scwArrSeed[2])   == null)
                     {
                      scwBlnFullInputDate_next = false;
                      scwArrSeed[0] = scwBaseYear_next +
                                      Math.floor(scwDropDownYears_next/2); // Year
                      scwArrSeed[1] = '6';                            // Month
                      scwArrSeed[2] = 1;                              // Day
                     }

                 // Return the  Year    in scwArrSeed[0]
                 //             Month   in scwArrSeed[1]
                 //             Day     in scwArrSeed[2]

                 return scwArrSeed;
                }


             // Parse the string into an array using the allowed delimiters

             scwArrSeedDate = scwInputFormat_next(scwEle_next.value);

             // So now we have the Year, Month and Day in an array.

             //   If the year is one or two digits then the routine assumes a
             //   year belongs in the 21st Century unless it is less than 50
             //   in which case it assumes the 20th Century is intended.

             if (scwArrSeedDate[0]<100)
                scwArrSeedDate[0] += (scwArrSeedDate[0]>50)?1900:2000;

             // Check whether the month is in digits or an abbreviation

             if (scwArrSeedDate[1].search(/\d+/)!=0)
                {month = scwArrMonthNames_next.join('|').toUpperCase().
                            search(scwArrSeedDate[1].substr(0,3).
                                                    toUpperCase());
                 scwArrSeedDate[1] = Math.floor(month/4)+1;
                }

             scwSeedDate_next = new Date(scwArrSeedDate[0],
                                    scwArrSeedDate[1]-1,
                                    scwArrSeedDate[2]);
            }

         // Test that we have arrived at a valid date

         if (isNaN(scwSeedDate_next))
            {alert( scwInvalidDateMsg_next +
                    scwInvalidAlert_next[0] + scwEle_next.value +
                    scwInvalidAlert_next[1]);
             scwSeedDate_next = new Date(scwBaseYear_next +
                    Math.floor(scwDropDownYears_next/2),5,1);
             scwBlnFullInputDate_next=false;
            }
         else
            {// Test that the date is within range,
             // if not then set date to a sensible date in range.

             if ((new Date(scwBaseYear_next,0,1)) > scwSeedDate_next)
                {if (scwBlnStrict_next) alert(scwOutOfRangeMsg_next);
                 scwSeedDate_next = new Date(scwBaseYear_next,0,1);
                 scwBlnFullInputDate_next=false;
                }
             else
                {if ((new Date(scwBaseYear_next+scwDropDownYears_next-1,11,31))<
                      scwSeedDate_next)
                    {if (scwBlnStrict_next) alert(scwOutOfRangeMsg_next);
                     scwSeedDate_next = new Date(scwBaseYear_next +
                                            Math.floor(scwDropDownYears_next)-1,
                                                       11,1);
                     scwBlnFullInputDate_next=false;
                    }
                 else
                    {if (scwBlnStrict_next && scwBlnFullInputDate_next &&
                          (scwSeedDate_next.getDate()      != scwArrSeedDate[2] ||
                           (scwSeedDate_next.getMonth()+1) != scwArrSeedDate[1] ||
                           scwSeedDate_next.getFullYear()  != scwArrSeedDate[0]
                          )
                        )
                        {alert(scwDoesNotExistMsg_next);
                         scwSeedDate_next = new Date(scwSeedDate_next.getFullYear(),
                                                scwSeedDate_next.getMonth()-1,1);
                         scwBlnFullInputDate_next=false;
                        }
                    }
                }
            }

         // Test the disabled dates for validity
         // Give error message if not valid.

         for (var i=0;i<scwDisabledDates_next.length;i++)
            {if (!((typeof scwDisabledDates_next[i]      == 'object') &&
                   (scwDisabledDates_next[i].constructor == Date)))
                {if ((typeof scwDisabledDates_next[i]      == 'object') &&
                     (scwDisabledDates_next[i].constructor == Array))
                    {var scwPass = true;

                     if (scwDisabledDates_next[i].length !=2)
                        {alert(scwRangeDisablingError_next[0] +
                               scwDisabledDates_next[i] +
                               scwRangeDisablingError_next[1]);
                         scwPass = false;
                        }
                     else
                        {for (var j=0;j<scwDisabledDates_next[i].length;j++)
                            {if (!((typeof scwDisabledDates_next[i][j]
                                    == 'object') &&
                                   (scwDisabledDates_next[i][j].constructor
                                    == Date)))
                                {alert(scwDateDisablingError_next[0] +
                                       scwDisabledDates_next[i][j] +
                                       scwDateDisablingError_next[1]);
                                 scwPass = false;
                                }
                            }
                        }

                     if (scwPass &&
                         (scwDisabledDates_next[i][0] > scwDisabledDates_next[i][1])
                        )
                        {scwDisabledDates_next[i].reverse();}
                    }
                 else
                    {alert(scwDateDisablingError_next[0] + scwDisabledDates_next[i] +
                           scwDateDisablingError_next[1]);}
                }
            }

         // Calculate the number of months that the entered (or
         // defaulted) month is after the start of the allowed
         // date range.

         scwMonthSum_next =  12*(scwSeedDate_next.getFullYear()-scwBaseYear_next)+
                            scwSeedDate_next.getMonth();

         // Set the drop down boxes.

         document.getElementById('scwYears_net').options.selectedIndex =
            Math.floor(scwMonthSum_next/12);
         document.getElementById('scwMonths_next').options.selectedIndex=
            (scwMonthSum_next%12);

         // Position the calendar box

         var offsetTop =parseInt(scwEle_next.offsetTop ,10) +
                        parseInt(scwEle_next.offsetHeight,10),
             offsetLeft=parseInt(scwEle_next.offsetLeft,10);

         scwTargetEle_next=scwEle_next;

         do {scwEle_next=scwEle_next.offsetParent;
             offsetTop +=parseInt(scwEle_next.offsetTop,10);
             offsetLeft +=parseInt(scwEle_next.offsetLeft,10);
            }
         while (scwEle_next.tagName!='BODY');

         document.getElementById('scw_next').style.top =offsetTop +'px';
         document.getElementById('scw_next').style.left=offsetLeft+'px';

         if (document.getElementById('scwIframe_next'))
            {document.getElementById('scwIframe_next').style.top=offsetTop +'px';
             document.getElementById('scwIframe_next').style.left=offsetLeft+'px';
             document.getElementById('scwIframe_next').style.width=
                (document.getElementById('scw_next').offsetWidth-2)+'px';
             document.getElementById('scwIframe_next').style.height=
                (document.getElementById('scw_next').offsetHeight-2)+'px';
             document.getElementById('scwIframe_next').style.visibility='visible';
            }

         // Check whether or not dragging is allowed and display drag handle
         // if necessary

         document.getElementById('scwDrag_next').style.display=
             (scwAllowDrag_next)
                ?((document.getElementById('scwIFrame_next'))?'block':'table-row')
                :'none';

         // Display the month

         scwShowMonth_next(0);

         // Show it on the page

         document.getElementById('scw_next').style.visibility='visible';

         if (typeof event=='undefined')
                {scwSourceEle_next.parentNode.
                        addEventListener("click",scwStopPropagation_next,false);
                }
         else   {event.cancelBubble = true;}
        }

    function scwHide_next()
        {document.getElementById('scw_next').style.visibility='hidden';
         if (document.getElementById('scwIframe_next'))
            {document.getElementById('scwIframe_next').style.visibility='hidden';}

         if (typeof scwNextAction_next!='undefined' && scwNextAction_next!=null)
             {scwNextActionReturn_next = scwNextAction_next();
              // Explicit null set to prevent closure causing memory leak
              scwNextAction_next = null;
             }
        }

    function scwCancel_next(scwEvt)
        {if (scwClickToHide_next) scwHide_next();
         scwStopPropagation_next(scwEvt);
        }

    function scwStopPropagation_next(scwEvt)
        {if (scwEvt.stopPropagation)
                scwEvt.stopPropagation();    // Capture phase
         else   scwEvt.cancelBubble = true;  // Bubbling phase
        }

    function scwBeginDrag_next(event)
        {var elementToDrag = document.getElementById('scw_next');

         var deltaX    = event.clientX,
             deltaY    = event.clientY,
             offsetEle = elementToDrag;

         do {deltaX   -= 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_next,
                                           true);        // Capture phase
                 document.addEventListener('mouseup',
                                           upHandler_next,
                                           true);        // Capture phase
                }
         else   {elementToDrag.attachEvent('onmousemove',
                                           moveHandler_next); // Bubbling phase
                 elementToDrag.attachEvent('onmouseup',
                                             upHandler_next); // Bubbling phase
                 elementToDrag.setCapture();
                }

         scwStopPropagation_next(event);

         function moveHandler_next(e)
            {if (!e) e = window.event;

             elementToDrag.style.left = (e.clientX - deltaX) + 'px';
             elementToDrag.style.top  = (e.clientY - deltaY) + 'px';

             if (document.getElementById('scwIframe_next'))
                {document.getElementById('scwIframe_next').style.left =
                    (e.clientX - deltaX) + 'px';
                 document.getElementById('scwIframe_next').style.top  =
                    (e.clientY - deltaY) + 'px';
                }

             scwStopPropagation_next(e);
            }

         function upHandler_next(e)
            {if (!e) e = window.event;

             if (document.removeEventListener)
                    {document.removeEventListener('mousemove',
                                                  moveHandler_next,
                                                  true);     // Capture phase
                     document.removeEventListener('mouseup',
                                                  upHandler_next,
                                                  true);     // Capture phase
                    }
             else   {elementToDrag.detachEvent('onmouseup',
                                                 upHandler_next); // Bubbling phase
                     elementToDrag.detachEvent('onmousemove',
                                               moveHandler_next); // Bubbling phase
                     elementToDrag.releaseCapture();
                    }

             scwStopPropagation_next(e);
            }
        }

    function scwShowMonth_next(scwBias)
        {// Set the selectable Month and Year
         // May be called: from the left and right arrows
         //                  (shift month -1 and +1 respectively)
         //                from the month selection list
         //                from the year selection list
         //                from the showCal_next routine
         //                  (which initiates the display).

         var scwShowDate_next  = new Date(Date.parse(new Date().toDateString())),
             scwStartDate_next = new Date(),
             scwSaveBackground,
             scwSaveText;

         scwSelYears_next  = document.getElementById('scwYears_net');
         scwSelMonths_next = document.getElementById('scwMonths_next');

         if (scwSelYears_next.options.selectedIndex>-1)
            {scwMonthSum_next=12*(scwSelYears_next.options.selectedIndex)+scwBias;
             if (scwSelMonths_next.options.selectedIndex>-1)
                {scwMonthSum_next+=scwSelMonths_next.options.selectedIndex;}
            }
         else
            {if (scwSelMonths_next.options.selectedIndex>-1)
                {scwMonthSum_next+=scwSelMonths_next.options.selectedIndex;}
            }

         scwShowDate_next.setFullYear(scwBaseYear_next + Math.floor(scwMonthSum_next/12),
                                 (scwMonthSum_next%12),
                                 1);

         // If the Week numbers are displayed, shift the week day names
         // to the right.
         document.getElementById("scwWeek_").style.display=
             (scwWeekNumberDisplay_next)?'block':'none';

         if ((12*parseInt((scwShowDate_next.getFullYear()-scwBaseYear_next),10)) +
             parseInt(scwShowDate_next.getMonth(),10) < (12*scwDropDownYears_next)  &&
             (12*parseInt((scwShowDate_next.getFullYear()-scwBaseYear_next),10)) +
             parseInt(scwShowDate_next.getMonth(),10) > -1)
            {scwSelYears_next.options.selectedIndex=Math.floor(scwMonthSum_next/12);
             scwSelMonths_next.options.selectedIndex=(scwMonthSum_next%12);

             scwCurMonth_next = scwShowDate_next.getMonth();

             scwShowDate_next.setDate((((scwShowDate_next.
                                    getDay()-scwWeekStart_next)<0)?-6:1)+
                                 scwWeekStart_next-scwShowDate_next.getDay());

             scwStartDate_next = new Date(scwShowDate_next);

             var scwFoot_next = document.getElementById('scwFoot_next');

             function scwFootOutput_next()   {scwSetOutput_next(scwDateNow_next);}

             function scwFootOver_next()
                {document.getElementById('scwFoot_next').style.color=
                    scwTodayHighlight_next;
                 document.getElementById('scwFoot_next').style.fontWeight='bold';
                }

             function scwFootOut_next()
                {document.getElementById('scwFoot_next').style.color=scwTodayText_next;
                 document.getElementById('scwFoot_next').style.fontWeight='normal';
                }

             if (scwDisabledDates_next.length==0)
                {if (scwActiveToday_next && scwParmActiveToday_next)
                    {scwFoot_next.onclick     =scwFootOutput_next;
                     scwFoot_next.onmouseover =scwFootOver_next;
                     scwFoot_next.onmouseout  =scwFootOut_next;
                     scwFoot_next.style.cursor=
                         (document.getElementById('scwIframe_next'))
                             ?'hand':'pointer';
                    }
                 else
                    {scwFoot_next.onclick     =null;
                     if (document.addEventListener)
                            {scwFoot_next.addEventListener('click',
                                                      scwStopPropagation_next,
                                                      false);}
                     else   {scwFoot_next.attachEvent('onclick',
                                                 scwStopPropagation_next);}
                     scwFoot_next.onmouseover =null;
                     scwFoot_next.onmouseout  =null;
                     scwFoot_next.style.cursor='default';
                    }
                }
             else
                {for (var k=0;k<scwDisabledDates_next.length;k++)
                    {if (!scwActiveToday_next || !scwParmActiveToday_next ||
                         ((typeof scwDisabledDates_next[k] == 'object')            &&
                             (((scwDisabledDates_next[k].constructor == Date)      &&
                               scwDateNow_next.valueOf() == scwDisabledDates_next[k].
                                                            valueOf()
                              ) ||
                              ((scwDisabledDates_next[k].constructor == Array)     &&
                               scwDateNow_next.valueOf() >= scwDisabledDates_next[k][0].
                                                        valueOf()             &&
                               scwDateNow_next.valueOf() <= scwDisabledDates_next[k][1].
                                                        valueOf()
                              )
                             )
                         )
                        )
                        {scwFoot_next.onclick     =null;
                         if (document.addEventListener)
                                {scwFoot_next.addEventListener('click',
                                                          scwStopPropagation_next,
                                                          false);
                                }
                         else   {scwFoot_next.attachEvent('onclick',
                                                     scwStopPropagation_next);
                                }
                         scwFoot_next.onmouseover =null;
                         scwFoot_next.onmouseout  =null;
                         scwFoot_next.style.cursor='default';
                         break;
                        }
                     else
                        {scwFoot_next.onclick     =scwFootOutput_next;
                         scwFoot_next.onmouseover =scwFootOver_next;
                         scwFoot_next.onmouseout  =scwFootOut_next;
                         scwFoot_next.style.cursor=
                             (document.getElementById('scwIframe_next'))
                                  ?'hand':'pointer';
                        }
                    }
                }

             function scwSetOutput_next(scwOutputDate_next)
                {scwTargetEle_next.value =
                    scwOutputDate_next.scwFormat_next(scwDateOutputFormat_next);
                 scwHide_next();
                }

             function scwCellOutput_next(scwEvt)
                {var scwEle_next = scwEventTrigger_next(scwEvt),
                     scwOutputDate_next = new Date(scwStartDate_next);

                 if (scwEle_next.nodeType==3) scwEle_next=scwEle_next.parentNode;

                 scwOutputDate_next.setDate(scwStartDate_next.getDate() +
                                         parseInt(scwEle_next.id.substr(8),10));

                 scwSetOutput_next(scwOutputDate_next);
                }

             function scwHighlight_next(e)
                {var scwEle_next = scwEventTrigger_next(e);

                 if (scwEle_next.nodeType==3) scwEle_next=scwEle_next.parentNode;

                 scwSaveText        =scwEle_next.style.color;
                 scwSaveBackground  =scwEle_next.style.backgroundColor;

                 scwEle_next.style.color             =scwHighlightText_next;
                 scwEle_next.style.backgroundColor   =scwHighlightBackground_next;

                 return true;
                }

             function scwUnhighlight_next(e)
                {var scwEle_next = scwEventTrigger_next(e);

                 if (scwEle_next.nodeType==3) scwEle_next =scwEle_next.parentNode;

                 scwEle_next.style.backgroundColor   =scwSaveBackground;
                 scwEle_next.style.color             =scwSaveText;

                 return true;
                }

             function scwEventTrigger_next(e)
                {if (!e) e = event;
                 return e.target||e.srcElement;
                }

            function scwWeekNumber_next(scwInDate_next)
                {// The base day in the week of the input date
                 var scwInDateWeekBase_next = new Date(scwInDate_next);

                 scwInDateWeekBase_next.setDate(scwInDateWeekBase_next.getDate()
                                            - scwInDateWeekBase_next.getDay()
                                            + scwWeekNumberBaseDay_next
                                            + ((scwInDate_next.getDay()>
                                                scwWeekNumberBaseDay_next)?7:0));

                 // The first Base Day in the year
                 var scwFirstBaseDay_next = new Date(scwInDateWeekBase_next.getFullYear(),0,1)

                 scwFirstBaseDay_next.setDate(scwFirstBaseDay_next.getDate()
                                            - scwFirstBaseDay_next.getDay()
                                            + scwWeekNumberBaseDay_next
                                        );

                 if (scwFirstBaseDay_next < new Date(scwInDateWeekBase_next.getFullYear(),0,1))
                    {scwFirstBaseDay_next.setDate(scwFirstBaseDay_next.getDate()+7);}

                 // Start of Week 01
                 var scwStartWeekOne_next = new Date(scwFirstBaseDay_next
                                                - scwWeekNumberBaseDay_next
                                                + scwInDate_next.getDay());

                 if (scwStartWeekOne_next > scwFirstBaseDay_next)
                    {scwStartWeekOne_next.setDate(scwStartWeekOne_next.getDate()-7);}

                 // Subtract the date of the current week from the date of the
                 // first week of the year to get the number of weeks in
                 // milliseconds.  Divide by the number of milliseconds
                 // in a week then round to no decimals in order to remove
                 // the effect of daylight saving.  Add one to make the first
                 // week, week 1.  Place a string zero on the front so that
                 // week numbers are zero filled.

                 var scwWeekNo_next = "0" + (Math.round((scwInDateWeekBase_next -
                                                    scwFirstBaseDay_next)/604800000,0) + 1);

                 // Return the last two characters in the week number string

                 return scwWeekNo_next.substring(scwWeekNo_next.length-2,scwWeekNo_next.length);
                }

             // Treewalk to display the dates.
             // I tried to use getElementsByName but IE refused to cooperate
             // so I resorted to this method which works for all tested
             // browsers.

             var scwCells_next = document.getElementById('scwCells_next');

             for (i=0;i<scwCells_next.childNodes.length;i++)
                {var scwRows_next = scwCells_next.childNodes[i];
                 if (scwRows_next.nodeType==1 && scwRows_next.tagName=='TR')
                    {if (scwWeekNumberDisplay_next)
                        {//Calculate the week number using scwShowDate_next
                         scwRows_next.childNodes[0].innerHTML=scwWeekNumber_next(scwShowDate_next);
                         scwRows_next.childNodes[0].style.display='block';
                        }
                     else
                        {scwRows_next.childNodes[0].style.display='none';}

                     for (j=1;j<scwRows_next.childNodes.length;j++)
                        {var scwCols_next = scwRows_next.childNodes[j];
                         if (scwCols_next.nodeType==1 && scwCols_next.tagName=='TD')
                            {scwRows_next.childNodes[j].innerHTML=
                                scwShowDate_next.getDate();
                             var scwCellStyle_next=scwRows_next.childNodes[j].style,
                                 scwDisabled =
                                    (scwOutOfRangeDisable_next &&
                                     (scwShowDate_next < (new Date(scwBaseYear_next,0,1))
                                      ||
                                      scwShowDate_next > (new Date(scwBaseYear_next+
                                                              scwDropDownYears_next-
                                                              1,11,31))
                                     )
                                    )?true:false;

                             for (var k=0;k<scwDisabledDates_next.length;k++)
                                {if ((typeof scwDisabledDates_next[k]=='object')
                                     &&
                                     (scwDisabledDates_next[k].constructor ==
                                      Date
                                     )
                                     &&
                                     scwShowDate_next.valueOf() ==
                                        scwDisabledDates_next[k].valueOf()
                                    )
                                    {scwDisabled = true;}
                                 else
                                    {if ((typeof scwDisabledDates_next[k]=='object')
                                         &&
                                         (scwDisabledDates_next[k].constructor ==
                                          Array
                                         )
                                         &&
                                         scwShowDate_next.valueOf() >=
                                             scwDisabledDates_next[k][0].valueOf()
                                         &&
                                         scwShowDate_next.valueOf() <=
                                             scwDisabledDates_next[k][1].valueOf()
                                        )
                                        {scwDisabled = true;}
                                    }
                                }

                             if (scwDisabled ||
                                 !scwEnabledDay_next[j-1+(7*((i*scwCells_next.
                                                          childNodes.
                                                          length)/6))] ||
                                 !scwPassEnabledDay_next[(j-1+(7*(i*scwCells_next.
                                                               childNodes.
                                                               length/6)))%7]
                                )
                                {scwRows_next.childNodes[j].onclick     =null;
                                 scwRows_next.childNodes[j].onmouseover =null;
                                 scwRows_next.childNodes[j].onmouseout  =null;
                                 scwRows_next.childNodes[j].style.cursor='default';

                                 if (scwShowDate_next.getMonth()!=scwCurMonth_next)
                                    {scwCellStyle_next.color=scwDisabledExMonthText_next;
                                     scwCellStyle_next.backgroundColor=
                                         scwDisabledExMonthBackground_next;
                                    }
                                 else if (scwBlnFullInputDate_next &&
                                          scwShowDate_next.toDateString()==
                                          scwSeedDate_next.toDateString())
                                    {scwCellStyle_next.color=scwDisabledInDateText_next;
                                     scwCellStyle_next.backgroundColor=
                                         scwDisabledInDateBackground_next;
                                    }
                                 else if (scwShowDate_next.getDay()%6==0)
                                    {scwCellStyle_next.color=scwDisabledWeekendText_next;
                                     scwCellStyle_next.backgroundColor=
                                         scwDisabledWeekendBackground_next;
                                    }
                                 else
                                    {scwCellStyle_next.color=scwDisabledCellText_next;
                                     scwCellStyle_next.backgroundColor=
                                         scwDisabledCellBackground_next;
                                    }
                                }
                             else
                                {scwRows_next.childNodes[j].onclick      =
                                    scwCellOutput_next;
                                 scwRows_next.childNodes[j].onmouseover  =
                                    scwHighlight_next;
                                 scwRows_next.childNodes[j].onmouseout   =
                                    scwUnhighlight_next;
                                 scwRows_next.childNodes[j].style.cursor =
                                    (document.getElementById('scwIframe_next'))
                                        ?'hand':'pointer';

                                 if (scwShowDate_next.getMonth()!=scwCurMonth_next)
                                    {scwCellStyle_next.color=scwExMonthText_next;
                                     scwCellStyle_next.backgroundColor=
                                         scwExMonthBackground_next;
                                    }
                                 else if (scwBlnFullInputDate_next &&
                                          scwShowDate_next.toDateString()==
                                          scwSeedDate_next.toDateString())
                                    {scwCellStyle_next.color=scwInDateText_next;
                                     scwCellStyle_next.backgroundColor=
                                         scwInDateBackground_next;
                                    }
                                 else if (scwShowDate_next.getDay()%6==0)
                                    {scwCellStyle_next.color=scwWeekendText_next;
                                     scwCellStyle_next.backgroundColor=
                                         scwWeekendBackground_next;
                                    }
                                 else
                                    {scwCellStyle_next.color=scwCellText_next;
                                     scwCellStyle_next.backgroundColor=
                                         scwCellBackground_next;
                                    }
                                }

                             scwShowDate_next.setDate(scwShowDate_next.getDate()+1);
                            }
                        }
                    }
                }
            }
        }

// *************************
//  End of Function Library
// *************************
// ***************************
// Start of Calendar structure
// ***************************

    document.write(
     "<!--[if IE]>" +
        "<iframe class='scw_next' src='scwblank.html' " +
                "id='scwIframe_next' name='scwIframe_next' " +
                "frameborder='0'>" +
        "</iframe>" +
     "<![endif]-->" +
     "<table id='scw_next' class='scw_next' onclick='scwCancel_next(event);'>" +
       "<tr class='scw_next'>" +
         "<td class='scw_next'>" +
           "<table class='scwHead_next' align='right' id='scwHead_next' width='100%' " +
                    "onClick='scwStopPropagation_next(event);' " +
                    "cellspacing='0' cellpadding='0'>" +
            "<tr id='scwDrag_next' style='display:none;'>" +
                "<td colspan='4' class='scwDrag_next' " +
                    "onmousedown='scwBeginDrag_next(event);'>" +
                    scwDrag_next +
                "</td>" +
            "</tr>" +
            "<tr class='scwHead_next'>" +
                 "<td class='scwHead_next'>" +
                    "<input class='scwHead_next' type='button' value='<' " +
                            "onclick='scwShowMonth_next(-1);'  /></td>" +
                 "<td class='scwHead_next'>" +
                    "<select id='scwMonths_next' class='scwHead_next' " +
                            "onChange='scwShowMonth_next(0);'>");

    for (i=0;i<scwArrMonthNames_next.length;i++)
        document.write(   "<option>" + scwArrMonthNames_next[i] + "</option>");

    document.write("   </select>" +
                 "</td>" +
                 "<td class='scwHead_next'>" +
                    "<select id='scwYears_net' class='scwHead_next' " +
                            "onChange='scwShowMonth_next(0);'>");

    for (i=0;i<scwDropDownYears_next;i++)
        document.write(   "<option>" + (scwBaseYear_next+i) + "</option>");

    document.write(   "</select>" +
                 "</td>" +
                 "<td class='scwHead_next'>" +
                    "<input class='scwHead_next' type='button' value='>' " +
                            "onclick='scwShowMonth_next(1);' /></td>" +
                "</tr>" +
              "</table>" +
            "</td>" +
          "</tr>" +
          "<tr class='scw_next'>" +
            "<td class='scw_next'>" +
              "<table class='scwCells_next' align='center'>" +
                "<thead>" +
                  "<tr>");

    for (i=0;i<scwArrWeekInits_next.length;i++)
	
        document.write( "<td class='scwWeek_next' id='scwWeekInit" + i + "'>" +
                          scwArrWeekInits_next[(i+scwWeekStart_next)%
                                            scwArrWeekInits_next.length] +
                        "</td>");

    document.write("</tr>" +
                "</thead>" +
                "<tbody id='scwCells_next' " +
                        "onClick='scwStopPropagation_next(event);'>");

    for (i=0;i<6;i++)
        {document.write(
                    "<tr>" +
                      "<td class='scwWeekNo_next' id='scwWeek_" + i + "'></td>");
         for (j=0;j<7;j++)
            {document.write(
                        "<td class='scwCells_next' id='scwCell_" + (j+(i*7)) +
                        "'></td>");
            }

         document.write(
                    "</tr>");
        }

    document.write(
                "</tbody>");

    if ((new Date(scwBaseYear_next + scwDropDownYears_next, 11, 32)) > scwDateNow_next &&
        (new Date(scwBaseYear_next, 0, 0))                      < scwDateNow_next)
        {document.write(
                  "<tfoot class='scwFoot_next'>" +
                    "<tr class='scwFoot_next'>" +
                      "<td class='scwFoot_next' id='scwFoot_next' colspan='8'>" +
                        scwToday_next + " " +
                        scwDateNow_next.scwFormat_next(scwDateDisplayFormat_next) +
                      "</td>" +
                    "</tr>" +
                  "</tfoot>");
        }

    document.write(
              "</table>" +
            "</td>" +
          "</tr>" +
        "</table>");

// ***************************
//  End of Calendar structure
// ***************************
// ****************************************
// Start of document level event definition
// ****************************************

    if (document.addEventListener)
            {document.addEventListener('click',scwHide_next, false);}
    else    {document.attachEvent('onclick',scwHide_next);}

// ****************************************
//  End of document level event definition
// ****************************************
// ************************************
//  End of Simple Calendar Widget Code
// ************************************