Index: lib/style/common/templates/entryForm.tmpl
===================================================================
--- lib/style/common/templates/entryForm.tmpl	(revision 2403)
+++ lib/style/common/templates/entryForm.tmpl	(revision 2404)
@@ -1,40 +1,110 @@
 [% INCLUDE "genericHeader.tmpl" %]
 
   <script language="JavaScript" type="text/javascript">
+
     function addParagraph() {
         var newParaWidget=document.createElement("textarea");
-        newParaWidget.setAttribute("rows", "5");
-        newParaWidget.setAttribute("columns", "80");
+        newParaWidget.setAttribute("rows", "6");
+        newParaWidget.className="longwidth";
         newParaWidget.setAttribute("name", "methodPara");
-        var newParaContainer = document.createElement("p");
-        newParaContainer.appendChild(newParaWidget);
+
+        var TR = document.createElement("tr");
+        TR.className='sectbody';
+        var TD = createTD("5","left");
+        var emptyTD = createTD("","right");
+        TD.appendChild(newParaWidget);
+        TR.appendChild(emptyTD);
+        TR.appendChild(TD);
         var addParaButton = document.getElementById("addparabutton1");
         var parent = addParaButton.parentNode;
-        parent.insertBefore(newParaContainer, addParaButton);
+        parent.insertBefore(TR, addParaButton);
     }
 
-    function createTextField(name, size) {
+    function addMethod(){
+        var index = incrementCount('methodCount');
+        var methodButton = document.getElementById("addmethodbutton");
+        var parent = methodButton.parentNode;
+        
+        parent.insertBefore(createHRRow(), methodButton);
+        parent.insertBefore(addMethodTitle(), methodButton);
+        parent.insertBefore(addMethodDescription(index), methodButton);
+        parent.insertBefore(addMethodButton(index), methodButton);
+    }
+
+    function  addMethodButton(index){
+        var TR = document.createElement("tr");
+        var buttonId = 'addparabutton' + index;
+        TR.className='sectbody';
+        TR.setAttribute("id", buttonId);
+        var labelTD = createTD("","right");
+        var TD = createTD("5","left");
+        var button=document.createElement("input");
+        button.setAttribute("type", "button"); 
+        button.setAttribute("value", "Add Paragraph to Method Description"); 
+        if (navigator.userAgent.toLowerCase().indexOf('msie')!= -1 && document.all){
+            button.attachEvent("onclick", new Function("addParagraph("+ index + ", '" + buttonId + "')"));
+        } else {
+            button.setAttribute("onclick", "addParagraph("+ index +", '" + buttonId + "')"); 
+        }
+        TD.appendChild(button);
+        TR.appendChild(labelTD);
+        TR.appendChild(TD);
+        return TR;
+    }
+    
+    function  addMethodTitle(){
+        var TR = document.createElement("tr");
+        TR.className='sectbody';
+        var labelTD = createTD("","right");
+        labelTD.appendChild(document.createTextNode("Method Title"));
+        var TD = createTD("5","left");
+        var textField=document.createElement("input");
+        textField.setAttribute("type", "text"); 
+        textField.setAttribute("name", "methodTitle"); 
+        textField.className="longwidth";
+        TD.appendChild(textField);
+        TR.appendChild(labelTD);
+        TR.appendChild(TD);
+        return TR;
+    }
+
+    function  addMethodDescription(index){
+        var TR = document.createElement("tr");
+        TR.className='sectbody';
+        var labelTD = createTD("","right");
+        labelTD.setAttribute("vAlign","top");
+        labelTD.appendChild(document.createTextNode("Method Description"));
+        var TD = createTD("5","left");
+        var textArea=document.createElement("textarea");
+        textArea.setAttribute("name", "methodPara"+index);
+        textArea.setAttribute("rows", 6); 
+        textArea.className="longwidth";
+        TD.appendChild(textArea);
+        TR.appendChild(labelTD);
+        TR.appendChild(TD);
+        return TR;
+    }
+    
+    function createTextField(name, size, value) {
         var newField=document.createElement("input");
         newField.setAttribute("type", "text"); 
         newField.setAttribute("name", name); 
         newField.setAttribute("size", size); 
-
+        newField.value = value; 
         return newField;
     }
 
-    function createTextRow(count, varName, labelText) {
-        var textField=createTextField(varName + count, "30");
+    function createTextRow(count, varName, labelText, value) {
+        var textField=createTextField(varName + count, "30", value);
 	var row = createRow(count, textField, labelText);
 	return row;
     }
 
     function createRow(count, elem, labelText){
-        var textTD = document.createElement("td");
-        textTD.setAttribute("colSpan", "5");
+        var textTD = createTD("5");
         textTD.appendChild(elem);
 
-        var labelTD = document.createElement("td");
-        labelTD.setAttribute("align", "right");
+        var labelTD = createTD("","right");
 
         var labelSpan = document.createElement("span");
         labelSpan.className = 'label';
@@ -52,8 +122,7 @@
     }
 
     function createHRRow() {
-        var hrCell = document.createElement("td");
-        hrCell.setAttribute("colSpan", "7");
+        var hrCell = createTD("6");
 	var hr = document.createElement("hr");
 	hr.setAttribute("width", "85%");
         hrCell.appendChild(hr);
@@ -62,134 +131,759 @@
         hrTR.className = 'sectbody';
         hrTR.appendChild(hrCell);
 
-       return hrTR;
+        return hrTR;
     }
 
-    function addTaxon() {
-        var taxaCountField = document.getElementById("taxaCount");
-        var taxaCount = taxaCountField.getAttribute("value");
-        taxaCount++;
-        taxaCountField.setAttribute("value", taxaCount);
+    function createHiddenInput(name, value){
+        var elem = document.createElement("input");
+        elem.setAttribute("type", "hidden");
+        elem.setAttribute("name", name);
+        elem.setAttribute("value", value);
+        return elem
+    }
 
-        var hrRow = createHRRow();
-        var taxonRankRow = createTextRow(taxaCount, "taxonRankName","Taxon Rank");
-        var taxonNameRow = createTextRow(taxaCount, "taxonRankValue","Taxon Name");
+    function sortInputTags(){
+        sortTagWithAttributeName("aoFirstName", "addAssociatedParty");
+        sortTagWithAttributeName("aoLastName", "addAssociatedParty");
+        sortTagWithAttributeName("aoRole", "addAssociatedParty", "select");
+        
+        sortTagWithAttributeName("taxonName", "addTaxon");
+        sortTagWithAttributeName("taxonRank", "addTaxon");
+        
+        sortTagWithAttributeName("keyword", "addKeyword");
+        sortTagWithAttributeName("keywordType", "addKeyword");
+        sortTagWithAttributeName("keywordTh", "addKeyword");
 
-        var taxonRowMarker = document.getElementById("addtaxarow");
-        var parent = taxonRowMarker.parentNode;
+    }
+    
 
-        parent.insertBefore(hrRow, taxonRowMarker);
-        parent.insertBefore(taxonRankRow, taxonRowMarker);
-        parent.insertBefore(taxonNameRow, taxonRowMarker);
+    function sortTagWithAttributeName(tag, afterTag, parentTag){
+       var elem = document.getElementById(afterTag);
+       
+       elem=elem.nextSibling.nextSibling;
+        while(elem.nodeName == "TR"){
+            var nodes = elem.getElementsByTagName("input");
+            for(var i=0; i < nodes.length; i++){
+                var node = nodes.item(i); 
+                if(node.getAttribute("name")==tag){
+                        var parent = node.parentNode;
+                        var clone = node.cloneNode(true);
+                        parent.removeChild(node);
+                        parent.appendChild(clone);
+                }
+            }
+            if(parentTag != null){
+            var nodes = elem.getElementsByTagName(parentTag);
+            for(var i=0; i < nodes.length; i++){
+                var node = nodes.item(i); 
+                if(node.getAttribute("name")==tag){
+                        var parent = node.parentNode;
+                        var clone = node.cloneNode(true);
+                        clone.value = node.value;
+                        parent.removeChild(node);
+                        parent.appendChild(clone);
+                }
+            }
+            }
+            elem=elem.nextSibling;
+        }
     }
+    
+    function incrementCount(_count){
+        var countField = document.getElementById(_count);
+        var count = countField.getAttribute("value");
+        count++;
+        countField.setAttribute("value", count);
+        return count;
+    }
+    
+    function decrementCount(_count){
+        var countField = document.getElementById(_count);
+        var count = countField.getAttribute("value");
+        count--;
+        countField.setAttribute("value", count);
+        return count;
+    }
+    
+    function createImageLink(imgSrc, imgAlt, imgOnClick, cursor){
+        var link = document.createElement("a");
+        var img = document.createElement("img");
+        img.setAttribute("src", imgSrc);
+        img.setAttribute("alt", imgAlt);
+        if (navigator.userAgent.toLowerCase().indexOf('msie')!= -1 && document.all){
+            link.style.setAttribute("cursor", cursor);
+            img.attachEvent("onclick", new Function(imgOnClick));
+        } else {
+            link.setAttribute("style", "cursor:"+cursor);
+            img.setAttribute("onClick", imgOnClick);
+        }
+        img.setAttribute("border", "0");
+        link.appendChild(img);        
+        return link;
+    }
+    
+    
+    function createTD(colSpan, align, cursor){
+        var td = document.createElement("td");
+        if(colSpan != "")
+            td.setAttribute("colSpan", colSpan);
+        td.setAttribute("align", align);
+        if (navigator.userAgent.toLowerCase().indexOf('msie')!= -1 && document.all){
+            td.style.setAttribute("cursor", cursor);
+        } else {
+            td.setAttribute("style", "cursor:"+cursor);
+        }
+        return td;
+    }
+  
+  
+    function cleanTextNodes(startTagId, endTagId){
+        var startTag = document.getElementById(startTagId);
 
+        var bro = startTag.nextSibling;       
 
-    function addKeyword() {
-        var keyCountField = document.getElementById("keyCount");
-        var keyCount = keyCountField.getAttribute("value");
-        keyCount++;
-        keyCountField.setAttribute("value", keyCount);
+        while(bro){
+            if(bro.nodeName == "#text"){
+                var temp = bro.nextSibling;
+                bro.parentNode.removeChild(bro);
+                bro = temp;
+            } else {
+                var id = bro.getAttribute("id");
+                if(id == endTagId){
+                  return;
+                }
+                bro = bro.nextSibling;
+            }
+        }
 
-        var hrRow = createHRRow();
-        var keyRow = createTextRow(keyCount,"keyword", "Keyword");
-	var keyTypeSelect = createKeyTypeSelect("kwType" + keyCount);
-        var keyTypeRow = createRow(keyCount, keyTypeSelect, "Keyword Type");
-        var keyThRow = createKeywordThesaurusRow("kwTh" + keyCount);
+    }
+  
+    function delRow(evt){
+         evt = (evt) ? evt : ((window.event) ? window.event : null);
+         if (evt) {
+           // equalize W3C/IE models to get event target reference
+           var elem = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
+           if (elem) {
+               try {
+                    var table = elem.parentNode.parentNode.parentNode.parentNode;
+                    var row = elem.parentNode.parentNode.parentNode;
 
-        var keyRowMarker = document.getElementById("addkeyrow");
-        var parent = keyRowMarker.parentNode;
+                    table.removeChild(row);
+                 }
+               catch(e) {
+                   var msg = (typeof e == "string") ? e : ((e.message) ? e.message : "Unknown Error");
+                   alert("Error:\n" + msg);
+                   return;
+               }
+           }
+         }
+    }
 
-        parent.insertBefore(hrRow, keyRowMarker);
-        parent.insertBefore(keyRow, keyRowMarker);
-        parent.insertBefore(keyTypeRow, keyRowMarker);
-        parent.insertBefore(keyThRow, keyRowMarker);
-	
+    function moveUpRow(evt){
+         evt = (evt) ? evt : ((window.event) ? window.event : null);
+         if (evt) {
+           // equalize W3C/IE models to get event target reference
+           var elem = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
+           if (elem) {
+               try {
+                    var table = elem.parentNode.parentNode.parentNode.parentNode;
+                    var row = elem.parentNode.parentNode.parentNode;
+                    
+                    var bro = row.previousSibling;
+                    if(bro != null && bro.previousSibling.nodeName =="TR"){
+                        clone = row.cloneNode(true);
+                        table.insertBefore(clone, bro);
+                        table.removeChild(row);
+                    }
+                 }
+               catch(e) {
+                   var msg = (typeof e == "string") ? e : ((e.message) ? e.message : "Unknown Error");
+                   alert("Error:\n" + msg);
+                   return;
+               }
+           }
+         }
     }
 
-    function createKeywordThesaurusRow(name) {        
-        var keyRowTemplate = document.getElementById("keyThRow");
-        var newField =  keyRowTemplate.cloneNode(true);
-	var nodes = newField.getElementsByTagName("input");
-	nodes.item(0).setAttribute("name", name);
-	nodes.item(1).setAttribute("name", name);
-	return newField;
+    function moveDownRow(evt, lastTR){
+         evt = (evt) ? evt : ((window.event) ? window.event : null);
+         if (evt) {
+           // equalize W3C/IE models to get event target reference
+           var elem = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
+           if (elem) {
+               try {
+                    var table = elem.parentNode.parentNode.parentNode.parentNode;
+                    var row = elem.parentNode.parentNode.parentNode;
+                    
+                    var _test = row.nextSibling;
+                    if(_test.getAttribute("id") == lastTR){
+                            return;
+                    }
+                    var bro = row.nextSibling.nextSibling;
+                    if(bro != null && bro.nodeName =="TR"){
+                        clone = row.cloneNode(true);
+                        table.insertBefore(clone, bro);
+                        table.removeChild(row);
+                    }
+                 }
+               catch(e) {
+                   var msg = (typeof e == "string") ? e : ((e.message) ? e.message : "Unknown Error");
+                   alert("Error:\n" + msg);
+                   return;
+               }
+           }
+         }
     }
+  
+    function addAssociatedParty() {
+    	var AOLN   = document.getElementById("AONameLast");
+	var AOFN   = document.getElementById("AONameFirst");
+	var AORole = document.getElementById("AORole");
 
-    function createKeyTypeSelect(name) {
+        if(AOLN.value != ""){
+            
+            var aoCount = incrementCount("aoCount");
+            
+        try{
+            var aoRow = createAORow(aoCount, AOLN.value, AOFN.value, AORole.options[AORole.selectedIndex].text);
+        }    catch(e) {
+                   var msg = (typeof e == "string") ? e : ((e.message) ? e.message : "Unknown Error");
+                   alert("Error:\n" + msg);
+                   return;
+               }
+
+             var aoRowMarker = document.getElementById("addaorow");
+            var parent = aoRowMarker.parentNode;
+            
+            var aoHR = document.getElementById("aoHRRow");
+            if(aoHR == null) {
+              var aoHRRow = createHRRow();
+              aoHRRow.setAttribute("id", "aoHRRow");
+              parent.insertBefore(aoHRRow, aoRowMarker);
+            }
+            
+            parent.insertBefore(aoRow, aoRowMarker);
+        
+            AOFN.value = "";
+            AOLN.value = "";
+            AORole.selectedIndex = 0;
+        } else {
+            alert("Enter the last name of the associated party");
+        }
+    }
+    
+    function createAORow(aoCount, AOLN, AOFN, AORole){    
+        var TR = document.createElement("tr");
+        TR.className='sectbody';
+        var labelTD = createTD("5","left", "pointer");
+        
+        if (navigator.userAgent.toLowerCase().indexOf('msie')!= -1 && document.all){
+            labelTD.attachEvent("onclick", new Function("aoEditRow(event, 0, \"" + AOFN  + "\",\""
+                             + AOLN  + "\",\"" + AORole + "\")"));
+        } else {
+            labelTD.setAttribute("onClick","aoEditRow(event, 0, \"" + AOFN  + "\",\""
+                             + AOLN  + "\",\"" + AORole + "\")");
+        }
+
+        
+        var text   = AOFN + " " + AOLN + " (Role: " + AORole + ")";
+        var label = document.createTextNode(text);
+
+        labelTD.appendChild(label);
+        labelTD.appendChild(createHiddenInput("aoFirstName", AOFN));
+        labelTD.appendChild(createHiddenInput("aoLastName", AOLN));
+        labelTD.appendChild(createHiddenInput("aoRole", AORole));
+        
+        var imgTD = createTD("","right");
+        
+        imgTD.appendChild(createImageLink("@systemidserver@@html-path@/style/images/previous.gif",
+                                          "Move Up","moveUpRow(event)","pointer"));
+      	imgTD.appendChild(document.createTextNode(" "));
+        imgTD.appendChild(createImageLink("@systemidserver@@html-path@/style/images/next.gif",
+                                          "Move Down", "moveDownRow(event, \"addaorow\")",
+                                          "pointer"));
+      	imgTD.appendChild(document.createTextNode(" "));
+        imgTD.appendChild(createImageLink("@systemidserver@@html-path@/style/images/delete.gif",
+                                          "Delete", "delRow(event)",
+                                          "pointer"));
+    
+        TR.appendChild(imgTD);
+        TR.appendChild(labelTD);
+        
+        return TR;
+    }
+
+    function aoEditRow(evt, num,  AOFN ,  AOLN ,  AORole){
+         evt = (evt) ? evt : ((window.event) ? window.event : null);
+         if (evt) {
+           // equalize W3C/IE models to get event target reference
+           var elem = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
+           if (elem && elem.nodeName == "TD") {
+               try {
+                    var table = elem.parentNode;
+                    if(num == 0){
+                        table.removeChild(elem);
+                        var TD = createTD("5","left", "pointer");
+                        if (navigator.userAgent.toLowerCase().indexOf('msie')!= -1 && document.all){
+                            TD.attachEvent("onclick", new Function("aoEditRow(event, 1, \"" + AOFN  + "\",\""
+                                                        + AOLN  + "\",\"" + AORole + "\")"));
+                        } else {
+                            TD.setAttribute("onClick","aoEditRow(event, 1, \"" + AOFN  + "\",\""
+                                                 + AOLN  + "\",\"" + AORole + "\")");
+                        }                   
+                        TD.appendChild(createTextField("aoFirstName", 15, AOFN));
+                        TD.appendChild(document.createTextNode(" "));
+                        TD.appendChild(createTextField("aoLastName", 15, AOLN));
+                        TD.appendChild(document.createTextNode(" Role: "));
+                        TD.appendChild(createAORoleTypeSelect("aoRole", AORole));
+                        table.appendChild(TD);
+                    } else {
+                        var child = elem.childNodes;
+                        AOFN = child.item(0).value;
+                        AOLN = child.item(2).value;
+                        var _AORole = child.item(4);
+                        AORole = _AORole.options[_AORole.selectedIndex].text;
+                        table.removeChild(elem);
+    
+                        var TD = createTD("5","left", "pointer");
+                        if (navigator.userAgent.toLowerCase().indexOf('msie')!= -1 && document.all){
+                            TD.attachEvent("onclick", new Function("aoEditRow(event, 0, \"" + AOFN  + "\",\""
+                                                        + AOLN  + "\",\"" + AORole + "\")"));
+                        } else {
+                            TD.setAttribute("onClick","aoEditRow(event, 0, \"" + AOFN  + "\",\""
+                                                 + AOLN  + "\",\"" + AORole + "\")");
+                        }
+                        var text   = AOFN + " " + AOLN + " (Role: " + AORole + ")";
+                        var label = document.createTextNode(text);
+                        TD.appendChild(label);
+                        TD.appendChild(createHiddenInput("aoFirstName", AOFN));
+                        TD.appendChild(createHiddenInput("aoLastName", AOLN));
+                        TD.appendChild(createHiddenInput("aoRole", AORole));
+                        table.appendChild(TD);
+                    }
+                 }
+               catch(e) {
+                   var msg = (typeof e == "string") ? e : ((e.message) ? e.message : "Unknown Error");
+                   alert("Error:\n" + msg);
+                   return;
+               }
+           }
+         }
+    }
+
+    function createAORoleTypeSelect(name, value) {
         var newField=document.createElement("select");
         newField.setAttribute("name", name);
 	var option1=document.createElement("option");
-	var text1=document.createTextNode("None");
+	var text1=document.createTextNode("Co-owner");
+	//var text1=document.createTextNode("Principal Investigator");
 	option1.appendChild(text1);
 	newField.appendChild(option1);
 	var option2=document.createElement("option");
-	var text2=document.createTextNode("Theme");
+	var text2=document.createTextNode("Custodian/Steward");
 	option2.appendChild(text2);
 	newField.appendChild(option2);
 	var option3=document.createElement("option");
-	var text3=document.createTextNode("Place");
+	var text3=document.createTextNode("Metadata Provider");
 	option3.appendChild(text3);
 	newField.appendChild(option3)
 	var option4=document.createElement("option");
-	var text4=document.createTextNode("Stratum");
+	var text4=document.createTextNode("User");
 	option4.appendChild(text4);
 	newField.appendChild(option4);
-	var option5=document.createElement("option");
-	var text5=document.createTextNode("Temporal");
-	option5.appendChild(text5);
-	newField.appendChild(option5);
-	var option6=document.createElement("option");
-	var text6=document.createTextNode("Taxonomic");
-	option6.appendChild(text6);
-	newField.appendChild(option6);
+        
+        if(value == "Co-owner"){
+            newField.selectedIndex=0;
+        } else if(value == "Custodian/Steward"){
+            newField.selectedIndex=1;
+        } else if(value == "Metadata Provider"){
+            newField.selectedIndex=2;
+        } else if(value == "User"){
+            newField.selectedIndex=3;
+        }
 
 	return newField;
     }
 
-    function addAdditionalPeople() {
-        var aoCountField = document.getElementById("aoCount");
-        var aoCount = aoCountField.getAttribute("value");
-        aoCount++;
-        aoCountField.setAttribute("value", aoCount);
 
-	var aoHRRow = createHRRow();
-        var aoFirstNameRow = createTextRow(aoCount, "origNamefirst", "First Name");
-        var aoLastNameRow = createTextRow(aoCount, "origNamelast", "Last Name");
 
-	var role = createRoleTypeSelect("origRole" + aoCount);
-        var aoRoleRow = createRow(aoCount, role, "Role");
-       
-        var aoRowMarker = document.getElementById("addaorow");
-        var parent = aoRowMarker.parentNode;
+   function addTaxon() {   
+      	var taxonRank   = document.getElementById("taxonRank");
+	var taxonName   = document.getElementById("taxonName");
+
+        if(taxonRank.value !="" && taxonName.value != ""){
+            
+            var taxonCount = incrementCount("taxaCount");
+
+            var row = createTaxonRow(taxonCount, taxonName.value, taxonRank.value);
+            var taxonRowMarker = document.getElementById("addtaxarow");
+            var parent = taxonRowMarker.parentNode;
+            
+            var taxonHR = document.getElementById("taxonHRRow");
+            if(taxonHR == null) {
+              var taxonHRRow = createHRRow();
+              taxonHRRow.setAttribute("id", "taxonHRRow");
+              parent.insertBefore(taxonHRRow, taxonRowMarker);
+            }
+            
+            parent.insertBefore(row, taxonRowMarker);
         
-	parent.insertBefore(aoHRRow, aoRowMarker)
-	parent.insertBefore(aoFirstNameRow, aoRowMarker);
-	parent.insertBefore(aoLastNameRow, aoRowMarker);
-	parent.insertBefore(aoRoleRow, aoRowMarker);
+            taxonRank.value = "";
+            taxonName.value = "";
+        } else {
+            alert("Enter complete taxonomic information");
+        }
     }
 
-    function createRoleTypeSelect(name) {
+    function createTaxonRow(taxonCount, taxonRank, taxonName){    
+        var TR = document.createElement("tr");
+        TR.className='sectbody';
+
+        var labelTD = createTD("5","left", "pointer");
+        if (navigator.userAgent.toLowerCase().indexOf('msie')!= -1 && document.all){
+            labelTD.attachEvent("onclick",new Function("taxonEditRow(event, 0, \"" + taxonName
+                             + "\",\"" + taxonRank  + "\")"));
+        } else {
+            labelTD.setAttribute("onClick","taxonEditRow(event, 0, \"" + taxonName
+                             + "\",\"" + taxonRank  + "\")");
+        }
+
+        
+        var text = "Rank: " + taxonName + ", Name: " + taxonRank;
+        var label = document.createTextNode(text);
+
+        labelTD.appendChild(label);
+        labelTD.appendChild(createHiddenInput("taxonName", taxonName));
+        labelTD.appendChild(createHiddenInput("taxonRank", taxonRank));
+        
+        var imgTD = createTD("","right");
+        imgTD.appendChild(createImageLink("@systemidserver@@html-path@/style/images/previous.gif",
+                                          "Move Up", "moveUpRow(event)",
+                                          "pointer"));
+      	imgTD.appendChild(document.createTextNode(" "));
+        imgTD.appendChild(createImageLink("@systemidserver@@html-path@/style/images/next.gif",
+                                          "Move Down", "moveDownRow(event, 'addtaxarow')",
+                                          "pointer"));
+      	imgTD.appendChild(document.createTextNode(" "));
+        imgTD.appendChild(createImageLink("@systemidserver@@html-path@/style/images/delete.gif",
+                                          "Delete", "delRow(event)",
+                                          "pointer"));
+    
+        TR.appendChild(imgTD);
+        TR.appendChild(labelTD);
+        
+        return TR;
+    }
+
+
+    function taxonEditRow(evt, num,  taxonName ,  taxonRank){
+         evt = (evt) ? evt : ((window.event) ? window.event : null);
+         if (evt) {
+           // equalize W3C/IE models to get event target reference
+           var elem = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
+           if (elem && elem.nodeName == "TD") {
+               try {
+                    var table = elem.parentNode;
+                    if(num == 0){
+                        table.removeChild(elem);
+                        var TD = createTD("5","left", "pointer");
+                        if (navigator.userAgent.toLowerCase().indexOf('msie')!= -1 && document.all){
+                            TD.attachEvent("onclick",new Function("taxonEditRow(event, 1, \"" + taxonName
+                                 + "\",\"" + taxonRank  + "\")"));
+                        } else {
+                            TD.setAttribute("onClick","taxonEditRow(event, 1, \"" + taxonName
+                                 + "\",\"" + taxonRank  + "\")");
+                        }
+                  
+                        TD.appendChild(document.createTextNode("Rank: "));
+                        TD.appendChild(createTextField("taxonName", 15, taxonName));
+                        TD.appendChild(document.createTextNode(" Name: "));
+                        TD.appendChild(createTextField("taxonRank", 15, taxonRank));
+                        table.appendChild(TD);
+                    } else {
+                        var child = elem.childNodes;
+                        taxonName = child.item(1).value;
+                        taxonRank = child.item(3).value;
+                        table.removeChild(elem);
+    
+                        var TD = createTD("5","left", "pointer");
+                        if (navigator.userAgent.toLowerCase().indexOf('msie')!= -1 && document.all){
+                            TD.attachEvent("onclick",new Function("taxonEditRow(event, 0, \"" + taxonName
+                                 + "\",\"" + taxonRank  + "\")"));
+                        } else {
+                            TD.setAttribute("onClick","taxonEditRow(event, 0, \"" + taxonName
+                                 + "\",\"" + taxonRank  + "\")");
+                        }                        
+                        var text = "Rank: " + taxonName + ", Name: " + taxonRank;
+                        var label = document.createTextNode(text);
+                        TD.appendChild(label);
+                        TD.appendChild(createHiddenInput("taxonName", taxonName));
+                        TD.appendChild(createHiddenInput("taxonRank", taxonRank));
+                        table.appendChild(TD);
+                    }
+                 }
+               catch(e) {
+                   var msg = (typeof e == "string") ? e : ((e.message) ? e.message : "Unknown Error");
+                   alert("Error:\n" + msg);
+                   return;
+               }
+           }
+         }
+    }
+    
+    function addKeyword() {
+    	var keyword   = document.getElementById("keyword");
+	var keywordType   = document.getElementById("keywordType");
+	var keywordTh = document.getElementById("keywordTh");
+
+        if(keyword.value !=""){
+            var keyCount = incrementCount("keyCount");
+
+            var keyRow = createKeywordRow(keyCount, keyword.value, keywordType.options[keywordType.selectedIndex].text, keywordTh.options[keywordTh.selectedIndex].text);
+            var keyRowMarker = document.getElementById("addkeyrow");
+            var parent = keyRowMarker.parentNode;
+            
+            var keyHR = document.getElementById("keywordHRRow");
+            if(keyHR == null) {
+              var keyHRRow = createHRRow();
+              keyHRRow.setAttribute("id", "keywordHRRow");
+              parent.insertBefore(keyHRRow, keyRowMarker);
+            }
+            
+            parent.insertBefore(keyRow, keyRowMarker);
+        
+            keyword.value = "";
+            keywordType.selectedIndex = 0;
+            keywordTh.selectedIndex = 0;
+        } else {
+            alert("Enter keyword");
+        }
+    }
+
+
+    function createKeywordRow(keyCount, keyword, keywordType, keywordTh){    
+        var TR = document.createElement("tr");
+        TR.className='sectbody';
+
+        var labelTD = createTD("5","left", "pointer");
+        
+        if (navigator.userAgent.toLowerCase().indexOf('msie')!= -1 && document.all){
+            labelTD.attachEvent("onclick", new Function("keywordEditRow(event, 0, \"" + keyword
+                + "\",\"" + keywordType + "\",\"" + keywordTh  + "\")"));
+        } else {
+            labelTD.setAttribute("onClick","keywordEditRow(event, 0, \"" + keyword
+                + "\",\"" + keywordType + "\",\"" + keywordTh  + "\")");
+        }
+                  
+        var text   = keyword + " (Type: " + keywordType + ", Thesaurus: " + keywordTh + ")";
+        var label = document.createTextNode(text);
+
+        labelTD.appendChild(label);
+        labelTD.appendChild(createHiddenInput("keyword", keyword));
+        labelTD.appendChild(createHiddenInput("keywordType", keywordType));
+        labelTD.appendChild(createHiddenInput("keywordTh", keywordTh));
+        
+        var imgTD = createTD("","right");
+        imgTD.appendChild(createImageLink("@systemidserver@@html-path@/style/images/previous.gif",
+                                          "Move Up", "moveUpRow(event)",
+                                          "pointer"));
+      	imgTD.appendChild(document.createTextNode(" "));
+        imgTD.appendChild(createImageLink("@systemidserver@@html-path@/style/images/next.gif",
+                                          "Move Down", "moveDownRow(event, 'addkeyrow')",
+                                          "pointer"));
+      	imgTD.appendChild(document.createTextNode(" "));
+        imgTD.appendChild(createImageLink("@systemidserver@@html-path@/style/images/delete.gif",
+                                          "Delete", "delRow(event)",
+                                          "pointer"));
+    
+        TR.appendChild(imgTD);
+        TR.appendChild(labelTD);
+        
+        return TR;
+    }
+
+    function keywordEditRow(evt, num,  keyword,  keywordType, keywordTh){
+         evt = (evt) ? evt : ((window.event) ? window.event : null);
+         if (evt) {
+           // equalize W3C/IE models to get event target reference
+           var elem = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
+           if (elem && elem.nodeName == "TD") {
+               try {
+                    var table = elem.parentNode;
+                    if(num == 0){
+                        table.removeChild(elem);
+                        var TD = createTD("5","left", "pointer");
+                        if (navigator.userAgent.toLowerCase().indexOf('msie')!= -1 && document.all){
+                            TD.attachEvent("onclick", new Function("keywordEditRow(event, 1, \"" + keyword
+                            + "\",\"" + keywordType + "\",\"" + keywordTh  + "\")"));
+                        } else {
+                            TD.setAttribute("onClick","keywordEditRow(event, 1, \"" + keyword
+                            + "\",\"" + keywordType + "\",\"" + keywordTh  + "\")");
+                        }
+                    
+                        TD.appendChild(createTextField("keyword", 15, keyword));
+                        TD.appendChild(document.createTextNode(" Type: "));
+                        TD.appendChild(createKeyTypeSelect("keywordType", keywordType));
+                        TD.appendChild(document.createTextNode(" Thesaurus: "));
+                        TD.appendChild(createKeyThSelect("keywordTh", keywordTh));
+                        table.appendChild(TD);
+                    } else {
+                        var child = elem.childNodes;
+                        keyword = child.item(0).value;
+                        var _keywordType = child.item(2);
+                        keywordType = _keywordType.options[_keywordType.selectedIndex].text;
+                        var _keywordTh = child.item(4);
+                        keywordTh = _keywordTh.options[_keywordTh.selectedIndex].text;
+                        table.removeChild(elem);
+    
+                        var TD = createTD("5","left", "pointer");
+                        if (navigator.userAgent.toLowerCase().indexOf('msie')!= -1 && document.all){
+                            TD.attachEvent("onclick", new Function("keywordEditRow(event, 0, \"" + keyword
+                            + "\",\"" + keywordType + "\",\"" + keywordTh  + "\")"));
+                        } else {
+                            TD.setAttribute("onClick","keywordEditRow(event, 0, \"" + keyword
+                            + "\",\"" + keywordType + "\",\"" + keywordTh  + "\")");
+                        }
+                    
+                        var text   = keyword + " (Type: " + keywordType + ", Thesaurus: " + keywordTh + ")";
+                        var label = document.createTextNode(text);
+                        TD.appendChild(label);
+                        TD.appendChild(createHiddenInput("keyword", keyword));
+                        TD.appendChild(createHiddenInput("keywordType", keywordType));
+                        TD.appendChild(createHiddenInput("keywordTh", keywordTh));
+                        table.appendChild(TD);
+                    }
+                 }
+               catch(e) {
+                   var msg = (typeof e == "string") ? e : ((e.message) ? e.message : "Unknown Error");
+                   alert("Error:\n" + msg);
+                   return;
+               }
+           }
+         }
+    }
+    
+    function createKeywordThesaurusRow(name) {        
+        var keyRowTemplate = document.getElementById("keyThRow");
+        var newField =  keyRowTemplate.cloneNode(true);
+	var nodes = newField.getElementsByTagName("input");
+	nodes.item(0).setAttribute("name", name);
+	nodes.item(1).setAttribute("name", name);
+	return newField;
+    }
+
+    function createKeyThSelect(name, value) {
         var newField=document.createElement("select");
         newField.setAttribute("name", name);
 	var option1=document.createElement("option");
-	var text1=document.createTextNode("Principal Investigator");
+	var text1=document.createTextNode("None");
 	option1.appendChild(text1);
 	newField.appendChild(option1);
 	var option2=document.createElement("option");
-	var text2=document.createTextNode("Custodian/Steward");
+	var text2=document.createTextNode("GCMD");
 	option2.appendChild(text2);
 	newField.appendChild(option2);
+
+        if(value == "None"){
+            newField.selectedIndex=0;
+        } else if(value == "GCMD"){
+            newField.selectedIndex=1;
+        }
+	return newField;
+    }
+
+    function createKeyTypeSelect(name, value) {
+        var newField=document.createElement("select");
+        newField.setAttribute("name", name);
+	var option1=document.createElement("option");
+	var text1=document.createTextNode("None");
+	option1.appendChild(text1);
+	newField.appendChild(option1);
+	var option2=document.createElement("option");
+	var text2=document.createTextNode("Theme");
+	option2.appendChild(text2);
+	newField.appendChild(option2);
 	var option3=document.createElement("option");
-	var text3=document.createTextNode("Metadata Provider");
+	var text3=document.createTextNode("Place");
 	option3.appendChild(text3);
 	newField.appendChild(option3)
 	var option4=document.createElement("option");
-	var text4=document.createTextNode("Owner");
+	var text4=document.createTextNode("Stratum");
 	option4.appendChild(text4);
 	newField.appendChild(option4);
+	var option5=document.createElement("option");
+	var text5=document.createTextNode("Temporal");
+	option5.appendChild(text5);
+	newField.appendChild(option5);
+	var option6=document.createElement("option");
+	var text6=document.createTextNode("Taxonomic");
+	option6.appendChild(text6);
+	newField.appendChild(option6);        
+        if(value == "None"){
+            newField.selectedIndex=0;
+        } else if(value == "Theme"){
+            newField.selectedIndex=1;
+        } else if(value == "Place"){
+            newField.selectedIndex=2;
+        } else if(value == "Stratum"){
+            newField.selectedIndex=3;
+        }else if(value == "Temporal"){
+            newField.selectedIndex=4;
+        } else if(value == "Taxonomic"){
+            newField.selectedIndex=5;
+        }
 	return newField;
     }
+    
+    var basicInfoBit = 1;
+    var dsoBit = 1;
+    var apBit = 1;
+    var abstractBit = 1;
+    var keywordBit = 1;
+    var temporalBit = 1;
+    var spatialBit = 1;
+    var taxonomicBit = 1;
+    var methodBit = 1;
+    var dscBit = 1;
+    var distBit = 1;
+    
+    function swap(evt, _node, nodeBit){
+        evt = (evt) ? evt : ((window.event) ? window.event : null);
+        if(evt) {
+            var elem = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
+            elem.removeChild(elem.firstChild);
 
+            var node = document.getElementById(_node);
+            if(nodeBit){
+                elem.appendChild(document.createTextNode("Show"));
+                if (navigator.userAgent.toLowerCase().indexOf('msie')!= -1 && document.all){
+                   node.style.setAttribute("display", "none");
+                } else {
+                   node.setAttribute("style", "display:none");
+                }
+                return 0;
+            } else {
+                elem.appendChild(document.createTextNode("Hide"));
+                if (navigator.userAgent.toLowerCase().indexOf('msie')!= -1 && document.all){
+                   node.style.removeAttribute("display");
+                } else {
+                   node.removeAttribute("style");
+                }
+                return 1;
+            }
+        }        
+    }
+
+
+    function handleOther(enable, node){
+        var textBox = document.getElementById(node);
+        if(enable){
+       	   textBox.removeAttribute("disabled");   
+        } else {
+           textBox.value="";
+      	   textBox.disabled = "true";   
+        }
+    }
     function copyContact(){
         var checkBox = document.getElementById("copyCheckBox");
         if(checkBox.checked == true)
@@ -310,15 +1004,16 @@
       [% IF form != 're_entry' %]	
       
       
-      <table width="760" cellpadding="3" cellspacing="0">
+      <table class="intro" cellpadding="3" cellspacing="0">
       
-      <tr><td align="left"><span class="regtext">Use this page to submit a <span class="label">new</span> data set description for
+      <tr><td align="left"><span class="emphasis">Data Registry Form</td></tr>
+      <tr><td align="left"><span class="regtext">Use this form to submit a new data set description for
          inclusion in the registry.</span></td></tr>
       <tr><td></td></tr>
       <tr><td align="left"><span class="regtext">Please have a look at the 
       <a href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&amp;stage=guide" target="guide">
-        <span class="boldlink">Guide on How to Complete Data Registry Entries</span></a> 
-        before you start filling in this catalog form. Also, use your browser's 
+        <span class="boldlink">Guide for Completing the Data Registry Form</span></a> 
+        before you start filling in this form. Also, use your browser's 
         Reload/Refresh function to make sure you see the latest version of this 
         page.</span></td></tr>
       <tr><td></td></tr>
@@ -340,7 +1035,7 @@
       <a href="mailto:[% recipient %]"><span class="italicized">[% recipient %]</span></a>.</span>
       </td></tr>
       [% END %]
-      <tr><td align="left"><span class="label">* Denotes a required field.</span></td></tr>
+      <tr><td align="left"><span class="label">*Denotes a required field.</span></td></tr>
       <tr><td></td></tr>
       
       <tr><td></td></tr>
@@ -365,19 +1060,25 @@
   <input type="hidden" name="temporalRequired" value="[% temporalRequired %]">
   <input type="hidden" name="spatialRequired" value="[% spatialRequired %]">
   
-        <table class="tables" cellpadding="8" cellspacing="0">
-        <tr class="sectheader"><td class="borderbottom" colspan="5" align="left"> BASIC INFORMATION - Name of Person completing this form</td>
-	<td class="borderbottom" align="right"><a href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&amp;stage=guide#DataSetOriginator" target="guide"><img src="@systemidserver@@html-path@/style/images/question_mark.gif" alt="What's this?" border="0"></a></td></tr>
-	<tr class="sectbody"><td align="right"><span class="label">*First Name</span><td colspan="5"><input type="TEXT" name="providerGivenName" size="30" value="[%providerGivenName%]">
+        <table class="tables" cellpadding="5" cellspacing="0">
+        <tr class="sectheader"><td colspan="5" align="left"> BASIC INFORMATION - name of person completing this form.&nbsp;
+	<a href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&amp;stage=guide#DataSetOriginator" target="guide">
+        <span class="smalltext">(What's this?)</span></a></td>
+        <td class="rightCol"><span><a onClick="basicInfoBit=swap(event, 'basicInfoTable', basicInfoBit)" style="cursor:pointer">Hide</a></span></td>
+        </tr>
+	</table>
+        
+        <table class="tables" cellpadding="5" cellspacing="0" id="basicInfoTable">
+        <tr class="sectbody" id="firstName"><td class="rightCol"><span class="label">*First Name</span><td colspan="5"><input type="TEXT" name="providerGivenName" class="shortwidth" value="[%providerGivenName%]">
         </td></tr>
-	<tr class="sectbody"><td align="right"><span class="label">*Last Name</span><td colspan="5"><input type="TEXT" name="providerSurName" size="30" value="[%providerSurName%]">
+	<tr class="sectbody" id="lastName"><td class="rightCol"><span class="label">*Last Name</span><td colspan="5"><input type="TEXT" name="providerSurName" class="shortwidth" value="[%providerSurName%]">
         </td></tr>
 	
-	<tr class="sectbody"><td align="right"><span class="label">*Data Set Title</span></td><td colspan="5"><input type="TEXT" name="title" value="[%title%]" size="60">
+	<tr class="sectbody" id="title"><td class="rightCol"><span class="label">*Data Set Title</span></td><td colspan="5"><input type="TEXT" name="title" value="[%title%]" class="longwidth">
         </td></tr>
 		
 	[% IF showSiteList == 'true' %]
-        <tr class="sectbody"><td align="right"><span class="label">[% usite %] Name</span></td>
+        <tr class="sectbody" id="sitelist"><td class="rightCol"><span class="label">*[% usite %] Name</span></td>
 	  <td colspan="5"><select name="site">
 	    [% IF form == 're_entry' %]
 	    	<option selected>[%site%]</option>
@@ -391,8 +1092,8 @@
 [% END %]
         
 	[% IF showWgList == 'true' %]
-        <tr class="sectbody"><td align="right"><span class="label">*NCEAS Project(s):</span></td>
-            <td colspan="5"><select name="wg" multiple="multiple" size="5">
+        <tr class="sectbody"><td class="rightCol"><span class="label">*NCEAS Project(s):</span></td>
+            <td colspan="5"><select name="wg" multiple="multiple" size="5" class="longwidth">
             [% FOREACH project = projects %]
               [% SET pname = $project.3 %]
               [% IF pname.length > 50 %]
@@ -411,32 +1112,42 @@
           </select></td></tr>
 [% END %]
 [% IF showOrganization == 'true' %]
-        <tr class="sectbody"><td align="right"><span class="label">Organization Name</span></td>
-            <td colspan="5"><input type="TEXT" name="site" size="60" value="[%site%]"></td></tr>
+        <tr class="sectbody"><td class="rightCol"><span class="label">*Organization Name</span></td>
+            <td colspan="5"><input type="TEXT" name="site" class="longwidth" value="[%site%]"></td></tr>
 [% END %]
+            
+        </table>
+       
+    <table class="tables" cellpadding="5" cellspacing="0">
+        <tr class="sectheader"><td colspan="5" align="left"><span class="label">PRINCIPAL DATA SET OWNER&nbsp;</span>
+	<a href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&amp;stage=guide#DataSetOriginator" 
+	target="guide"><span class="smalltext">(What's this?)</span></a></td>
+        <td class="rightCol"><span><a onClick="dsoBit=swap(event, 'dsoTable', dsoBit)" style="cursor:pointer">Hide</a></span></td>
+        </tr>
+    </table>
+
+    <table class="tables" cellpadding="5" cellspacing="0" id="dsoTable">    
+    <tr class="sectbody"><td class="rightCol"><span class="label">*First Name</span></td>
+        <td colspan="5"><input type="TEXT" name="origNamefirst0" class="shortwidth" id="origNameFirst" value="[%origNamefirst0%]"></td></tr>
+    <tr class="sectbody"><td class="rightCol"><span class="label">*Last Name</span></td>
+        <td colspan="5"><input type="TEXT" name="origNamelast0" class="shortwidth" id="origNameLast" value="[%origNamelast0%]"></td></tr>
+    <tr class="sectbody"><td class="rightCol"><span class="label">Organization Name</span></td>
+        <td colspan="5"><input type="TEXT" name="origNameOrg" class="longwidth" id="origNameOrg" value="[%origNameOrg%]"></td></tr>
+    <tr class="sectbody"><td class="rightCol"><span class="label">E-Mail</span></td>
+         <td colspan="5"><input type="TEXT" name="origEmail" class="shortwidth" id="origEmail" value="[%origEmail%]"></td></tr>
+    <tr class="sectbody"><td class="rightCol"><span class="label">Phone</span></td>
+        <td colspan="5"><input type="TEXT" name="origPhone" class="shortwidth" id="origPhone" value="[%origPhone%]"></td></tr>
+    <tr class="sectbody"><td class="rightCol"><span class="label">FAX</span></td>
+        <td colspan="5"><input type="TEXT" name="origFAX" class="shortwidth" id="origFAX" value="[%origFAX%]"></td></tr>
+  
+   <tr class="sectbody"><td valign="top" align="right"><span class="label">Street<br>Information</td> 
+        <td colspan="5"><textarea id="origDelivery" name="origDelivery" class="longwidth">[%origDelivery%]</textarea><br><span class="smalltext">(number, street, unit, etc.; comma-separated)</span>
+        </td></tr>
     
-        <tr class="sectheader"><td class="topbottom" colspan="5" align="left">PRINCIPAL DATA SET OWNER&nbsp</td> 
-	<td class="topbottom" align="right"><a href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&amp;stage=guide#DataSetOriginator" target="guide"><img src="@systemidserver@@html-path@/style/images/question_mark.gif" alt="What's this?" border="0"></a>
-	</td></tr>
-    <tr class="sectbody"><td align="right"><span class="label">*First Name</span></td>
-        <td colspan="5"><input type="TEXT" name="origNamefirst0" size="30" id="origNameFirst" value="[%origNamefirst0%]"></td></tr>
-    <tr class="sectbody"><td align="right"><span class="label">*Last Name</span></td>
-        <td colspan="5"><input type="TEXT" name="origNamelast0" size="30" id="origNameLast" value="[%origNamelast0%]"></td></tr>
-    <tr class="sectbody"><td align="right"><span class="label">Organization Name</span></td>
-        <td colspan="5"><input type="TEXT" name="origNameOrg" size="60" id="origNameOrg" value="[%origNameOrg%]"></td></tr>
-    <tr class="sectbody"><td align="right"><span class="label">E-Mail</span></td>
-         <td colspan="5"><input type="TEXT" name="origEmail" size="30" id="origEmail" value="[%origEmail%]"></td></tr>
-    <tr class="sectbody"><td align="right"><span class="label">Phone</span></td>
-        <td colspan="5"><input type="TEXT" name="origPhone" size="30" id="origPhone" value="[%origPhone%]"></td></tr>
-    <tr class="sectbody"><td align="right"><span class="label">FAX</span></td>
-        <td colspan="5"><input type="TEXT" name="origFAX" size="30" id="origFAX" value="[%origFAX%]"></td></tr>
-    <tr class="sectbody"><td valign="top" align="right"><span class="label">Street<br>Information</td> 
-        <td colspan="5"><textarea rows="3" cols="30" id="origDelivery" name="origDelivery">[%origDelivery%]</textarea><br><span class="smalltext">(number, street, unit, etc.; comma-separated)</span>
-        </td></tr>
-    <tr class="sectbody"><td align="right"><span class="label">City</span></td>
-        <td colspan="5"><input type="TEXT" name="origCity" id="origCity" value="[%origCity%]" size="30"></td></tr>
-    <tr class="sectbody"><td align="right"><span class="label">State</span></td>
-        <td colspan="5"><select name="origState" id="origState">
+    <tr class="sectbody"><td class="rightCol"><span class="label">City</span></td>
+        <td colspan="5"><input type="TEXT" name="origCity" id="origCity" value="[%origCity%]" class="shortwidth"></td></tr>
+    <tr class="sectbody"><td class="rightCol"><span class="label">State</span></td>
+        <td colspan="5"><select name="origState" id="origState" class="shortwidth">
 	    [% IF form == 're_entry' %]
                 <option selected>[%origState%]</option>
 	    [% ELSE %]
@@ -501,96 +1212,127 @@
             <option>West Virginia</option>
             <option>Wisconsin</option>
             <option>Wyoming</option>
-          </select></td></tr>
-    <tr class="sectbody"><td align="right"><span class="label">Other State/Province</span></td>
-          <td colspan="5"><input type="TEXT" name="origStateOther" size="30" id="origStateOther" value="[%origStateOther%]"></td></tr>
-    <tr class="sectbody"><td align="right"><span class="label">Postal Code</span></td>
-        <td colspan="5"><input type="TEXT" name="origZIP" id="origZip" value="[%origZIP%]" size="30"></td></tr>
-    <tr class="sectbody"><td align="right"><span class="label">Country</span></td>
-        <td colspan="5"><input type="TEXT" name="origCountry" size="30" id="origCountry" value="[%origCountry%]"></td></tr>
-       
-  <tr class="sectheader"><td class="topbottom" colspan="5" align="left"><span class="label">ASSOCIATED PARTIES</span></td>
-      <td class="topbottom" align="right"><a href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&amp;stage=guide#AdditionalOriginators"
-       target="guide"><img src="@systemidserver@@html-path@/style/images/question_mark.gif" alt="What's this?" border="0"></a></td></tr>
-  
- [% numAO = 1 %]
- [% IF aoCount > 0 %]
-   [% numAO = aoCount %]
- [% END %]
-  <input type="hidden" name="aoCount" value="[%numAO%]" 
-            id="aoCount">
-  
-       [% cnt = 1 %]
-       [% WHILE cnt <= numAO%]
-       <tr class="sectbody"><td align="right"><span class="label">First Name</span></td>
+	    </select></td></tr>
+   
+	  <tr class="sectbody"><td class="rightCol"><span class="label">Other State/Province</span></td>
+          <td colspan="5"><input type="TEXT" name="origStateOther" class="shortwidth" id="origStateOther" value="[%origStateOther%]"></td></tr>
+    <tr class="sectbody"><td class="rightCol"><span class="label">Postal Code</span></td>
+        <td colspan="5"><input type="TEXT" name="origZIP" id="origZip" value="[%origZIP%]" class="shortwidth"></td></tr>
+    <tr class="sectbody"><td class="rightCol"><span class="label">Country</span></td>
+        <td colspan="5"><input type="TEXT" name="origCountry" class="shortwidth" id="origCountry" value="[%origCountry%]"></td></tr>
+    </table>
+   
+    <table class="tables" cellpadding="5" cellspacing="0">
+    <tr class="sectheader"><td colspan="5" align="left"><span class="label">ASSOCIATED PARTIES&nbsp;</span><a href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&amp;stage=guide#AdditionalOriginators"
+         target="guide"><span class="smalltext">(What's this?)</span></a></td>
+         <td class="rightCol"><span><a onClick="apBit=swap(event, 'apTable', apBit)" style="cursor:pointer">Hide</a></span></td>
+    </tr>
+    </table>
+
+    <table class="tables" cellpadding="5" cellspacing="0" id="apTable">    
+    <tr class="sectbody"><td class="rightCol"><span class="label">First Name</span></td>
         <td colspan="5">
-            [% SET key = "origNamefirst${cnt}" %]
-            <input name="origNamefirst[%cnt%]" value="[%$key%]" size="30"></td></tr>
+        <input name="aoFirstName" id="AONameFirst" class="shortwidth"></td></tr>
             
-       <tr class="sectbody"><td align="right"><span class="label">Last Name</span></td>
-       <td colspan="5">
-            [% SET key = "origNamelast${cnt}" %]
-            <input name="origNamelast[%cnt%]" value="[%$key%]" size="30"></td></tr>
+    <tr class="sectbody"><td class="rightCol"><span class="label">Last Name</span></td>
+        <td colspan="5">
+        <input name="aoLastName" id="AONameLast" class="shortwidth"></td></tr>
                    
-       <tr class="sectbody"><td align="right"><span class="label">Role</span></td>
-       <td colspan="5"> 
-           [% SET origR = "origRole${cnt}" %]
-	  <select name="origRole[%cnt%]">
-	    [% IF form == 're_entry' && $origR != ""%]
-	     	<option selected>[%$origR%]</option>
-	    [% END %]
-            <option>Principal Investigator</option>
+    <tr class="sectbody"><td class="rightCol"><span class="label">Role</span></td>
+        <td colspan="5"> 
+        <select id="AORole" name="aoRole" class="shortwidth">
+            <option>Co-owner</option>
             <option>Custodian/Steward</option>
             <option>Metadata Provider</option>
-            <option>Owner</option>
-            </select>
-            </td>
-            </tr>
-            [% cnt = cnt + 1 %]
-         [% END %]
-	  
-	 <tr class="sectbody" id="addaorow"> 
+	    <option>User</option>
+        </select>
+        </td>
+    </tr>
+  
+   <tr id="addAssociatedParty" class="sectbody"> 
             <td></td>
             <td colspan="5"> <input type="button" value="Add Associated Party" id="addaobutton1"
-                    onClick="addAdditionalPeople()"></td></tr>
-           
-		    
-  <tr class="sectheader"><td class="topbottom" colspan="5" align="left"><span class="label">DATA SET ABSTRACT</span></td>
-         <td class="topbottom" align="right"><a href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&amp;stage=guide#DataSetAbstract"
-          target="guide"><img src="@systemidserver@@html-path@/style/images/question_mark.gif" alt="What's this?" border="0"></td></tr>  
-  
-    <tr class="sectbody"><td align="right" valign="top"><span class="label">*Data Set Abstract</span></td>
+                    onClick="addAssociatedParty()"></td></tr>
+       
+    [% numAO = 0 %]
+    [% IF aoCount > 0 %]
+        [% numAO = aoCount %]
+        <tr class="sectbody" id="aoHRRow">
+            <td colSpan="6">
+                <hr width = "85%"/>
+            </td>
+        </tr>
+    [% END %]
+    [% cnt = 1 %]
+    [% WHILE cnt < numAO%]
+            
+        <tr class="sectbody">
+            [% SET aofn = "origNamefirst${cnt}" %]
+            [% SET aoln = "origNamelast${cnt}" %]
+            [% SET aorole = "origRole${cnt}" %]
+     
+            <td class="rightCol">
+                <a style="cursor:pointer">
+                    <img onClick="cleanTextNodes('aoHRRow', 'addaorow');moveUpRow(event)"
+                    src="@systemidserver@@html-path@/style/images/previous.gif"
+                    alt="Move Up" border="0"/>
+                </a>
+                <a style="cursor:pointer">
+                    <img onClick="cleanTextNodes('aoHRRow', 'addaorow');moveDownRow(event, 'addaorow')"
+                    src="@systemidserver@@html-path@/style/images/next.gif"
+                    alt="Move Down" border="0"/>
+                </a>
+                <a style="cursor:pointer">
+                    <img src="@systemidserver@@html-path@/style/images/delete.gif"
+                    onClick="delRow(event)" alt="Delete" border="0"/>
+                </a>
+            </td>
+            <td colspan="5" align ="left" style="cursor:pointer"
+                onClick="aoEditRow(event, 0, '[%$aofn%]', '[%$aoln%]' , '[%$aorole%]')">
+                [%$aofn%] [%$aoln%] (Role: [%$aorole%])
+                <input name="aoFirstName" type="hidden" value="[%$aofn%]"/>
+                <input name="aoLastName" type="hidden" value="[%$aoln%]"/>
+                <input name="aoRole" type="hidden" value="[%$aorole%]"/>
+            </td>
+        </tr>
+        [% cnt = cnt + 1 %]
+    [% END %]
+    <input type="hidden" name="aoCount" value="[%numAO%]" id="aoCount">
+    <tr class="sectbody" id="addaorow"><td colspan=6 /></tr>
+    </table>
+   
+    <table class="tables" cellpadding="5" cellspacing="0">  		    
+  <tr class="sectheader"><td colspan="5" align="left"><span class="label">DATA SET ABSTRACT&nbsp;</span><a href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&amp;stage=guide#DataSetAbstract"
+          target="guide"><span class="smalltext">(What's this?)</span></td>
+          <td class="rightCol"><span><a onClick="abstractBit=swap(event, 'abstractTable', abstractBit)" style="cursor:pointer">Hide</a></span></td>        
+  </tr>  
+    </table>
+   
+    <table class="tables" cellpadding="5" cellspacing="0" id="abstractTable">  
+    <tr class="sectbody"><td class="rightCol" valign="top"><span class="label">*Data Set Abstract</span></td>
         <td colspan="5"><textarea rows="6" cols="60" name="abstract">[%abstract%]</textarea></td></tr>
-    
-    
+    </table>
+   
   [% IF hasKeyword == 'true' %]
-  <tr class="sectheader"><td class="topbottom" colspan="5" align="left"><span class="label">KEYWORD INFORMATION - for samples, see <a href=
+    <table class="tables" cellpadding="5" cellspacing="0">
+  <tr class="sectheader"><td colspan="5" align="left"><span class="label">KEYWORD - for samples, see <a href=
 "http://gcmd.nasa.gov/Resources/valids/gcmd_parameters.html" target="nasa"><span class=
-"boldlink">NASA Global Change Master Directory (GCMD).</span></a></span></td>       
-       <td class="topbottom" align="right"><a href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&amp;stage=guide#KeywordInformation"
-        target="guide"><img src="@systemidserver@@html-path@/style/images/question_mark.gif" alt="What's this?" border="0"></a></td></tr>
-	
- [% numKey = 1 %]
- [% IF keyCount > 0 %]
-   [% numKey = keyCount %]
- [% END %]
- <input type="hidden" name="keyCount" value="[%numKey%]" 
-            id="keyCount">
-            
-      [% cnt = 1 %]
-        [% WHILE cnt <= numKey %]
-     <tr class="sectbody"><td align="right"><span class="label">Keyword</span></td>
+"boldlink">NASA Global Change Master Directory (GCMD)</span></a><span class="label">.&nbsp;</span><a href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&amp;stage=guide#KeywordInformation"
+        target="guide"><span class="smalltext">(What's this?)</span></a></td>
+        <td class="rightCol"><span><a onClick="keywordBit=swap(event, 'keywordTable', keywordBit)" style="cursor:pointer">Hide</a></span></td>
+        </tr>
+    </table>
+   
+    <table class="tables" cellpadding="5" cellspacing="0" id="keywordTable">     
+     <tr class="sectbody">
+        <td class="rightCol"><span class="label">Keyword</span></td>
       <td colspan="5">
-            [% SET key = "keyword${cnt}" %]
-            <input name="keyword[%cnt%]" value="[%$key%]" size="30"></td></tr>
-     
-     <tr class="sectbody"><td align="right"><span class="label">Keyword Type</span></td>
+            <input name="keyword" id="keyword" class="shortwidth"></td></tr>
+
+
+     <tr class="sectbody"><td class="rightCol"><span class="label">Keyword Type</span></td>
      <td colspan="5">
-            [% SET keyT = "kwType${cnt}" %]
-            <select name="kwType[%cnt%]">
-	    [% IF form == 're_entry' && $keyT !="" %]
-	     	<option selected>[%$keyT%]</option>
-	    [% END %]
+            <select name="keywordType" id="keywordType" class="shortwidth">
 	    <option>None</option>
             <option>Theme</option>
             <option>Place</option>
@@ -597,63 +1339,114 @@
             <option>Stratum</option>
             <option>Temporal</option>
             <option>Taxonomic</option>
-            </select></td></tr>
+            </select>
+        </td></tr>
       
-          <tr id="keyThRow" class="sectbody"><td align="right"><span class="label">Keyword Thesaurus</span></td>
+        <tr id="keyThRow" class="sectbody"><td class="rightCol"><span class="label">Keyword Thesaurus</span></td>
           <td colspan="5">
             
-	  
-	    <!--[% SET keyTh = "kwTh${cnt}" %]
-            <select name="kwTh[%cnt%]">
-	    [% IF form == 're_entry' && $keyTh != "none" && $keyTh != "" %]
-	     	<option selected>[%$keyTh%]</option>
-	    [% END %]
-	    <option>None</option>
-            <option>GCMD</option>
-            </select>    -->
+            <select name="keywordTh" id="keywordTh" class="shortwidth">
+   	     <option>None</option>
+             <option>GCMD</option>
+            </select>
 	    
-	    
-	  <input type="radio"  name="kwTh[%cnt%]" value="none"><span class="regtext">None&nbsp;&nbsp;</span>
-	  <input type="radio"  name="kwTh[%cnt%]" value="GCMD"><span class="regtext">GCMD&nbsp;&nbsp;</span>
+	  <!--  <input type="radio"  name="kwTh[%cnt%]" value="none"><span class="regtext">None&nbsp;&nbsp;</span>
+	  <input type="radio"  name="kwTh[%cnt%]" value="GCMD"><span class="regtext">GCMD&nbsp;&nbsp;</span> --> 
 	   
 	    
 	    </td></tr>
             
-            [% cnt = cnt + 1 %]
-         [% END %]
-         
-	  <tr id="addkeyrow" class="sectbody"><td></td><td colspan="5" align="left">
-                   <input type="button" value="Add Keyword" id="addkeybutton1"
-                    onClick="addKeyword()"></td></tr>
-           
+	  <tr id="addKeyword" class="sectbody">
+          <td></td>
+          <td colspan="5" align="left">
+                   <input type="button" value="Add Keyword" onClick="addKeyword()"></td></tr>
+        
+        
+ [% numKey = 0 %]
+ [% IF keyCount > 0 %]
+   [% numKey = keyCount %]
+        [% numAO = aoCount %]
+        <tr class="sectbody" id="keywordHRRow">
+            <td colSpan="6">
+                <hr width = "85%"/>
+            </td>
+        </tr>
+ [% END %]
+ <input type="hidden" name="keyCount" value="[%numKey%]" 
+            id="keyCount">
+   
+      [% cnt = 1 %]
+        [% WHILE cnt < numKey %]
+        
+           <tr class="sectbody">
+            <td class="rightCol">
+                <a style="cursor:pointer">
+                    <img onClick="cleanTextNodes('keywordHRRow', 'addkeyrow');moveUpRow(event)"
+                    src="@systemidserver@@html-path@/style/images/previous.gif"
+                    alt="Move Up" border="0"/>
+                </a>
+                <a style="cursor:pointer">
+                    <img onClick="cleanTextNodes('keywordHRRow', 'addkeyrow');moveDownRow(event, 'addkeyrow')"
+                    src="@systemidserver@@html-path@/style/images/next.gif"
+                    alt="Move Down" border="0"/>
+                </a>
+                <a style="cursor:pointer">
+                    <img src="@systemidserver@@html-path@/style/images/delete.gif"
+                    onClick="delRow(event)" alt="Delete" border="0"/>
+                </a>
+            </td>
+            [% SET keyword = "keyword${cnt}" %]
+            [% SET keywordType = "kwType${cnt}" %]
+            [% SET keywordTh = "kwTh${cnt}" %]
+            <td colspan="5" align ="left" style="cursor:pointer"
+                onClick="keywordEditRow(event, 0, '[%$keyword%]', '[%$keywordType%]' , '[%$keywordTh%]')">
+                [%$keyword%] (Type: [%$keywordType%], Thesaurus: [%$keywordTh%])
+                <input name="keyword" type="hidden" value="[%$keyword%]"/>
+                <input name="keywordType" type="hidden" value="[%$keywordType%]"/>
+                <input name="keywordTh" type="hidden" value="[%$keywordTh%]"/>
+            </td>
+        </tr>
+        [% cnt = cnt + 1 %]
+       [% END %]
+        <tr class="sectbody" id="addkeyrow"><td colspan=6 /></tr>
+       </table>
   [% END %]
-
+  
   [% IF hasTemporal == 'true' %]
-
-  <tr class="sectheader"><td class="topbottom" colspan="5" align="left"><span class="label">
-  TEMPORAL COVERAGE OF DATA</span></td>
-  <td class="topbottom" align="right"><a href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&amp;stage=guide#TemporalCoverageOfData"
-   target="guide"><img src="@systemidserver@@html-path@/style/images/question_mark.gif" alt="What's this?" border="0"></a></td></tr>
-  
-   <tr class="sectbody"><td>
-      <td align="left"><span class="label">Start Date</span></td><td></td>
-      <td align="left" colspan="3"><span class="label">Stop Date</span></td></tr>
+   
+  <table class="tables" cellpadding="5" cellspacing="0">   
+  <tr class="sectheader"><td colspan="5" align="left"><span class="label">
+  TEMPORAL COVERAGE OF DATA&nbsp;</span><a href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&amp;stage=guide#TemporalCoverageOfData"
+   target="guide"><span class="smalltext">(What's this?)</span></a></td>
+   <td class="rightCol"><span><a onClick="temporalBit=swap(event, 'temporalTable', temporalBit)" style="cursor:pointer">Hide</a></span></td>
+   </tr>
+   </table>
+   
+   <table class="tables" cellpadding="5" cellspacing="0" id="temporalTable">  
+   <tr class="sectbody">
+      <td/>
+      <td align="left"><span class="label">Start Date</span></td>
+      <td/>
+      <td align="left"><span class="label">Stop Date</span></td>
+      <td colspan="2"></td>
+      </tr>
      
       <tr class="sectbody"> 
-        <td align="right"> 
+        <td class="rightCol"> 
           [% IF temporalRequired == 'true' %]
           	<span class="label">*Year (yyyy)</span>
           [% ELSE %]
 		<span class="label">Year (yyyy)</span>
 	  [% END %]</td>
-	<td align="left"><input type="TEXT" name="beginningYear" value="[%beginningYear%]" size="8" maxlength="4"></td>
-        <td align="right"><span class="label">Year (yyyy)</span></td>
-	<td colspan="3" align="left"><input type="TEXT" name="endingYear" value="[%endingYear%]" size="8" maxlength="4"></td>
+	<td align="left" style="width:15%"><input type="TEXT" name="beginningYear" value="[%beginningYear%]" size="8" maxlength="4"></td>
+        <td class="rightCol"><span class="label">Year (yyyy)</span></td>
+	<td align="left"><input type="TEXT" name="endingYear" value="[%endingYear%]" size="8" maxlength="4"></td>
+        <td colspan="3"></td>
       </tr>
           
 	  
 	<tr class="sectbody">
-	  <td align="right">
+	  <td class="rightCol">
 	  [% IF temporalRequired == 'true' %]
 	        <span class="label">*Month</span>
           [% ELSE %]
@@ -669,8 +1462,8 @@
             <option>12</option>
           </select></td>
       
-         <td align="right"><span class="label">Month</span></td>
-	 <td align="left" colspan="3"> <select name="endingMonth">
+         <td class="rightCol"><span class="label">Month</span></td>
+	 <td align="left"> <select name="endingMonth">
 	    [% IF form == 're_entry' && endingMonth != ""%]
 	    	<option selected>[%endingMonth%]</option>
 	    [% END %]
@@ -678,11 +1471,10 @@
             <option>04</option>            <option>05</option>            <option>06</option>            <option>07</option>
             <option>08</option>            <option>09</option>            <option>10</option>            <option>11</option>
             <option>12</option>
-          </select></td></tr>
-	  
+          </select></td>  <td colspan="2"></td></tr>
 	 	  
    <tr class="sectbody">
-	  <td align="right"> 
+	  <td class="rightCol"> 
           [% IF temporalRequired == 'true' %]
         	  <span class="label">*Day</span>
           [% ELSE %]
@@ -703,8 +1495,8 @@
             <option>28</option>            <option>29</option>            <option>30</option>            <option>31</option>
           </select></td>
       
-          <td align="right"><span class="label">Day</span></td>
-	  <td align="left" colspan="3"><select name="endingDay">
+          <td class="rightCol"><span class="label">Day</span></td>
+	  <td align="left"><select name="endingDay">
 	    [% IF form == 're_entry' && endingDay != ""%]
 	    	<option selected>[%endingDay%]</option>
 	    [% END %]
@@ -716,21 +1508,28 @@
             <option>20</option>            <option>21</option>            <option>22</option>            <option>23</option>
             <option>24</option>            <option>25</option>            <option>26</option>            <option>27</option>
             <option>28</option>            <option>29</option>            <option>30</option>            <option>31</option>
-          </select></td></tr>
-	[% END %]  
-   
+          </select></td>
+          <td colspan="2"></td></tr>
   <tr class="sectbody"> 
       <td></td><td align="left" colspan="5"> 
        <span class="label">Note:&nbsp;</span><span class="regtext">Leave "Stop Date" blank if your data set is open-ended.</span>
      </td></tr>
-       
+     </table>
+  [% END %]  
   
 [% IF hasSpatial == 'true' %]
-    
-  <tr class="sectheader"><td class="topbottom" colspan="5" align="left"><span class="label">SPATIAL COVERAGE OF DATA</span></td>
-  <td class="topbottom" align="right"><a href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&amp;stage=guide#SpatialCoverageOfData" target="guide"><img src="@systemidserver@@html-path@/style/images/question_mark.gif" alt="What's this?" border="0"></a>
- </td></tr>
+
+  <table class="tables" cellpadding="5" cellspacing="0">  
+
+  <tr class="sectheader"><td colspan="5" align="left"><span class="label">SPATIAL COVERAGE OF DATA&nbsp;</span><a href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&amp;stage=guide#SpatialCoverageOfData" 
+  target="guide"><span class="smalltext">(What's this?)</span></a>
+ </td>
+ <td class="rightCol"><span><a onClick="spatialBit=swap(event, 'spatialTable', spatialBit)" style="cursor:pointer">Hide</a></span></td>
+ </tr>
+   </table>
    
+   <table class="tables" cellpadding="5" cellspacing="0" id="spatialTable">  
+   
     <tr class="sectbody">
        [% IF spatialRequired == 'true' %]
       	  <td align="right" valign="top"><span class="label">*Geographic Description</span></td>
@@ -744,7 +1543,7 @@
     <tr class="sectbody"><td class="topbottom" align="center" colspan="6"><span class="label">COORDINATES</span></td></tr>
         
      
-[% IF showSiteList == 'true' %]
+<!--[% IF showSiteList == 'true' %]
     <tr class="sectbody"><td align="left" valign="top" colspan="6">
         <input class="label" type="CHECKBOX" name="useSiteCoord" [%useSiteCoord%]>
         <span class="regtext">Use [% lsite %] coordinates. (This indicates that the data were
@@ -751,7 +1550,7 @@
         collected at the [% lsite %]. If you check this box, you don't need
         to fill in the lat./long. fields below).</span>
         </td></tr>
-[% END %]
+[% END %]-->
     
     <tr class="sectbody">
         <td width="190"></td><td width="100" align="left"><span class="label">Degrees</span></td>
@@ -761,7 +1560,7 @@
 		    
       
      <tr class="sectbody">
-     <td align="right">
+     <td class="rightCol">
       [% IF spatialRequired == 'true' %]
         <span class="label">*Latitude</span>
       [% ELSE %]
@@ -773,9 +1572,7 @@
       <td>  <input type="TEXT" name="latSec1" value="[%latSec1%]" size="2" maxlength="2"></td>
       
       <td Align="left" colspan="2"> 
-          
-      
-      
+    
 <!--    <select name="hemisphLat1">
 	    [% IF form == 're_entry' && hemisphLat1 != ""%]
 	    	<option selected>[%hemisphLat1%]</option>
@@ -784,13 +1581,22 @@
             <option>S</option>
           </select>   -->
 	  
+	    [% IF form == 're_entry' && hemisphLat1 == "N"%]
+	  <input type="radio"  name="hemisphLat1" value="N" CHECKED><span class="regtext">North&nbsp;&nbsp;</span>
+	[%ELSE%]
 	  <input type="radio"  name="hemisphLat1" value="N"><span class="regtext">North&nbsp;&nbsp;</span>
+	[%END%]
+	    [% IF form == 're_entry' && hemisphLat1 == "S"%]
+	  <input type="radio"  name="hemisphLat1" value="S" CHECKED><span class="regtext">South&nbsp;&nbsp;</span>
+	  [%ELSE%]
 	  <input type="radio"  name="hemisphLat1" value="S"><span class="regtext">South&nbsp;&nbsp;</span>
+	[%END%]
+
 	  </td></tr>
       
            
     <tr class="sectbody">
-      <td align="right"> 
+      <td class="rightCol"> 
       [% IF spatialRequired == 'true' %]
         <span class="label">*Longitude</span>
       [% ELSE %]
@@ -813,18 +1619,24 @@
           </select>   -->
 	  
 	  
+	    [% IF form == 're_entry' && hemisphLong1 == "W"%]
+	  <input type="radio"  name="hemisphLong1" value="W" CHECKED><span class="regtext">West&nbsp;&nbsp;</span>
+	[%ELSE%]
 	  <input type="radio"  name="hemisphLong1" value="W"><span class="regtext">West&nbsp;&nbsp;</span>
+	[%END%]
+	    [% IF form == 're_entry' && hemisphLong1 == "E"%]
+	  <input type="radio"  name="hemisphLong1" value="E" CHECKED><span class="regtext">East&nbsp;&nbsp;</span>
+	  [%ELSE%]
 	  <input type="radio"  name="hemisphLong1" value="E"><span class="regtext">East&nbsp;&nbsp;</span>
-	  
-	  
+	  [%END%]
 	  </td></tr>
       
       
-      <tr class="sectbody"><td><td colspan="4" align="left"><span class="regtext">If only this first lat/long is entered, this indicates a point location. If both lat/long pairs are entered, then this first pair represents the northwest corner of a bounding box.</span>
+      <tr class="sectbody"><td><td colspan="4" align="left"><span class="regtext">If only this first lat/long pair is entered, this indicates a point location. If both lat/long pairs are entered, then this first pair represents the northwest corner of a bounding box.</span>
       </td><td></td></tr>
       
       <tr class="sectbody"> 
-      <td align="right"><span class="label">Latitude</span></td>
+      <td class="rightCol"><span class="label">Latitude</span></td>
 	<td ><input type="TEXT" name="latDeg2" value="[%latDeg2%]" size="3" maxlength="3"></td>
         <td><input type="TEXT" name="latMin2" value="[%latMin2%]" size="2" maxlength="2"></td>
         <td><input type="TEXT" name="latSec2" value="[%latSec2%]" size="2" maxlength="2"></td>
@@ -839,19 +1651,23 @@
             <option>S</option>
           </select> -->
 	  
+	    [% IF form == 're_entry' && hemisphLat2 == "N"%]
+	  <input type="radio"  name="hemisphLat2" value="N" CHECKED><span class="regtext">North&nbsp;&nbsp;</span>
+	[%ELSE%]
 	  <input type="radio"  name="hemisphLat2" value="N"><span class="regtext">North&nbsp;&nbsp;</span>
+	[%END%]
+	    [% IF form == 're_entry' && hemisphLat2 == "S"%]
+	  <input type="radio"  name="hemisphLat2" value="S" CHECKED><span class="regtext">South&nbsp;&nbsp;</span>
+	  [%ELSE%]
 	  <input type="radio"  name="hemisphLat2" value="S"><span class="regtext">South&nbsp;&nbsp;</span>
+	  [%END%]
 	  
 	  </td></tr>
     
-    <tr class="sectbody"><td align="right"><span class="label">Longitude</span></td>
+    <tr class="sectbody"><td class="rightCol"><span class="label">Longitude</span></td>
        <td> <input type="TEXT" name="longDeg2" value="[%longDeg2%]" size="3" maxlength="3"></td>
        <td> <input type="TEXT" name="longMin2" value="[%longMin2%]" size="2" maxlength="2"></td>
        <td> <input type="TEXT" name="longSec2" value="[%longSec2%]" size="2" maxlength="2"></td>
-       
-       
-       
-       
        <td align="left" colspan="2">
        
 <!--      <select name="hemisphLong2">
@@ -862,8 +1678,16 @@
             <option>E</option>
           </select> -->
 	  
+	    [% IF form == 're_entry' && hemisphLong2 == "W"%]
+	  <input type="radio"  name="hemisphLong2" value="W" CHECKED><span class="regtext">West&nbsp;&nbsp;</span>
+	[%ELSE%]
 	  <input type="radio"  name="hemisphLong2" value="W"><span class="regtext">West&nbsp;&nbsp;</span>
+	[%END%]
+	    [% IF form == 're_entry' && hemisphLong2 == "E"%]
+	  <input type="radio"  name="hemisphLong2" value="E" CHECKED><span class="regtext">East&nbsp;&nbsp;</span>
+	  [%ELSE%]
 	  <input type="radio"  name="hemisphLong2" value="E"><span class="regtext">East&nbsp;&nbsp;</span>
+	  [%END%]
 	  
 	  </td></tr>
   <tr class="sectbody"><td></td>
@@ -870,77 +1694,125 @@
        <td align="left" colspan="4"><span class="regtext">
         If entered, this lat/long pair represents the southeast corner of a bounding box.</span>
       </td><td></td></tr>
-    
+    </table>    
    [% END %]
 
-  [% IF hasTaxonomic == 'true' %]
+   [% IF hasTaxonomic == 'true' %]
+   
+   <table class="tables" cellpadding="5" cellspacing="0">  
+
+        <tr class="sectheader"><td colspan="5" align="left">
+        <span class="label">TAXONOMIC COVERAGE OF DATA&nbsp;</span><a href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&amp;stage=guide#TaxonomicCoverage" 
+	target="guide"><span class="smalltext">(What's this?)</span></a> </td>
+        <td class="rightCol"><span><a onClick="taxonomicBit=swap(event, 'taxonomicTable', taxonomicBit)" style="cursor:pointer">Hide</a></span></td>
+        </tr>
+    </table>
+   
+    <table class="tables" cellpadding="5" cellspacing="0" id="taxonomicTable">  
+        <tr class="sectbody"><td><td colspan="5" align="left"><span class="regtext">See the <a href=
+        "http://darwin.zoology.gla.ac.uk/~rpage/MyToL/www/index.php" target="_blank">Glasgow Taxonomic Name Server</a> or the <a href=
+        "http://www.itis.usda.gov/" target="_blank">Integrated Taxonomic Information System</a> for correct spelling of taxonomic names.</td></tr>
   
-  <tr class="sectheader"><td class="topbottom" colspan="5" align="left">
-  <span class="label">TAXONOMIC COVERAGE OF DATA</span></td>
-  <td class="topbottom" align="right"><a href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&amp;stage=guide#TaxonomicCoverage" target="guide"><img src="@systemidserver@@html-path@/style/images/question_mark.gif" alt="What's this?" border="0"></span></a>
-       [% numTaxa = 1 %]
+        <tr class="sectbody"> 
+            <td class="rightCol"><span class="label">Taxon Rank</span></td>
+            <td align="left" colspan="5">
+                <input name="taxonRank" id="taxonRank" class="shortwidth">&nbsp;&nbsp;<span class="label"><span class="regtext">(e.g., Species)</span>
+            </td>
+        </tr>
+
+        <tr class="sectbody"> 
+            <td class="rightCol"><span class="label">Taxon Name</span></td>
+            <td align="left" colspan="5">
+                <input name="taxonName" id="taxonName" class="shortwidth">&nbsp;&nbsp;<span class="label"><span class="regtext">(e.g., <i>Ursus arctos</i>)</span>
+            </td>
+        </tr>
+
+        <tr id="addTaxon" class="sectbody"> 
+            <td></td>
+            <td colspan="5" align="left"> <input type="button" value="Add Taxon"
+                    onClick="addTaxon()">
+            </td>
+        </tr>
+
+        [% numTaxa = 0 %]
         [% IF taxaCount > 0 %]
             [% numTaxa = taxaCount %]
+            <tr class="sectbody" id="taxonHRRow">
+                <td colSpan="6">
+                    <hr width = "85%"/>
+                </td>
+            </tr>
         [% END %]
-        <input type="hidden" name="taxaCount" value="[%numTaxa%]" 
-            id="taxaCount">
-        </td></tr>
+        <input type="hidden" name="taxaCount" value="[%numTaxa%]" id="taxaCount">
     
-	
-    <tr class="sectbody"> 
-        <td align="right"><span class="label">Taxon Rank</span></td>
-	[% cnt = 1 %]
-        [% WHILE cnt <= numTaxa %]
-        <td align="left" colspan="5">
-            [% SET trn = "taxonRankName${cnt}" %]
-            <input name="taxonRankName[%cnt%]" value="[% $trn %]" size="30">&nbsp;&nbsp;<span class="label"><span class="regtext">(e.g., Phylum or Species)</span>
-            </td></tr>
-	
-    <tr class="sectbody">
-        <td align="right"><span class="label">Taxon Name</span></td>
-	<td align="left" colspan="5">
-	[% SET trv = "taxonRankValue${cnt}" %]
-            <input name="taxonRankValue[%cnt%]" value="[% $trv %]" size="30">&nbsp;&nbsp;<span class="regtext">(e.g., <span class="italicized">Ursus arctos</span>).</span>
-            </td></tr>
+        [% cnt = 1 %]
+        [% WHILE cnt <= numTaxa%]        
+            <tr class="sectbody">
+                <td class="rightCol">
+                    <a style="cursor:pointer">
+                        <img onClick="cleanTextNodes('taxonHRRow', 'addtaxarow');moveUpRow(event)"
+                        src="@systemidserver@@html-path@/style/images/previous.gif"
+                        alt="Move Up" border="0"/>
+                    </a>
+                    <a style="cursor:pointer">
+                        <img onClick="cleanTextNodes('taxonHRRow', 'addtaxarow');moveDownRow(event, 'addtaxarow')"
+                        src="@systemidserver@@html-path@/style/images/next.gif"
+                        alt="Move Down" border="0"/>
+                    </a>
+                    <a style="cursor:pointer">
+                        <img src="@systemidserver@@html-path@/style/images/delete.gif"
+                        onClick="delRow(event)" alt="Delete" border="0"/>
+                    </a>
+                </td>
+                [% SET trn = "taxonRankName${cnt}" %]
+                [% SET trv = "taxonRankValue${cnt}" %]
+                <td colspan="5" align ="left" style="cursor:pointer"
+                    onClick="taxonEditRow(event, 0, '[%$trn%]', '[%$trv%]')">
+                    Rank: [%$trn%], Name: [%$trv%]
+                    <input name="taxonName" type="hidden" value="[%$trn%]"/>
+                    <input name="taxonRank" type="hidden" value="[%$trv%]"/>
+                </td>
+            </tr>
             [% cnt = cnt + 1 %]
-         [% END %]
-    
-    <tr class="sectbody" id="addtaxarow"> 
-            <td></td><td colspan="5" align="left">
-	    <input type="button" value="Add Taxon" id="addtaxabutton1"
-                    onClick="addTaxon()"></td> </tr>
- 
-    <tr class="sectbody"> 
-        <td valign="top" align="right"><span class="label">Taxonomic Authority</span></td>
-        <td align="left" colspan="5"><textarea rows="3" cols="30" name="taxaAuth">[% taxaAuth %]</textarea></td></tr>
-	<tr class="sectbody"><td><td colspan="4"><span class="regtext">List the source(s) used for identifying and naming taxa.  These sources should provide
-	comprehensive information about the taxonomic concepts listed.</span></td><td></td></tr>
+        [% END %]
+
+        <tr class="sectbody" id="addtaxarow"> 
+        <td style="border-top: 1px solid black;" valign="top" align="right" ><span class="label">Taxonomic Reference</span></td>
+        <td style="border-top: 1px solid black;" align="left" colspan="5"><textarea rows="3" cols="30" name="taxaAuth">[% taxaAuth %]</textarea></td></tr>
+	<tr class="sectbody"><td><td colspan="4"><span class="regtext">List the source(s) used for identifying and naming taxa (e.g., name of a field guide, key, or nomenclature revision).</span></td><td></td></tr>
+   </table>
+    [% END %]	
+
+  [% IF hasMethod == 'true' %]
+   <table class="tables" cellpadding="5" cellspacing="0">  
+  <tr class="sectheader"><td colspan="5" align="left">
+  <span class="label">DATA COLLECTION METHODS&nbsp;</span>
+  <a href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&amp;stage=guide#Methods" target="guide"><span class="smalltext">(What's this?)</span></a></td>
+  <td class="rightCol"><span><a onClick="methodBit=swap(event, 'methodTable', methodBit)" style="cursor:pointer">Hide</a></span></td>
+  </tr>
+     </table>
    
-	  [% END %]	
+   <table class="tables" cellpadding="5" cellspacing="0" id="methodTable">  
 
-  [% IF hasMethod == 'true' %]
-  
-  <tr class="sectheader"><td class="topbottom" colspan="5" align="left">
-  <span class="label">DATA COLLECTION METHODS</span></td>
-  <td class="topbottom" align="right"><a href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&amp;stage=guide#Methods" target="guide"><img src="@systemidserver@@html-path@/style/images/question_mark.gif" alt="What's this?" border="0"></span></a>
-   </td></tr>
-  
     <tr class="sectbody"> 
-      <td align="right"><span class="label">Method Title</span></td>
+      <td class="rightCol"><span class="label">Method Title</span></td>
       <td colspan="5" align="left"><input type="text" name="methodTitle" value="[%methodTitle%]" size="60"></td></tr>
-      
-    <tr class="sectbody"><td valign="top" align="right"><span class="label">Method Description</span>
+
+       <tr class="sectbody"><td valign="top" class="rightCol"><span class="label">Method Description</span>      
+        <td colspan="5" align="left">
         [% IF methodPara.size < 1 %]
-          <td colspan="5" align="left"><textarea rows="6" cols="60" name="methodPara"></textarea></td></tr>
+          <textarea rows="6" cols="60" name="methodPara"></textarea>
         [% END %]
         [% FOREACH para = methodPara %]
-       <textarea rows="6" cols="60" name="methodPara">[% para %]</textarea></td></tr>
+           <textarea rows="6" cols="60" name="methodPara">[% para %]</textarea>
         [% END %]
+        </td></tr>
         
-    <tr class="sectbody"><td class="borderbottom"></td><td class="borderbottom" colspan="5" align="left">
-          <input type="button" value="Add Paragraph to Method Description" id="addparabutton1"
+    <tr class="sectbody" id="addparabutton1"><td class="borderbottom"></td><td class="borderbottom" colspan="5" align="left">
+          <input type="button" value="Add Paragraph to Method Description" 
                  onClick="addParagraph()"></td></tr>
-        
+   
+     
     <tr class="sectbody"><td valign="top" align="right"><span class="label">Extent of Study Description</span></td>
         <td colspan="5" align="left"><textarea rows="6" cols="60" name="studyExtentDescription">[% studyExtentDescription %]</textarea></td></tr>
 	
@@ -956,45 +1828,46 @@
    <tr class="sectbody"><td><td colspan="4"><span class="regtext">Describe the sampling design of the study.  For example, you might 
         describe the way in which treatments were assigned to sampling units.</span></td><td></td></tr>
       
-     
+    </table>     
    [% END %]
  
+   <table class="tables" cellpadding="5" cellspacing="0">    
+  <tr class="sectheader"><td colspan="5" align="left">
+  <span class="label">DATA SET CONTACT&nbsp;</span><a href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&amp;stage=guide#DataSetContactAddress" target="guide"><span class="smalltext">(What's this?)</span></a></td>
+  <td class="rightCol"><span><a onClick="dscBit=swap(event, 'dscTable', dscBit)" style="cursor:pointer">Hide</a></span></td>
+  </tr>
+     </table>
    
-  <tr class="sectheader"><td class="topbottom" colspan="5" align="left">
-  <span class="label">DATA SET CONTACT</span></td>
-  <td class="topbottom" align="right"><a href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&amp;stage=guide#DataSetContactAddress" target="guide"><img src="@systemidserver@@html-path@/style/images/question_mark.gif" alt="What's this?" border="0"></a>
-  </td></tr>
-  
+   <table class="tables" cellpadding="5" cellspacing="0" id="dscTable">  
   <tr class="sectbody"><td valign="top" align="left" colspan="6">
         <input type="CHECKBOX" name="useOrigAddress" onClick="copyContact()" id="copyCheckBox" [%useOrigAddress%]>
-        <span class="regtext">Use the same name and address as the <span class="label">PRINCIPAL DATA SET OWNER</span> above (if you check this box, 
-        you don't need to fill in the name and address fields below).</span></td></tr> 
+        <span class="regtext">Use the same name and address as the <span class="label">PRINCIPAL DATA SET OWNER</span> above.</span></td></tr> 
    <tr class="sectbody">
-      <td align="right"><span class="label">*First Name</span></td>
-      <td colspan="5"><input type="TEXT" name="origNamefirstContact" id="contactNameFirst" value="[%origNamefirstContact%]" size="30"></td></tr>
+      <td class="rightCol"><span class="label">*First Name</span></td>
+      <td colspan="5"><input type="TEXT" name="origNamefirstContact" id="contactNameFirst" value="[%origNamefirstContact%]" class="shortwidth"></td></tr>
     <tr class="sectbody">
-      <td align="right"><span class="label">*Last Name</span>
-      <td colspan="5"><input type="TEXT" name="origNamelastContact" id="contactNameLast" value="[%origNamelastContact%]" size="30"></td></tr>
+      <td class="rightCol"><span class="label">*Last Name</span>
+      <td colspan="5"><input type="TEXT" name="origNamelastContact" id="contactNameLast" value="[%origNamelastContact%]" class="shortwidth"></td></tr>
     <tr class="sectbody">
-      <td align="right"><span class="label">Organization Name</span>
-      <td colspan="5"><input type="TEXT" name="origNameOrgContact" id="contactNameOrg" value="[%origNameOrgContact%]" size="60"></td></tr>
+      <td class="rightCol"><span class="label">Organization Name</span>
+      <td colspan="5"><input type="TEXT" name="origNameOrgContact" id="contactNameOrg" value="[%origNameOrgContact%]" class="longwidth"></td></tr>
     <tr class="sectbody">      
-      <td align="right"><span class="label">E-Mail</span>
-      <td colspan="5"><input type="TEXT" name="origEmailContact" id="contactEmail" value="[%origEmailContact%]" size="30"></td></tr>
+      <td class="rightCol"><span class="label">E-Mail</span>
+      <td colspan="5"><input type="TEXT" name="origEmailContact" id="contactEmail" value="[%origEmailContact%]" class="shortwidth"></td></tr>
     <tr class="sectbody">
-      <td align="right"><span class="label">Phone</span>
-      <td colspan="5"><input type="TEXT" name="origPhoneContact" id="contactPhone" value="[%origPhoneContact%]" size="30"></td></tr>
+      <td class="rightCol"><span class="label">Phone</span>
+      <td colspan="5"><input type="TEXT" name="origPhoneContact" id="contactPhone" value="[%origPhoneContact%]" class="shortwidth"></td></tr>
     <tr class="sectbody"> 
-      <td align="right"><span class="label">FAX</span>
-      <td colspan="5"><input type="TEXT" name="origFAXContact" id="contactFAX" value="[%origFAXContact%]" size="30"></td></tr>
+      <td class="rightCol"><span class="label">FAX</span>
+      <td colspan="5"><input type="TEXT" name="origFAXContact" id="contactFAX" value="[%origFAXContact%]" class="shortwidth"></td></tr>
     <tr class="sectbody"><td valign="top" align="right"><span class="label">Street<br>Information</td>
       <td colspan="5"><textarea rows="3" cols="30" name="origDeliveryContact" id="contactDelivery">[%origDeliveryContact%]</textarea><br><span class="smalltext">(number, street, unit, etc.; comma-separated)</span></td></tr>
     <tr class="sectbody">    
-      <td align="right"><span class="label">City</span>
-      <td colspan="5"><input type="TEXT" name="origCityContact" id="contactCity" value="[%origCityContact%]" size="30"></td></tr>
+      <td class="rightCol"><span class="label">City</span>
+      <td colspan="5"><input type="TEXT" name="origCityContact" id="contactCity" value="[%origCityContact%]" class="shortwidth"></td></tr>
     <tr class="sectbody">
-      <td align="right"><span class="label">State</span>
-      <td colspan="5"><select id="contactState" name="origStateContact">
+      <td class="rightCol"><span class="label">State</span>
+      <td colspan="5"><select id="contactState" name="origStateContact" class="shortwidth">
 	    [% IF form == 're_entry' %]	
             	<option>[%origStateContact%]</option>
 	    [% ELSE %]
@@ -1061,61 +1934,56 @@
             <option>Wyoming</option>
           </select></td></tr>
      <tr class="sectbody">
-        <td align="right"><span class="label">Other State/Province</span>
-	<td colspan="5"><input type="TEXT" name="origStateOtherContact" id="contactStateOther" value="[%origStateOtherContact%]" size="30"></td></tr>
+        <td class="rightCol"><span class="label">Other State/Province</span>
+	<td colspan="5"><input type="TEXT" name="origStateOtherContact" id="contactStateOther" value="[%origStateOtherContact%]" class="shortwidth"></td></tr>
      <tr class="sectbody">     
-        <td align="right"><span class="label">Postal Code</span>
-	<td colspan="5"><input type="TEXT" name="origZIPContact" size="30" id="contactZip" value="[%origZIPContact%]"></td></tr>
+        <td class="rightCol"><span class="label">Postal Code</span>
+	<td colspan="5"><input type="TEXT" name="origZIPContact" class="shortwidth" id="contactZip" value="[%origZIPContact%]"></td></tr>
      <tr class="sectbody">
-        <td align="right"><span class="label">Country</span>
-        <td colspan="5"><input type="TEXT" name="origCountryContact" id="contactCountry" value="[%origCountryContact%]" size="30"></td></tr>
-  
-  
-  <tr class="sectheader"><td class="topbottom" colspan="5" align="left">
-  <span class="label">DISTRIBUTION INFORMATION</span></td>
-  <td class="topbottom" align="right"><a href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&amp;stage=guide#DistributionIinformation" target="guide"><img src="@systemidserver@@html-path@/style/images/question_mark.gif" alt="What's this?" border="0"></a>
-  </td></tr>
-  
-  <tr class="sectbody"><td align="right"><span class="label">Data Set Identifier</span></td>
-  <td colspan="5"><input type="TEXT" name="identifier" value="[%identifier%]" size="60"></td></tr>
+        <td class="rightCol"><span class="label">Country</span>
+        <td colspan="5"><input type="TEXT" name="origCountryContact" id="contactCountry" value="[%origCountryContact%]" class="shortwidth"></td></tr>
+     </table>
+   
+   <table class="tables" cellpadding="5" cellspacing="0">  
+  <tr class="sectheader"><td colspan="5" align="left">
+  <span class="label">DISTRIBUTION INFORMATION&nbsp;</span><a href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&amp;stage=guide#DistributionIinformation" 
+  target="guide"><span class="smalltext">(What's this?)</span></a></td>
+  <td class="rightCol"><span><a onClick="distBit=swap(event, 'distTable', distBit)" style="cursor:pointer">Hide</a></span></td>
+  </tr>
+   </table>
+   
+   <table class="tables" cellpadding="5" cellspacing="0" id="distTable">  
+  <tr class="sectbody"><td class="rightCol"><span class="label">Data Set Identifier</span></td>
+  <td colspan="5"><input type="TEXT" name="identifier" value="[%identifier%]" class="longwidth"></td></tr>
   <tr class="sectbody"><td valign="top" align="right"><span class="label">Note:</span></td>
-     <td colspan="4" align="left"><span class="regtext">If available, please enter the full name and path where the data set resides locally on your system.
-     Alternatively, provide other pertinent information that can identify and locate the data set within your site's data management system 
-     (e.g., references to hard copy information such as files numbers).</span></td><td></td></tr>
+     <td colspan="4" align="left"><span class="regtext">If available, please enter a name or number that uniquely identifies and describes concisely the data set. 
+Alternatively, provide other pertinent information that can identify and locate the data set within your site's data management system.</span></td><td></td></tr>
   
+    <tr class="sectbody">
+        <td class="rightCol"><span class="label">*Data Medium</span></td>
   
+        <td colspan="5" align="left">
+        [% IF form == 're_entry' && dataMedium == "digital" %]	
+            <input type="radio"  name="dataMedium" onClick="handleOther(0, 'otherDM')" value="digital" CHECKED><span class="regtext">Digital&nbsp;&nbsp;</span></input>
+        [%ELSE%]
+            <input type="radio"  name="dataMedium" onClick="handleOther(0, 'otherDM')" value="digital"><span class="regtext">Digital&nbsp;&nbsp;</span></input>
+        [% END %]
+        [% IF form == 're_entry' && dataMedium == "hardcopy" %]	
+           <input type="radio"  name="dataMedium" onClick="handleOther(0, 'otherDM')" value="hardcopy" CHECKED><span class="regtext">Hardcopy&nbsp;&nbsp;</span></input>
+        [%ELSE%]
+           <input type="radio"  name="dataMedium" onClick="handleOther(0, 'otherDM')" value="hardcopy"><span class="regtext">Hardcopy&nbsp;&nbsp;</span></input>
+        [% END %]
+        [% IF form == 're_entry' && dataMedium == "other" %]
+           <input type="radio" name="dataMedium" value="other" onClick="handleOther(1, 'otherDM')" CHECKED><span class="regtext">Other&nbsp;</span></input>
+        [%ELSE%]
+           <input type="radio"  name="dataMedium" onClick="handleOther(1, 'otherDM')" value="other"><span class="regtext">Other&nbsp;</span></input>
+        [% END %]
+
+	<input type="TEXT" name="dataMediumOther" value="[%dataMediumOther%]" id="otherDM" class="shortwidth"></input>
+        </td>
+    </tr>  
   
-  
-  <tr class="sectbody"><td align="right"><span class="label">*Data Medium:</span></td>
-  
-  <td colspan="5" align="left">
-    
-<!--      <select name="dataMedium">
-	    [% IF form == 're_entry' %]	
-	    	<option selected>[%dataMedium%]</option>
-	    [% ELSE %]
-                <option>Select type of medium here.</option>
-            [% END %]
-            <option>Digital</option>
-            <option>Hardcopy</option>
-            <option>Other</option>
-          </select>-->
-	  
-	  <input type="radio"  name="dataMedium" value="digital"><span class="regtext">Digital&nbsp;&nbsp;</span>
-	  <input type="radio"  name="dataMedium" value="hardcopy"><span class="regtext">Hardcopy&nbsp;&nbsp;</span>
-	  <input type="radio"  name="dataMedium" value="other"><span class="regtext">Other&nbsp;</span>
-	  <input type="TEXT" name="dataMedium" id="other" size="30">
-	  
-	  </td></tr>
-  
-<!--      <tr class="sectbody"><td></td><td colspan="5" align="left"><span class="label">If you selected "other" for Data Medium, enter detail 
-          here</span></td></tr>
-  
-          <tr class="sectbody"><td></td><td colspan="5" align="left"><input type="TEXT" name="dataMediumOther" value="[%dataMediumOther%]" size="60"></td></tr>
-  -->
-  
-  
-  <tr class="sectbody"><td align="right"><span class="label">*Use Constraints:</span></td>
+  <tr class="sectbody"><td class="rightCol"><span class="label">*Usage Constraints</span></td>
       <td colspan="5" align="left">
       
       
@@ -1130,34 +1998,47 @@
             <option>Obtain permission from originator(s)</option>
             <option>Other</option>
           </select>  -->
-   
 	  
-	  <input type="radio"  name="useConstraints" value="no restrictions"><span class="regtext">No restrictions&nbsp;&nbsp;</span>
-	  <input type="radio"  name="useConstraints" value="permissions"><span class="regtext">Obtain permission from originator(s)&nbsp;&nbsp;</span>
-	  </td></tr>
+          [% IF form == 're_entry' && useConstraints == "no restrictions" %]		  
+	    <input type="radio"  name="useConstraints" onClick="handleOther(0, 'otherUC')" value="no restrictions" CHECKED><span class="regtext">No restrictions&nbsp;&nbsp;</span>
+          [%ELSE%]
+            <input type="radio"  name="useConstraints" onClick="handleOther(0, 'otherUC')" value="no restrictions"><span class="regtext">No restrictions&nbsp;&nbsp;</span>
+          [%END%]
+          [% IF form == 're_entry' && useConstraints == "permissions" %]		  
+  	    <input type="radio"  name="useConstraints" onClick="handleOther(0, 'otherUC')" value="permissions" CHECKED><span class="regtext">Obtain permission from originator(s)&nbsp;&nbsp;</span>
+          [%ELSE%]
+            <input type="radio"  name="useConstraints" onClick="handleOther(0, 'otherUC')" value="permissions"><span class="regtext">Obtain permission from originator(s)&nbsp;&nbsp;</span>
+          [%END%]
+          </td></tr>
 	  
-<!--   <tr class="sectbody"><td></td><td colspan="5" align="left"><span class="label">If you selected "other" for Use Constraints, enter 
-          detail here</span></td></tr>
-       <tr class="sectbody"><td></td><td colspan="5" align="left"><input type="TEXT" name="useConstraintsOther" value="[%useConstraintsOther%]" size="60">
-   -->
+
    
    <tr class="sectbody"><td></td><td colspan="5" align="left">
-   <input type="radio"  name="useConstraints" value="other"><span class="regtext">Other&nbsp;</span>
-   <input type="TEXT" name="useConstraints" id="other" size="49"></td</tr>
+ 
+    [% IF form == 're_entry' && useConstraints == "other" %]		  
+      <input type="radio"  name="useConstraints" onClick="handleOther(1, 'otherUC')" value="other" CHECKED><span class="regtext">Other&nbsp;</span>
+    [%ELSE%]
+      <input type="radio"  name="useConstraints" onClick="handleOther(1, 'otherUC')" value="other"><span class="regtext">Other&nbsp;</span>
+    [%END%]
+   <input type="TEXT" name="useConstraintsOther" id="otherUC" value="[%useConstraintsOther%]" size="49"></td</tr>
    
    
+   <tr class="sectbody"><td class="rightCol"><span class="label">URL</span></td>
+   <td colspan="5" align="left"><input type="TEXT" name="url" value="[%url%]" class="longwidth"></td></tr>
    
-   <tr class="sectbody"><td align="right"><span class="label">URL</span></td>
-   <td colspan="5" align="left"><input type="TEXT" name="url" value="[%url%]" size="60"></td></tr>
+   <tr class="sectbody"><td valign="top" align="right"><span class="label">Additional Information</span>
+   <td colspan="5" align="left"><textarea rows="6" cols="60" name="addComments">[%addComments%]</textarea></td></tr>
    
-   <tr class="sectbody"><td class="borderbottom" valign="top" align="right"><span class="label">Additional Information</span>
-   <td class="borderbottom" colspan="5" align="left"><textarea rows="6" cols="60" name="addComments">[%addComments%]</textarea></td></tr>
+   </table>
    
+   <table class="tables" cellpadding="5" cellspacing="0">    
+   <tr class="sectheader"><td colspan="6" align="left"></td></tr>
+   <tr class="sectheader"><td colspan="6" align="center"><input type="SUBMIT" onClick="sortInputTags()" value="Submit Data Set Description" name="SUBMIT">
+              
    
-   <tr class="sectheader"><td colspan="6" align="left"></td></tr>
-   <tr class="sectheader"><td><td colspan="5" align="left"><input type="SUBMIT" value="Submit Data Set Description" name="SUBMIT">
-              <span>&nbsp;&nbsp;</span><input type="RESET" value="Clear Form" name="RESET"></td></tr>
-    <tr class="sectheader"><td colspan="6" align="left"></td></tr>
+   <!-- <span>&nbsp;&nbsp;</span><input type="RESET" value="Reset Form" name="RESET"></td></tr>-->
+    
+   <tr class="sectheader"><td colspan="6" align="left" class="borderbottom"></td></tr>
     </table>
     <p></p>
    
