<?cs include:"super_util.cs" ?>


<?cs def:print_course_list() ?> 
   <div class="dtree">
   <h4><a href="javascript: d.openAll();" title="<?cs var:lang.super_course_search.open_all ?>"><?cs var:lang.super_course_search.open_all ?></a> | <a href="javascript: d.closeAll();" title="<?cs var:lang.super_course_search.close_all ?>"><?cs var:lang.super_course_search.close_all ?></a> | <a href="javascript:checkAll(document.forms[0].course_list)" > <?cs var:lang.super_course_search.check_all ?></a> | <a href="javascript:uncheckAll(document.forms[0].course_list)"> <?cs var:lang.super_course_search.uncheck_all ?></a> </h4>

   <script type="text/javascript">
     d = new dTree('d');
     d.add(0, -1, '<?cs var:lang.survey_deliver_course_list.page_title ?>');

     <?cs if:normal_count ?>
            d.add(1, 0, '<?cs var:normal_count ?> <?cs var:lang.super_course_search.num_central_courses ?>');
     <?cs /if ?>
     <?cs if:std_count ?>

             d.add(2, 0,'<?cs var:std_count ?> <?cs var:lang.super_course_search.num_std_courses ?>');
     <?cs /if ?>
     <?cs if:temp_count ?>
            d.add(3, 0, '<?cs var:temp_count ?> <?cs var:lang.super_course_search.num_temp_courses ?>');
     <?cs /if ?>
     <?cs each:mynode = node ?>
       d.add(<?cs var:mynode ?>);
     <?cs /each ?>
   document.write(d);
   d.openAll();
  </script>
</div>
<?cs /def ?>






<?cs call:html_header() ?>
   <head>
      <title><?cs var:lang.survey_deliver_course_list.page_title ?></title>

   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
   <link rel="StyleSheet" href="<?cs var:image_path ?>dtree.css" type="text/css"  />
   <link rel="StyleSheet" href="<?cs var:image_path ?>common.css" type="text/css"  />
   <script type="text/javascript" src="<?cs var:image_path ?>form_validation.js"></script>

 <?cs if:number_matches > 0 ?> 
   <base href="<?cs var:server_name ?><?cs var:image_path ?>index.html" />
   <script type="text/javascript" src="<?cs var:image_path ?>dtree.js"></script>
  <script type="text/javascript">
   function validate_course_selection()
   {
      var true_test = 0;

      var obj = document.forms[0].course_list;
      if(obj.checked)
          true_test = 1;

      else
      {
             if(obj.length >0)
             {
                 for(i =0; i<obj.length; i++)
                 {
                    if(obj[i].checked)
                       true_test = 1;

                 }
             }
      }
      if(true_test == 0)
      {
             window.alert('<?cs var:lang.survey_deliver_course_list.no_courses_selected  ?>');
             return false;
      }
      else
      {
         var win = window.confirm('<?cs var:lang.survey_deliver_course_list.confirm ?>');
         if(win)
           return  true;
         else 
           return  false;
      }
   }
  </script>
 <?cs /if ?>

  </head>

<body>
<div>
   <a href="javascript:history.back()" title="<?cs var:lang.survey_deliver_course_list.goback ?>">
    <img src="<?cs var:image_path ?>back_arrow.gif" width="50" height="34" alt="<?cs var:lang.survey_deliver_course_list.back_button_title ?>" />
   </a>
</div>
 <div style="margin-left: 50px; padding:12px">
  <?cs call:print_super_search_criteria() ?>
 <?cs if:number_matches > 0 ?> 
  <div class="instructions"><br /><?cs var:lang.survey_deliver_course_list.steps ?><br /></div>
 <fieldset style="width:85%">
  <div>
  <form  method="post" action="<?cs var:server_name ?>/<?cs var:bin_alias ?>/survey_deliver" onsubmit="return validate_course_selection()" >
  <div>
   <input type="hidden" name="id" value="<?cs var:id ?>" />
   <input type="hidden" name="admin" value="1" />
   <input type="hidden" name="count" value="<?cs var:count ?>" />
  </div>
   <?cs call:print_course_list() ?> 
   <div class="center_msg">
   <input type="submit" value="<?cs var:lang.survey_deliver_course_list.submit ?>" title="<?cs var:lang.survey_deliver_course_list.submit ?>" />
  </div>
  </form>
 </div>
  </fieldset>
  <?cs /if ?>
 </div>
</body>
</html>
<?cs call:runtime() ?>
