<div class="content_div_small">
  <div class="table_tab_div">
    <div class="table_tab_left"></div>
    <div class="table_tab">Mosaic Descriptor</div>
    <div class="table_tab_right"></div>
  </div>
  <table>
    <tr>
      <th>Mosaic Entry Point</th>
      <td class="header" colspan="2">
        <select id="descMosaic">
          <option value="0">Uncheck</option>
          <option value="1" selected="selected">Check</option>
        </select>
      </td>
    </tr>
    <tr>
      <th>Horizontal Elementary Cells</th>
      <td class="header" colspan="2">
        <select id="descHorCell">
          <option value="0" selected="selected">One Cell</option>
          <option value="1">Two Cells</option>
          <option value="2">Three Cells</option>
          <option value="3">Four Cells</option>
          <option value="4">Five Cells</option>
          <option value="5">Six Cells</option>
          <option value="6">Seven Cells</option>
          <option value="7">Eight Cells</option>
        </select>
      </td>
    </tr>
    <tr>
      <th>Vertical Elementary Cells</th>
      <td class="header" colspan="2">
        <select id="descVerCell">
          <option value="0" selected="selected">One Cell</option>
          <option value="1">Two Cells</option>
          <option value="2">Three Cells</option>
          <option value="3">Four Cells</option>
          <option value="4">Five Cells</option>
          <option value="5">Six Cells</option>
          <option value="6">Seven Cells</option>
          <option value="7">Eight Cells</option>
        </select>
      </td>
    </tr>
    <tr>
      <th>Logical Cell ID</th>
      <td>
        <input type="text" id="descLogicId" value="0" />
      </td>
      <td id="addBtnTd" rowspan="5">
        <input type="button" id="addBtn" value="Add" class="input_normal" onclick="addTableRow();" />
      </td>
    </tr>
    <tr>
      <th>Logical Cell Presentation Info</th>
      <td>
        <input type="text" id="descLogicInfo" value="0" />
      </td>
    </tr>
    <tr>
      <th>Elementary Cell Field<br />(Consecutive input multiple element Identify)</th>
      <td>0x
        <textarea id="descBasicCell" style="width: 85%;"></textarea>
      </td>
    </tr>
    <tr>
      <th>Cell Linkage Info</th>
      <td>
       <select id="descCellLinkInfo" onchange="changeCellLink();">
          <option value="1" selected="selected">Bouquet Related</option>
          <option value="2">Service Related</option>
          <option value="3">Other Mosaic Related</option>
          <option value="4">Event Related</option>
        </select>
      </td>
    </tr>
    <tr id="descBouqetTr">
      <th>Bouquet ID</th>
      <td>
        <input type="text" id="descBouquetId" value="0" />
      </td>
    </tr>
    <tr id="descNetworkTr" style="display: none;">
      <th>Original Network ID</th>
      <td>
        <input type="text" id="descNetworkId" value="0" />
      </td>
    </tr>
    <tr id="descTsIdTr" style="display: none;">
      <th>Transport Stream ID</th>
      <td>
        <input type="text" id="descTsId" value="0" />
      </td>
    </tr>
    <tr id="descProgIdTr" style="display: none;">
      <th>Service ID</th>
      <td>
        <input type="text" id="descProgId" value="1" />
      </td>
    </tr>
    <tr id="descEventIdTr" style="display: none;">
      <th>Event ID</th>
      <td>
        <input type="text" id="descEventId" value="0" />
      </td>
    </tr>
  </table>
  <br />
  <table id="dataTable">
    <tr>
      <th>Logical Cell ID</th>
      <th>Logical Cell Presentation Info</th>
      <th>Elementary Cell Field</th>
      <th>Cell Linkage Info</th>
      <th>Operation</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="OK" class="input_normal" onclick="descPageApply();" />
    <input type="button" id="descCancelBtn" value="Cancel" 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>
