<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html>
<head>
<title>[$iwpc_version]</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="../html/tree/xtree.js"></script>
<script type="text/javascript" src="../html/tree/xmlextras.js"></script>
<script type="text/javascript" src="../html/tree/xloadtree.js"></script>
<script type="text/javascript" src="../html/functions.js"></script>
<link type="text/css" rel="stylesheet" href="../html/tree/xtree.css" />
<LINK href="../html/xmenu.css" type=text/css rel=stylesheet>
<SCRIPT src="../html/xmenu.js" type=text/javascript></SCRIPT>

<style type="text/css">

body {
	background:	white;
	color:		black;
}

</style>

<SCRIPT language=JavaScript>
var elo;
var loadmenuok=false;
var type = 'main';
var sId = '[$sId]';
function going(action, NodeID) {
	switch(action) {
		case 'newdoc':
			var leftPos = (screen.availWidth-800) / 2
			var topPos = (screen.availHeight-600) / 2 
			window.open('admin_publish.php?sId=[$sId]&type=main&o=content_editor_frameset&extra=add&NodeID='+NodeID ,'','width=800,height=600,scrollbars=no,resizable=no,titlebar=0,top=' + topPos + ',left=' + leftPos);

			break;
		case 'tpl':
			top.panelWork.location = 'admin_tpl.php?op=sId::' + sId +';o::list;NodeID::' + NodeID;
			break;
		case 'site':
			top.panelWork.location = 'admin_site.php?op=sId::' + sId +';o::edit;NodeID::' + NodeID + '&referer=' + 'admin_publish.php?op=sId::'+ sId +';o::list;NodeID::'+ NodeID +';type::main';
			break;
		case 'publish':
			top.panelWork.location = 'admin_publish.php?op=sId::' + sId +';o::list;NodeID::'+ NodeID +';type::main';
			break;
		case 'refresh':
			var arr = showModalDialog("admin_publish.php?sId=[$sId]&o=siteRefresh&NodeID="+ NodeID,"color","dialogWidth:300px;dialogHeight:260px;help:0;status:0;scroll:no");
			//alert(arr);
			
			var returnValue = CMSware_send("admin_task.php?sId=[$sId]&o=refreshSite&NodeID=" + NodeID + "&refresh_index=" + arr['refresh_index'] + "&refresh_content=" + arr['refresh_content'] + "&refresh_extra=" + arr['refresh_extra'] + "&include_sub=" + arr['include_sub'] + "&content_num=" + arr['content_num']);
			
			//alert(returnValue);
			top.CrawlerTaskFrame.addThread("admin_task.php?sId=[$sId]&o=refreshSite&mode=running&TaskID="+returnValue+"&NodeID=" + NodeID + "&content_num=" + arr['content_num'], returnValue);

			top.TaskInfoFrame.addInfo('{lang:taskinfo_refresh_start}', returnValue)

			break;


	}
}


function rightMenu(NodeID) {
	//alert(NodeID)

}
</SCRIPT>

</head>
<body>
<script type="text/javascript">

/// XP Look
webFXTreeConfig.rootIcon		= "../html/tree/images/xp/folder.png";
webFXTreeConfig.openRootIcon	= "../html/tree/images/xp/openfolder.png";
webFXTreeConfig.folderIcon		= "../html/tree/images/xp/folder.png";
webFXTreeConfig.openFolderIcon	= "../html/tree/images/xp/openfolder.png";
webFXTreeConfig.fileIcon		= "../html/tree/images/xp/file.png";
webFXTreeConfig.lMinusIcon		= "../html/tree/images/xp/Lminus.png";
webFXTreeConfig.lPlusIcon		= "../html/tree/images/xp/Lplus.png";
webFXTreeConfig.tMinusIcon		= "../html/tree/images/xp/Tminus.png";
webFXTreeConfig.tPlusIcon		= "../html/tree/images/xp/Tplus.png";
webFXTreeConfig.iIcon			= "../html/tree/images/xp/I.png";
webFXTreeConfig.lIcon			= "../html/tree/images/xp/L.png";
webFXTreeConfig.tIcon			= "../html/tree/images/xp/T.png";
webFXTreeConfig.blankIcon		= "../html/tree/images/blank.png";

//var tree = new WebFXLoadTree("WebFXLoadTree", "tree1.xml");
//tree.setBehavior("classic");
/*
	rootIcon        : 'images/foldericon.png',
	openRootIcon    : 'images/openfoldericon.png',
	folderIcon      : 'images/foldericon.png',
	openFolderIcon  : 'images/openfoldericon.png',
	fileIcon        : 'images/file.png',
	iIcon           : 'images/I.png',
	lIcon           : 'images/L.png',
	lMinusIcon      : 'images/Lminus.png',
	lPlusIcon       : 'images/Lplus.png',
	tIcon           : 'images/T.png',
	tMinusIcon      : 'images/Tminus.png',
	tPlusIcon       : 'images/Tplus.png',
	blankIcon       : 'images/blank.png',
	defaultText     : 'Tree Item',
	defaultAction   : 'javascript:void(0);',
	defaultBehavior : 'classic',
	usePersistence	: true
*/
var rti;
var tree = new WebFXTree("{lang:root}");
tree.cId = 0;
tree.add(new WebFXTreeItem("{lang:comment_setting}","[$base_url]&o=index::comment_setting", "panelWork", "[$var.NodeID]", '', '../html/tree/images/xp/setting.gif', '../html/tree/images/xp/setting.gif'));
tree.add(new WebFXTreeItem("{lang:plugin_setting}","[$base_url]&o=index::setting", "panelWork", "[$var.NodeID]", '', '../html/tree/images/xp/setting.gif', '../html/tree/images/xp/setting.gif'));
<loop $NodeInfo key=key var=var>
<if $var.haveSon == 1>
tree.add(new WebFXLoadTreeItem("[@htmlspecialchars($var.Name)]", "[$base_url]&o=index::tree_xml&NodeID=[$var.NodeID]", "[$base_url]&o=admin_base::list&NodeID=[$var.NodeID]", "panelWork" , "[$var.NodeID]"));
<else>
tree.add(new WebFXTreeItem("[@htmlspecialchars($var.Name)]","[$base_url]&o=admin_base::list&NodeID=[$var.NodeID]", "panelWork", "[$var.NodeID]"));
</if>
</loop>
 //(sText, sAction, sTarget, sCId, eParent, sIcon, sOpenIcon)
//WebFXLoadTree(sText, sXmlSrc, sAction, sBehavior, sIcon, sOpenIcon) 
//tree.add(rti = new WebFXLoadTreeItem("Tree Item 3 (Reload)", "../html/tree/date.xml.pl"));
//tree.add(new WebFXTreeItem("Tree Item 4"));

document.write(tree);

</script>
<div id="menudata"></div>

</body>
</html>
