<link rel="stylesheet" type="text/css" href="../../codebase/dhtmlxlayout.css">
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxlayout_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxlayout.js"></script>
<script src="../../codebase/dhtmlxcontainer.js"></script>
<div id="parentId" style="position: relative; top: 20px; left: 20px; width: 600px; height: 400px; aborder: #B5CDE4 1px solid;"></div>
<div id="log" style="position: relative; margin-top: 40px; margin-left: 20px; width: 600px; height: 120px; border: #909090 1px solid; overflow-y: scroll; font-family: Tahoma; font-size: 11px;">
</div>
<script>var dhxLayout;
function doOnLoad() {
dhxLayout = new dhtmlXLayoutObject("parentId", "5I");
dhxLayout.attachEvent("onExpand", doOnExpand);
dhxLayout.attachEvent("onCollapse", doOnCollapse);
}
function doOnExpand(itemId) {
document.getElementById("log").innerHTML += "<b>onExpand</b> event called, item id is <b>" + itemId + "</b><br>";
}
function doOnCollapse(itemId) {
document.getElementById("log").innerHTML += "<b>onCollapse</b> event called, item id is <b>" + itemId + "</b><br>";
}
</script>