Index: /main/trunk/greenstone3/web/interfaces/oran/js/gui_div.js
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/js/gui_div.js	(revision 24416)
+++ /main/trunk/greenstone3/web/interfaces/oran/js/gui_div.js	(revision 24417)
@@ -364,5 +364,5 @@
 
     console.log("Document ready function\n");
-
+	
     var CURRENT_SELECT_VALUE = "";
 
@@ -380,4 +380,45 @@
         return false; // don't event bubble
     });
+	
+	var collection = "";
+	
+	var regex = new RegExp("[?&]c=");
+	var matches = regex.exec(document.URL);
+	if(matches != null)
+	{
+		var startIndex = matches.index;
+		var endIndex = document.URL.indexOf("&", startIndex + 1);
+		
+		if(endIndex == -1)
+		{
+			endIndex = document.URL.length;
+		}
+		
+		collection = document.URL.substring(startIndex, endIndex);
+	}
+
+	$.ajax
+	({
+		type: "GET",
+		url: "?a=g&s=CoverageMetadataRetrieve&o=xml&rt=r&c=" + collection,
+		success: function(data) 
+		{
+			var selectorArea = document.getElementById("metadataSelector");
+			var newSelectBox = document.createElement("SELECT");
+			selectorArea.appendChild(newSelectBox);
+			var metadataSets = data.getElementsByTagName("metadataSet");
+			for(var i = 0; i < metadataSets.length; i++)
+			{
+				var metadata = metadataSets[i].getElementsByTagName("metadata");
+				for(var j = 0; j < metadata.length; j++)
+				{
+					var option = document.createElement("OPTION");
+					option.setAttribute("value", metadataSets[i].getAttribute("name") + "." + metadata[j].getAttribute("name"));
+					option.innerHTML = metadataSets[i].getAttribute("name") + "." + metadata[j].getAttribute("name");
+					newSelectBox.appendChild(option);
+				}
+			}
+		}
+	});
 
     /*
Index: /main/trunk/greenstone3/web/interfaces/oran/transform/layouts/formatmanager.xsl
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/transform/layouts/formatmanager.xsl	(revision 24416)
+++ /main/trunk/greenstone3/web/interfaces/oran/transform/layouts/formatmanager.xsl	(revision 24417)
@@ -45,4 +45,5 @@
 
         <style type="text/css">
+		
             .placeholder{margin-left: 10px; border: dashed 1px #ccc; background-color:#FFFFCC; height:20px; }
 
@@ -53,4 +54,5 @@
             .resizable { width: 150px; height: 150px; padding: 0.5em; } 
             
+			.indent { margin-left: 15px; }
             .block { margin-left: 15px; border-left: dashed 1px black;}
 
@@ -60,6 +62,8 @@
             #XSLTcode {width: 99%; }
 
-            .elementToolBox {position: fixed; top: 25%; right: 0px; background: none repeat scroll 0% 0% white; width: 250px; }
-
+            .elementToolBox {position: fixed; top: 25%; right: 0px; background: white; border: 2px solid; padding: 10px 10px 10px 0px;}
+			
+			.elementToolBoxHeader { font-weight:bold; }
+			
             .visible {display: block;}
             .hidden {display: none;}
@@ -145,5 +149,5 @@
 
         <div class="elementToolBox">
-            <h2> Elements to add </h2>
+            <p class="indent elementToolBoxHeader">Elements to add</p>
             <!-- <div class="header element_type_gsf_template css_gsf_template" title="gsf:template">TEMPLATE</div> -->
                 <div class="draggable_gsf_template css_gsf_template block" title="gsf:template">
@@ -152,16 +156,10 @@
                             <tr>
                                 <td class="header">MATCH=<input type="text" name="rawtextinput" size="10"/></td>
-                                <td><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td>
-                                <td><a href="#" class="remove ui-icon ui-icon-closethick">[x]</a></td>
-                            </tr>
-                        </tbody>
-                    </table>
-                    <table border="1">
-                        <tr class="tr">
-                            <td class="droppable" width="10px"></td>
-                        </tr>
-                    </table>
-                </div>
-                <br/>
+                                <!--<td><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td>
+                                <td><a href="#" class="remove ui-icon ui-icon-closethick">[x]</a></td>-->
+                            </tr>
+                        </tbody>
+                    </table>
+                </div>
 
                 <div class="draggable_gsf_choose_metadata css_gsf_choose_metadata block" title="gsf:choose-metadata">
@@ -170,6 +168,6 @@
                             <tr>
                                 <td class="header">CHOOSE</td>
-                                <td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick" title="Click me to expand">[-]</a></td>
-                                <td class="header"><a href="#" class="remove ui-icon ui-icon-closethick" title="Click me to remove"/></td>
+                                <!--<td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick" title="Click me to expand">[-]</a></td>
+                                <td class="header"><a href="#" class="remove ui-icon ui-icon-closethick" title="Click me to remove"/></td>-->
                             </tr>
                         </tbody>
@@ -181,11 +179,11 @@
                         <tbody>
                             <tr>
-                                <td class="header">
-                                    <xsl:call-template name="meta-to-combo">
+                                <td class="header" id="metadataSelector">
+                                    <!--<xsl:call-template name="meta-to-combo">
                                         <xsl:with-param name="metadataSets" select="//metadataSetList"/>
                                         <xsl:with-param name="current" select="ex.Title"/>
-                                    </xsl:call-template>
+                                    </xsl:call-template>-->
                                 </td>
-                                <td class="header"><a href="#" class="remove ui-icon ui-icon-closethick" title="Click me to remove"/></td>
+                                <!--<td class="header"><a href="#" class="remove ui-icon ui-icon-closethick" title="Click me to remove"/></td>-->
                             </tr>
                         </tbody>
@@ -203,6 +201,6 @@
                                     <option value = "horizontal">Horizontal</option>
                                 </select></td>
-                                <td><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td>
-                                <td><a href="#" class="remove ui-icon ui-icon-closethick">[x]</a></td>
+                                <!--<td><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td>
+                                <td><a href="#" class="remove ui-icon ui-icon-closethick">[x]</a></td>-->
                             </tr>
                         </tbody>
@@ -215,6 +213,6 @@
                             <tr>
                                 <td class="header">SWITCH</td>
-                                <td><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td>
-                                <td><a href="#" class="remove ui-icon ui-icon-closethick">[x]</a></td>
+                                <!--<td><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td>
+                                <td><a href="#" class="remove ui-icon ui-icon-closethick">[x]</a></td>-->
                             </tr>
                         </tbody>
@@ -227,6 +225,6 @@
                             <tr>
                                 <td class="header">WHEN<xsl:value-of select="@test"/></td>
-                                <td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td>
-                                <td class="header"><a href="[myhref]" class="ui-icon ui-icon-closethick"/></td>
+                                <!--<td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td>
+                                <td class="header"><a href="[myhref]" class="ui-icon ui-icon-closethick"/></td>-->
                             </tr>
                         </tbody>
@@ -239,6 +237,6 @@
                             <tr>
                                 <td class="header">OTHERWISE</td>
-                                <td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td>
-                                <td><a href="#" class="ui-icon ui-icon-closethick"/></td>
+                                <!--<td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td>
+                                <td><a href="#" class="ui-icon ui-icon-closethick"/></td>-->
                             </tr>
                         </tbody>
@@ -251,28 +249,50 @@
                             <tr>
                                 <td class="header">ICON<select>
-                                    <option value = "document" selected = "document">Document</option>
-                                    <option value = "classifier">Classifier</option>
-                                    <option value = "source">Source</option>
+                                    <option value="document" selected="document">Document</option>
+                                    <option value="classifier">Classifier</option>
+                                    <option value="source">Source</option>
                                 </select></td>
-                                <td><a href="#" class="remove ui-icon ui-icon-closethick">[x]</a></td>
-                            </tr>
-                        </tbody>
-                    </table>
-                </div>
-                <br/>
-                <div class="draggable_gsf_text css_text" title="text">
+                                <!--<td><a href="#" class="remove ui-icon ui-icon-closethick">[x]</a></td>-->
+                            </tr>
+                        </tbody>
+                    </table>
+                </div>
+                <div class="draggable_gsf_text css_text block" title="text">
                     <table class="header">
                         <tbody>
                             <tr>
                                 <td class="header"><input type="text" name="rawtextinput" size="10" value=""/></td>
-                                <td class="header"><a href="[myhref]" class="ui-icon ui-icon-closethick"/></td>
-                            </tr>
-                        </tbody>
-                    </table>
-                </div>
-                <div class="draggable_table css_table" title="gsf:table">NEW TABLE</div>
-                <div class="draggable_tr css_tr" title="gsf:row">NEW TABLE ROW</div>
-                <div class="draggable_td css_td" title="gsf:column">NEW TABLE COLUMN</div>
-
+                                <!--<td class="header"><a href="[myhref]" class="ui-icon ui-icon-closethick"/></td>-->
+                            </tr>
+                        </tbody>
+                    </table>
+                </div>
+                <div class="draggable_table css_table block" title="gsf:table">
+					<table class="header">
+                        <tbody>
+                            <tr>
+                                <td class="header">NEW TABLE</td>
+							</tr>
+						</tbody>
+					</table>
+				</div>
+				<div class="draggable_tr css_tr block" title="gsf:table">
+					<table class="header">
+                        <tbody>
+                            <tr>
+                                <td class="header">NEW TABLE ROW</td>
+							</tr>
+						</tbody>
+					</table>
+				</div>
+				<div class="draggable_td css_td block" title="gsf:table">
+					<table class="header">
+                        <tbody>
+                            <tr>
+                                <td class="header">NEW TABLE COLUMN</td>
+							</tr>
+						</tbody>
+					</table>
+				</div>
          </div>
 
