{$xml[0]}
<script type="text/javascript" reload="1">
var categoryJson = {$category_json};
function categorySelected(obj){
	var pid = parseInt(obj.value);
	var pc = $('category_shows');
	var lis = pc.getElementsByTagName('li');
	var index = parseInt(obj.parentNode.getAttribute('rel'));
	while(lis.length > index+1){
		pc.removeChild(lis[index+1]);
	}
	var data = [];
	for(var i=0;i<categoryJson.length;i++){
		if(categoryJson[i]['pid'] == pid){
			data.push(categoryJson[i]);
		}
	}
	if(data.length> 0){
		var n = lis.length;
		var li = document.createElement('li');
		li.setAttribute('rel', n);
		var html = "<select size='12' style='height:200px;width:100px' onchange='categorySelected(this)'>";
		for(var i=0;i<data.length;i++){
			html += "<option value='"+data[i]['cid']+"'>"+data[i]['title']+"</option>";
		}
		html += "</select>";
		li.innerHTML = html;
		pc.appendChild(li);
	}else{
		if(document.all){
			var o = document.myform.cid.options;
		}else{
			var o = $('cid').options;
		}
		for(var i=0;i<o.length;i++){
			if(parseInt(o[i].value) == parseInt(obj.value)) {
				o.selectedIndex = i;
				qmeCms.dialogView.close();
				break;
			}
		}
	}
}
</script>
<div >
	<ul id="category_shows" style="height:200px">
		<li style="float:left" rel="0">
			<select size="12" style="height:200px;width:100px" onchange="categorySelected(this)">
				<!--{loop $menus $val}-->
				<!--{if $val['pid'] == 0}--><option value="{$val['cid']}">{$val['title']}</option><!--{/if}-->
				<!--{/loop}-->
			</select>
		</li>
	</ul>
</div>
<div class="clear"></div>
{$xml[1]}