function writeHead($extraHeaders = "")
{
    ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- jQuery -->
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<!-- Extra Headers -->
<?php 
    echo $extraHeaders;
    ?>
<!-- Screen Stylesheets -->
<link href="css/reset.css"  rel="stylesheet" type="text/css" media="screen" />
<link href="css/screen.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<div id="error"></div>
<div id="container">
  <div id="header">
    <!-- End #logo -->
    <div id="decoration"></div>
    <!-- End #decoration -->
  </div>
  <!-- End #header -->
  <div id="menu">
    <div class="primairy">
      <ul><li>
      <a href="<?php 
    echo serviceref('Ops');
    ?>
" TITLE="Toon alle Ops" class="menuItem">
        Ops
      </a>
      <a href="<?php 
    echo serviceref('Sessions');
    ?>
" TITLE="Toon alle Sessions" class="menuItem">
        Sessions
      </a>
    <?php 
    if (isset($_SESSION["home"])) {
        //$_SESSION["home"] can be set by the parent CONTEXT application like Meterkast is in the relation with Atlas
        echo '<a HREF="' . $_SESSION["home"] . '" TITLE="Back to main page" class="menuItem" >
      Back to main page
      </a>';
    }
    ?>
      </li></ul>
    </div>
    <!-- End .primairy -->
  </div>
  <!-- End #menu -->
  <div id="content">
<?php 
}
    <?php 
    if ($edit) {
        echo '</FORM>';
    }
    if ($del) {
        echo "<P><I>Delete failed</I></P>";
    }
    if ($edit) {
        if ($new) {
            $buttons .= ifaceButton("JavaScript:save('" . serviceref($_REQUEST['content']) . "&save=1',document.forms[0].ID.value);", "Save");
        } else {
            $buttons .= ifaceButton("JavaScript:save('" . serviceref($_REQUEST['content']) . "&save=1','" . urlencode($Gebruiker->getId()) . "');", "Save");
            $buttons .= ifaceButton(serviceref($_REQUEST['content'], array('Gebruiker' => urlencode($Gebruiker->getId()))), "Cancel");
        }
    } else {
        ifaceButton(serviceref($_REQUEST['content'], array('Gebruiker' => urlencode($Gebruiker->getId()), 'edit' => 1)), "Edit");
        ifaceButton(serviceref($_REQUEST['content'], array('Gebruiker' => urlencode($Gebruiker->getId()), 'del' => 1)), "Delete");
    }
} else {
    if ($del) {
        writeHead("<TITLE>Delete geslaagd</TITLE>");
        echo 'The Gebruiker is deleted';
    } else {
        // deze pagina zou onbereikbaar moeten zijn
        writeHead("<TITLE>No Gebruiker object selected - Meterkast - ADL Prototype</TITLE>");
        ?>
<i>No Gebruiker object selected</i><?php 
    }
    $buttons .= ifaceButton($_SERVER['PHP_SELF'] . "?new=1", "New");
}
writeTail($buttons);
    $v0 = display('UserRule', 'display', $idv0);
    echo '
            <LI CLASS="item UI" ID="0.' . $i0 . '">';
    if (!$edit) {
        echo '
              <A HREF="' . serviceref('UserRule', array('UserRule' => urlencode($idv0))) . '">' . htmlspecialchars($v0) . '</A>';
    } else {
        echo htmlspecialchars($v0);
    }
    echo '</LI>';
}
if ($edit) {
    echo '
            <LI CLASS="new UI" ID="0.' . count($Regellijst) . '">new Regellijst</LI>';
}
echo '
          </UL>';
?>
 
      </DIV>
    </DIV>
    <?php 
if ($edit) {
    echo '</FORM>';
}
if (!$edit) {
    $buttons = $buttons;
} else {
    $buttons .= ifaceButton("JavaScript:save('" . serviceref($_REQUEST['content']) . "&save=1');", "Save") . ifaceButton(serviceref($_REQUEST['content']), "Cancel");
}
writeTail($buttons);
 
      </DIV>
    </DIV>
    <?php 
    if ($edit) {
        echo '</FORM>';
    }
    if ($del) {
        echo "<P><I>Delete failed</I></P>";
    }
    if ($edit) {
        if ($new) {
            $buttons .= ifaceButton("JavaScript:save('" . serviceref($_REQUEST['content']) . "&save=1',document.forms[0].ID.value);", "Save");
        } else {
            $buttons .= ifaceButton("JavaScript:save('" . serviceref($_REQUEST['content']) . "&save=1','" . urlencode($Relatiedetails->getId()) . "');", "Save");
            $buttons .= ifaceButton(serviceref($_REQUEST['content'], array('Relatiedetails' => urlencode($Relatiedetails->getId()))), "Cancel");
        }
    } else {
        $buttons = $buttons;
        $buttons = $buttons;
    }
} else {
    if ($del) {
        writeHead("<TITLE>Delete geslaagd</TITLE>");
        echo 'The Relatiedetails is deleted';
    } else {
        // deze pagina zou onbereikbaar moeten zijn
        writeHead("<TITLE>No Relatiedetails object selected - Atlas - ADL Prototype</TITLE>");
        ?>
<i>No Relatiedetails object selected</i><?php 
    }
    echo '<IMG src="' . $Conceptueeldiagram . '"/>';
    ?>
 
    <?php 
    if ($edit) {
        echo '</FORM>';
    }
    if ($del) {
        echo "<P><I>Delete failed</I></P>";
    }
    if ($edit) {
        if ($new) {
            $buttons .= ifaceButton("JavaScript:save('" . serviceref($_REQUEST['content']) . "&save=1',document.forms[0].ID.value);", "Save");
        } else {
            $buttons .= ifaceButton("JavaScript:save('" . serviceref($_REQUEST['content']) . "&save=1','" . urlencode($Pattern->getId()) . "');", "Save");
            $buttons .= ifaceButton(serviceref($_REQUEST['content'], array('Pattern' => urlencode($Pattern->getId()))), "Cancel");
        }
    } else {
        $buttons = $buttons;
        $buttons = $buttons;
    }
} else {
    if ($del) {
        writeHead("<TITLE>Delete geslaagd</TITLE>");
        echo 'The Pattern is deleted';
    } else {
        // deze pagina zou onbereikbaar moeten zijn
        writeHead("<TITLE>No Pattern object selected - Atlas - ADL Prototype</TITLE>");
        ?>
<i>No Pattern object selected</i><?php 
    }
 
      </DIV>
    </DIV>
    <?php 
    if ($edit) {
        echo '</FORM>';
    }
    if ($del) {
        echo "<P><I>Delete failed</I></P>";
    }
    if ($edit) {
        if ($new) {
            $buttons .= ifaceButton("JavaScript:save('" . serviceref($_REQUEST['content']) . "&save=1',document.forms[0].ID.value);", "Save");
        } else {
            $buttons .= ifaceButton("JavaScript:save('" . serviceref($_REQUEST['content']) . "&save=1','" . urlencode($Signal->getId()) . "');", "Save");
            $buttons .= ifaceButton(serviceref($_REQUEST['content'], array('Signal' => urlencode($Signal->getId()))), "Cancel");
        }
    } else {
        $buttons = $buttons;
        $buttons = $buttons;
    }
} else {
    if ($del) {
        writeHead("<TITLE>Delete geslaagd</TITLE>");
        echo 'The Signal is deleted';
    } else {
        // deze pagina zou onbereikbaar moeten zijn
        writeHead("<TITLE>No Signal object selected - Atlas - ADL Prototype</TITLE>");
        ?>
<i>No Signal object selected</i><?php 
    }
 
      </DIV>
    </DIV>
    <?php 
    if ($edit) {
        echo '</FORM>';
    }
    if ($del) {
        echo "<P><I>Delete failed</I></P>";
    }
    if ($edit) {
        if ($new) {
            $buttons .= ifaceButton("JavaScript:save('" . serviceref($_REQUEST['content']) . "&save=1',document.forms[0].ID.value);", "Save");
        } else {
            $buttons .= ifaceButton("JavaScript:save('" . serviceref($_REQUEST['content']) . "&save=1','" . urlencode($Rule3->getId()) . "');", "Save");
            $buttons .= ifaceButton(serviceref($_REQUEST['content'], array('Rule3' => urlencode($Rule3->getId()))), "Cancel");
        }
    } else {
        $buttons = $buttons;
        $buttons = $buttons;
    }
} else {
    if ($del) {
        writeHead("<TITLE>Delete geslaagd</TITLE>");
        echo 'The Rule3 is deleted';
    } else {
        // deze pagina zou onbereikbaar moeten zijn
        writeHead("<TITLE>No Rule3 object selected - Atlas - ADL Prototype</TITLE>");
        ?>
<i>No Rule3 object selected</i><?php 
    }
 
      </DIV>
    </DIV>
    <?php 
    if ($edit) {
        echo '</FORM>';
    }
    if ($del) {
        echo "<P><I>Delete failed</I></P>";
    }
    if ($edit) {
        if ($new) {
            $buttons .= ifaceButton("JavaScript:save('" . serviceref($_REQUEST['content']) . "&save=1',document.forms[0].ID.value);", "Save");
        } else {
            $buttons .= ifaceButton("JavaScript:save('" . serviceref($_REQUEST['content']) . "&save=1','" . urlencode($Populatie->getId()) . "');", "Save");
            $buttons .= ifaceButton(serviceref($_REQUEST['content'], array('Populatie' => urlencode($Populatie->getId()))), "Cancel");
        }
    } else {
        $buttons = $buttons;
        $buttons = $buttons;
    }
} else {
    if ($del) {
        writeHead("<TITLE>Delete geslaagd</TITLE>");
        echo 'The Populatie is deleted';
    } else {
        // deze pagina zou onbereikbaar moeten zijn
        writeHead("<TITLE>No Populatie object selected - Atlas - ADL Prototype</TITLE>");
        ?>
<i>No Populatie object selected</i><?php 
    }
    <?php 
    if ($edit) {
        echo '</FORM>';
    }
    if ($del) {
        echo "<P><I>Delete failed</I></P>";
    }
    if ($edit) {
        if ($new) {
            $buttons .= ifaceButton("JavaScript:save('" . serviceref($_REQUEST['content']) . "&save=1',document.forms[0].ID.value);", "Save");
        } else {
            $buttons .= ifaceButton("JavaScript:save('" . serviceref($_REQUEST['content']) . "&save=1','" . urlencode($Actie->getId()) . "');", "Save");
            $buttons .= ifaceButton(serviceref($_REQUEST['content'], array('Actie' => urlencode($Actie->getId()))), "Cancel");
        }
    } else {
        ifaceButton(serviceref($_REQUEST['content'], array('Actie' => urlencode($Actie->getId()), 'edit' => 1)), "Edit");
        ifaceButton(serviceref($_REQUEST['content'], array('Actie' => urlencode($Actie->getId()), 'del' => 1)), "Delete");
    }
} else {
    if ($del) {
        writeHead("<TITLE>Delete geslaagd</TITLE>");
        echo 'The Actie is deleted';
    } else {
        // deze pagina zou onbereikbaar moeten zijn
        writeHead("<TITLE>No Actie object selected - Meterkast - ADL Prototype</TITLE>");
        ?>
<i>No Actie object selected</i><?php 
    }
    $buttons .= ifaceButton($_SERVER['PHP_SELF'] . "?new=1", "New");
}
writeTail($buttons);
    <?php 
    if ($edit) {
        echo '</FORM>';
    }
    if ($del) {
        echo "<P><I>Delete failed</I></P>";
    }
    if ($edit) {
        if ($new) {
            $buttons .= ifaceButton("JavaScript:save('" . serviceref($_REQUEST['content']) . "&save=1',document.forms[0].ID.value);", "Save");
        } else {
            $buttons .= ifaceButton("JavaScript:save('" . serviceref($_REQUEST['content']) . "&save=1','" . urlencode($Bestand->getId()) . "');", "Save");
            $buttons .= ifaceButton(serviceref($_REQUEST['content'], array('Bestand' => urlencode($Bestand->getId()))), "Cancel");
        }
    } else {
        ifaceButton(serviceref($_REQUEST['content'], array('Bestand' => urlencode($Bestand->getId()), 'edit' => 1)), "Edit");
        ifaceButton(serviceref($_REQUEST['content'], array('Bestand' => urlencode($Bestand->getId()), 'del' => 1)), "Delete");
    }
} else {
    if ($del) {
        writeHead("<TITLE>Delete geslaagd</TITLE>");
        echo 'The Bestand is deleted';
    } else {
        // deze pagina zou onbereikbaar moeten zijn
        writeHead("<TITLE>No Bestand object selected - Meterkast - ADL Prototype</TITLE>");
        ?>
<i>No Bestand object selected</i><?php 
    }
    $buttons .= ifaceButton($_SERVER['PHP_SELF'] . "?new=1", "New");
}
writeTail($buttons);
    <?php 
    if ($edit) {
        echo '</FORM>';
    }
    if ($del) {
        echo "<P><I>Delete failed</I></P>";
    }
    if ($edit) {
        if ($new) {
            $buttons .= ifaceButton("JavaScript:save('" . serviceref($_REQUEST['content']) . "&save=1',document.forms[0].ID.value);", "Save");
        } else {
            $buttons .= ifaceButton("JavaScript:save('" . serviceref($_REQUEST['content']) . "&save=1','" . urlencode($Session->getId()) . "');", "Save");
            $buttons .= ifaceButton(serviceref($_REQUEST['content'], array('Session' => urlencode($Session->getId()))), "Cancel");
        }
    } else {
        ifaceButton(serviceref($_REQUEST['content'], array('Session' => urlencode($Session->getId()), 'edit' => 1)), "Edit");
        ifaceButton(serviceref($_REQUEST['content'], array('Session' => urlencode($Session->getId()), 'del' => 1)), "Delete");
    }
} else {
    if ($del) {
        writeHead("<TITLE>Delete geslaagd</TITLE>");
        echo 'The Session is deleted';
    } else {
        // deze pagina zou onbereikbaar moeten zijn
        writeHead("<TITLE>No Session object selected - Meterkast - ADL Prototype</TITLE>");
        ?>
<i>No Session object selected</i><?php 
    }
    $buttons .= ifaceButton($_SERVER['PHP_SELF'] . "?new=1", "New");
}
writeTail($buttons);
    echo '<IMG src="' . $Conceptueeldiagram . '"/>';
    ?>
 
    <?php 
    if ($edit) {
        echo '</FORM>';
    }
    if ($del) {
        echo "<P><I>Delete failed</I></P>";
    }
    if ($edit) {
        if ($new) {
            $buttons .= ifaceButton("JavaScript:save('" . serviceref($_REQUEST['content']) . "&save=1',document.forms[0].ID.value);", "Save");
        } else {
            $buttons .= ifaceButton("JavaScript:save('" . serviceref($_REQUEST['content']) . "&save=1','" . urlencode($Concept->getId()) . "');", "Save");
            $buttons .= ifaceButton(serviceref($_REQUEST['content'], array('Concept' => urlencode($Concept->getId()))), "Cancel");
        }
    } else {
        $buttons = $buttons;
        $buttons = $buttons;
    }
} else {
    if ($del) {
        writeHead("<TITLE>Delete geslaagd</TITLE>");
        echo 'The Concept is deleted';
    } else {
        // deze pagina zou onbereikbaar moeten zijn
        writeHead("<TITLE>No Concept object selected - Atlas - ADL Prototype</TITLE>");
        ?>
<i>No Concept object selected</i><?php 
    }