<html>
  <head>
    <meta HTTP-EQUIV='Pragma' CONTENT='no-cache'>
    <link rel="stylesheet" href='stylemain.css' type='text/css'>
         <link rel="stylesheet" href='colors.css' type='text/css'>
            <script language="javascript" src="util.js"></script>
	     <script type="text/javascript" src="lang/b28n.js"></script>
	     <script language="javascript"><%ejGetOther(forbidHTMLCode)%></script>
            <script language="javascript">
<!-- hide

var obj1Items = '<%ejGetObject(MDMOID_DN_S)%>';
var obj1Rows = numOfRow(obj1Items);
var dnsdomainArray = getColFromList(obj1Items, "DomainName");
var dnsipaddressArray = getColFromList(obj1Items, "IpAddress");

var locationQuery="sessionKey=<%ejGetOther(sessionKey)%>";

function addClick() {
   var code = 'location="' + 'staticdnsaddcfg.html' + '"';
   eval(code);
}


function removeClick(rml) {
   var lst = '';
   if (rml.length > 0)
      for (i = 0; i < rml.length; i++) {
         if ( rml[i].checked == true )
            lst += rml[i].value + ', ';
      }
   else if ( rml.checked == true )
      lst = rml.value;

   var loc = 'staticdnscfg.cmd?action=remove&rmLst=' + lst+"&"+ locationQuery;
   var code = 'location="' + loc + '"';
   eval(code);
}

function fillObj1Items(){
	var i;
	for(i=0; i < obj1Rows; i++){
		if(dnsdomainArray[i] != ''){
			document.writeln("<tr align='center'>");
			document.writeln("<td>&nbsp;"+ dnsdomainArray[i] + "</td>");
			document.writeln("<td>&nbsp;"+dnsipaddressArray[i]+"</td>");
			document.writeln("<td align='center'><input type='checkbox' name='rml' value='" + dnsdomainArray[i] + "'></td>");
			document.writeln("</tr>");
		}
	}
}

function frmLoad() {
   initTranslation();
}


// done hiding -->
</script></head>
<body onLoad='frmLoad()'>
<blockquote> 
  <form>
    <center>
      <b id="dnsaddcfgTitle">Dns Domain Resolve Configuration</b><br>
      <br><span>Choose Add, or Remove to configure Dns Domain Configuration.</span><br>
      <br>
      <table border='1' cellpadding='4' cellspacing='0'>
        <tr align='center'> 
          <td class='hd'>Domain</td>
          <td class='hd'>IpAddress</td>
          <td class='hd'>Remove</td>
        </tr>
        <script language='javascript'>
	<!--hide
		fillObj1Items();
	//-->
	</script>
      </table>
      <br>
      <script language='javascript'>
	<!--hide
	document.writeln("<input type='button' onClick='addClick()' value='Add' id='DnsDomainBtnAdd'>");
      if(obj1Rows > 0){ 
             document.writeln("<input type='button' onClick='removeClick(this.form.rml)' value='Remove'>");
      	}
      else {
             document.writeln("<input type='button' onClick='removeClick(this.form.rml)' value='Remove' disabled>");
      	}
	//-->
	</script>

    </center>
  </form>
</blockquote>
</body>
</html>
