<!--
var oBD = new navDat();

//PreLoadMemberIcons();
var g_aImages = new Array("unknown", "attribute", "method", "prop_ro", "prop_rw", "event", "collection", "object", "behavior");
var g_memberImages = new Array(g_aImages.length);
var g_sGR = "/abkd/shared/";
var g_sGExt = ".gif";
var g_sObject = null;
var g_sFC = null; // optimize by caching current friendly column

/*
Insert object-page-specific data-bound tables into page. IE4up/Windows only  

vCtx - hash containing context information for current binding; valid keys: defView, dataPath

sCSSLink - optional string specifying name of field to surround with hyperlink; acceptable values: cssattr (default), prop
*/

function addObjs(vCtx, sCSSLink){
// so that down-level links show up in Mac and Unix
if (!oBD.getsNavBar){
   if (typeof(divMembers) == 'object'){
      divMembers.children(0).className = "clsExpanded";
   }
   if (typeof(divCSS) == 'object'){
      divCSS.children(0).className = "clsExpanded";
   }
   return false;
}

// defView - default filter (acceptable values: all, methods, properties, events, attributes (default), or collections)
var vDefView = "";

/* dataPath - location of the data set to which the DSOs are to bind - for legacy reasons, this parameter may also specify a string representing the default view specifying default filter for members table; using relative path allows this code to be used by ANY reference */
var sDataPath = "../data/";

// dig data out of context object
if (typeof(vCtx) == 'object'){
   if (typeof(vCtx.defView) == 'string'){
      vDefView = vCtx.defView;
   }
   if (typeof(vCtx.dataPath) == 'string'){
      sDataPath = vCtx.dataPath;
   }
}
else if (typeof(vCtx) == 'string'){
   vDefView = vCtx;
}

// Normalize the path on or off-line
var oReg = new RegExp("[\\\\]", "g");
var sPath = location.pathname.replace(oReg, "/");
aPath = sPath.split("/");
g_sObject = aPath[aPath.length-1].split(".")[0];

if (typeof(divMembers) == 'object'){
   var oPersist = ensPersist();
   var sPM = oPersist.getPersistedMembers();
   if (sPM){
      vDefView = sPM;
   }

   // coerce to a sensible default if nothing passed
   if (!vDefView){
   /* if nothing explicit is passed, and it's a collection, show all; otherwise show attribs only */
      vDefView = (IsCollection(document)) ? -1 : 0;
   }
   else if (typeof(vDefView) == "string"){
      vDefView = MapStringToView(vDefView);
   }

   cFilter = GetFilterExpr(vDefView);
   g_sFC = GetFriendlyCol(vDefView);
   var cImgCol = GetImgCol(vDefView);
   sMembers = '<object classid="clsid:333C7BC4-460F-11D0-BC04-0080C7055A83" ' +
'id=tdcMembers height=0 width=0>' + 
'<param name="DataURL" value="' + sDataPath + g_sObject + '_members.csv">' + 
'<param name="UseHeader" value="True">' + 
'<param name="TextQualifier" value="|">' + 
'<param name="CaseSensitive" value="False">' +
'<param name="Sort" value="' + g_sFC + '">' +
(cFilter == '' ? '' : 
'<param name="Filter" value="' + cFilter + '">') +
'</object>';

   document.body.insertAdjacentHTML('afterBegin', sMembers);
   divMembers.innerHTML = "<div align='center'><table class='clsStd' id=tblMembers datasrc=#tdcMembers style='width:92%'>" +
"<thead><tr valign=top><th>" + 
viewOpts() +
"</th><th>&nbsp;</th><th>Description</th></tr></thead>" +
"<tbody><tr><td><a datafld=ref_link>" +
"<span id=ref_friendly datafld=" + g_sFC + "></span></a></td>" +
"<td><img id=ref_icon datafld=" + cImgCol + " onload='chgImgTitle(this, tdcMembers)'></td>" +
"<td><span datafld=ref_desc dataformatas=html></td></tr></tbody></table></div>";

   cboInvokeKind.selectedIndex = MapViewToOption(vDefView);
   tblMembers.width=divMembers.offsetWidth; //Temporary code for IE5 bug #40557
}

// CSS is optional if object doesn't support it.
if (typeof(divCSS) == 'object'){
   addCSSTbl(divCSS, sDataPath + g_sObject + '_css.csv', sCSSLink);
}
}

// Add data bound CSS table to doc
function addCSSTbl(oContainer, sPathToData, sLinkFld){
// wrap the CSS attribute name in a link unless prop is explicitly specified
// sort by the field surrounded by the link
if (!sLinkFld || sLinkFld != "prop"){
   sLinkFld = "cssattr";
}

var sCSS = '<object width=0 height=0 id=tdcCSS classid="clsid:333C7BC4-460F-11D0-BC04-0080C7055A83">' +
'<param name="DataURL" value="' + sPathToData + '">' +
'<param name="UseHeader" value="True">' +
'<param name="TextQualifier" value="|">' +
'<param name="Sort" value="' + sLinkFld + '">' +
'</object>'

document.body.insertAdjacentHTML('afterBegin', sCSS);
oContainer.innerHTML = "<div align='center'><table class='clsStd' datasrc=#tdcCSS onreadystatechange='fixTable()' style='width:92%'>" +
"<thead><tr valign=top><th>Style attribute</th><th>Style property</th><th>Description</th></tr><thead>" + "<tbody><tr>" +
GenBoundCell('cssattr', null, null, (sLinkFld == "cssattr" ? "<A datafld=propurl>" : null), (sLinkFld == "cssattr" ? "</A>" : null)) +
GenBoundCell('prop', null, null, (sLinkFld == "prop" ? "<A datafld=propurl>" : null), (sLinkFld == "prop" ? "</A>" : null)) +
GenBoundCell('css_desc', null,'html') +
"</tr></tbody></table>";
}

// Return true if the document represents a collection
function IsCollection(oDoc){
var oReg = new RegExp("Collection");
return (oDoc.title.match(oReg) ? true : false);
}

/*
Return a string representing a data bound table cell
cField - name of the field in the data set
cElem - name of element to bind
cFormat - format of data
cPre - prefix wrapper 
cPost - suffix wrapper
*/
function GenBoundCell(cField, cElem, cFormat, cPre, cPost){
if (!cElem){
   cElem = 'SPAN';
}

if (!cFormat){
   cFormat="text"
}

if (!cPre){
   cPre = '';
}

if (!cPost){
   cPost = '';
}

return '<td>' + cPre + '<' + cElem + ' datafld=' + cField + ' dataformatas=' + cFormat + '>' + '</' + cElem + '>' + cPost + '</td>';
}

// Filter the members displayed supplied by a TDC
// oSelect - reference to a select
// oTDC - reference to a TDC
function FilterMembers(oSelect, oTDC){
var cFilter='';
var iValue = oSelect.options(oSelect.selectedIndex).value;

cFilter = GetFilterExpr(iValue);

if (RebindMTCols(tblMembers, GetFriendlyCol(iValue), GetImgCol(iValue))){
   oTDC.object.Sort = g_sFC;
}

oTDC.object.Filter = cFilter;
oTDC.Reset();
var oPersist = ensPersist();
oPersist.persistMembers(oSelect.options(oSelect.selectedIndex).text)
}

// Rebind the friendly column to the appropriate field in the data set but only if necessary
function RebindMTCols(oTable, sNewFCol, sNewImgCol){
// Don't bother rebinding to the same column
if (g_sFC == sNewFCol){
   return false;
}

var sDSO = oTable.dataSrc;
oTable.dataSrc = '';
ref_friendly.dataFld = sNewFCol;
ref_icon.dataFld = sNewImgCol;
oTable.dataSrc = sDSO;

g_sFC = sNewFCol;
return true;
}

// Fired when a member image loads. Allows us to set the tooltip
// oImg - reference to an image object
// no need to specify a full vroot here.

g_aMemberImg2Str = new Array();
g_aMemberImg2Str["method"] = "Method";
g_aMemberImg2Str["prop_ro"] = "Read-Only Property";
g_aMemberImg2Str["prop_rw"] = "Read/Write Property";
g_aMemberImg2Str["event"] = "Event";
g_aMemberImg2Str["collection"] = "Collection";
g_aMemberImg2Str["object"] = "Object";
g_aMemberImg2Str["attribute"] = "Attribute";
g_aMemberImg2Str["behavior"] = "Behavior";

g_oRegImgTitle = new RegExp("(method|prop_ro|prop_rw|event|collection|object|attribute|behavior)\.gif");
g_oRegProp = new RegExp("(prop_..|attribute)");

function chgImgTitle(oImg, oTDC){
var sImgPath = oImg.href.toLowerCase();
var aMatch = sImgPath.match(g_oRegImgTitle);
oImg.title = (null != aMatch ? g_aMemberImg2Str[aMatch[1]] : "Member");
if (g_oRegProp.test((null != aMatch ? aMatch[1] : sImgPath))){
   modPropAttr(tblMembers.rows[oImg.recordNumber].children(0).all(1), oTDC);
}
}

// Builds a string and sets the tooltip for the cell
// When All is selected, the property rather than the attribute is displayed
// When Attrib is selected, the attrib is displayed and the tooltip is arranged appropriately
// When property is selected, the property is displayed ...
// oPropCell - the cell to be tipped
function modPropAttr(oPropCell, oTDC){
// added robustness and stack var to handle quirk on some machines
if (typeof(oTDC) != 'object'){
   return false;
}

var oRS = oTDC.recordset;
if (!oRS){
   return false;
}

oRS.AbsolutePosition = oPropCell.recordNumber;
var iFilter = cboInvokeKind.options(cboInvokeKind.selectedIndex).value;
var sPropValue = null, sAttrValue = null;
with (oRS.fields){
   sPropValue = item('ref_dynamic').value;
   sAttrValue = item('ref_persistent').value;
   if (sPropValue == 'null' || sAttrValue == 'null'){
      return false;
   }
}

var sProp = sPropValue + ' property';
var sAttr = sAttrValue + ' attribute';
var sTip = 'The ' + (iFilter==0 ? sAttr : sProp) + ' corresponds to the ' + (iFilter==0 ? sProp : sAttr) + '.';
oPropCell.className = "clsPropattr";
oPropCell.title = sTip;
}

var g_FilterMap = new Array();
g_FilterMap[-1] = 'ref_dynamic <> null'; // show all dynamic member
g_FilterMap[2] = '((invoke_kind=2 | invoke_kind=4 | invoke_kind=6) & ref_dynamic <> null)';
g_FilterMap[4] = g_FilterMap[2];
g_FilterMap[6] = g_FilterMap[2];

//'(ref_friendly = * \/ *) | invoke_kind = 0'; // old attribute filter
g_FilterMap[0] = "invoke_kind=0 | ((invoke_kind=2 | invoke_kind=6) & ref_persistent <> null)"; // look for text pattern; requires a space followed by slash followed by space to match

// Map an invoke_kind to a filter expression for use by the TDC
// With the exception of -1 (show all) vValue corresponds to the invoke_kind field from the data set
function GetFilterExpr(iValue){
return (typeof(g_FilterMap[iValue]) == 'string' ? g_FilterMap[iValue] : '(invoke_kind=' + iValue + ')');
}

function GetFriendlyCol(iValue){
return (iValue == 0) ? 'ref_persistent' : 'ref_dynamic';
}

function GetImgCol(iValue){
return (iValue == 0) ? 'pers_icon' : 'dyn_icon';
}

var g_aMemberViewByName = new Array();
g_aMemberViewByName["all"] = -1;
g_aMemberViewByName["attributes"] = 0;
g_aMemberViewByName["properties"] = 6;
g_aMemberViewByName["methods"] = 1;
g_aMemberViewByName["events"] = 8;
g_aMemberViewByName["collections"] = 32;
g_aMemberViewByName["behaviors"] = 128;

// Map the string to its numeric equivalent
function MapStringToView(sView){
sView = sView.toLowerCase();

// if the string isn't a valid key, return an acceptable default
return (typeof(g_aMemberViewByName[sView]) == 'number' ? g_aMemberViewByName[sView] : -1);
}

var g_aMemberViewByNum = new Array();
g_aMemberViewByNum[-1] = 0;
g_aMemberViewByNum[0] = 1;
g_aMemberViewByNum[2] = 2;
g_aMemberViewByNum[4] = 2;
g_aMemberViewByNum[6] = 2;
g_aMemberViewByNum[1] = 3;
g_aMemberViewByNum[8] = 4;
g_aMemberViewByNum[32] = 5;
g_aMemberViewByNum[128] = 6;

// map the specified view to an index into a select defined below
function MapViewToOption(vView){
return (typeof(g_aMemberViewByNum[vView]) == 'number' ? g_aMemberViewByNum[vView] : 0);
}

// return a string representing the select to be injected into the data bound table
function viewOpts(){
return "<select id=cboInvokeKind onchange='FilterMembers(this, tdcMembers)'>" +
"<option value=-1>All" +
"<option value=0>Attributes" +
"<option value=6>Properties" +
"<option value=1>Methods" +
"<option value=8>Events" +
"<option value=32>Collections" +
"<option value=128>Behaviors" + 
"</select>";
}

// Preload the icons used in the member table
function PreLoadMemberIcons()
{
// preload the member images
for (i = 0; i < g_aImages.length; i++)
{
var sImage = g_sGR + g_aImages[i] + g_sGExt;
g_memberImages[g_aImages[i]] = new Image();
g_memberImages[g_aImages[i]].src = sImage;
}
}

function fixTable() {
var tbl=event.srcElement
if (tbl.readyState=="complete") {
   for (i=0;i<tbl.rows.length;i++) {
      if (tbl.rows(i).cells(0).innerText=="behavior") {
         tbl.rows(i).cells(0).insertAdjacentText("beforeEnd", "(proposed)");
         break;
      }
   }
}
}

//return the persistence wrapper
function ensPersist(){
if (typeof(ensPersist.oPersist) == 'object'){
   return ensPersist.oPersist;
   }
else{
   ensPersist.oPersist = new objPersistence();
   return ensPersist.oPersist;
   }
}

//Constructor for the persistence object
function objPersistence(){
this.bXMLDocLoadedFlag=false;
//Indicates if the XML Document has been loaded yet.
this.bIsPostIE5B1 = false;
//Indicates that the browser supports the persistent feature
this.sPersistedMember;
//The current selection from of the members drop down
this.sStoreName="INETSDKStore";
//The name of the persistent data store
this.sSectionPath="";
//The path to the section objects in the XML doc
this.sMemberPath="";
//The path to the members object in the XML doc
this.LoadXML=LoadXML;
//Initialization routine for most of the object properties
this.getObjectHierarchy=getObjectHierarchy;
this.getObject=getObject;
this.insertObject=insertObject;
this.removeObject=removeObject;
this.persistSection=persistSection;
this.persistHilite=persistHilite;
this.persistMembers=persistMembers;
this.getPersistedMembers=getPersistedMembers;
this.getPersistedSection=getPersistedSection;
}

//Persists the users choice of a show/hide section
function persistSection(oSection, sText, sShowHide){
if (this.bIsPostIE5B1){
   var oSectionNode = getObject(this.XMLDoc,this.sSectionPath + oSection.id);
   if (typeof(oSectionNode)!='object' && sShowHide.toLowerCase()=='show'){
      oSectionNode=insertObject(this.XMLDoc,this.sSectionPath + oSection.id);
      if (oSectionNode){
         oSectionNode.setAttribute("sValue",sText);
         document.body.save(this.sStoreName);
      }
   }
   if (typeof(oSectionNode)=='object' && sShowHide.toLowerCase()=='hide'){
      removeObject(this.XMLDoc,this.sSectionPath + oSection.id);
      document.body.save(this.sStoreName);
   }
}
}

//Persists what text should be highlited in example code
function persistHilite(oCode, sToken, oSample){
if (this.bIsPostIE5B1){
   var oSectionNode = getObject(this.XMLDoc,this.sSectionPath + oSample.id);
   if (typeof(oSectionNode)=='object'){
      oSectionNode.setAttribute("sToken",sToken);
      oSectionNode.setAttribute("sCode",oCode.id);
      document.body.save(this.sStoreName);
      }
   }
}

//Persists the user's selection from the members drop down
function persistMembers(sSelection){
// Persist the current filter
if (this.bIsPostIE5B1){
   var oMemberNode = getObject(this.XMLDoc,this.sMemberPath);
   if (typeof(oMemberNode)!='object'){
      oMemberNode=insertObject(this.XMLDoc,this.sMemberPath);
      }
   if (typeof(oMemberNode)=='object'){
      oMemberNode.setAttribute("sValue",sSelection);
      document.body.save(this.sStoreName);
      this.sPersistedMember=sSelection
      }
   }
}

//Returns the user's last selection from the members drop down
function getPersistedMembers(){
this.LoadXML();
if (this.bIsPostIE5B1){
   if (!this.sPersistedMember){
      var oNode=getObject(this.XMLDoc,this.sMemberPath);
      if (typeof(oNode)=='object'){
         this.sPersistedMember=oNode.getAttribute("sValue");
      }
   }
   return this.sPersistedMember;
}
else{
   return null;
}
}

//Expands a section that has been stored.
function getPersistedSection(oElem, sCaption){
this.LoadXML();
if (this.bIsPostIE5B1){
   var sectionNode = getObject(this.XMLDoc,this.sSectionPath + oElem.id);
if (typeof(sectionNode)=='object')
{
sCaption=sectionNode.getAttribute("sValue");
ShowHide(oElem,sCaption);
if (sectionNode.getAttribute("sToken") && sectionNode.getAttribute("sCode"))
{
HiliteText(document.all(sectionNode.getAttribute("sCode")), sectionNode.getAttribute("sToken"));
}
}
}
}

//Provides TWO pieces of functionality.
//Loads the persistent XML document if needed.
//Determines if this is a post beta1 build.
function LoadXML()
{
if (!this.bXMLDocLoadedFlag)
{
this.bIsPostIE5B1 = oBD.browser == "MSIE" && oBD.majorVer == 5 && oBD.betaVer == 2;
if (this.bIsPostIE5B1)
{
document.styleSheets[0].addRule(".userData","behavior:url(#_IE_)");
document.body.className += "userData";
document.body.load(this.sStoreName);
if (!document.body.XMLDocument)
{
document.body.save(this.sStoreName);
}
this.XMLDoc=document.body.XMLDocument;
this.sSectionPath=document.location.pathname + "/sections/"
this.sMemberPath=document.location.pathname + "/members"
}
}
this.bXMLDocLoadedFlag=true;//The flag is set to true even for pre IE5 browsers so the do not keep recalling this function
}

//Takes a file path and creates an array using the "/" character as delimiter.
//In addition it converts the elements to lower case.
//sPath is a file path ("/workshop/author/dhtml")
function getObjectHierarchy(sPath)
{
sPath=sPath.toLowerCase();
var aInitial=sPath.split("/");
var aFinal = new Array;
for (var i=0; i<aInitial.length; i++)
{
if (aInitial[i].length > 0)
{
aFinal[aFinal.length]=aInitial[i];
}
}
return aFinal;
}

//Returns the XML object at the position in the document indicated by sPath.
function getObject(docObject, sPath)
{
var aHierarchy = getObjectHierarchy(sPath);
var oCurNode=docObject.documentElement;
var iDepth = 0;
var bFound=false;
while (iDepth<aHierarchy.length)
{
bFound=false;
for (var i=0;i<oCurNode.childNodes.length;i++)
{
if (oCurNode.childNodes.item(i).nodeName==aHierarchy[iDepth])
{
oCurNode=oCurNode.childNodes.item(i);
bFound=true;
break;
}
}
if (!bFound)
{
return "undefined";
}
iDepth++;
}
return oCurNode;
}

//Inserts an object in the XML document indicated by sPath
function insertObject(docObject, sPath)
{
var aHierarchy = getObjectHierarchy(sPath);
var oCurNode=docObject.documentElement;
var iDepth = 0;
var bFound=false;
while (iDepth<aHierarchy.length)
{
bFound=false;
for (var i=0;i<oCurNode.childNodes.length;i++)
{
if (oCurNode.childNodes.item(i).nodeName==aHierarchy[iDepth])
{
oCurNode=oCurNode.childNodes.item(i);
bFound=true;
break;
}
}
if (!bFound)
{
var newNode=docObject.createElement(aHierarchy[iDepth])
oCurNode.insertBefore(newNode,null);
oCurNode=newNode;
}
iDepth++;
}
return oCurNode;
}

//Removes the object from the XML document indicated by sPath.
//If the removal of the object causes the parent to have no children then the parent is also removed.
//This process continues recursively up to the but not including the docuement root
function removeObject(docObject, sPath)
{
var oCurNode=getObject(docObject,sPath);
if (typeof(oCurNode)!='object')
return false;
var oParent=oCurNode.parentNode;
oParent.removeChild(oCurNode);
while (oParent.childNodes.length==0 && oParent != docObject.documentElement)
{
oCurNode=oParent;
oParent=oCurNode.parentNode;
oParent.removeChild(oCurNode);
}
}

// Hilites the text in the code sample 
// oStart - reference to start of block
// sText - string to find and hilite
function HiliteText(oStart, sText){
if (!oBD.getsNavBar)
   {
   // IE4/Mac doesn't support text ranges
   return false;
   }

var oRng = document.body.createTextRange();
oRng.moveToElementText(oStart);
var oRngFixed = oRng.duplicate();

if (typeof(HiliteText.tokens) == 'undefined')
   {
   HiliteText.tokens = new Array(1);
   }
else
   {
   for (i = 0; i < HiliteText.tokens.length; i++)
      {
      if (HiliteText.tokens[i].m_sSectionID == oStart.id && HiliteText.tokens[i].m_sToken == sText)
         {
         return true;
         }
      }
   HiliteText.tokens.length++;
   }

while (oRng.findText(sText, 1000000, 6) && oRngFixed.inRange(oRng)) 
   {    
   oRng.execCommand('bold');
   oRng.collapse(false);
   }

HiliteText.tokens[HiliteText.tokens.length-1] = new CHilitedToken(oStart.id, sText);
}

// a tuple representing the id of the section and the token to be hilited
// the object is stored in an array to prevent the code from running twice on the same section
function CHilitedToken(sSectionID, sToken){
this.m_sSectionID = sSectionID;
this.m_sToken = sToken;
}


// Toggles the display of the content contained within oCode
// oCode - reference to code block
// sToken - string to bolden
function ToggleSample(oCode, sToken){
if (ShowHide(window.event.srcElement,'Sample Code')){
   HiliteText(oCode, sToken);
   var oPersist = ensPersist();
   oPersist.persistHilite(oCode, sToken, window.event.srcElement);
   }
}

// If hidden, show. If shown, hide. Modify the caption of the element appropriately
// Returns true if showing on return, false if hidden on return
function ShowHide(oHead, sText){
var bRet = false;
var oChild = document.all(oHead.getAttribute('child', false));

if (typeof(oChild) == null){
   return bRet;
   }

var sClass = oChild.className;
var sAction = "Show";
if (sClass == "clsCollapsed"){
   sAction = "Hide";
   bRet = true; // we'll be showing upon return, so return true
   var oPersist = ensPersist();
   oPersist.persistSection(oHead, sText, "SHOW")
   }
else{
   var oPersist = ensPersist();
   oPersist.persistSection(oHead, sText, "HIDE")
   }
sAction = sAction + ' ' + sText;
oChild.className = (sClass == "clsCollapsed" ? "clsExpanded" : "clsCollapsed");
oHead.innerText = sAction;
return bRet;
}

// Set the caption of the specified element
// oElem - reference to element to modify. Typically a Hn
// sCaption - New caption for the element
// bShow - boolean indicating whether or not the element should be made visible
function setCap(oElem, sCaption, bShow){
oElem.innerText = sCaption;
if (bShow) oElem.style.display = 'inline';
var oPersist = ensPersist();
oPersist.getPersistedSection(oElem, sCaption);
}

function CheckCAB(n){
return true;
}

// Perform universal document post-processing at load time.
function PostGBInit(){
if (oBD.getsNavBar){
   // Hook up SBN code
   if ("function" == typeof(InitNavLinks)) InitNavLinks();
      if ("function" == typeof(CheckToTop)) CheckToTop();
         SetShowMes();
      if (typeof(oATTable) == 'object' && typeof(oATC) == 'object')
         fnATInit();
   }
}

// Walk the images collection and turn install icons into show me buttons
function SetShowMes(){
var oImages = document.images;
var aContainers = new Array();

// collect references to DIVs that contain qualifying IMGs
for (i = oImages.length-1; i >= 0 ; i--){
   with (oImages[i]){
      if ((!(iMinVer = getAttribute('MINVER', 1))) || (navigator.appVersion.substring(navigator.appVersion.indexOf("MSIE ") + 5,navigator.appVersion.indexOf("MSIE ") + 6) < parseFloat(iMinVer)) || (!getAttribute('SAMPLEPATH', 1)) || (parentElement.tagName != "A") || (src.lastIndexOf("ieget_animated.gif") == -1) || (parentElement.parentElement.tagName != "DIV") || (parentElement.parentElement.children(0).tagName != "DIV")){
         loop;
      }
      else{
         aContainers[aContainers.length] = parentElement.parentElement;
      }
   }
}

var sShowMeClass = "clsShowme";
if (oBD.majorVer >= 5){
sShowMeClass += "5";
}

// walk the containing DIVs
for (i = 0; i < aContainers.length; i++){
with (aContainers[i]){
   // gather data
   var sToolTip, sClickCode;
   with (children(1).children(0)){
      var sSamplePath = SAMPLEPATH;
      sToolTip = (!getAttribute('SAMPLETEXT', 1) ? "Click here to see a demonstration of this technology." : SAMPLETEXT);
      var oReg = new RegExp("direct", "i");
      if (sSamplePath.match(oReg)){
         sClickCode = getAttribute('CODE', 1);
      }
      else{
         sClickCode = "window.open(\'" + sSamplePath + "\'" + (getAttribute('FEATURES', 1) ? ", null, \'" + FEATURES + "\'" : "") + ")";
      }
   }

   // change the innerHTML of the containing DIV to a button
   // BUGBUG: Removed class="clsShowme" to span per 22222
   innerHTML = '<button class="' + sShowMeClass + '" title="' + sToolTip + '" onclick="' + sClickCode + '"><span>Show Me</span></button>';
   }
}
}

// Function that adds the "view-source:" prefix to the specified vroot
// View-source syntax:
// view-source:http://sitebuilder.microsoft.com/workshop/ul.sct
//
// Note that view-source only takes an absolute path, and thus the function below 
// does the munging of the protocol + host to the vroot, resulting in an absolute path.
// 
// Sample Usage:
//    <A HREF="javascript:HandleViewSource('/workshop/samples/components/scriptoid/calc/engine.sct')">engine.sct</A>
function HandleViewSource(sURL){
location.href = "view-source:" + location.protocol + "//" + location.host + sURL;
}

// Generate an ID unique to the page
function GenerateID(sPrefix){
if ("MSIE" == oBD.browser && oBD.majorVer >= 5)
   {
   return (sPrefix ? sPrefix : '') + document.uniqueID;
   }
else
   {
   for (iTry = 0; iTry < 3; iTry++)
      {
      var sUniqueID = (sPrefix ? sPrefix : '') + Math.round(Math.random()*100000000);
      if (document.all(sUniqueID) == null)
         {// verify that the ID is not already in use
         return sUniqueID;
         }
      }
   }
return null;
}

// Add client caps to the specified element on the page
// returns the element to which the behavior was added
// oElem - optional. The element to which the behavior was added (BODY is the default)
function EnableClientCaps(oElem){
if (!oBD.getsNavBar || oBD.majorVer < 5) // new for IE5
   {
   return null;
   }

if (typeof(EnableClientCaps.oCaps) == 'object') // already cached? return it
   {
   return EnableClientCaps.oCaps;
   }

if (typeof(oElem) != 'object') // validate params
   {
   oElem = document.body;
   }

// addBehavior came in IE5 B2, so check a B2 property before making call
if (typeof(oElem.behaviorUrns) != 'object')
   {
   return null;
   }

/* var iBehaviorID = */ oElem.addBehavior("#default#clientcaps");

if (typeof(oElem.platform) == 'string')
   {
   EnableClientCaps.oCaps = oElem;
   return oElem;
   }
else
   {
   EnableClientCaps.oCaps = null;
   return null;
   }
}

function navDat(){
this.userAgent = "Mozilla/4.0 (compatible; MSIE 4.01; Windows NT)";
this.browser = "MSIE";
this.majorVer = "4";
this.minorVer = "01";
this.betaVer = 0;
this.platform = "NT";
this.getsNavBar = true;
this.doesActiveX = true;
}
//-->