


// -------------------------   Calculation of the next Black Belt Test ------------------

        <!-- Hide from JavaScript-Impaired Browsers
        function displayblackdate() {

           var isnMonths=new Array("January","February","March","April","May","June","July","August","September","October","November","December","January","February");

           var testmonth=new Array(1,1,4,4,4,7,7,7,10,10,10,1,1,1);
  
           today=new Date();      //       document.write(today+"   today<br>");
            
           ty=today.getYear();             //           document.write(ty + "<br>");
           if (ty < 10) ty=ty+2000;        //           (y2k check)
           if (ty < 2000) ty=ty+1900;      //           (y2k check)

           var testyear=new Array(ty, ty, ty, ty, ty, ty, ty, ty, ty, ty, ty, ty + 1, ty + 1, ty + 1);  // document.write(testyear[11] + "<br>");  
  
           m = isnMonths[today.getMonth()];

           mm = testmonth[today.getMonth()];  //       finding the next test month
                                              //       document.write(mm +"<br>");  
                                              //       document.write(isnMonths[mm] +"<br>");

           ll = 12 * 60 * 60 * 1000;
		   
           var c = 1;

           colortestdate = new Date(isnMonths[mm] + c+", "+ testyear[mm]);    //   document.write(colortestdate+"   colortestdate<br>");

           while ( c < 8 ) 
                 {  colortestdate = new Date(isnMonths[mm] + c+", "+ testyear[mm]);  

                    cc = colortestdate.getDay(c);     
                                         //     document.write(c +"   "+ cc +"   "+colortestdate+" loop<br>");
                    colortestdate.setTime(colortestdate.getTime() + ll);
                                         //   document.write(colortestdate+"   colortestdate loop<br>");                                                     

                    if (cc == 6)  { if (colortestdate <= today) { mm = mm + 3; c = 1; }
                                                                       //  document.write(mm +"   "+ c +"    loop2<br>");
                                       else { document.write("Upcoming Black Belt Test: "+isnMonths[mm]+" "+c+", "+testyear[mm]+"<br>"); 
                                              c = 8; 
                                              }
                                    }  
                 c++;
               }              


      
 

        }
        // End Hiding -->


