set first month if day is before the 15th and after the 15 add 20days to it
<pre><code>function setCardDate2(){
    var ct_min_days;
    if (doc.findItem('stop_date').value.substring(3, 5 / 1) &gt;= 15)
        ct_min_days = "20";
    else 
        ct_min_days = "1";
    doc.findItem('card_date').value =
            doc.calcCardDate(doc.getDefault("ct_min_days"), "b_holidays", "6,5,4,3,2,1,0"); // Set a Saturday
    var myDays = ["7", "1", "2", "3", "4", "5", "6"];                                                                            
    var curctdate = doc.findItem('card_date').value;
    var theDate = new Date(curctdate);                                                                                                        
    var ct_dow = myDays[theDate.getDay()];                                                                                            
    var ct_date_year = curctdate.substring(6);                                                                          
    var ct_date_month = curctdate.substring(0, 2);
    var ct_date_day = curctdate.substring(3, 5);

    var firstSaturday = (ct_date_day * 1) % 7;                                                                              
    if (ct_date_day &lt;= firstSaturday) {
        ct_date_day = firstSaturday;
        doc.findItem('card_date').value = ct_date_month + "/" + ct_date_day + "/" + ct_date_year;
    } else {                                                                                                                                                                                                  // Force it to the NEXT month
        var xtra = (DaysInMonth(ct_date_month, ct_date_year)) / 1 - ct_date_day;
        if (xtra &gt;= 21)
            xtra = 28;
        else if (xtra &gt;= 14)
            xtra = 21;
        else if (xtra &gt;= 7)
            xtra = 14;
        else
            xtra = 7;
        doc.findItem('card_date').value = doc.calccardDate(((doc.getDefault("ct_min_days") * 1) + xtra), "card_holidays", "6,5,4,3,2,1,0");
        }
    }
</code></pre>

<p>/// I am to get the value of the var in my doc.calcCardDate, but it does not seem to be adding it. Also the getDefault refers to a file that has card holidays in it.  Can someone help me or point me in the right direction </p>
