<%@ Page Language="C#" AutoEventWireup="True" CodeBehind="index.aspx.cs" Inherits="MYAPP.Manage.Project.Design.index" %>
<%@ Register TagPrefix="ComponentArt" Namespace="ComponentArt.Web.UI" Assembly="ComponentArt.Web.UI" %>
<!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 runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<script language="JavaScript" type="text/javascript" src="/js/tdialog.js"></script>
<script language='JavaScript' type='text/javascript' src='/js/common.js'></script>
<script language="JavaScript" type="text/javascript" src="/js/odialog.js"></script>
<link href="/CSS/main.css" rel="stylesheet" type="text/css" />
<link href="splitterStyle.css" type="text/css" rel="stylesheet" />
<link href="treeStyle.css" type="text/css" rel="stylesheet" />
<title><%=GetValue("/Project", "Name")%></title>
<script language="JavaScript" type="text/javascript">
    var _Value = 0,_Scene_ID=0;
	var _NodeSelectTF = true;
    function nodeSelect(node) {
        _Value = node.GetProperty('Value');
		
		if (_NodeSelectTF==true){
			switch (_Value.split("_")[0]) 
			{
				case "pcollect":_Scene_ID=_Value.split("_")[1]; getmainFrame().location="<%=GetNodeConfigValue("/config/tree/node[@id='PCollect']","childNavigateUrl")%>".replace('{action}','edit').replace('{Tour_ID}','<%=_Tour_ID%>'); break; 
				
				case "scene":_Scene_ID=_Value.split("_")[1]; getmainFrame().location="<%=GetNodeConfigValue("/config/tree/node[@id='TScene']","sceneNavigateUrl")%>".replace('{action}','edit').replace('{Tour_ID}','<%=_Tour_ID%>').replace('{Scene_ID}',_Value.split("_")[1]); break; 
				case "scenehotspot": _Scene_ID=_Value.split("_")[1]; getmainFrame().location="Scene/List_Hotspot.aspx?Tour_ID={Tour_ID}&Scene_ID={Scene_ID}".replace('{Tour_ID}','<%=_Tour_ID%>').replace('{Scene_ID}',_Value.split("_")[1]); break; 
				case "sceneplugin": _Scene_ID=_Value.split("_")[1]; getmainFrame().location="Scene/List_Plugin.aspx?Tour_ID={Tour_ID}&Scene_ID={Scene_ID}".replace('{Tour_ID}','<%=_Tour_ID%>').replace('{Scene_ID}',_Value.split("_")[1]); break; 
				case "scenelensflare": _Scene_ID=_Value.split("_")[1]; getmainFrame().location="Scene/List_Lensflare.aspx?Tour_ID={Tour_ID}&Scene_ID={Scene_ID}".replace('{Tour_ID}','<%=_Tour_ID%>').replace('{Scene_ID}',_Value.split("_")[1]); break; 
				case "plugin": getmainFrame().location="<%=GetNodeConfigValue("/config/tree/node[@id='Plugin']","childNavigateUrl")%>".replace('{action}','edit').replace('{Tour_ID}','<%=_Tour_ID%>').replace('{ROW}',_Value.split("_")[1]); break; 
				case "custommap": getmainFrame().location="<%=GetNodeConfigValue("/config/tree/node[@id='CustomMap']","childNavigateUrl")%>".replace('{action}','edit').replace('{Tour_ID}','<%=_Tour_ID%>').replace('{ROW}',_Value.split("_")[1]); break; 
				case "textstyle": getmainFrame().location="<%=GetNodeConfigValue("/config/tree/node[@id='TextStyle']","childNavigateUrl")%>".replace('{action}','edit').replace('{Tour_ID}','<%=_Tour_ID%>').replace('{ROW}',_Value.split("_")[1]); break; 
				case "action": getmainFrame().location="<%=GetNodeConfigValue("/config/tree/node[@id='Action']","childNavigateUrl")%>".replace('{action}','edit').replace('{Tour_ID}','<%=_Tour_ID%>').replace('{ROW}',_Value.split("_")[1]); break; 
				case "data": getmainFrame().location="<%=GetNodeConfigValue("/config/tree/node[@id='Data']","childNavigateUrl")%>".replace('{action}','edit').replace('{Tour_ID}','<%=_Tour_ID%>').replace('{ROW}',_Value.split("_")[1]); break; 
				case "contextmenu": getmainFrame().location="<%=GetNodeConfigValue("/config/tree/node[@id='Contextmenu']","childNavigateUrl")%>".replace('{action}','edit').replace('{Tour_ID}','<%=_Tour_ID%>').replace('{ROW}',_Value.split("_")[1]); break; 
				case "include": getmainFrame().location="<%=GetNodeConfigValue("/config/tree/node[@id='Include']","childNavigateUrl")%>".replace('{action}','edit').replace('{Tour_ID}','<%=_Tour_ID%>').replace('{ROW}',_Value.split("_")[1]); break; 
				case "tscene": getmainFrame().location="<%=GetNodeConfigValue("/config/tree/node[@id='TScene']","childNavigateUrl")%>".replace('{action}','edit').replace('{Tour_ID}','<%=_Tour_ID%>').replace('{TypeID}',_Value.split("_")[1]); break; 
			}
		}
		return true;
    }

/*    function ButAdd() {
		try
		{
			switch (_Value.split("_")[0]) 
			{   
				case "Scene": top.openWindow('Scene/ADD_Scene.aspx?action=add&Tour_ID=<%=_Tour_ID%>&Scene_ID=0', '420', '164', "ADD Scene" ,'no');   break; 
				//case "Plugin": top.openWindow("Tour/ADD_Plugin.aspx?action=add&Tour_ID=<%=_Tour_ID%>&ROW=0", '420', '164', "ADD Plugin" ,'no');   break; 
				case "Plugin": getmainFrame().location="Tour/AD_Plugin.aspx?action=add&Tour_ID=<%=_Tour_ID%>&ROW=0";   break; 
				case "CustomMap": getmainFrame().location="Tour/Map/AD_Map.aspx?action=add&Tour_ID=<%=_Tour_ID%>&ROW=0";   break; 
				//default:alert("Error!!!");
			}
		}catch(exception){alert("Error!!!");}
    }*/

    function resizeTree(DomElementId, NewPaneHeight, NewPaneWidth) {
        TV_Tree.Render();
    }

    function Command_AddChildNode(_text, _value, _image, _up_value) {
        TV_Tree.beginUpdate();
        var newNode = new ComponentArt.Web.UI.TreeViewNode();
        newNode.set_text(_text);
        newNode.set_value(_value);
        newNode.set_imageUrl(_image);
        newNode.set_expanded(true);
        TV_Tree.findNodeByProperty("Value", _up_value).get_nodes().add(newNode);
        TV_Tree.endUpdate();
    }

    function Command_EditChildNode(_text, _value, _image, _up_value) {

        TV_Tree.beginUpdate();
        var newNode = TV_Tree.findNodeByProperty("Value", _value);
        if (_up_value == newNode.get_parentNode().get_value()) {
            newNode.set_text(_text);
            newNode.set_value(_value);
            newNode.set_imageUrl(_image);
        }
        else {
            TV_Tree.findNodeByProperty("Value", _value).remove();
            newNode.set_text(_text);
            newNode.set_value(_value);
            newNode.set_imageUrl(_image);
            newNode.set_expanded(true);
            TV_Tree.findNodeByProperty("Value", _up_value).get_nodes().add(newNode);
        }
        TV_Tree.endUpdate();
    }

    function Command_DelChildNode() {
        TV_Tree.get_selectedNode().remove();
    }
</script>
<script language="JavaScript" type="text/javascript">
function updatetour()
{
	window.document.title=AjaxDemo.GetValue('<%=_Tour_ID%>' ,'/Project', 'Name').value;
	TV_Tree.beginUpdate();
	var newNode = TV_Tree.findNodeByProperty("Value", "Project");
	newNode.set_text("<%=GetNodeConfigValue("/config/tree","Text")%>".replace('{text}',parent.window.document.title));
	TV_Tree.endUpdate();
}

function updatescenebyid(sceneid)
{
	var newNode = TV_Tree.findNodeByProperty("Value", "scene_"+sceneid);
	TV_Tree.beginUpdate();
	Command_EditChildNodeN(newNode,sceneid+":"+AjaxDemo.GetElemValueByPath(<%=_Tour_ID%>,sceneid,"Name").value, "scene_"+sceneid, true, "<%=GetNodeConfigValue("/config/tree/node[@id='TScene']","sceneimageUrl")%>", "", "",false);
	TV_Tree.endUpdate();
}
function updatecustommap()
{
	TV_Tree.beginUpdate();
    var newNode = TV_Tree.findNodeByProperty("Value", "CustomMap");
	newNode.get_nodes().clear();
	var dr_plugin = AjaxDemo.Get_CustomMaps('<%=_Tour_ID%>').value;

	for(var i=0; i<dr_plugin.length; i++)
	{
		var _txt="";
		var dr=dr_plugin[i];
		if (dr.parent!="")
		{
			_txt=dr.name+"->["+dr.parent+"]";
		}
		else
		{
			_txt=dr.name;
		}
		Command_AddChildNodeN(newNode,dr.id+":"+_txt, "custommap_"+dr.row, true, "<%=GetNodeConfigValue("/config/tree/node[@id='CustomMap']","childImageUrl")%>", "", "",false);
	}

	TV_Tree.endUpdate();
}
function updatecustommapbyid(rowid)
{
	var _txt="",_parent,_id;
	var newNode = TV_Tree.findNodeByProperty("Value", "custommap_"+rowid);
	TV_Tree.beginUpdate();
	_id=AjaxDemo.Get_CustomMap_NodeValue('<%=_Tour_ID%>',rowid,"id").value;
	_txt=AjaxDemo.Get_CustomMap_NodeValue('<%=_Tour_ID%>',rowid,"name").value;
	_parent=AjaxDemo.Get_CustomMap_NodeValue('<%=_Tour_ID%>',rowid,"parent").value;
		if (_parent!="")
		{
			_txt=_txt+"->["+_parent+"]";
		}


	Command_EditChildNodeN(newNode,_id+":"+_txt, "custommap_"+rowid, true, "<%=GetNodeConfigValue("/config/tree/node[@id='CustomMap']","childImageUrl")%>", "", "",false);
	TV_Tree.endUpdate();
}

function updateplugin()
{
	TV_Tree.beginUpdate();
    var newNode = TV_Tree.findNodeByProperty("Value", "Plugin");
	newNode.get_nodes().clear();
	var dr_plugin = AjaxDemo.Get_Plugins('<%=_Tour_ID%>').value;

	for(var i=0; i<dr_plugin.length; i++)
	{
		var _txt="";
		var dr=dr_plugin[i];
		if (dr.parent!="")
		{
			_txt=dr.name+"->["+dr.parent+"]";
		}
		else
		{
			_txt=dr.name;
		}
		Command_AddChildNodeN(newNode,dr.row+":"+_txt, "plugin_"+dr.row, true, "<%=GetNodeConfigValue("/config/tree/node[@id='Plugin']","childImageUrl")%>", "", "",false);
	}

	TV_Tree.endUpdate();
}

function updatepluginbyid(rowid)
{
	var _txt="",_parent;
	var newNode = TV_Tree.findNodeByProperty("Value", "plugin_"+rowid);
	TV_Tree.beginUpdate();
	_txt=AjaxDemo.Get_Plugin_NodeValue('<%=_Tour_ID%>',rowid,"name").value;
	_parent=AjaxDemo.Get_Plugin_NodeValue('<%=_Tour_ID%>',rowid,"parent").value;
		if (_parent!="")
		{
			_txt=_txt+"->["+_parent+"]";
		}

	Command_EditChildNodeN(newNode,rowid+":"+_txt, "plugin_"+rowid, true, "<%=GetNodeConfigValue("/config/tree/node[@id='Plugin']","childImageUrl")%>", "", "",false);
	TV_Tree.endUpdate();
}


function updateKRPanoNode(xpath,Bhead_nodename,head_nodename)
{
	TV_Tree.beginUpdate();
    var newNode = TV_Tree.findNodeByProperty("Value", Bhead_nodename);
	newNode.get_nodes().clear();
	var dr_node = AjaxDemo.Get_KRPanoNode('<%=_Tour_ID%>',xpath).value;

	for(var i=0; i<dr_node.length; i++)
	{
		var _txt="";
		var dr=dr_node[i];
		
		_txt=dr.name;

		Command_AddChildNodeN(newNode,dr.row+":"+_txt, head_nodename+dr.row, true, AjaxDemo.GetNodeConfigValue("/config/tree/node[@id='"+head_nodename+"']","childImageUrl").value, "", "",false);
	}

	TV_Tree.endUpdate();
}

function selectbyvalue(_value)
{
	_NodeSelectTF=false;
	try
	{
		 TV_Tree.selectNodeById(_value);
		 TV_Tree.findNodeById(_value).expand(true);
	}catch(exception){}
	_NodeSelectTF=true;
}

function re_select()
{
	try
	{
	 TV_Tree.selectNodeById(_Value);
	 TV_Tree.findNodeById(_Value).expand(true);
	}catch(exception){}
}

function Command_EditChildNodeN(newNode,_name,_id,_expanded,_imageurl,_navurl,_target,_ShowCheckBox)
    {    
		newNode.set_id(_id);
		newNode.set_text(_name);
        newNode.set_value(_id);
        newNode.set_imageUrl(_imageurl);    
        newNode.set_expanded(_expanded);
        newNode.set_target(_target);
        newNode.set_navigateUrl(_navurl);
		newNode.setProperty("ShowCheckBox", _ShowCheckBox); 
    } 
	
function Command_AddChildNodeN(up_node,_name,_id,_expanded,_imageurl,_navurl,_target,_ShowCheckBox)
    {    
        var newNode = new ComponentArt.Web.UI.TreeViewNode(); 
		newNode.set_id(_id);
		newNode.set_text(_name);
        newNode.set_value(_id);
        newNode.set_imageUrl(_imageurl);    
        newNode.set_expanded(_expanded);
        newNode.set_target(_target);
        newNode.set_navigateUrl(_navurl);
		newNode.setProperty("ShowCheckBox", _ShowCheckBox); 
		newNode.set_selectable(true); 
        try
        {
            up_node.get_nodes().add(newNode);
        }
        catch(exception){up_node.add(newNode);}    
        return newNode;
    }      
</script>
<script language="JavaScript" type="text/javascript">
    function reloadmainBEFrame()
    {
	    mainFrame.mainBEFrame.location=mainFrame.mainBEFrame.location
    }  

    function reloadmainFrame()
    {
	    mainFrame.location=mainFrame.location;
    }  

    function getmainFrame()
    {
        return mainFrame;
    }

    function getmainBEFrame()
    {
        return mainFrame.mainBEFrame;
    }
    function close_dialog()
    {
        new dialog().reset();
    }
    if (top.location != location)
    {
          top.location.href = location.href;
    }
// self.resizeTo(1024,768);
 self.focus();	
 
function updateaction()
{
	updateKRPanoNode('/Project/Actions/action','Action','action_');
}

function updatetextstyle()
{
	updateKRPanoNode('/Project/TextStyles/textstyle','TextStyle','textstyle_');
}

function updatedata()
{
	updateKRPanoNode('/Project/Datas/data','Data','data_');
}

function updatecontextmenu()
{
	updateKRPanoNode('/Project/contextmenu/item','Contextmenu','contextmenu_');
}

function updateinclude()
{
	updateKRPanoNode('/Project/Includes/include','Include','include_');
}
function updatescenetree()
{
	if ('<%=GetValue("/Project", "EnableListScene")%>'!="False")
	{
		TV_Tree.beginUpdate();
		var newNode = TV_Tree.findNodeByProperty("Value", "TScene");
		newNode.get_nodes().clear();
		var dr_plugin = AjaxDemo.Get_TypeTree('<%=_Tour_ID%>').value;
	
		//默认分组
		var mNode=Command_AddChildNodeN(newNode,"[默认分组]", "tscene_", false, "<%=GetNodeConfigValue("/config/tree/node[@id='TScene']","childImageUrl")%>", "", "",false);
		updatetypescene(mNode,'');
		//
		updatescenetreenode(newNode,dr_plugin,"");
		TV_Tree.endUpdate();
	}
}
function updatescenetreenode(upNode,dr_plugin,upid)
{
	for(var i=0; i<dr_plugin.length; i++)
	{
		var dr=dr_plugin[i];
		if (dr.upid==upid)
		{
			//var newNode=Command_AddChildNodeN(upNode,dr.name, "tscene_"+dr.id, false, "<%=GetNodeConfigValue("/config/tree/node[@id='TScene']","childImageUrl")%>", "<%=GetNodeConfigValue("/config/tree/node[@id='TScene']","childNavigateUrl")%>".replace('{action}','edit').replace('{Tour_ID}','<%=_Tour_ID%>').replace('{TypeID}',dr.id), "mainFrame",false);	
			var newNode=Command_AddChildNodeN(upNode,dr.id+":"+dr.name, "tscene_"+dr.id, false, "<%=GetNodeConfigValue("/config/tree/node[@id='TScene']","childImageUrl")%>", "", "",false);	
			updatescenetreenode(newNode,dr_plugin,dr.id);
			updatetypescene(newNode,dr.id);
		}
	}
}

function updatetypescene(newNode,typeid)
{
    //var newNode = TV_Tree.findNodeByProperty("Value", "tscene_"+typeid);

	var dr_scene = AjaxDemo.Get_TypeScenes('<%=_Tour_ID%>',typeid).value;	
	for(var i=0; i<dr_scene.length; i++)
	{
		var dr=dr_scene[i];
		var scene_node = Command_AddChildNodeN(newNode,dr[0]+":"+AjaxDemo.GetElemValueByPath(<%=_Tour_ID%>,dr[0],"Name").value, "scene_"+dr[0], false, "<%=GetNodeConfigValue("/config/tree/node[@id='TScene']","sceneimageUrl")%>", "", "",false);
		//场景下属
		Command_AddChildNodeN(scene_node,"插件(s)", "sceneplugin_"+dr[0], false, "", "", "",false);
		Command_AddChildNodeN(scene_node,"热点(s)", "scenehotspot_"+dr[0], false, "", "", "",false);
		Command_AddChildNodeN(scene_node,"眩光(s)", "scenelensflare_"+dr[0], false, "", "", "",false);
		//
	}

}

function addscene(scene_id)
{
	TV_Tree.beginUpdate();
	var newNode = TV_Tree.findNodeByProperty("Value", "tscene_"+AjaxDemo.GetElemValueByPath(<%=_Tour_ID%>,scene_id,"TypeID").value);

	var scene_node = Command_AddChildNodeN(newNode,scene_id+":"+AjaxDemo.GetElemValueByPath(<%=_Tour_ID%>,scene_id,"Name").value, "scene_"+scene_id, false, "<%=GetNodeConfigValue("/config/tree/node[@id='TScene']","sceneimageUrl")%>", "", "",false);
		//场景下属
	Command_AddChildNodeN(scene_node,"插件(s)", "sceneplugin_"+scene_id, false, "", "", "",false);
	Command_AddChildNodeN(scene_node,"热点(s)", "scenehotspot_"+scene_id, false, "", "", "",false);
	Command_AddChildNodeN(scene_node,"眩光(s)", "scenelensflare_"+scene_id, false, "", "", "",false);
	TV_Tree.endUpdate();
}
function delscene(scene_id)
{
	TV_Tree.beginUpdate();
	//var newNode = TV_Tree.findNodeByProperty("Value", "tscene_"+AjaxDemo.GetElemValueByPath(<%=_Tour_ID%>,scene_id,"TypeID").value);
	selectbyvalue("scene_"+scene_id);
	TV_Tree.get_selectedNode().remove();
	TV_Tree.endUpdate();
}
function _load()
{
	updatepcollecttree();
	updatescenetree();
	updateplugin();
	updatecustommap();
	updateaction();
	updatetextstyle();
	updatedata();
	updatecontextmenu();
	updateinclude();	
}
function openscene()
{
	if (_Scene_ID==0)
	{
		alert("请先选择场景!!!");
	}
	else
	{
		window.open('/project/<%=_Tour_ID%>/view_tour_'+_Scene_ID+'_0.aspx');
	}
}
function sceneid(id)
{
	_Scene_ID=id;
}

function updatepcollecttree()//更新图集分组
{
		TV_Tree.beginUpdate();
		var newNode = TV_Tree.findNodeByProperty("Value", "PCollect");
		newNode.get_nodes().clear();
		var dr_pcollect = AjaxDemo.Get_PCollectType('<%=_Tour_ID%>').value;
	
		//默认分组
		var mNode=Command_AddChildNodeN(newNode,"[默认分组]", "pcollect_", false, "<%=GetNodeConfigValue("/config/tree/node[@id='PCollect']","childImageUrl")%>", "", "",false);
		
		updatepcollecttreenode(newNode,dr_pcollect,"");
		TV_Tree.endUpdate();
}

function updatepcollecttreenode(upNode,dr_pcollect,upid)
{
	for(var i=0; i<dr_pcollect.length; i++)
	{
		var dr=dr_pcollect[i];
		if (dr.upid==upid)
		{
			//var newNode=Command_AddChildNodeN(upNode,dr.name, "tscene_"+dr.id, false, "<%=GetNodeConfigValue("/config/tree/node[@id='PCollect']","childImageUrl")%>", "<%=GetNodeConfigValue("/config/tree/node[@id='PCollect']","childNavigateUrl")%>".replace('{action}','edit').replace('{Tour_ID}','<%=_Tour_ID%>').replace('{TypeID}',dr.id), "mainFrame",false);	
			var newNode=Command_AddChildNodeN(upNode,dr.id+":"+dr.name, "pcollect_"+dr.id, false, "<%=GetNodeConfigValue("/config/tree/node[@id='PCollect']","childImageUrl")%>", "", "",false);	
			updatepcollecttreenode(newNode,dr_pcollect,dr.id);
		}
	}
}

function edit_skin()
{
		url='skin/index.aspx?Tour_ID=<%=_Tour_ID%>', '动作编辑器' , 'scrollbars=yes';
	
	    he = screen.availHeight; wi = screen.availWidth;
        ctop = ((screen.availHeight - he) / 2); 
		cleft = ((screen.availWidth - wi) / 2);

        var selProdWnd = window.open(url, "skinedit", "channelmode=no,directories=no,resizable=yes,width=" + wi + ",height=" + he + ",left=" + cleft + ",top=" + ctop + ",scrollbars=no,status=yes,titlebar=yes,toolbar=no,unadorned=yes");
        if (selProdWnd.opener == null)
            selProdWnd.opener = self;
}
function ExportTemplate()//导出成模板
{
	top.openWindow("ExportTemplate/index.aspx?action=edit&Tour_ID=<%=_Tour_ID%>", '420', '158', '模板导出设置' ,'no');
}
function ExportSet()
{
	top.openWindow('Publish/index.aspx?Tour_ID=<%=_Tour_ID%>', '640', '342', '发布设置' ,'no');
}
function TourConfigSet()
{
	top.openWindow('Config/AD_Config.aspx?Tour_ID=<%=_Tour_ID%>', '640', '342', '漫游默认参数设置' ,'no');
}
</script>
</head>
</head>
<body style="margin:0px; padding:0px; overflow-y:hidden; overflow-x:hidden"  onload="_load();">
<form id="theform" runat="server">
  <table width="100%" cellspacing="0" border="1" align="center" cellpadding="0" bordercolor="#CCCCCC"
            class="board_kong">
    <tr>
      <td><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="1">
          <tr>
            <td style="border-bottom: #CCCCCC 1px solid; height: 24px"><table class="title_table">
                <tr>
                  <td width="500" align="left"><input type="button" class="displaynone" value="Config" onClick="getmainFrame().location='Config/AD_Config.aspx?Tour_ID=<%=_Tour_ID%>';" /><input type="button" class="width80px" value="漫游附件" onClick="window.open('Tour/List_Accessories_Info.aspx?curl=%FIRSTXML%/Accessories&dir=Accessories&Info_ID=<%=_Tour_ID%>','Accessories_Info','toolbar=no,resizable=yes,status=yes');" />
                  <input type="button" class="width80px" value="分组管理" onClick="getmainFrame().location='Tour/SceneType/List_SceneType.aspx?Tour_ID=<%=_Tour_ID%>';" />
                  <input type="button" class="displaynone" value="界面皮肤" onclick="edit_skin();" />
                  <input type="button" class="width80px" value="参数设置" onclick="TourConfigSet();" />
                  <input type="button" class="width80px" value="导出模板" onclick="ExportTemplate();" />
                  <input type="button" class="width80px" value="发布设置" onclick="ExportSet();" /></td>
                  <td>&nbsp;</td>
                  <td align="right"><%if (COE.Components.MyFun.GetNumber()==1000000){%><input type="button" class="width80px" onclick="window.open('Export_TourXml.aspx?Tour_ID=<%=_Tour_ID%>&navurlx=<%=COE.Components.Encrypt.EncryptString("Scene/AD_AutoHotspot.aspx?action=add&Tour_ID="+_Tour_ID+"&Scene_ID=0&ROW=0")%>');" value="自动热点"/><%}%>
                    <input type="button" class="width80px" value="刷新场景" onclick="updatescenetree();" style="display:none" />
                    <input type="button" class="width80px" value="漫游预览" onClick="window.open('Export_TourXml.aspx?Tour_ID=<%=_Tour_ID%>');" />
                    <input type="button" class="width80px" value="场景预览" onClick="openscene();" />
                    <input type="button"  value="刷新窗口" onClick="window.location=window.location;" class="width80px" />
                  <input type="button"  value="关闭窗口" onClick="window.close();" class="width80px"/></td>
                </tr>
              </table></td>
          </tr>
          <tr>
            <td valign="top"><ComponentArt:Splitter runat="server" ID="sp" FillHeight="true" FillWidth="true"
                                    ImagesBaseUrl="images/Splitter/">
                <Layouts>
                  <ComponentArt:SplitterLayout>
                    <Panes Orientation="Horizontal" SplitterBarCssClass="HorizontalSplitterBar" SplitterBarActiveCssClass="ActiveSplitterBar"
                                                SplitterBarWidth="5">
                      <ComponentArt:SplitterPane PaneContentId="TreeViewContent" Width="200" MinWidth="0"
                                                    ClientSideOnResize="resizeTree" CssClass="SplitterPane" />
                      <ComponentArt:SplitterPane>
                      <panes orientation="Vertical" splitterbarcollapseimageurl="splitter_verCol.gif" splitterbarcollapsehoverimageurl="splitter_verColHover.gif"
                                                        splitterbarexpandimageurl="splitter_verExp.gif" splitterbarexpandhoverimageurl="splitter_verExpHover.gif"
                                                        splitterbarcollapseimagewidth="116" splitterbarcollapseimageheight="5" splitterbarcssclass="VerticalSplitterBar"
                                                        splitterbarcollapsedcssclass="CollapsedVerticalSplitterBar" splitterbaractivecssclass="ActiveSplitterBar"
                                                        splitterbarwidth="5">
                        <ComponentArt:SplitterPane PaneContentId="MainContent" CssClass="SplitterPane" />
                      </panes>
                      </ComponentArt:SplitterPane>
                    </Panes>
                  </ComponentArt:SplitterLayout>
                </Layouts>
                <Content>
                  <ComponentArt:SplitterPaneContent id="TreeViewContent">
                    <ComponentArt:TreeView ID="TV_Tree" Height="100%" Width="100%" EnableViewState="false"
                                                ClientSideOnNodeSelect="nodeSelect" KeyboardEnabled="false" ShowLines="true"
                                                DisplayMargin="false" NodeCssClass="TreeNode" SelectedNodeCssClass="SelectedTreeNode"
                                                MultipleSelectedNodeCssClass="MultipleSelectedTreeNode" HoverNodeCssClass="HoverTreeNode"
                                                NodeEditCssClass="NodeEdit" CutNodeCssClass="CutTreeNode" MarginWidth="20" DefaultMarginImageWidth="24"
                                                DefaultMarginImageHeight="20" LineImageWidth="19" LineImageHeight="20" NodeLabelPadding="3"
                                                ParentNodeImageUrl="folders.gif" LeafNodeImageUrl="folder.gif" CollapseImageUrl="exp.gif"
                                                ExpandImageUrl="col.gif" ExpandCollapseImageWidth="19" ExpandCollapseImageHeight="20"
                                                ImagesBaseUrl="images/tree/" LineImagesFolderUrl="images/lines/" runat="server" CausesValidation="False" CollapseNodeOnSelect="False" MultipleSelectEnabled="False" ViewStateMode="Disabled" ExpandNodeOnSelect="False" ExpandSelectedPath="False"> </ComponentArt:TreeView>
                  </ComponentArt:SplitterPaneContent>
                  <ComponentArt:SplitterPaneContent id="MainContent">
                    <iframe src="Tour/AD_Tour.aspx?action=edit&Tour_ID=<%=_Tour_ID%>" id="mainFrame" name="mainFrame" width="100%" height="100%" 
                                                frameborder="0"></iframe>
                  </ComponentArt:SplitterPaneContent>
                </Content>
              </ComponentArt:Splitter></td>
          </tr>
        </table></td>
    </tr>
  </table>
</form>
</body>
</html>
