Index: lib/style/skins/knb2/portalpages.js
===================================================================
--- lib/style/skins/knb2/portalpages.js	(nonexistent)
+++ lib/style/skins/knb2/portalpages.js	(revision 2214)
@@ -0,0 +1,90 @@
+// JavaScript Document
+
+var popupMsg = "If you need to create a new account, \n"
+			  +"click the \"create new account\" link \n"
+			  +"beneath the password text-box";
+
+function allowSubmit(formObj) {
+
+  if (trim(formObj.elements["loginAction"].value)!="Login") return true;
+
+  //trim username & passwd:
+  var username = trim(formObj.elements["username"].value);
+  var organization  = trim(formObj.elements["organization"].value);
+  var password      = trim(formObj.elements["password"].value);
+
+  if (username=="") {
+    alert("You must type a username. \n"+popupMsg);
+	formObj.elements["username"].focus();
+    return false;
+  } 
+  
+  if (organization=="") {
+    alert("You must select an organization. \n"+popupMsg);
+	formObj.elements["organization"].focus();
+    return false;
+  } 
+  
+  if (password=="") {
+    alert("You must type a password. \n"+popupMsg);
+	formObj.elements["password"].focus();
+    return false;
+  }
+  return true;
+}	
+
+function allowSearch(formObj) {
+
+  var canSearch = true;
+  var searchString = trim(formObj.elements["anyfield"].value);
+  if (searchString=="") {
+    if (confirm("Show *all* data in the KNB?\n(this may take some time!)")) {
+	  formObj.elements["anyfield"].value = "%";
+	  canSearch = true;
+	} else {
+	  formObj.elements["anyfield"].focus();
+	  canSearch = false;
+	}
+  } 
+  return canSearch;
+}
+
+
+function allowAdvancedSearch(inputFormObj, submitFormObj) {
+
+  var searchString = trim(inputFormObj.elements["searchValue"].value);
+  
+  if (searchString=="") searchString="%";
+  
+  if (inputFormObj.searchField.value=='anyfield') {
+    
+    submitFormObj.anyfield.value=searchString;
+      
+  } else if (inputFormObj.searchField.value=='title') {
+    
+    submitFormObj.title.value=searchString;
+      
+  } else if (inputFormObj.searchField.value=='surname') {
+    
+    submitFormObj.surName.value=searchString;
+  }
+  return true;
+}
+
+function keywordSearch(formObj, searchKeyword) {
+
+  var searchString = trim(searchKeyword);
+  
+  if (searchString=="") searchString="%";
+  
+  formObj.anyfield.value=searchString;
+
+  formObj.submit();
+
+  return true;
+}
+
+function trim(stringToTrim) {
+
+  return stringToTrim.replace(/^\s*/, '').replace(/\s*$/,'');
+}

Property changes on: lib/style/skins/knb2/portalpages.js
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Index: lib/style/skins/knb2/index.jsp
===================================================================
--- lib/style/skins/knb2/index.jsp	(revision 2213)
+++ lib/style/skins/knb2/index.jsp	(revision 2214)
@@ -261,9 +261,9 @@
         <tr>
           <td class="text_plain"><table width="100%" border="0" cellspacing="0" cellpadding="0">
               <tr> 
-                <td width="10" align="right" valign="top"><img src="<%=relativeRoot%>/images/panelhead_bg_lcorner.gif" width="10" height="21"></td>
+                <td width="10" align="right" valign="top"><img src="images/panelhead_bg_lcorner.gif" width="10" height="21"></td>
                 <td width="720" class="sectionheader">about the KNB project</td>
-                <td width="10" align="left" valign="top"><img src="<%=relativeRoot%>/images/panelhead_bg_rcorner.gif" width="10" height="21"></td>
+                <td width="10" align="left" valign="top"><img src="images/panelhead_bg_rcorner.gif" width="10" height="21"></td>
               </tr>
               <tr> 
                 <td colspan="3"><table width="740" border="0" cellpadding="2" cellspacing="0" class="subpanel">
Index: lib/style/skins/knb2/include_searchbox_page.jsp
===================================================================
--- lib/style/skins/knb2/include_searchbox_page.jsp	(revision 2213)
+++ lib/style/skins/knb2/include_searchbox_page.jsp	(revision 2214)
@@ -38,14 +38,14 @@
 <head>
   <title>KNB :: The Knowledge Network for Biocomplexity</title>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-  <link href="<%=relativeRoot%>/portalpages.css" rel="stylesheet" type="text/css">
-  <script language="JavaScript" type="text/JavaScript" src="<%=relativeRoot%>/portalpages.js"></script>
+  <link href="portalpages.css" rel="stylesheet" type="text/css">
+  <script language="JavaScript" type="text/JavaScript" src="portalpages.js"></script>
   </head>
 
 <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
   <table width="740" border="0" cellspacing="0" cellpadding="0" align="center">
     <tr> 
-      <td><img src="<%=relativeRoot%>/images/transparent1x1.gif" width="20" height="20"/></td>
+      <td><img src="images/transparent1x1.gif" width="20" height="20"/></td>
     </tr>
     <tr> 
       <td align="center"><%@ include file="include_searchbox.jsp" %></td>
Index: lib/style/skins/knb2/include_searchbox.jsp
===================================================================
--- lib/style/skins/knb2/include_searchbox.jsp	(revision 2213)
+++ lib/style/skins/knb2/include_searchbox.jsp	(revision 2214)
@@ -32,10 +32,10 @@
 <!-- *********************** START SEARCHBOX TABLE ************************* -->
 <table width="740" border="0" cellspacing="0" cellpadding="0">
   <tr> 
-    <td width="10" align="right" valign="top"><img src="<%=relativeRoot%>/images/panelhead_bg_lcorner.gif" width="10" height="21"></td>
+    <td width="10" align="right" valign="top"><img src="images/panelhead_bg_lcorner.gif" width="10" height="21"></td>
     <td width="720" class="sectionheader">search for data on the 
       KNB</td>
-    <td width="10" align="left" valign="top"><img src="<%=relativeRoot%>/images/panelhead_bg_rcorner.gif" width="10" height="21"></td>
+    <td width="10" align="left" valign="top"><img src="images/panelhead_bg_rcorner.gif" width="10" height="21"></td>
   </tr>
   <tr> 
     <td colspan="3"> <table width="740" border="0" cellpadding="0" cellspacing="0" class="subpanel">
@@ -48,8 +48,8 @@
               <%=sessionidField%> <%=SIMPLE_SEARCH_METACAT_POST_FIELDS%> 
               <table width="100%" border="0" cellpadding="5" cellspacing="0">
                 <tr> 
-                  <td width="94" rowspan="2" align="left" valign="top"><img src="<%=relativeRoot%>/images/search.jpg" width="94" height="80"></td>
-                  <td colspan="2" valign="middle" class="text_example"><p> <%= loginStatus %>&nbsp&nbsp;(<a href="<%=relativeRoot%>/index.jsp#loginanchor" target="_top"><%=loginButtonLabel%></a>).&nbsp; You may search the KNB without 
+                  <td width="94" rowspan="2" align="left" valign="top"><img src="images/search.jpg" width="94" height="80"></td>
+                  <td colspan="2" valign="middle" class="text_example"><p> <%= loginStatus %>&nbsp&nbsp;(<a href="index.jsp#loginanchor" target="_top"><%=loginButtonLabel%></a>).&nbsp; You may search the KNB without 
                       being logged into your account, but will have access only 
                       to &quot;public&quot; data (see &quot;login &amp; registration&quot;)<br></br> 
                       Enter a search phrase (e.g. biodiversity) to search for 
@@ -61,7 +61,7 @@
                   <td align="right" class="searchcat"> <input type="text" name="anyfield"  size="30" maxlength="200"> 
                     &nbsp;&nbsp;</td>
                   <td width="365" align="left" class="searchcat"> <input type="submit" value="Search KNB"> 
-                    &nbsp;&nbsp;&nbsp;<a href="<%=relativeRoot%>/advancedsearch.jsp" target="_top"> 
+                    &nbsp;&nbsp;&nbsp;<a href="advancedsearch.jsp" target="_top"> 
                     &raquo;&nbsp;advanced&nbsp;search&nbsp;&laquo;</a></td>
                 </tr>
               </table>
