<div class="content_div_small">
  <div class="table_tab_div">
    <div class="table_tab_left"></div>
    <div class="table_tab">马赛克描述符</div>
    <div class="table_tab_right"></div>
  </div>
  <table>
    <tr>
      <th>马赛克入口点</th>
      <td class="header" colspan="2">
        <select id="descMosaic">
          <option value="0">未选中</option>
          <option value="1" selected="selected">选中</option>
        </select>
      </td>
    </tr>
    <tr>
      <th>水平基本单元数</th>
      <td class="header" colspan="2">
        <select id="descHorCell">
          <option value="0" selected="selected">一个单元</option>
          <option value="1">二个单元</option>
          <option value="2">三个单元</option>
          <option value="3">四个单元</option>
          <option value="4">五个单元</option>
          <option value="5">六个单元</option>
          <option value="6">七个单元</option>
          <option value="7">八个单元</option>
        </select>
      </td>
    </tr>
    <tr>
      <th>垂直基本单元数</th>
      <td class="header" colspan="2">
        <select id="descVerCell">
          <option value="0" selected="selected">一个单元</option>
          <option value="1">二个单元</option>
          <option value="2">三个单元</option>
          <option value="3">四个单元</option>
          <option value="4">五个单元</option>
          <option value="5">六个单元</option>
          <option value="6">七个单元</option>
          <option value="7">八个单元</option>
        </select>
      </td>
    </tr>
    <tr>
      <th>逻辑单元标识符</th>
      <td>
        <input type="text" id="descLogicId" value="0" />
      </td>
      <td id="addBtnTd" rowspan="5">
        <input type="button" id="addBtn" value="添 加" class="input_normal" onclick="addTableRow();" />
      </td>
    </tr>
    <tr>
      <th>逻辑单元展现信息</th>
      <td>
        <input type="text" id="descLogicInfo" value="0" />
      </td>
    </tr>
    <tr>
      <th>基本单元字段<br />(连续输入多个单元标识符)</th>
      <td>0x
        <textarea id="descBasicCell" style="width: 85%"></textarea>
      </td>
    </tr>
    <tr>
      <th>单元链接信息</th>
      <td>
       <select id="descCellLinkInfo" onchange="changeCellLink();">
          <option value="1" selected="selected">与业务群相关</option>
          <option value="2">与业务相关</option>
          <option value="3">与其他马赛克相关</option>
          <option value="4">与事件相关</option>
        </select>
      </td>
    </tr>
    <tr id="descBouqetTr">
      <th>业务群ID</th>
      <td>
        <input type="text" id="descBouquetId" value="0" />
      </td>
    </tr>
    <tr id="descNetworkTr" style="display: none;">
      <th>原始网络ID</th>
      <td>
        <input type="text" id="descNetworkId" value="0" />
      </td>
    </tr>
    <tr id="descTsIdTr" style="display: none;">
      <th>传送流ID</th>
      <td>
        <input type="text" id="descTsId" value="0" />
      </td>
    </tr>
    <tr id="descProgIdTr" style="display: none;">
      <th>节目号</th>
      <td>
        <input type="text" id="descProgId" value="1" />
      </td>
    </tr>
    <tr id="descEventIdTr" style="display: none;">
      <th>事件ID</th>
      <td>
        <input type="text" id="descEventId" value="0" />
      </td>
    </tr>
  </table>
  <br />
  <table id="dataTable">
    <tr>
      <th>逻辑单元标识符</th>
      <th>逻辑单元展现信息</th>
      <th>基本单元字段</th>
      <th>单元链接信息</th>
      <th>操作</th>
    </tr>
  </table>
  <table style="display: none;">
    <tr id="dataRow0" class="CaseRow">
      <td>
        <span id="descLogicId0"></span>
      </td>
      <td>
        <span id="descLogicInfo0"></span>
      </td>
      <td>
        <span id="descBasicCell0"></span>
      </td>
      <td>
        <span id="descCellLinkInfo0"></span>
      </td>
      <td>
        <img src="../../style/images/shanchu1.png" id="delete0" class="img img_hand" onclick="deleteCurrentRow($(this));" title="Delete" />
      </td>
    </tr>
  </table>
  <div class="bottom_button_div">
    <input type="button" id="descApplyBtn" value="确 定" class="input_normal" onclick="descPageApply();" />
    <input type="button" id="descCancelBtn" value="取 消" class="input_normal" onclick="cancelEdit();" />
  </div>
</div>
<style type="text/css">
#addBtn
{
	float: none;
	margin: 0;	
}
</style>
<script>
var maxRowNum = 42;
var objIdArray = ["descLogicId", "descLogicInfo", "descBasicCell", "descCellLinkInfo"];
var COL_NUM = 4;
function changeCellLink()
{
	var curLinkType = $("#descCellLinkInfo").val();
	if(curLinkType == 1)
	{
		$("#descBouqetTr").show();
		$("#descNetworkTr").hide();
		$("#descTsIdTr").hide();
		$("#descProgIdTr").hide();
		$("#descEventIdTr").hide();
		$("#addBtnTd").attr("rowspan", "5");
	}
	else if((curLinkType == 2) || (curLinkType == 3))
	{
		$("#descBouqetTr").hide();
		$("#descNetworkTr").show();
		$("#descTsIdTr").show();
		$("#descProgIdTr").show();
		$("#descEventIdTr").hide();
		$("#addBtnTd").attr("rowspan", "7");
	}
	else
	{
		$("#descBouqetTr").hide();
		$("#descNetworkTr").show();
		$("#descTsIdTr").show();
		$("#descProgIdTr").show();
		$("#descEventIdTr").show();
		$("#addBtnTd").attr("rowspan", "8");
	}	
}
</script>
