<%--
  Copyright 2003 Sun Microsystems, Inc. All rights reserved 
  Use is subject to license terms.
 --%>
<%-- Sites.jsp --%>

<%@page info="Sites" language="java"%>
<%@taglib uri="/WEB-INF/jato.tld" prefix="jato"%>
<%@taglib uri="/WEB-INF/console.tld" prefix="console"%>
<%@taglib uri="/WEB-INF/searchadmin.tld" prefix="searchadmin"%>

<jato:useViewBean className="com.sun.portal.search.admin.SitesViewBean"> 
<jsp:useBean id="viewBean" type="com.sun.portal.search.admin.SitesViewBean" />

<HTML>

<script language="javascript" src="../ps/searchadmin/js/searchadmin.js"></script>
<script language="javascript">
function checkInput() {
    var emptyError = '<searchadmin:text key="createsite.error.empty"/>'; 
    var siteText = document.forms['Sites'].elements['Sites.URLText'];
    if (siteText) {
	if (siteText.value.length ==0 ) {
	    alert(emptyError);
	    return false;
	}
	return validateServer(siteText,document.forms['Sites'].elements['Sites.AddCombo'])
    }
    return true;
}
</script>

<%@include file="/ps/searchadmin/CSHeader.jsp"%>
<script language="javascript" src="../ps/searchadmin/js/urlmagic.js"></script>
<script language="javascript">
if (parent.headerFrame) {
    parent.headerFrame.helpDocURL = "<jato:text name="helpDocURL"/>";
    parent.headerFrame.helpPage = "<searchadmin:text key="help.robot.sites"/>";
}
</script>

<searchadmin:AdminMenu selected="Sites" images="../ps/searchadmin/images"/>

  <table border="0" align="center">
    <tr>
      <td align="center" valign="top">
        <console:messagebox name="MessageBox" fireDisplayEvents="true" imageURI="../console/images"/>
      </td>
    </tr>
  </table>

<console:form name="Sites" defaultCommandChild="/CreateButton" onSubmit="return checkInput();">





<jato:content name="NewSiteSection">

  <TABLE border="0" cellpadding="0" cellspacing="10" width="100%">
    <TR> 
      <TD class="help-text"><searchadmin:text key="newsite.desc"/></TD>
    </TR>
    <TR>
	<TD>
	<DIV class="table-title-text"><searchadmin:text key="newsite.text"/></DIV>
	<TABLE class="table-content" border="0" cellspacing="0" cellpadding="0">
	<TR>
	    <TD>
		<jato:combobox name="AddCombo" onChange="toggle_type(this, document.forms['Sites'].elements['Sites.URLText'])"/>
	    </TD>
	    <TD>
		<jato:textField name="URLText" />
	    </TD>
	</TR>
	<TR>
	    <TD><STRONG><searchadmin:text key="depth"/>&nbsp;:&nbsp;</STRONG></TD>
	    <TD></STRONG>
		<jato:combobox name="DepthCombo"/>
	    </TD>
	</TR>
	</TABLE>
    </TR>
    <TR>
	<TD>
	<TABLE class="table-content" border="0" cellspacing="0" cellpadding="0">
	<TR>
	<TD> 
	    <console:button name="CreateButton" onClick="return checkInput();"/>
	</TD>
            <TD width="5"><IMG src="../ps/searchadmin/images/blank.gif" width="10" height="1" alt=""></TD>
	<TD>
	    <console:button name="CreateEditButton" onClick="return checkInput();"/>
	</TD>
            <TD width="5"><IMG src="../ps/searchadmin/images/blank.gif" width="10" height="1" alt=""></TD>
	<TD>
	    <console:button name="CancelButton" onClick="document.location.href='Sites';return false;"/>
	</TD>
	</TR>
	</TABLE>
    </TR>
  </TABLE>
</jato:content>

<jato:content name="SitesListSection">

  <TABLE border="0" cellpadding="0" cellspacing="10" width="100%">
    <TR> 
      <TD align="right" height="2"> 
        <TABLE border="0" cellpadding="0" cellspacing="0">
          <TR> 
            <TD> 
		   <console:button name="SubmitButton" />
            </TD>
            <TD width="5"><IMG src="../ps/searchadmin/images/blank.gif" width="10" height="1" alt=""></TD>
            <TD>
		<console:button name="ResetButton"  href="Sites"/>
            </TD>
            <TD><IMG src="../ps/searchadmin/images/blank.gif" width="10" height="1" alt=""></TD>
            <TD>  </TD>
          </TR>
        </TABLE>
      </TD>
    </TR>
    <TR> 
      <TD class="help-text"><searchadmin:text key="sites.desc.one"/> <LABEL for="del"><searchadmin:text key="sites.desc.keywordone"/></LABEL> <searchadmin:text key="sites.desc.two"/></TD>
    </TR>
    <TR> 
      <td> <!-- Table Title --> 
        <table border="0" cellspacing="0" cellpadding="0">
          <tr> 
            <td colspan="3" class="table-title-text"><searchadmin:text key="sites.title"/></td>
          </tr>
          <tr> 
            <td colspan="3"><img alt="" border="0" height="5" width="1" src="../ps/searchadmin/images/blank.gif"></td>
          </tr>
          <tr> 
            <td><console:button name="NewSiteButton" /></td>
            <td><img src="../ps/searchadmin/images/blank.gif" width="10" height="1" alt=""></td>
            <td><console:button name="DeleteButton" onClick="return confirmDelete();" /></td>
          </tr>
          <tr> 
            <td colspan="3"><img alt="" border="0" height="5" width="1" src="../ps/searchadmin/images/blank.gif"></td>
          </tr>
        </table>
        <!-- End table containing Save and Cancel Buttons --> <!-- Begin outer table -->
	
	<TABLE class="table-frame" border="0" cellspacing="0" cellpadding="1">
          <TR> 
            <TD> 
		<TABLE class="table-content" border="0" cellspacing="0" cellpadding="0">
		<!-- Top row containing the column headers --> 
                <TR class="table-header-row">
		    <td><img alt="" border="0" height="1" width="10" src="../ps/searchadmin/images/blank.gif"></td>
		    <td align="center"> 
			<table width="100%" border="0" cellspacing="3" cellpadding="0">
			<tr> 
			    <td><a href="javascript:SelectAll('Sites', 'SitesList', 'Delete', true);"><img src="../ps/searchadmin/images/select-all-small.gif" width="11" height="13" alt="<searchadmin:text key='select.all'/>" border="0"></a></td>
			    <td><a href="javascript:SelectAll('Sites', 'SitesList', 'Delete', false);"><img src="../ps/searchadmin/images/deselect-all-small.gif" width="11" height="13" alt="<searchadmin:text key='deselect.all'/>" border="0"></a></td>
			</tr>
			</table>
		    </td>

		    <td><img alt="" border="0" height="1" width="10" src="../ps/searchadmin/images/blank.gif"></td>
		    <td><div class="table-header-text"><searchadmin:text key="sites.name.header"/></div></td>
		    <td><img alt="" border="0" height="1" width="10" src="../ps/searchadmin/images/blank.gif"></td>
		    <td><div class="table-header-text">&nbsp;<searchadmin:text key="action.text"/></div></td>
		    <td><img alt="" border="0" height="1" width="10" src="../ps/searchadmin/images/blank.gif"></td>
		    <td><div class="table-header-text"><searchadmin:text key="onoff.text" label="onoff"/></div></td>
		    <td><img alt="" border="0" height="1" width="10" src="../ps/searchadmin/images/blank.gif"></td>
		</tr>
	<jato:content name="EmptyList">
	<TR>
	    <td>&nbsp; </td>

	    <TD colspan="8"><searchadmin:text key ="sites.nosite"/></TD>
	</TR>
	</jato:content>

		<jato:tiledView name="SitesList">
		<TR> 
		    <td>&nbsp; </td>
		    <TD><jato:checkbox name="Delete" elementId="del"/></TD>
		    <td>&nbsp; </td>
		    <TD class="table-normal-text"><jato:image name="TypeImage" alt="" /><jato:text name="NickName"/></TD>
		    <td>&nbsp; </td>
		    <TD>&nbsp;<font color="#CC6600">
		    <jato:href name="SiteLink">
			<searchadmin:text key="edit.action"/>
		     </jato:href>
		    </font>&nbsp;
		    </TD>
		    <td>&nbsp; </td>
		    <TD><jato:radioButtons name="OnOffRButton" layout="horizontal" elementId="onoff"/></TD>
		    <td>&nbsp; </td>
                </TR>
		<tr> 
		    <td class="table-separator-row" colspan="9" ><img src="../ps/searchadmin/images/blank.gif" alt="" width="1" height="1" border="0"></td>
                </tr>

		</jato:tiledView>
              </TABLE>
	    </TD>
          </TR>
        </TABLE>
	
      </TD>
    </TR>
    <TR> 
      <TD align="right" height="2"> 
        <TABLE border="0" cellpadding="0" cellspacing="0">
          <TR> 
            <TD> 
		   <console:button name="SubmitButton" />
            </TD>
            <TD width="5"><IMG src="../ps/searchadmin/images/blank.gif" width="10" height="1" alt=""></TD>
            <TD>
		<console:button name="ResetButton"  href="Sites"/>
            </TD>
            <TD><IMG src="../ps/searchadmin/images/blank.gif" width="10" height="1" alt=""></TD>
            <TD>  </TD>
          </TR>
        </TABLE>
      </TD>
    </TR>
  </TABLE>

</jato:content>



</console:form>

</body>
<script language="javascript">
pageLoaded = 1;
</script>

</HTML>
</jato:useViewBean>
