expressed/v_dl/sdk/doc/navi.html

520 lines
25 KiB
HTML
Raw Normal View History

2023-11-20 16:39:21 +00:00
<!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" />
<title>navigation</title>
<link href="css/main.css" rel="stylesheet" type="text/css" />
</head>
<body>
<iframe src="header.html" width="200" height="90" frameborder="0">
<a href="header.html">Your browser does not appear to support the iframe element.
Click here to view the visage|SDK documentation header.</a>
</iframe>
<div class="vmenu">
<table width="200" border="0" align="left">
<!--
<tr>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="4"><a id="menuitem_intro" class="vmenu" href="intro.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_intro')">Introduction</a></td>
</tr>
-->
<tr>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="4"><a id="menuitem_migration" class="vmenu" href="migration.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_migration')">Migration from older versions</a></td>
</tr>
<tr>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="4"><a id="menuitem_samples" class="vmenu" href="samples.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_samples')">Samples</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="3"><a id="menuitem_showcase" class="vmenu" href="showcase.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_showcase')">Showcase Demo</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="3"><a id="menuitem_gazetracker" class="vmenu" href="gazetracker.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_gazetracker')">Gaze Tracker</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="3"><a id="menuitem_visageeye" class="vmenu" href="eyewear.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_visageeye')">Virtual Eyewear Try-on</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="2"><a id="menuitem_AR" class="vmenu" href="visar_api.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_AR')">Augmented Reality API</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="3"><a id="menuitem_unityintegration" class="vmenu" href="unity_integration.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_unityintegration')">Unity3D</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="2"><a id="menuitem_unitytracker" class="vmenu" href="trackerunity.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_unitytracker')">VisageTrackerUnityDemo</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="2"><a id="menuitem_trackerunityplugin" class="vmenu" href="module-VisageTrackerUnityPlugin.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_trackerunityplugin')">VisageTrackerUnityPlugin</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="2"><a id="menuitem_analyserunityplugin" class="vmenu" href="module-VisageAnalyserUnityPlugin.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_analyserunityplugin')">VisageAnalyserUnityPlugin</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="2"><a id="menuitem_arguide" class="vmenu" href="doc/modeling_guide.pdf" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_arguide')">Animation & AR Modeling Guide</a></td>
</tr>
<tr>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="4"><a id="menuitem_api" class="vmenu" href="index_api.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_api')">API</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="3"><a id="menuitem_face" class="vmenu" href="index_api.html#visageVision-t" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_face')">Facial Features Tracking</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="2"><a id="menuitem_VisageTrackerClass" class="vmenu" href="VisageTracker.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_VisageTrackerClass')">VisageTracker</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="2"><a id="menuitem_VisageConfigurationClass" class="vmenu" href="VisageConfiguration.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_VisageConfigurationClass')">VisageConfiguration</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="2"><a id="menuitem_FaceDataStruct" class="vmenu" href="FaceData.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_FaceDataStruct')">FaceData</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="2"><a id="menuitem_FDPClassVT" class="vmenu" href="FDP.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_FDPClassVT')">FDP</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="2"><a id="menuitem_FeaturePointStructVT" class="vmenu" href="FeaturePoint.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_FeaturePointStructVT')">FeaturePoint</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="2"><a id="menuitem_config_manual" class="vmenu" href="doc/VisageTracker Configuration Manual.pdf" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_config_manual')">VisageTracker Configuration Manual</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="3"><a id="menuitem_detect" class="vmenu" href="index_api.html#visageVision-d" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_detect')">Facial Features Detection</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="2"><a id="menuitem_VisageDetector2Class" class="vmenu" href="VisageDetector.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_VisageDetector2Class')">VisageDetector</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="2"><a id="menuitem_FaceDataStructVD" class="vmenu" href="FaceData.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_FaceDataStructVD')">FaceData</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="2"><a id="menuitem_FDPClassVD" class="vmenu" href="FDP.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_FDPClassVD')">FDP</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="2"><a id="menuitem_FeaturePointStructVD" class="vmenu" href="FeaturePoint.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_FeaturePointStructVD')">FeaturePoint</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="3"><a id="menuitem_analyse" class="vmenu" href="index_api.html#visageVision-a" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_analyse')">Face Analysis</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="2"><a id="menuitem_VisageFaceAnalyserClass" class="vmenu" href="VisageFaceAnalyser.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_VisageFaceAnalyserClass')">VisageFaceAnalyser</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="2"><a id="menuitem_AnalysisDataClass" class="vmenu" href="AnalysisData.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_AnalysisDataClass')">AnalysisData</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="2"><a id="menuitem_FaceDataStructVFA" class="vmenu" href="FaceData.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_FaceDataStructVFA')">FaceData</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="3"><a id="menuitem_facerec" class="vmenu" href="index_api.html#visageVision-fr" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_facerec')">Face Recognition</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="2"><a id="menuitem_VisageFaceRecognitionClass" class="vmenu" href="VisageFaceRecognition.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_VisageFaceRecognitionClass')">VisageFaceRecognition</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="2"><a id="menuitem_FaceDataStructVFR" class="vmenu" href="FaceData.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_FaceDataStructVFR')">FaceData</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="3"><a id="menuitem_gaze" class="vmenu" href="index_api.html#visageVision-g" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_gaze')">Screen Space Gaze Tracking</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="2"><a id="menuitem_VisageGazeTracker" class="vmenu" href="VisageGazeTracker.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_VisageGazeTracker')">VisageGazeTracker</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="2"><a id="menuitem_FaceDataStructVG" class="vmenu" href="FaceData.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_FaceDataStructVG')">FaceData</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="2"><a id="menuitem_ScreenSpaceGaze" class="vmenu" href="ScreenSpaceGazeData.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_ScreenSpaceGaze')">ScreenSpaceGazeData</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="2"><a id="menuitem_FDPClassVG" class="vmenu" href="FDP.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_FDPClassVG')">FDP</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="2"><a id="menuitem_FeaturePointStructVG" class="vmenu" href="FeaturePoint.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_FeaturePointStructVG')">FeaturePoint</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="3"><a id="menuitem_liveness" class="vmenu" href="index_api.html#visageVision-li" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_liveness')">Liveness</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="2"><a id="menuitem_VisageLivenessBlink" class="vmenu" href="VisageLivenessBlink.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_VisageLivenessBlink')">VisageLivenessBlink</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="2"><a id="menuitem_VisageLivenessSmile" class="vmenu" href="VisageLivenessSmile.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_VisageLivenessSmile')">VisageLivenessSmile</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="2"><a id="menuitem_VisageLivenessBrowRaise" class="vmenu" href="VisageLivenessBrowRaise.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_VisageLivenessBrowRaise')">VisageLivenessBrowRaise</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="2"><a id="menuitem_FaceDataStructVL" class="vmenu" href="FaceData.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_FaceDataStructVL')">FaceData</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="3"><a id="menuitem_visageAR" class="vmenu" href="VisageAR.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_visageAR')">VisageAR</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="3"><a id="menuitem_modeling_guide" class="vmenu" href="doc/modeling_guide.pdf" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_modeling_guide')">Animation & AR Modeling Guide</a></td>
</tr>
<tr>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="4"><a id="menuitem_licence" class="vmenu" href="licensing.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_licence')">Licensing</a></td>
</tr>
<tr style="display: none;">
<td width="15">&nbsp;</td>
<td width="15"><img src="images/folder-open.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="2"><a id="menuitem_wrapper-VT_License_Agreement" class="vmenu" href="../VT License Agreement.pdf" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_wrapper-VT_License_Agreement')">VT License Agreement</a></td>
</tr>
<tr>
<td width="15"><img src="images/folder-closed.jpg" width="15" height="15" alt="folder-open" /></td>
<td colspan="4"><a id="menuitem_references" class="vmenu" href="references.html" target="mainFrame" onmouseup="onmouseup_menuitem(event,'menuitem_references')">References</a></td>
</tr>
<br/>
</table>
</div>
<div id="navigation5">
<img src="images/logo.png" alt="Visage Technologies logo" />
</div>
<script type="text/javascript">
var ITEMLEVEL_OFFSET = 2;
function get_menuitem_by_id( menuitem_id )
{
return document.getElementById( menuitem_id );
}
function get_menuitem_by_rowindex( table, row_index )
{
var itemrow = table.rows[row_index];
for( var ci = 0; ci < itemrow.childNodes.length; ++ci )
{
if( itemrow.childNodes.item(ci).hasChildNodes() &&
itemrow.childNodes.item(ci).firstChild.nodeName == 'A' )
{
return itemrow.childNodes.item(ci).firstChild;
}
}
}
function get_menuitem_level( menuitem )
{
var itemrow = menuitem.parentNode.parentNode;
for( var di = 0; di < itemrow.childNodes.length; ++di )
{
if( itemrow.childNodes.item(di).hasChildNodes() &&
itemrow.childNodes.item(di).firstChild.nodeName == 'IMG' )
return di;
}
return -1;
}
function get_menuitem_icon( menuitem )
{
var itemrow = menuitem.parentNode.parentNode;
for( var di = 0; di < itemrow.childNodes.length; ++di )
{
if( itemrow.childNodes.item(di).hasChildNodes() &&
itemrow.childNodes.item(di).firstChild.nodeName == 'IMG' )
return itemrow.childNodes.item(di).firstChild;
}
return null;
}
function get_menuitem_topitem( menuitem )
{
var table, parent_item, parent_itemlevel;
table = menuitem.parentNode.parentNode.parentNode;
parent_item = menuitem;
parent_itemlevel = 1000;
var cur_item;
for( var ri = 0; ri <= menuitem.parentNode.parentNode.rowIndex; ++ri )
{
cur_item = get_menuitem_by_rowindex( table, ri );
if( get_menuitem_level( cur_item ) <= parent_itemlevel &&
is_child_menuitem( menuitem, cur_item ) )
{
parent_itemlevel = get_menuitem_level( cur_item );
parent_item = cur_item;
}
}
return parent_item;
}
function is_child_menuitem( menuitem, parent_item )
{
if( menuitem == parent_item )
return true; // each item is its own child
var row_index, parent_row_index, itemlevel, parent_itemlevel, table;
row_index = menuitem.parentNode.parentNode.rowIndex;
parent_row_index = parent_item.parentNode.parentNode.rowIndex;
itemlevel = get_menuitem_level( menuitem );
parent_itemlevel = get_menuitem_level( parent_item );
table = menuitem.parentNode.parentNode.parentNode;
if( row_index < parent_row_index ||
itemlevel <= parent_itemlevel )
return false;
var cur_item;
for( var ri = parent_row_index + 1; ri < row_index; ++ri )
{
cur_item = get_menuitem_by_rowindex( table, ri );
if( get_menuitem_level( cur_item ) <= parent_itemlevel )
return false;
}
return true;
}
function open_menuitem( menuitem )
{
var itemimg, itemlevel, table;
itemimg = get_menuitem_icon( menuitem );
itemlevel = get_menuitem_level( menuitem );
table = menuitem.parentNode.parentNode.parentNode;
// display the item itself
menuitem.parentNode.parentNode.style.display = '';
get_menuitem_icon( menuitem ).src = 'images/folder-open.jpg'
// display its subitems
var ri, cur_item, cur_itemlevel;
for( ri = menuitem.parentNode.parentNode.rowIndex + 1; ri < table.rows.length; ++ri )
{
cur_item = get_menuitem_by_rowindex( table, ri );
cur_itemlevel = get_menuitem_level( cur_item );
if( cur_itemlevel == itemlevel + ITEMLEVEL_OFFSET )
{
table.rows[ri].style.display = '';
}
else if( cur_itemlevel <= itemlevel )
{
break;
}
}
}
function close_menuitem( menuitem )
{
var itemimg, itemlevel, table;
itemimg = get_menuitem_icon( menuitem );
itemlevel = get_menuitem_level( menuitem );
table = menuitem.parentNode.parentNode.parentNode;
// set the item's icon to 'closed'
get_menuitem_icon( menuitem ).src = 'images/folder-closed.jpg';
// hide its subitems
var ri, cur_item, cur_itemlevel;
for( ri = menuitem.parentNode.parentNode.rowIndex + 1; ri < table.rows.length; ++ri )
{
cur_item = get_menuitem_by_rowindex( table, ri );
cur_itemlevel = get_menuitem_level( cur_item );
if( cur_itemlevel >= itemlevel + ITEMLEVEL_OFFSET )
{
table.rows[ri].style.display = 'none';
get_menuitem_icon( cur_item ).src = 'images/folder-closed.jpg';
}
else if( cur_itemlevel <= itemlevel )
{
break;
}
}
}
function is_menuitem_open( menuitem )
{
return get_menuitem_icon( menuitem ).src == 'images/folder-open.jpg';
}
function getInternetExplorerVersion()
// Returns the version of Internet Explorer or a -1
// (indicating the use of another browser).
{
var rv = -1; // Return value assumes failure.
if (navigator.appName == 'Microsoft Internet Explorer')
{
var ua = navigator.userAgent;
var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
if (re.exec(ua) != null)
rv = parseFloat( RegExp.$1 );
}
return rv;
}
function onmouseup_menuitem( e, menuitem_id )
{
var lmb_code = 0;
var ver = getInternetExplorerVersion();
if ( ver > -1 && ver < 9)
{
ITEMLEVEL_OFFSET = 1;
lmb_code = 1;
}
if( e.button != lmb_code )
return;
var menuitem, itemlevel, top_item, table;
menuitem = get_menuitem_by_id( menuitem_id );
itemlevel = get_menuitem_level( menuitem );
top_item = get_menuitem_topitem( menuitem );
table = menuitem.parentNode.parentNode.parentNode;
/* TODO: this is a temporary fix for MSIE
if( navigator.appName == 'Microsoft Internet Explorer' )
{
table = menuitem.parentNode.parentNode.parentNode.parentNode;
// open all items
for( ri = 0; ri < table.rows.length; ++ri )
table.rows[ri].style.display = '';
return;
}*/
// open appropriate items
for( ri = 0; ri < table.rows.length; ++ri )
{
cur_item = get_menuitem_by_rowindex( table, ri );
if( is_child_menuitem( menuitem, cur_item ) )
open_menuitem( cur_item );
else
close_menuitem( cur_item );
}
}
</script>
</body>
</html>