//<!--
//\include\js\syi\CategoryNode.js@@\main\3

_CatNode_checkCompatible();_CatNode_checkConfigured();function catNode(pId,pName,pParentNode,pNodeType){var re_Ampersand=new RegExp("&amp;","gi");var re_Apostrophe=new RegExp("&apos;","gi");pName=pName.replace(re_Ampersand,"&");pName=pName.replace(re_Apostrophe,"'");window["n"+pId]=new CategoryNode(pId,pName,pParentNode,pNodeType);if(pNodeType==1){LeafCategories.length++;LeafCategories[LeafCategories.length-1]=pId;}
if(pParentNode!=null){pParentNode.addChild(eval("n"+pId));}}
function CategoryNode(pId,pName,pParentNode,pNodeType){this.TYPE_TRUNK=-1;this.TYPE_BRANCH=0;this.TYPE_LEAF=1;this.instanceOf=_CatNode_instanceOf;this.addChild=_CatNode_addChild;this.getId=_CatNode_getId;this.getName=_CatNode_getName;this.getDepth=_CatNode_getDepth;this.getParent=_CatNode_getParent;this.getPointer=_CatNode_getPointer;this.getChildren=_CatNode_getChildren;this.id=pId;this.name=pName;this.type=pNodeType;this.depth=0;this.parent=pParentNode;this.children=new Array();}
function _CatNode_instanceOf(pType){return(this.type==pType);}
function _CatNode_addChild(pChildNode){if(pChildNode!=null){pChildNode.depth=this.depth+1;this.children.length++;this.children[this.children.length-1]=pChildNode;}}
function _CatNode_getId(){return this.id;}
function _CatNode_getName(){return this.name;}
function _CatNode_getDepth(){return this.depth;}
function _CatNode_getParent(){return this.parent;}
function _CatNode_getPointer(){return(this.instanceOf(this.TYPE_BRANCH)?" -->":"");}
function _CatNode_getChildren(){return this.children;}
function _CatNode_init(){if(pParentNode!=null){pParentNode.addChild(this);}}
function _CatNode_checkCompatible(){return true;}
function _CatNode_checkConfigured(){if(!document.eBayLoaded||!document.eBayLoaded.config){_throwConfigError("config file not found");return false;}
if(config.VALID_FOR!="SYI"){_throwConfigError("config file found for '"
+config.VALID_FOR
+"' rather than than 'SYI'");return false;}
return true;}
function _CatNode_throwConfigError(msg){var out="============================================================"
+"\n"
+"[configuration error]"
+"\n"
+"file:\CategoryNode.js"
+"\n"
+"message:\t"+msg
+"\n"
+"============================================================";alert(out);}
// -->
