var FrontProductCategory_showTree = {
	cestatic:"",
	categoryId:"",
	tree:"",
	//方法功能：加载dhtml插件
	//context上下文参数
	//actionURL点击节点树后页面跳转的路径
	//categoryId1分类id
	//treeboxId页面中div的id
	//namelength页面中名称截取的长度
	//iconWidth图标宽度
    //iconHeight图标高度
	loadTree:function(context,actionURL,categoryId1,treeboxId,namelength,iconWidth,iconHeight){
		FrontProductCategory_showTree.tree=new dhtmlXTreeObject(treeboxId,"100%","100%",1);
		FrontProductCategory_showTree.tree.setImagePath(context+"/images/product/dhtmlXTree/images/");
		FrontProductCategory_showTree.tree.setImageSize(iconWidth,iconHeight);
		FrontProductCategory_showTree.cestatic=actionURL;
		this.categoryId=categoryId1;
		//点击时触发
		FrontProductCategory_showTree.tree.setOnClickHandler(this.toonclick);
		FrontProductCategory_showTree.tree.loadXML("comp-FrontProductCategory_showTreeView-001?namelength="+namelength,this.changeStyle);
	},
	//方法功能：加载dhtml插件
	//context上下文参数
	//actionURL点击节点树后页面跳转的路径
	//categoryId1分类id
	//treeboxId页面中div的id
	//namelength页面中名称截取的长度
	//iconWidth图标宽度
    //iconHeight图标高度
	loadTreeLazy:function(context,actionURL,categoryId1,treeboxId,namelength,iconWidth,iconHeight){
		FrontProductCategory_showTree.tree=new dhtmlXTreeObject(treeboxId,"100%","100%",1);
		FrontProductCategory_showTree.tree.setImagePath(context+"/images/product/dhtmlXTree/images/");
		FrontProductCategory_showTree.tree.setImageSize(iconWidth,iconHeight);
		FrontProductCategory_showTree.cestatic=actionURL;
		this.categoryId=categoryId1;
		//点击时触发
		FrontProductCategory_showTree.tree.setOnClickHandler(this.toonclick);
		FrontProductCategory_showTree.tree.setXMLAutoLoading("comp-FrontProductCategory_showTreeLazily-001?namelength="+namelength);
		FrontProductCategory_showTree.tree.loadXML("comp-FrontProductCategory_showTreeLazily-001?namelength="+namelength,this.changeStyle);
	},
	//替换cid
	toonclick:function(cid){
		document.location = FrontProductCategory_showTree.cestatic.replace("parameter_categoryid",cid);
	},
	//聚焦当前显示分类
	changeStyle:function(){
		if(FrontProductCategory_showTree.categoryId){
			FrontProductCategory_showTree.tree.openItem(FrontProductCategory_showTree.categoryId);
		}
	}
}
