
 function Page_Create(elmParent)
  {
   elmParent.innerHTML = '<form method="POST" action="/template_create.html"><input type="text" name="txtPage" /><br /><input type="submit" value="Opslaan"></form>';

   return true;
  }

  function Page_Operation(strOperation, intID, elmParent)
   {
    var strHTML = "";

    if (strOperation == "Delete")
     {
      if (!confirm("Object verwijderen?"))
       {
        return false;
       }
     }
    else
     {
      if (!confirm("Object verplaatsen?"))
       {
        return false;
       }
     }

    strHTML = '<form id="frmOperation" method="POST" action="/template_alter.html">';
    strHTML += '<input type="hidden" name="intID" value="' + intID.toString() + '">';

    switch (strOperation)
     {
      case "Up":
       strHTML += '<input type="hidden" name="strOperation" value="Move"><input type="hidden" name="blnDirection_Up" value="true">';
       break;

      case "Down":
       strHTML += '<input type="hidden" name="strOperation" value="Move"><input type="hidden" name="blnDirection_Up" value="false">';
       break;

      case "Delete":
       strHTML += '<input type="hidden" name="strOperation" value="Delete">';
       break;
     }

    strHTML += '</form>';

    elmParent.innerHTML = strHTML;

    document.getElementById("frmOperation").submit();
   }

 function Image(intID)
  {
   objWindow = window.open(
                           './module/partnerkracht/client/graphics/content/' + intID + '_original.jpg',
                           'wndImage',
                           'height=600, width=750, scrollbars=yes, toolbar=no, statusbar=no, locationbar=no, top=' + ((screen.height / 2) - 370) + ', left='  + ((screen.width / 2) - 300)
                          );
  }


 function Subject_Selected()
  {
   var aryelmSubject = document.getElementsByTagName("input");
   
   for (var intIndex = 0; intIndex < aryelmSubject.length; intIndex++)
    {
     if (aryelmSubject[intIndex].name == "chkSubject[]")
      {
       if (aryelmSubject[intIndex].checked == true)
        {
         return true;
        }
      }
    }

   return false;
  }

 function Collapse(elmButton_Parent, intID)
  {
   var elmRow_Content = document.getElementById("trRow_" + intID.toString() + "_Content");
   var elmRow_Button  = document.getElementById("trRow_" + intID.toString() + "_Button");

   if (elmButton_Parent.src.indexOf("_up") > 0)
    {
     elmRow_Content.style.display = "none";
     elmRow_Button.style.display  = "none";

     elmButton_Parent.src = elmButton_Parent.src.replace("_up", "_down");
    }
   else
    {
     elmRow_Content.style.display = "block";
     elmRow_Button.style.display  = "block";

     elmButton_Parent.src = elmButton_Parent.src.replace("_down", "_up");
    }
  }
