// JScript File

function OnLoad()
{
   FolderListLoad();
   CheckboxClicked();
   return;
}  //OnLoad


function FolderListLoad()
{
   var   wFolder;
   var   szTableHtml="";
   for (wFolder= 0; wFolder < wNumCheckedFolders; wFolder++)
   {
      szTableHtml += "<table id=\"FolderTable\" cellspacing=0 cellpadding=2> ";
      szTableHtml += "<tr> ";
      szTableHtml += "<td valign=\"top\" nowrap=\"nowrap\" > ";
      szTableHtml += "<input type=checkbox name=FolderCheckbox onclick=\"CheckboxClicked()\" ";
      szTableHtml += "value=\"" + aszCheckedFolderName[wFolder] + "\" checked>";
      szTableHtml += "</td>";
      szTableHtml += "<td><b>" + aszCheckedFolderName[wFolder] + " </b></td>";
      szTableHtml += "</tr>";

      szTableHtml += "<tr>";
      szTableHtml += "<td> </td>";
      szTableHtml += "<td>" + "Network Path: " + aszCheckedNetPath[wFolder] + " </td>";
      szTableHtml += "</tr>";

      szTableHtml += "<tr>";
      szTableHtml += "<td> </td>";
      szTableHtml += "<td>" + "Creator: " + aszCheckedUserName[wFolder] + " </td>";
      szTableHtml += "</tr>";

      szTableHtml += "</table> ";
   }  //for

   FolderTableDiv.innerHTML= szTableHtml;
   return;
}  //FolderListLoad


function CheckboxClicked()
{
   wNumChecked= 0;
   CheckedFolderString= "";
   var FolderCheckboxList= document.getElementsByName("FolderCheckbox");
   for (i=0; i < FolderCheckboxList.length; i++)
   {
      if (FolderCheckboxList[i].checked)
      {
         wNumChecked++;
         CheckedFolderString += FolderCheckboxList[i].value + ",";
      }
   }
   //document.getElementById("FoldersChecked").value= "NumberOfChecked=" + wNumChecked;
   document.getElementById("FoldersChecked").value= CheckedFolderString;
   return;
}  //CheckboxClicked


function whichButton(event)
{
   if((event.srcElement.id != "ButtonBack")&&(event.srcElement.id != "ButtonCancel"))
   {
      if(event.srcElement.id == "ButtonNext")
      {
         var FolderCheckboxList= document.getElementsByName("FolderCheckbox");
         document.getElementById("FoldersChecked").value= "next37";
      }

      if(event.keyCode==13)
      {
         document.getElementById("ButtonNext").focus();
         return false;
      }
   }
}  //whichButton
//Last line.