<!--
  Copyright 2003 Sun Microsystems, Inc. All rights reserved
  Use is subject to license terms.
"@(#)edit.template	1.1 00/03/27 Sun Microsystems"
-->

<script language="JavaScript">

var invalidHost='[tag:invalidHostName]';

function isLetter (c) {
	return ( ((c >= "a") && (c <= "z")) || ((c >= "A") && (c <= "Z")) );
}

function leftTrim(str) {
	for(var i=0; str.charAt(i) <= " " && i < str.length; i++);
	return str.substring(i, str.length);
}

function rightTrim(str) {
	for(var i=str.length-1; str.charAt(i) <= " " && i >= 0; i--);
	return str.substring(0, i+1);
}

function Trim(str) {
	return leftTrim(rightTrim(str));
}

/*
 * Trims the white spaces in String list ( '+' separated list )
 */

function TrimStringList(strList) {
	var trimmed = '';
	var thosts = strList.split("+");
	for(var i=0; i < thosts.length; i++) {
		trimmed = trimmed + Trim(thosts[i]);
		if(i < thosts.length - 1) {
			trimmed = trimmed + '+';
		}
	}
	return trimmed;
}


function checkTarget() {
	var tHost = document.edit_form.newHost.value;
	if(tHost == null || tHost == "" ) {
		alert(invalidHost);
		return false;
	}
	document.edit_form.add_more.value='true';
	document.edit_form.newHost.value=TrimStringList(tHost);
	return true;
}

</script>

<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=0 WIDTH="100%">
<INPUT TYPE=HIDDEN NAME="targetCount" VALUE="[tag:targetCount]">
<INPUT TYPE=HIDDEN NAME="add_more" VALUE="">
<TR>
<TD BGCOLOR="#666699" colspan="2">
<FONT FACE="[tag:fontFace1]" color="#FFFFFF" size="+1">
<B>
Add new target:
</B>
</FONT>
<BR>
</TD></TR>

<TR>
<TD>
<CENTER>
<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=2 WIDTH="100%">
<TR>
<TD ALIGN=RIGHT WIDTH="35%">
<FONT FACE="[tag:iwtDesktop-fontFace1]" SIZE=+0>
<B>
Rule Name:</B></FONT>
</TD>
<TD>
<FONT FACE="[tag:iwtDesktop-fontFace1]" SIZE=+0>
[tag:newRuleSelect]
</FONT>
</TD>
</TR>
<TR>
<TD ALIGN=RIGHT>
<FONT FACE="[tag:iwtDesktop-fontFace1]" SIZE=+0>
<B>
Host(s):</B></FONT>
</TD>
<TD>
<FONT FACE="[tag:iwtDesktop-fontFace1]" SIZE=+0>
<INPUT TYPE=TEXT NAME="newHost" SIZE=45>
</FONT>
</TD>
</TR>
<TR>
<TD> </TD>
<TD> <font FACE="[tag:iwtDesktop-fontFace1]" size="-1">Use '+' to separate entries in case of multiple hosts. </font> </TD>
</TR>
</TABLE>
</CENTER>
</TD>
</TR>

</TABLE>
<FONT FACE="[tag:iwtDesktop-fontFace1]" SIZE=+0>
<INPUT TYPE=SUBMIT NAME="Add Target" VALUE="Add Target" onClick="return checkTarget();" return class="button">
</FONT>

<BR><BR>

<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=0 WIDTH="100%">
<TR>
<TD BGCOLOR="#666699" colspan="2">
<FONT FACE="[tag:fontFace1]" color="#FFFFFF" size="+1">
<B>
Edit an existing target:
</B>
</FONT>
<BR>
</TD></TR>

<TR>
<TD>
<CENTER>
<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=2 WIDTH="50%">
<TR>
<TD ALIGN=CENTER BGCOLOR="#CCCCCC">
<P ALIGN=CENTER>
<FONT FACE="[tag:iwtDesktop-fontFace1]" SIZE=+0>
<B>
Remove</B>
</FONT>
</TD>
<TD BGCOLOR="#CCCCCC">
<P ALIGN=CENTER>
<FONT FACE="[tag:iwtDesktop-fontFace1]" SIZE=+0>
<B>
Rule</B>
</FONT>
</TD>
<TD BGCOLOR="#CCCCCC">
<P ALIGN=CENTER>
<FONT FACE="[tag:iwtDesktop-fontFace1]" SIZE=+0>
<B>
Host</B>
</FONT>
</TD>
</TR>
[tag:targetList] 
</TABLE>
</CENTER>
</TD>
</TR>
</TABLE>
</CENTER>

</TD></TR>
</TABLE>
<BR>
<BR>


<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=0 WIDTH="100%">
<TR>
<TD BGCOLOR="#666699" colspan="2">
<FONT FACE="[tag:fontFace1]" color="#FFFFFF" size="+1">
<B>
Change algorithm:
</B>
</FONT>
<BR>
</TD></TR>

<TR><TD>
<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=0 WIDTH="100%">
[tag:newAlgorithmSelect]
</TABLE>
</TD>
</TR>

<TR>
<TD BGCOLOR="#666699" colspan="2">
<FONT FACE="[tag:fontFace1]" color="#FFFFFF" size="+1">
<B>
Change client bind IP address:
</B>
</FONT>
<BR>
</TD></TR>
<TR><TD>

<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=0 WIDTH="100%">
<TR>
<TD ALIGN=RIGHT WIDTH="35%">
<FONT FACE="[tag:fontFace1]" SIZE=+0>
<B>
Client Bind IP Address:</B></FONT>
</TD>
<TD>
<FONT FACE="[tag:iwtDesktop-fontFace1]" SIZE=+0>
<INPUT TYPE=TEXT NAME="clientBindIP" VALUE=[tag:clientBindIP] SIZE=45>
</FONT>
</TD>
</TR>
</TABLE>

</TD>
</TR>

</TABLE>
</TABLE>
<BR>
<BR>

[tag:changePasswordTemplate]

<CENTER>
