<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<link href="css/admin.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" language="javascript" src="js/jquery.js"></script>
<script type="text/javascript" language="javascript">
<!--
$(function(){
$.each( $('.table_content'),
function(){
$(this).bind('mouseover',function(){$(this).css('background-color','#d9e8fd');});
$(this).bind('mouseout',function(){$(this).css('background-color','#e6f2fe');});
}
);
$('#is_link').bind('click',function(){ckeck_type()});
$('#is_link2').bind('click',function(){ckeck_type()});
get_category(<!--Kw[$nav[0].category]-->);
ckeck_type();
});
function simOptionClick4IE(){    
    var evt=window.event  ;    
    var selectObj=evt?evt.srcElement:null;
    if (evt && selectObj &&  evt.offsetY && evt.button!=2    
        && (evt.offsetY > selectObj.offsetHeight || evt.offsetY<0 ) ) {    
            var oldIdx = selectObj.selectedIndex;    
   
            setTimeout(function(){    
                var option=selectObj.options[selectObj.selectedIndex];
                get_category( selectObj.options.value );
            }, 60);    
    }    
}    
function option_image(){    
    var evt=window.event  ;    
    var selectObj=evt?evt.srcElement:null;
    if (evt && selectObj &&  evt.offsetY && evt.button!=2    
        && (evt.offsetY > selectObj.offsetHeight || evt.offsetY<0 ) ) {    
            var oldIdx = selectObj.selectedIndex;    
   
            setTimeout(function(){    
                var option=selectObj.options[selectObj.selectedIndex];
				document.getElementById('icon').src='../images/icon/'+selectObj.options.value;
            }, 60);    
    }    
}    
function ckeck_type()
{
	if($('#is_link').attr('checked')==false)
	{
		$('#link_area').hide();
		$('#category_area').show();
	}
	else
	{
		$('#link_area').show();
		$('#category_area').hide();
	}
}
function get_category( id )
{
	$.get("get_category2.php","id="+id,function(data){$('#category').html(data)});
}

-->
</script>
</head>

<body>
<table width="100%" border="0" cellspacing="0">
  <tr height="184">
    <td align="left" valign="top" class="table_bg">
      <div class="boxtitle"><!--Kw[$title]--></div>
		<form action="add_nav.php?type=<!--Kw[$stype]-->" method="post" name="form1" target="_self" id="form1">
      <table width="60%" border="0">
        <tr class="table_content">
          <td width="23%" nowrap="nowrap">模块名称</td>
          <td width="77%"><input name="name" type="text" id="name" value="<!--Kw[$nav[0].name]-->" size="35" /></td>
        </tr>
        <tr class="table_content">
          <td nowrap="nowrap">模块图标</td>
          <td>
			<!--Kw[if $nav[0].icon]-->
			<img style="margin:0 10px 0 10px;" src="../images/icon/<!--Kw[$nav[0].icon]-->" id="icon" width="18" height="22" />
			<!--Kw[else]--> 
			<img style="margin:0 10px 0 10px;" src="../images/icon/noimage.png" id="icon" width="18" height="22" />
			<!--Kw[/if]--> 
          <select name="icon" id="icon" onclick="option_image()">
              <!--Kw[section name=images loop=$images]--> 
              <option <!--Kw[if $images[images]==$nav[0].icon]--> selected="selected"<!--Kw[/if]--> onclick="document.getElementById('icon').src='../images/icon/<!--Kw[$images[images]]-->'" value="<!--Kw[$images[images]]-->"><!--Kw[$images[images]]--></option>
              <!--Kw[/section]--> 
            </select></td>
        </tr>
        <tr class="table_content">
          <td nowrap="nowrap">模块类型</td>
          <td><input type="radio" name="is_link" id="is_link" value="1" <!--Kw[if $nav[0].is_link==1]-->checked="true"<!--Kw[/if]-->/>链接
      <input type="radio" name="is_link" id="is_link2" value="0" <!--Kw[if $nav[0].is_link==0]-->checked="true"<!--Kw[/if]-->/>分类</td>
        </tr>
        <tr id="link_area" class="table_content">
          <td>链接地址</td>
          <td><input name="link" type="text" id="link" value="<!--Kw[$nav[0].link]-->" size="35" /></td>
        </tr>
        <tr id="category_area" class="table_content">
          <td>选择分类</td>
          <td><span id="category"></span></td>
        </tr>
        <tr class="table_content">
          <td><!--Kw[if $stype == "editok"]-->
          <input name="id" type="hidden" id="id" value="<!--Kw[$nav[0].id]-->" />
          <!--Kw[/if]--></td>
          <td><span class="button" onclick="document.getElementById('form1').submit()">提交</span></td>
        </tr>
    </table>
    </form>
    </td>
  </tr>
  </table>
</body>
</html>
