Index: in/trunk/greenstone3/web/interfaces/oran/js/YAHOO.js
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/js/YAHOO.js	(revision 24017)
+++ 	(revision )
@@ -1,63 +1,0 @@
-/*
-Copyright (c) 2006 Yahoo! Inc. All rights reserved.
-version 0.9.0
-*/
-
-/**
- * @class The Yahoo global namespace
- */
-var YAHOO = function() {
-
-    return {
-
-        /**
-         * Yahoo presentation platform utils namespace
-         */
-        util: {},
-
-        /**
-         * Yahoo presentation platform widgets namespace
-         */
-        widget: {},
-
-        /**
-         * Yahoo presentation platform examples namespace
-         */
-        example: {},
-
-        /**
-         * Returns the namespace specified and creates it if it doesn't exist
-         *
-         * YAHOO.namespace("property.package");
-         * YAHOO.namespace("YAHOO.property.package");
-         *
-         * Either of the above would create YAHOO.property, then
-         * YAHOO.property.package
-         *
-         * @param  {String} sNameSpace String representation of the desired
-         *                             namespace
-         * @return {Object}            A reference to the namespace object
-         */
-        namespace: function( sNameSpace ) {
-
-            if (!sNameSpace || !sNameSpace.length) {
-                return null;
-            }
-
-            var levels = sNameSpace.split(".");
-
-            var currentNS = YAHOO;
-
-            // YAHOO is implied, so it is ignored if it is included
-            for (var i=(levels[0] == "YAHOO") ? 1 : 0; i<levels.length; ++i) {
-                currentNS[levels[i]] = currentNS[levels[i]] || {};
-                currentNS = currentNS[levels[i]];
-            }
-
-            return currentNS;
-
-        }
-    };
-
-} ();
-
Index: in/trunk/greenstone3/web/interfaces/oran/js/berrybasket.js
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/js/berrybasket.js	(revision 24017)
+++ 	(revision )
@@ -1,393 +1,0 @@
-//used to stored the current items in berrybasket, including collection name, document id and dodument title
-//in the format of collection:id:[title], it is updated when the page is loaded (reloaded) or the user adds
-// new items in the berry basket (see ygDDplayer.js). It is used to show the contents of the berry basket.
-
-var berryList =  new Array();
-var show = false;
-
-// the default width and height of the berry basket
-var oldHeight=90;
-var oldWidth=140;
-var oldBg;
-
-var dd = new ygDDOnTop('berrybasket');
-dd.setHandleElId('baskethandle');
-
-
-var checkout = function(){
-
-	if ( document.getElementById('berrybasket') == null ) return;
-//alert( arguments.callee );
-	var request_type = "GET";
-	var url = "?a=pr&rt=r&ro=1&s=ItemNum&o=XML&c=";
-
-	var responseSuccess = function(o){
-//alert( arguments.callee );
-		var response = o.responseXML;
-		var size = response.getElementsByTagName('size').item(0).getAttribute('value');
-
-		var items = response.getElementsByTagName('item');
-
-		for (var i=0;i < items.length ; i++ ){
-
-			// remove berries images from if the berry basket has already contains this item
-			var itemID = items[i].getAttribute('collection')+":"+items[i].getAttribute('name');
-			var item = YAHOO.util.Dom.get(itemID);
-			if (item != null){
-				var parent = item.parentNode;
-				parent.removeChild(item);
-				if (parent !=null && parent.id == "documentberries"){
-					var root = YAHOO.util.Dom.get(itemID+":root");
-					var section = YAHOO.util.Dom.get(itemID+":section");
-
-					if(root!=null && root.id.indexOf(itemID) !=-1){
-						parent.removeChild(root);
-					}
-
-					if(section!=null && section.id.indexOf(itemID) !=-1){
-						parent.removeChild(section);
-					}
-				}
-			}
-			berryList[berryList.length] = items[i];
-		}
-
-		//add berryimage into the berry basket
-		updateBerryImages();
-
-		// set berries images visible
-		// they are set to be invisible to prevent flickering when first loaded (see berry.css)
-
-		var berries = document.getElementsByTagName('img');
-		var berrybasket = new YAHOO.util.DDTarget('berrybasket','basket');
-
-		for (var j=0; j < berries.length; j++){
-			var berry = berries[j]; 
-			var parent = berry.parentNode;
-			if (parent !=null && parent.id == "documentberries"){
-				var root = YAHOO.util.Dom.get(berry.id+":root");
-				var section = YAHOO.util.Dom.get(berry.id+":section");
-				if(root!=null && root.id.indexOf(berry.id) !=-1){
-					root.style.visibility ="visible" ;
-				}
-
-				if(section!=null && section.id.indexOf(berry.id) !=-1){
-					section.style.visibility ="visible" ;
-				}
-			}
-
-			if (berry.className && berry.className == 'pick'){
-				berry.style.visibility = "visible";
-				new ygDDPlayer(berry.id,'basket',berryList); 
-			}
-		}
-		//updateBerryCount();
-		correctBerryExpandCollapseButtons();
-	}
-
-	var responseFailure = function(o){
-		alert("CHECKOUT FAILED");
-//alert( arguments.callee );
-	}
-
-	var callback = {
-		success: responseSuccess,
-		failure: responseFailure
-	}
-
-	YAHOO.util.Connect.asyncRequest(request_type , url , callback);
-}
-
-function updateBerryImages(){
-//alert( arguments.callee );
-	var berries = YAHOO.util.Dom.get('berries');
-	if ( berries == null ) return;
-	for (var i =0;i < berryList.length && i<12 ; i++ ){
-		var img = document.createElement('img');
-		img.src = 'interfaces/oran/images/berry.png';
-		berries.appendChild(img);
-	}
-
-	//show the help message if there are no berries
-	if ( berryList.length == 0 ) {
-		var berryHelpMsg = document.createElement('span');
-		berries.appendChild(berryHelpMsg);
-		berryHelpMsg.appendChild(document.createTextNode('Drag & drop berries here to add documents to your Berry Basket'));
-		berryHelpMsg.setAttribute('id','berryHelpMsg');
-	}
-
-	//show the expand buttons
-	correctBerryExpandCollapseButtons();
-
-}
-
-function correctBerryExpandCollapseButtons() {
-	var bbecl = YAHOO.util.Dom.get('berryBasketExpandCollapseLinks');
-	if ( bbecl == null ) return;
-	if ( berryList.length > 0 ) {
-		YAHOO.util.Dom.get('berryBasketExpandCollapseLinks').style.display='';
-	} else {
-		YAHOO.util.Dom.get('berryBasketExpandCollapseLinks').style.display='none';
-	}
-}
-
-function updateBerryCount() {
-	var berries = YAHOO.util.Dom.get('berries');
-	var berryCountElement = YAHOO.util.Dom.get('berryBasketCount');
-	if ( berries == null || berryCountElement == null ) return;
-	if ( berryList.length == 0 ) {
-		berryCountElement.innerHTML = "empty";
-	} else {
-		berryCountElement.innerHTML = berryList.length;
-	}
-}
-
-function basketUpdate(e) {
-//alert( arguments.callee );
-	var target = e.target;
-	if ((target.id.toLowerCase() == 'berrybasket' || target.id.toLowerCase() == 'berries') && !show){
-		showBasket();
-		show = true;
-	}else{
-		if (target.id.toLowerCase() == 'hideview' && show){
-			hideBasket();
-			show = false;
-		}
-	}
-
-	if (target.className == 'pick'){
-		addBerry(target);
-	}
-}
-
-function showBasket() {
-//alert( arguments.callee );
-	var berryBasket = YAHOO.util.Dom.get('berrybasket');
-	var basketHandle = YAHOO.util.Dom.get('baskethandle');
-	var berries = YAHOO.util.Dom.get('berries');
-	var width = 500;
-	var height = 40;
-	var i=0;
-
-	//remove berryImages in the berry basket
-	while (berries.hasChildNodes()) {
-		berries.removeChild(berries.firstChild);
-	}
-	while (basketHandle.hasChildNodes()) {
-		basketHandle.removeChild(basketHandle.firstChild);
-	}
-	
-	var div = document.createElement('div');
-	berries.appendChild(div);
-	var list = document.createElement('ol');
-	div.appendChild(list);
-	
-	list.id = 'doclist';
-
-	//put the berries in
-	for (i; i < berryList.length; i++){
-		var berryItem = berryList[i];
-		var berryElement = document.createElement('li');
-		list.appendChild(berryElement);
-		var title = berryItem.getAttribute('title');
-		var root_title = berryItem.getAttribute('root_title');
-		//var id = berryItem.getAttribute('collection')+":"+berryItem.getAttribute('name');
-
-		if (root_title != ""){
-			root_title +=":";
-		}
-
-		title = root_title+title;
-		if (title.length > 50){
-			title = title.substring(0,20)+" ... "+title.substr(title.length-35,35);
-		}
-		
-		berryElement.setAttribute("class","berryitem");
-		berryElement.setAttribute("title",title);
-		berryElement.innerHTML = title;
-		height +=40;
-	}
-
-	oldHeight = berryBasket.style.height;
-	oldWidth = berryBasket.style.width;
-	oldBg = berryBasket.style.background;
-	//berryBasket.style.height = height;
-	//berryBasket.style.width = width;
-	berryBasket.style.background ='url("interfaces/default/images/kete2.png") 0 0 repeat';
-	berryBasket.style.cursor = "default";
-	berryBasket.className = "show";
-	//berries.style.height = height - 40;
-
-	//put the full view link in
-	var fullView = document.createElement('a');
-	berries.appendChild(fullView);
-	
-	//Find the collection in the cgi parameters
-	var url = window.location.href;
-	var colstart = url.indexOf("&c=");
-	var collectionName = "";
-	if (colstart != -1)
-	{
-		var colend = url.indexOf("&", (colstart + 1));
-		if (colend == -1)
-		{
-			colend = url.length - 1;
-		}
-		collectionName = url.substring(colstart + 3, colend);
-	}
-	
-	fullView.appendChild(document.createTextNode('Full View Â»'));
-	fullView.setAttribute("href","?a=g&sa=berry&c=&s=DisplayList&rt=r&p.c=" + collectionName);
-	fullView.setAttribute("id","berryFullViewLink");
-
-	//toggle expand/collapse links
-	var expandLink = YAHOO.util.Dom.get('berryBasketExpandLink');
-	var collapseLink = YAHOO.util.Dom.get('berryBasketCollapseLink');
-	if ( expandLink != null && collapseLink != null ) {
-		expandLink.style.display = 'none';
-		collapseLink.style.display = '';
-	}
-
-}
-
-function hideBasket() {
-//alert( arguments.callee );
-	var i = 0;
-	var berryBasket = YAHOO.util.Dom.get('berrybasket');
-	var basketHandle = YAHOO.util.Dom.get('baskethandle');
-	var berries = YAHOO.util.Dom.get('berries');
-	berryBasket.style.height = oldHeight;
-	berryBasket.style.width = oldWidth;
-	berryBasket.style.background = oldBg;
-	berryBasket.style.cursor = "pointer";
-	berryBasket.className = "hide";
-
-	while (berries.hasChildNodes()) {
-		berries.removeChild(berries.firstChild);
-	}
-
-	while (basketHandle.hasChildNodes()) {
-		basketHandle.removeChild(basketHandle.firstChild);
-	}
-
-	updateBerryImages();
-	//updateBerryCount();
-
-	//toggle expand/collapse links
-	var expandLink = YAHOO.util.Dom.get('berryBasketExpandLink');
-	var collapseLink = YAHOO.util.Dom.get('berryBasketCollapseLink');
-	if ( expandLink != null && collapseLink != null ) {
-		expandLink.style.display = '';
-		collapseLink.style.display = 'none';
-	}
-	
-}
-
-
-function addBerry(el){
-//alert( arguments.callee );
-	var addurl = "?a=pr&rt=r&ro=1&s=AddItem&c=&s1.id=2&o=XML&s1.item=" + el.id;
-
-	var addSuccess = function(o){
-alert( arguments.callee );
-		var result = o.responseXML;
-		var items = result.getElementsByTagName('item');
-
-		if (items.length < 0){
-
-			var item = items[0];
-			var berrybasket = YAHOO.util.Dom.get('berrybasket');
-			var berries = YAHOO.util.Dom.get('berries');
-			berryList[berryList.length]= item;
-			var parent =el.parentNode;
-			if (parent == null) return;
-			parent.removeChild(el);
-			var itemID = item.getAttribute('collection')+":"+item.getAttribute('name');
-			if (parent !=null && parent.id == "documentberries"){
-
-				var root = YAHOO.util.Dom.get(itemID+":root");
-				var section = YAHOO.util.Dom.get(itemID+":section");
-
-				if(root!=null && root.id.indexOf(itemID) !=-1){
-					parent.removeChild(root);
-				}
-
-				if(section!=null && section.id.indexOf(itemID) !=-1){
-					parent.removeChild(section);
-				}
-
-			}
-
-			if (!YAHOO.util.Dom.get('hideview') && berryList.length < 13){
-
-				while (berries.hasChildNodes()) {
-					berries.removeChild(berries.firstChild);
-				}
-
-				for (var i =0; i < berryList.length; i++ ){
-					var img = document.createElement('img');
-					img.src = 'interfaces/oran/images/berry.png';
-					berries.appendChild(img);
-				}
-
-			} else {
-
-				if (YAHOO.util.Dom.get('hideview')){
-					var berryBasket = YAHOO.util.Dom.get('berrybasket');
-					var berries = YAHOO.util.Dom.get('berries');
-					var doclist = YAHOO.util.Dom.get('doclist');
-					var tid = el.id;
-					var berryItem;
-					var berryElement = document.createElement('li');
-
-					for (var i in berryList){
-						berryItem = berryList[i];
-						var id = berryItem.getAttribute('collection')+":"+berryItem.getAttribute('name');
-
-						if (id == tid){
-							var title = berryItem.getAttribute('title');
-							var root_title = berryItem.getAttribute('root_title');
-							if (root_title != ""){
-								root_title +=":";
-							}
-
-							title = root_title+title;
-							if (title.length > 50){
-								title = title.substring(0,20)+" ... "+title.substr(title.length-35,35);
-							}
-
-							berryElement.appendChild(document.createTextNode(title));
-							berryElement.setAttribute("class","berryitem");
-							doclist.appendChild(berryElement);
-							var heightStr = berryBasket.style.height+"";
-							var height =parseInt(heightStr.substring(0,heightStr.length-2)) +18;
-							berryBasket.style.height = height;
-							berries.style.height = height;
-							break;
-						}
-
-					}
-
-				}
-
-			}
-		}
-	}
-
-	var addFailure = function(o){
-//alert( arguments.callee );
-	}
-
-	var addcallback = {
-		success:addSuccess,
-		failure:addFailure
-	}
-
-	YAHOO.util.Connect.asyncRequest(request_type , addurl , addcallback);
-}
-
-YAHOO.util.Event.addListener(window, 'load', checkout);
-//YAHOO.util.Event.addListener(window, 'click', basketUpdate);
-
-
-
Index: /main/trunk/greenstone3/web/interfaces/oran/js/berrybasket/berrybasket.js
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/js/berrybasket/berrybasket.js	(revision 24018)
+++ /main/trunk/greenstone3/web/interfaces/oran/js/berrybasket/berrybasket.js	(revision 24018)
@@ -0,0 +1,397 @@
+//used to stored the current items in berrybasket, including collection name, document id and dodument title
+//in the format of collection:id:[title], it is updated when the page is loaded (reloaded) or the user adds
+// new items in the berry basket (see ygDDplayer.js). It is used to show the contents of the berry basket.
+
+var berryList =  new Array();
+var show = false;
+
+// the default width and height of the berry basket
+var oldHeight=90;
+var oldWidth=140;
+var oldBg;
+
+var dd = new ygDDOnTop('berrybasket');
+dd.setHandleElId('baskethandle');
+
+
+var checkout = function(){
+
+	if ( document.getElementById('berrybasket') == null ) return;
+	
+	var request_type = "GET";
+	var url = "?a=pr&rt=r&ro=1&s=ItemNum&o=XML&hhf=Cache-Control%3Dno-cache&c=";
+
+	var responseSuccess = function(o){
+		
+		var response = o.responseXML;
+		var size = response.getElementsByTagName('size').item(0).getAttribute('value');
+
+		var items = response.getElementsByTagName('item');
+
+		berryList = new Array();
+		for (var i=0;i < items.length ; i++ ){
+
+			// remove berries images from if the berry basket has already contains this item
+			var itemID = items[i].getAttribute('collection')+":"+items[i].getAttribute('name');
+			var item = YAHOO.util.Dom.get(itemID);
+			if (item != null){
+				var parent = item.parentNode;
+				parent.removeChild(item);
+				if (parent !=null && parent.id == "documentberries"){
+					var root = YAHOO.util.Dom.get(itemID+":root");
+					var section = YAHOO.util.Dom.get(itemID+":section");
+
+					if(root!=null && root.id.indexOf(itemID) !=-1){
+						parent.removeChild(root);
+					}
+
+					if(section!=null && section.id.indexOf(itemID) !=-1){
+						parent.removeChild(section);
+					}
+				}
+			}
+			berryList[berryList.length] = items[i];
+		}
+
+		//add berryimage into the berry basket
+		updateBerryImages();
+
+		// set berries images visible
+		// they are set to be invisible to prevent flickering when first loaded (see berry.css)
+
+		var berries = document.getElementsByTagName('img');
+		var berrybasket = new YAHOO.util.DDTarget('berrybasket','basket');
+
+		for (var j=0; j < berries.length; j++){
+			var berry = berries[j]; 
+			var parent = berry.parentNode;
+			if (parent !=null && parent.id == "documentberries"){
+				var root = YAHOO.util.Dom.get(berry.id+":root");
+				var section = YAHOO.util.Dom.get(berry.id+":section");
+				if(root!=null && root.id.indexOf(berry.id) !=-1){
+					root.style.visibility ="visible" ;
+				}
+
+				if(section!=null && section.id.indexOf(berry.id) !=-1){
+					section.style.visibility ="visible" ;
+				}
+			}
+
+			if (berry.className && berry.className == 'pick'){
+				berry.style.visibility = "visible";
+				new ygDDPlayer(berry.id,'basket',berryList); 
+			}
+		}
+		//updateBerryCount();
+		correctBerryExpandCollapseButtons();
+	}
+
+	var responseFailure = function(o){
+		alert("CHECKOUT FAILED");
+	}
+
+	var callback = {
+		success: responseSuccess,
+		failure: responseFailure
+	}
+
+	//var date = new Date();
+	//url += "&rand=" + date.getTime();
+	YAHOO.util.Connect.asyncRequest(request_type , url , callback);
+}
+
+function updateBerryImages(){
+
+	var berries = YAHOO.util.Dom.get('berries');
+	if ( berries == null ) return;
+	
+	while(berries.hasChildNodes())
+	{
+		berries.removeChild(berries.firstChild);
+	}
+	
+	for (var i =0;i < berryList.length && i<12 ; i++ ){
+		var img = document.createElement('img');
+		img.src = 'interfaces/oran/images/berry.png';
+		berries.appendChild(img);
+	}
+
+	//show the help message if there are no berries
+	if ( berryList.length == 0 ) {
+		var berryHelpMsg = document.createElement('span');
+		berries.appendChild(berryHelpMsg);
+		berryHelpMsg.appendChild(document.createTextNode('Drag & drop berries here to add documents to your Berry Basket'));
+		berryHelpMsg.setAttribute('id','berryHelpMsg');
+	}
+
+	//show the expand buttons
+	correctBerryExpandCollapseButtons();
+
+}
+
+function correctBerryExpandCollapseButtons() {
+	var bbecl = YAHOO.util.Dom.get('berryBasketExpandCollapseLinks');
+	if ( bbecl == null ) return;
+	if ( berryList.length > 0 ) {
+		YAHOO.util.Dom.get('berryBasketExpandCollapseLinks').style.display='';
+	} else {
+		YAHOO.util.Dom.get('berryBasketExpandCollapseLinks').style.display='none';
+	}
+}
+
+function updateBerryCount() {
+	var berries = YAHOO.util.Dom.get('berries');
+	var berryCountElement = YAHOO.util.Dom.get('berryBasketCount');
+	if ( berries == null || berryCountElement == null ) return;
+	if ( berryList.length == 0 ) {
+		berryCountElement.innerHTML = "empty";
+	} else {
+		berryCountElement.innerHTML = berryList.length;
+	}
+}
+
+function basketUpdate(e) {
+//alert( arguments.callee );
+	var target = e.target;
+	if ((target.id.toLowerCase() == 'berrybasket' || target.id.toLowerCase() == 'berries') && !show){
+		showBasket();
+		show = true;
+	}else{
+		if (target.id.toLowerCase() == 'hideview' && show){
+			hideBasket();
+			show = false;
+		}
+	}
+
+	if (target.className == 'pick'){
+		addBerry(target);
+	}
+}
+
+function showBasket() {
+//alert( arguments.callee );
+	var berryBasket = YAHOO.util.Dom.get('berrybasket');
+	var basketHandle = YAHOO.util.Dom.get('baskethandle');
+	var berries = YAHOO.util.Dom.get('berries');
+	var width = 500;
+	var height = 40;
+	var i=0;
+
+	//remove berryImages in the berry basket
+	while (berries.hasChildNodes()) {
+		berries.removeChild(berries.firstChild);
+	}
+	while (basketHandle.hasChildNodes()) {
+		basketHandle.removeChild(basketHandle.firstChild);
+	}
+	
+	var div = document.createElement('div');
+	berries.appendChild(div);
+	var list = document.createElement('ol');
+	div.appendChild(list);
+	
+	list.id = 'doclist';
+
+	//put the berries in
+	for (i; i < berryList.length; i++){
+		var berryItem = berryList[i];
+		var berryElement = document.createElement('li');
+		list.appendChild(berryElement);
+		var title = berryItem.getAttribute('title');
+		var root_title = berryItem.getAttribute('root_title');
+		//var id = berryItem.getAttribute('collection')+":"+berryItem.getAttribute('name');
+
+		if (root_title != ""){
+			root_title +=":";
+		}
+
+		title = root_title+title;
+		if (title.length > 50){
+			title = title.substring(0,20)+" ... "+title.substr(title.length-35,35);
+		}
+		
+		berryElement.setAttribute("class","berryitem");
+		berryElement.setAttribute("title",title);
+		berryElement.innerHTML = title;
+		height +=40;
+	}
+
+	oldHeight = berryBasket.style.height;
+	oldWidth = berryBasket.style.width;
+	oldBg = berryBasket.style.background;
+
+	berryBasket.style.background ='url("interfaces/default/images/kete2.png") 0 0 repeat';
+	berryBasket.style.cursor = "default";
+	berryBasket.className = "show";
+
+	//put the full view link in
+	var fullView = document.createElement('a');
+	berries.appendChild(fullView);
+	
+	//Find the collection in the cgi parameters
+	var url = window.location.href;
+	var colstart = url.indexOf("&c=");
+	var collectionName = "";
+	if (colstart != -1)
+	{
+		var colend = url.indexOf("&", (colstart + 1));
+		if (colend == -1)
+		{
+			colend = url.length - 1;
+		}
+		collectionName = url.substring(colstart + 3, colend);
+	}
+	
+	fullView.appendChild(document.createTextNode('Full View Â»'));
+	fullView.setAttribute("href","?a=g&sa=berry&c=&s=DisplayList&rt=r&p.c=" + collectionName);
+	fullView.setAttribute("id","berryFullViewLink");
+
+	//toggle expand/collapse links
+	var expandLink = YAHOO.util.Dom.get('berryBasketExpandLink');
+	var collapseLink = YAHOO.util.Dom.get('berryBasketCollapseLink');
+	if ( expandLink != null && collapseLink != null ) {
+		expandLink.style.display = 'none';
+		collapseLink.style.display = '';
+	}
+
+}
+
+function hideBasket() {
+//alert( arguments.callee );
+	var i = 0;
+	var berryBasket = YAHOO.util.Dom.get('berrybasket');
+	var basketHandle = YAHOO.util.Dom.get('baskethandle');
+	var berries = YAHOO.util.Dom.get('berries');
+	berryBasket.style.height = oldHeight;
+	berryBasket.style.width = oldWidth;
+	berryBasket.style.background = oldBg;
+	berryBasket.style.cursor = "pointer";
+	berryBasket.className = "hide";
+
+	while (berries.hasChildNodes()) {
+		berries.removeChild(berries.firstChild);
+	}
+
+	while (basketHandle.hasChildNodes()) {
+		basketHandle.removeChild(basketHandle.firstChild);
+	}
+
+	updateBerryImages();
+	//updateBerryCount();
+
+	//toggle expand/collapse links
+	var expandLink = YAHOO.util.Dom.get('berryBasketExpandLink');
+	var collapseLink = YAHOO.util.Dom.get('berryBasketCollapseLink');
+	if ( expandLink != null && collapseLink != null ) {
+		expandLink.style.display = '';
+		collapseLink.style.display = 'none';
+	}
+	
+}
+
+
+function addBerry(el){
+	alert("ADDING");
+	var addurl = "?a=pr&rt=r&ro=1&s=AddItem&c=&s1.id=2&o=XML&hhf=Cache-Control%3Dno-cache&s1.item=" + el.id;
+
+	var addSuccess = function(o){
+		var result = o.responseXML;
+		var items = result.getElementsByTagName('item');
+
+		if (items.length < 0){
+
+			var item = items[0];
+			var berrybasket = YAHOO.util.Dom.get('berrybasket');
+			var berries = YAHOO.util.Dom.get('berries');
+			berryList[berryList.length]= item;
+			var parent =el.parentNode;
+			if (parent == null) return;
+			parent.removeChild(el);
+			var itemID = item.getAttribute('collection')+":"+item.getAttribute('name');
+			if (parent !=null && parent.id == "documentberries"){
+
+				var root = YAHOO.util.Dom.get(itemID+":root");
+				var section = YAHOO.util.Dom.get(itemID+":section");
+
+				if(root!=null && root.id.indexOf(itemID) !=-1){
+					parent.removeChild(root);
+				}
+
+				if(section!=null && section.id.indexOf(itemID) !=-1){
+					parent.removeChild(section);
+				}
+
+			}
+
+			if (!YAHOO.util.Dom.get('hideview') && berryList.length < 13){
+
+				while (berries.hasChildNodes()) {
+					berries.removeChild(berries.firstChild);
+				}
+
+				for (var i =0; i < berryList.length; i++ ){
+					var img = document.createElement('img');
+					img.src = 'interfaces/oran/images/berry.png';
+					berries.appendChild(img);
+				}
+
+			} else {
+
+				if (YAHOO.util.Dom.get('hideview')){
+					var berryBasket = YAHOO.util.Dom.get('berrybasket');
+					var berries = YAHOO.util.Dom.get('berries');
+					var doclist = YAHOO.util.Dom.get('doclist');
+					var tid = el.id;
+					var berryItem;
+					var berryElement = document.createElement('li');
+
+					for (var i in berryList){
+						berryItem = berryList[i];
+						var id = berryItem.getAttribute('collection')+":"+berryItem.getAttribute('name');
+
+						if (id == tid){
+							var title = berryItem.getAttribute('title');
+							var root_title = berryItem.getAttribute('root_title');
+							if (root_title != ""){
+								root_title +=":";
+							}
+
+							title = root_title+title;
+							if (title.length > 50){
+								title = title.substring(0,20)+" ... "+title.substr(title.length-35,35);
+							}
+
+							berryElement.appendChild(document.createTextNode(title));
+							berryElement.setAttribute("class","berryitem");
+							doclist.appendChild(berryElement);
+							var heightStr = berryBasket.style.height+"";
+							var height =parseInt(heightStr.substring(0,heightStr.length-2)) +18;
+							berryBasket.style.height = height;
+							berries.style.height = height;
+							break;
+						}
+
+					}
+
+				}
+
+			}
+		}
+	}
+
+	var addFailure = function(o){
+	}
+
+	var addcallback = {
+		success:addSuccess,
+		failure:addFailure
+	}
+	
+	YAHOO.util.Connect.asyncRequest(request_type , addurl , addcallback);
+}
+
+YAHOO.util.Event.addListener(window, 'load', checkout);
+//YAHOO.util.Event.addListener(window, 'click', basketUpdate);
+
+
+
Index: /main/trunk/greenstone3/web/interfaces/oran/js/berrybasket/berrycheckout.js
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/js/berrybasket/berrycheckout.js	(revision 24018)
+++ /main/trunk/greenstone3/web/interfaces/oran/js/berrybasket/berrycheckout.js	(revision 24018)
@@ -0,0 +1,455 @@
+var docList = new Array();
+var urlonly = false;
+var mailinfo = new Array();
+mailinfo['address'] = "To: ";
+mailinfo['cc'] = "CC: ";
+mailinfo['bcc'] = "Bcc: ";
+mailinfo['subject'] = "Subject: ";
+var textwin;
+var mailwin;
+
+var options = new Array(3);
+options[0] = 'fullview';
+options[1] = 'textview';
+options[2] = 'email';
+
+function navigate(e){
+	
+	var target = this;
+
+	if ( target.id.toLowerCase() == '' ) {
+		target = target.parentNode;
+	}
+
+	if (target.id.toLowerCase() == 'fullview'){
+		berryCheckoutHighlight( 'fullview' );
+		showFullView();
+	}
+
+	if (target.id.toLowerCase() == 'textview'){
+		berryCheckoutHighlight( 'textview' );
+		showTextView();
+	}
+
+	if (target.id.toLowerCase() == 'email'){
+		berryCheckoutHighlight( 'email' );
+		showEmail();
+	}
+
+	if (target.id.toLowerCase() == 'sendmail'){
+		sendMail();
+	}
+
+	if (target.id.toLowerCase() == 'urlcheck' && urlonly){
+		var urlcheck = YAHOO.util.Dom.get('urlcheck');
+		urlcheck.src = 'interfaces/default/images/check3.gif';
+		var parea =YAHOO.util.Dom.get('pretextarea');
+		urlonly = false;
+		
+		this.value='URL only view';
+		
+		populateUrlsAndMetadata(parea);
+		return;
+	}
+
+	if (target.id.toLowerCase() == 'urlcheck' && !urlonly ){
+		var urlcheck = YAHOO.util.Dom.get('urlcheck');
+		urlcheck.src = 'interfaces/default/images/check4.gif';
+		var parea =YAHOO.util.Dom.get('pretextarea');
+		populateUrls(parea);
+		urlonly = true;
+		
+		this.value='URL and Metadata view';
+		
+		return;
+	}
+
+	if (target.id.toLowerCase() == 'extextview' ){
+		if (textwin != null){
+			textwin.close();
+		}
+
+		textwin = window.open("","Berry basket plain text view","status=1,width=450,height=300");
+		textwin.moveTo(0,0);
+		var content = document.createElement('div');
+		buildPreview(content);
+		var body = textwin.document.getElementsByTagName('body')[0]; 
+		body.appendChild(content);
+		var prearea = textwin.document.getElementsByTagName('textarea')[0];
+		prearea.cols = '55';
+		prearea.rows = '15';
+	}
+
+	if (target.id.toLowerCase() == 'exemail' ){
+		if (mailwin != null){
+			mailwin.close();
+		}
+		mailwin = window.open("","Berry basket mail to a friend","status=1,width=450,height=350");
+		mailwin.moveTo(0,0);
+		var content = document.createElement('div');
+		getEmailContent(content);
+		var body = mailwin.document.getElementsByTagName('body')[0];
+		body.appendChild(content);
+		var prearea = mailwin.document.getElementsByTagName('textarea')[0];
+		prearea.cols = '50';
+		prearea.rows = '11';
+	}
+}
+
+function pageLoad(){
+	for(var j = 0; j < options.length; j++)
+	{
+		var ele = document.getElementById(options[j]);
+		YAHOO.util.Event.addListener(ele, 'click', navigate);
+	}
+	
+	showFullView();
+}
+
+function showFullView(){
+
+	var content =  YAHOO.util.Dom.get('berryBasketContent');
+	var fullview =  YAHOO.util.Dom.get('fullview');
+	berryCheckoutPageClear();
+
+	if (docList.length == 0){
+		content.appendChild(document.createTextNode("Your berry basket is empty."));
+		return;
+	}
+
+	var trashbin = document.createElement('div');
+	trashbin.id ='trashbin';
+
+	var binhandle = document.createElement('div');
+	binhandle.id = 'binhandle';
+	binhandle.appendChild(document.createElement('span'));
+	trashbin.appendChild(binhandle);
+	content.appendChild(trashbin);
+
+	var dd = new ygDDOnTop('trashbin');
+	dd.setHandleElId('binhandle');
+	new YAHOO.util.DDTarget('trashbin','trash');
+
+	var dlist = document.createElement('div');
+	content.appendChild(dlist);
+	var ol = document.createElement('ol');
+	dlist.appendChild(ol);
+
+	for (var i in docList){
+		var doc = docList[i];
+		var li = document.createElement('li');
+		var a = document.createElement('a');
+		var img = document.createElement('img');
+		var text ="";
+		
+		img.setAttribute("src", "interfaces/oran/images/berry.png");
+		img.setAttribute("id", doc['collection']+":"+ doc['name']);
+		img.setAttribute("height", "15px");
+		img.setAttribute("width", "15px");
+		li.appendChild(img);
+		
+		a.href ="?a=d&c="+doc['collection']+"&d="+doc['name'];
+		
+		if(window.interfaceName && window.interfaceName == "dev")
+		{
+			a.href +="&dt=hierarchy&ed=1";
+		}
+		
+		a.appendChild(document.createTextNode(doc['title'])); 
+		if (doc['root_title'] != ""){
+			li.appendChild(document.createTextNode(doc['root_title']+": ")); 
+		}
+		li.appendChild(a);
+
+		var metadata = "";
+		for (var metaItem in doc && metaItem != 'title'){
+			metadata = "\n"+metaItem+": "+ doc[metaItem]+"\n";
+		}
+		text +=metadata+"\n";
+		li.appendChild(document.createTextNode(text));
+		li.className = 'berrydoc';
+		ol.appendChild(li);
+		new ygDDPlayer(img.id,'trash',docList);
+	}
+
+	/**
+	var extra = document.createElement('div');
+	var textview = document.createElement('span');
+	textview.id = 'extextview';
+	textview.className = 'extralink';
+	textview.appendChild(document.createTextNode("plain text version"));
+	var email = document.createElement('span');
+	email.appendChild(document.createTextNode("email to a friend"));
+	email.id = 'exemail';
+	email.className = 'extralink';
+	extra.appendChild(textview);
+	extra.appendChild(email);
+	content.appendChild(extra);
+	**/
+	//alert('x');
+
+}
+
+function showTextView(){
+
+	var content = YAHOO.util.Dom.get('berryBasketContent');
+	var textview = YAHOO.util.Dom.get('textview');
+
+	berryCheckoutPageClear();
+	if (docList.length == 0){
+		content.appendChild(document.createTextNode("Your berry basket is empty."));
+		return;
+	}
+	buildPreview(content);
+
+}
+
+function getEmailContent(content){
+	var item ;
+	var tr;
+	var td;
+	var input;
+
+	table = document.createElement('table');
+	table.setAttribute("class","mailtable");
+
+	for (item in mailinfo){
+		tr = document.createElement('tr');
+		td = document.createElement('td');
+		td.setAttribute("class","mailitem");
+		td.appendChild(document.createTextNode(mailinfo[item]));
+		tr.appendChild(td);
+		td = document.createElement('td');
+		input = document.createElement('input');
+		input.setAttribute("id", item);
+		input.setAttribute("class", "mailinput");
+		input.setAttribute("type", "text");
+		td.appendChild(input);
+		tr.appendChild(td);
+		table.appendChild(tr);
+	}
+
+	// an empty line
+	tr = document.createElement('tr');
+	td = document.createElement('td');
+	td.appendChild(document.createElement('br'));
+	tr.appendChild(td);
+	table.appendChild(tr);
+
+	content.appendChild(table);
+
+	buildPreview(content);
+
+	//send button
+	input = document.createElement('input');
+	input.setAttribute("id", 'sendmail');
+	input.setAttribute("class", "sendbutton");
+	input.setAttribute("type", "button");
+	input.setAttribute("value", "send");
+	content.appendChild(input);
+}
+
+function showEmail(){
+	var content = YAHOO.util.Dom.get('berryBasketContent');
+	var email = YAHOO.util.Dom.get('email');
+
+	berryCheckoutPageClear();
+
+	if (docList.length == 0){
+		content.appendChild(document.createTextNode("Your berry basket is empty."));
+		return;
+	}
+
+	var item;
+	var tr;
+	var td;
+	var input;
+
+	table = document.createElement('table');
+	table.setAttribute("class","mailtable");
+
+	for (item in mailinfo){
+		tr = document.createElement('tr');
+		td = document.createElement('td');
+		td.setAttribute("class","mailitem");
+		td.appendChild(document.createTextNode(mailinfo[item]));
+		tr.appendChild(td);
+
+		td = document.createElement('td');
+		input = document.createElement('input');
+		input.setAttribute("id", item);
+		input.setAttribute("class", "mailinput");
+		input.setAttribute("type", "text");
+		td.appendChild(input);
+		tr.appendChild(td);
+		table.appendChild(tr);
+
+	}
+
+	// an empty line
+	tr = document.createElement('tr');
+	td = document.createElement('td');
+	td.appendChild(document.createElement('br'));
+	tr.appendChild(td);
+	table.appendChild(tr);
+
+	content.appendChild(table);
+
+	buildPreview(content);
+
+	//send button
+	input = document.createElement('input');
+	input.setAttribute("id", 'sendmail');
+	input.setAttribute("class", "sendbutton");
+	input.setAttribute("type", "button");
+	input.setAttribute("value", "send");
+	content.appendChild(input);
+	
+	YAHOO.util.Event.addListener(input, 'click', navigate);
+}
+
+function buildPreview(parent){
+
+	var div = document.createElement('div');
+	var cb = document.createElement('input');
+	cb.setAttribute('class', 'sendbutton');
+	cb.type = 'button';
+	cb.id = 'urlcheck';
+	if (urlonly)
+	{
+		cb.value='URL and Metadata view';
+	}
+	else
+	{
+		cb.value='URL only view';
+	}
+
+	YAHOO.util.Event.addListener(cb, 'click', navigate);
+	
+	var img = document.createElement('img');
+	img.src = 'interfaces/default/images/check3.gif';
+	img.id = 'urlcheck';
+	div.appendChild(cb);
+	//div.appendChild(img);
+
+	var urls = document.createElement('span');
+	urls.id = 'urls';
+	urls.className = 'berrycheck';
+	//urls.appendChild(document.createTextNode('URL only'));
+	div.appendChild(urls);
+
+	// var urlsmetadata = document.createElement('span');
+	// urlsmetadata.id = 'urlsmetadata'
+	// urlsmetadata.className = 'berryradio';
+	// urlsmetadata.appendChild(document.createTextNode('URLs and Metadata'));
+	// div.appendChild(urlsmetadata);
+
+	parent.appendChild(div);
+
+	var parea = document.createElement('textarea');
+	parea.id = 'pretextarea';
+
+	parent.appendChild(parea);
+
+	if(urlonly)
+	{
+		populateUrls(parea);
+	}
+	else
+	{
+		populateUrlsAndMetadata(parea);
+	}
+}
+
+function populateUrls(parea){
+
+	var urls="";
+	var doc_url = document.URL;
+	var root_url = doc_url.substring(0,doc_url.indexOf('?'));
+
+	for (var i in docList){
+		var doc = docList[i];
+		urls +=root_url+"?a=d&c="+doc["collection"]+"&d="+doc["name"]+"\n\n";
+	}
+
+	parea.value = urls;
+
+}
+
+function populateUrlsAndMetadata(parea){
+
+	var doc_url = document.URL;
+	var root_url = doc_url.substring(0,doc_url.indexOf('?'));
+	var fulltext="";
+
+	for (var i in docList){
+		var doc = docList[i];
+		var url =root_url+"?a=d&c="+doc['collection']+"&d="+doc['name']+"\n";
+		for (var metaItem in doc){
+			var metadata = metaItem+": "+ doc[metaItem]+"\n";
+		}
+		fulltext +=url+metadata+"\n";
+	}
+
+	parea.value = fulltext;
+
+}
+
+function sendMail(){
+	var url = "?a=pr&rt=r&ro=1&s=SendMail&c=";
+	var request_type = "POST";
+	var postdata = "";
+	var i;
+	//get checked items
+	for (i in mailinfo) {
+		var input = YAHOO.util.Dom.get(i);
+		var value = input.value;
+		postdata +="&s1."+i+"="+value;
+	}
+
+	var content = YAHOO.util.Dom.get('pretextarea').value;
+
+	content = content.replace(/&/g,'-------');
+	postdata +="&s1.content="+content;
+
+	var callback = {
+		success: function(o) {
+			var result = o.responseText;
+			alert("Sending mail Succeeded");
+		} ,
+		failure: function(o) {
+			alert("Sending mail falied");
+		}
+	}
+	YAHOO.util.Connect.asyncRequest(request_type , url , callback, postdata);
+}	
+
+function berryCheckoutPageClear() {
+	var bbc = document.getElementById('berryBasketContent');
+	if ( bbc == null ) return;
+	bbc.innerHTML = '';
+}
+
+function berryCheckoutHighlight( id ) {
+
+	for ( var i=0; i<options.length; i++ ) {
+		var option = document.getElementById( options[i] );
+		if ( option != null ) {
+			if ( id == options[i] ) {
+				//YAHOO.util.Dom.addClass( option, 'current' );
+				option.className='current';
+			} else {
+				//YAHOO.util.Dom.removeClass( option, 'current' );
+				option.className='';
+			}
+		}
+	}
+
+	if ( option == null ) return;
+	option.style.className = 'current';
+
+}
+
+YAHOO.util.Event.addListener(window,'load', pageLoad);
+
+
Index: /main/trunk/greenstone3/web/interfaces/oran/js/berrybasket/ygDDOnTop.js
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/js/berrybasket/ygDDOnTop.js	(revision 24018)
+++ /main/trunk/greenstone3/web/interfaces/oran/js/berrybasket/ygDDOnTop.js	(revision 24018)
@@ -0,0 +1,46 @@
+
+/* Copyright (c) 2006 Yahoo! Inc. All rights reserved. */
+
+/**
+ * @class a DragDrop implementation that moves the object as it is being dragged,
+ * and keeps the object being dragged on top.  This is a subclass of ygDD rather
+ * than DragDrop, and inherits the implementation of most of the event listeners
+ * from that class.
+ *
+ * @extends ygDD
+ * @constructor
+ * @param {String} id the id of the linked element
+ * @param {String} sGroup the group of related DragDrop items
+ */
+function ygDDOnTop(id, sGroup) {
+	if (id) {
+		this.init(id, sGroup);
+	
+	}
+}
+
+ygDDOnTop.prototype = new YAHOO.util.DD();
+
+/**
+ * The inital z-index of the element, stored so we can restore it later
+ *
+ * @type int
+ */
+ygDDOnTop.prototype.origZ = 0;
+
+ygDDOnTop.prototype.startDrag = function(x, y) {
+
+	var style = this.getEl().style;
+
+	// store the original z-index
+	this.origZ = style.zIndex;
+
+	// The z-index needs to be set very high so the element will indeed be on top
+	style.zIndex = 999;
+}
+
+ygDDOnTop.prototype.endDrag = function(e) {
+
+	// restore the original z-index
+	this.getEl().style.zIndex = this.origZ;
+};
Index: /main/trunk/greenstone3/web/interfaces/oran/js/berrybasket/ygDDPlayer.js
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/js/berrybasket/ygDDPlayer.js	(revision 24018)
+++ /main/trunk/greenstone3/web/interfaces/oran/js/berrybasket/ygDDPlayer.js	(revision 24018)
@@ -0,0 +1,346 @@
+/* Copyright (c) 2006 Yahoo! Inc. All rights reserved. */
+
+function ygDDStack(id, sGroup) {
+	if (id) {
+		this.init(id, sGroup);
+		this.initFrame();
+	}
+}
+
+ygDDStack.prototype = new YAHOO.util.DDTarget();
+
+ygDDPlayer.TYPE = "ygDDPlayer";
+
+/**
+* @class a YAHOO.util.DDFramed implementation. During the drag over event, the
+* dragged element is inserted before the dragged-over element.
+*
+* @extends YAHOO.util.DDProxy
+* @constructor
+* @param {String} id the id of the linked element
+* @param {String} sGroup the group of related DragDrop objects
+*/
+function ygDDPlayer(id, sGroup, bl) {
+	this.initPlayer(id, sGroup);
+	this.berryList = bl;     
+	
+}
+
+ygDDPlayer.prototype = new YAHOO.util.DDProxy();
+
+ygDDPlayer.prototype.berryList = new Array();
+
+ygDDPlayer.prototype.initPlayer = function(id, sGroup) {
+	if (!id) { return; }
+
+	this.init(id, sGroup);
+	this.initFrame();
+	var s = this.getDragEl().style;
+	s.borderColor = "transparent";
+	// s.backgroundColor = "#cccccc";
+	s.opacity = 0.76;
+	s.filter = "alpha(opacity=76)";
+
+	// specify that this is not currently a drop target
+	this.isTarget = false;
+
+	this.originalStyles = [];
+
+	this.type = ygDDPlayer.TYPE;
+	this.slot = null;
+	this.startPos = YAHOO.util.Dom.getXY( this.getEl() );
+
+}
+
+ygDDPlayer.prototype.startDrag = function(x, y) {
+	
+	var dragEl = this.getDragEl();
+	var clickEl = this.getEl();
+	
+	dragEl.innerHTML = clickEl.innerHTML;
+	//dragEl.className = clickEl.className;
+	//dragEl.style.color = clickEl.style.color;
+	//dragEl.style.backgroundColor = clickEl.style.backgroundColor;
+	//dragEl.style.visibility = clickEl.style.visibility;
+	
+	while (dragEl.hasChildNodes())	{
+		dragEl.removeChild(dragEl.firstChild);
+	}	
+	
+	var img = document.createElement('img');
+	img.src = 'interfaces/oran/images/berry.png';
+	dragEl.appendChild(img);
+	
+	var added = true;
+
+	var s = clickEl.style;
+	s.opacity = .1;
+	s.filter = "alpha(opacity=10)";
+
+	var targets = YAHOO.util.DDM.getRelated(this, true);
+	
+	for (var i=0; i<targets.length; i++) {
+		
+		var targetEl = this.getTargetDomRef(targets[i]);
+
+		if (!this.originalStyles[targetEl.id]) {
+			this.originalStyles[targetEl.id] = targetEl.className;
+		}
+
+		targetEl.className = "target";
+	}
+	correctBerryExpandCollapseButtons();
+};
+
+ygDDPlayer.prototype.getTargetDomRef = function(oDD) {
+	if (oDD.player) {
+		return oDD.player.getEl();
+	} else {
+		return oDD.getEl();
+	}
+};
+
+ygDDPlayer.prototype.endDrag = function(e) {
+	// reset the linked element styles
+	var s = this.getEl().style;
+	s.opacity = 1;
+	s.filter = "alpha(opacity=100)";
+
+	this.resetTargets();
+};
+
+ygDDPlayer.prototype.resetTargets = function() {
+
+	// reset the target styles
+	var targets = YAHOO.util.DDM.getRelated(this, true);
+	for (var i=0; i<targets.length; i++) {
+		var targetEl = this.getTargetDomRef(targets[i]);
+		var oldStyle = this.originalStyles[targetEl.id];
+		if (oldStyle) {
+			targetEl.className = oldStyle;
+		}
+	}
+};
+
+var request_type = "GET";
+var addurlPath ="?a=pr&rt=r&ro=1&s=AddItem&c=&s1.id=2&o=XML&hhf=Cache-Control%3Dno-cache&s1.item=";
+var delurlPath ="?a=pr&rt=r&ro=1&s=DeleteItem&c=&o=XML&hhf=Cache-Control%3Dno-cache&s1.item=";
+var postdata = null;
+
+ygDDPlayer.prototype.onDragDrop = function(e, id) {
+	// get the drag and drop object that was targeted
+	var oDD;
+	var player = this;
+
+	if ("string" == typeof id) {
+		oDD = YAHOO.util.DDM.getDDById(id);
+	} else {
+		oDD = YAHOO.util.DDM.getBestMatch(id);
+	}
+
+
+	var el = this.getEl();
+
+	// check if the slot has a player in it already
+	if (oDD.player) {
+		// check if the dragged player was already in a slot
+		if (this.slot) {
+			// check to see if the player that is already in the
+			// slot can go to the slot the dragged player is in
+			// YAHOO.util.DDM.isLegalTarget is a new method
+			if ( YAHOO.util.DDM.isLegalTarget(oDD.player, this.slot) ) {
+				YAHOO.util.DDM.moveToEl(oDD.player.getEl(), el);
+				this.slot.player = oDD.player;
+				oDD.player.slot = this.slot;
+			} else {
+				YAHOO.util.Dom.setXY(oDD.player.getEl(), oDD.player.startPos);
+				this.slot.player = null;
+				oDD.player.slot = null
+			}
+		} else {
+			// the player in the slot will be moved to the dragged
+			// players start position
+			//oDD.player.slot = null;
+			//YAHOO.util.DDM.moveToEl(oDD.player.getEl(), el);
+		}
+	}else {
+		// Move the player into the emply slot
+		// I may be moving off a slot so I need to clear the player ref
+		if (this.slot) {
+			this.slot.player = null;
+		}
+	}
+
+	var  addurl = addurlPath + el.id;	
+	var addSuccess = function(o){
+		var text = o.responseText;
+		var result = o.responseXML;
+		var items = result.getElementsByTagName('item');
+		if (items.length > 0){
+			var item = items[0];
+			var berrybasket = YAHOO.util.Dom.get('berrybasket');
+			var berries = YAHOO.util.Dom.get('berries');
+			player.berryList[player.berryList.length]= item;     
+			
+			var itemID = item.getAttribute('collection')+":"+item.getAttribute('name');
+			var parent =el.parentNode;
+			parent.removeChild(el);
+			
+			if (parent !=null && parent.id == "documentberries"){
+				var root = YAHOO.util.Dom.get(itemID+":root");
+				var section = YAHOO.util.Dom.get(itemID+":section");
+				if(root!=null && root.id.indexOf(itemID) !=-1){
+					parent.removeChild(root);
+				}
+				
+				if(section!=null && section.id.indexOf(itemID) !=-1){
+					parent.removeChild(section);
+				}                                                
+			}
+			
+
+			if (!YAHOO.util.Dom.get('hideview') && player.berryList.length <13){
+				
+				while (berries.hasChildNodes()) {
+					berries.removeChild(berries.firstChild);
+				}
+				
+				for (var i =0; i < player.berryList.length; i++ ){
+					var img = document.createElement('img');
+					img.src = 'interfaces/oran/images/berry.png';
+					berries.appendChild(img);
+				}
+
+				correctBerryExpandCollapseButtons();
+				
+			}
+			else{
+				
+				
+				if (YAHOO.util.Dom.get('hideview')){
+					
+					var berryBasket  = YAHOO.util.Dom.get('berrybasket');
+					var berries  = YAHOO.util.Dom.get('berries');
+					var doclist = YAHOO.util.Dom.get('doclist'); 
+					var tid = el.id;                                  
+					var berryItem; 
+					var berryElement = document.createElement('li');
+					for (var i in player.berryList){
+						berryItem = player.berryList[i];
+						var id = berryItem.getAttribute('collection')+":"+berryItem.getAttribute('name');
+						if (id == tid){
+							var title = berryItem.getAttribute('title');
+							var root_title = berryItem.getAttribute('root_title');  
+							if (root_title != ""){
+								root_title +=":";
+							}
+							
+							title = root_title+title;	
+							if (title.length > 50){
+								title = title.substring(0,20)+" ... "+title.substr(title.length-35,35);
+							}
+							
+							berryElement.appendChild(document.createTextNode(title));
+							berryElement.setAttribute("class","berryitem");
+							doclist.appendChild(berryElement);
+							var heightStr =  berryBasket.style.height+"";
+							var height =parseInt(heightStr.substring(0,heightStr.length-2)) +18;                             
+							berryBasket.style.height = height;
+							berries.style.height = height;
+							break;
+						}
+					}
+				}    
+				
+			}
+		}
+		
+		//Makes sure all the berries on the page are up to date
+		checkout();
+	}
+
+	var addFailure = function(o){ alert("Adding berry failed" + o); }
+
+
+	var addcallback = {
+		success:addSuccess,
+		failure:addFailure,  
+		argument:player
+	}
+	
+
+	var  delurl = delurlPath + el.id;
+	var delSuccess = function(o){ 
+		var result = o.responseXML;
+		var parent =el.parentNode;
+		var ancestor = parent.parentNode;
+		if (parent == null) return;                   
+
+		ancestor.removeChild(parent);
+		
+		for (var i in player.berryList){
+			var berry = player.berryList[i];
+			
+			var id = berry['collection']+":"+berry['name'];
+			
+			if (id == el.id){
+				player.berryList.splice(i,1);
+				
+				break;
+			}
+
+		}
+
+		if (!parent.hasChildNodes()){
+			var content =  YAHOO.util.Dom.get('content');
+			while (content.hasChildNodes()) {
+				content.removeChild(content.firstChild);
+			}  
+			content.appendChild(document.createTextNode('Your berry basket is empty.'));
+		}
+		var trashbin =  YAHOO.util.Dom.get('trashbin');
+		if ( trashbin !=null){
+			trashbin.style.background = 'url("interfaces/default/images/trash-full.png") 0 0 no-repeat';
+		}
+	}                                       
+	
+
+	var delFailure = function(o){ alert("Deletion failed" + o);}
+
+
+	var delcallback = {
+		success:delSuccess,
+		failure:delFailure,  
+		argument:player
+	}
+	
+	if (id == 'berrybasket'){
+		YAHOO.util.Connect.asyncRequest(request_type , addurl , addcallback);    		
+	} else {
+		if (id == 'trashbin'){
+			YAHOO.util.Connect.asyncRequest(request_type , delurl , delcallback); 
+		}
+	}
+
+	this.resetTargets();  	
+	this.slot = oDD;	
+	this.slot.player = this;
+
+};
+
+ygDDPlayer.prototype.swap = function(el1, el2) {
+	var dom = YAHOO.util.Dom;
+	var pos1 = dom.getXY(el1);
+	var pos2 = dom.getXY(el2);
+	dom.setXY(el1, pos2);
+	dom.setXY(el2, pos1);
+};
+
+ygDDPlayer.prototype.onDragOver = function(e, id) {};
+
+ygDDPlayer.prototype.onDrag = function(e, id) {};
+
+
+
+
+
Index: in/trunk/greenstone3/web/interfaces/oran/js/berrycheckout.js
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/js/berrycheckout.js	(revision 24017)
+++ 	(revision )
@@ -1,442 +1,0 @@
-var docList = new Array();
-var urlonly = false;
-var mailinfo = new Array();
-mailinfo['address'] = "To: ";
-mailinfo['cc'] = "CC: ";
-mailinfo['bcc'] = "Bcc: ";
-mailinfo['subject'] = "Subject: ";
-var textwin;
-var mailwin;
-
-var options = new Array(3);
-options[0] = 'fullview';
-options[1] = 'textview';
-options[2] = 'email';
-
-function navigate(e){
-	
-	var target = this;
-
-	if ( target.id.toLowerCase() == '' ) {
-		target = target.parentNode;
-	}
-
-	if (target.id.toLowerCase() == 'fullview'){
-		berryCheckoutHighlight( 'fullview' );
-		showFullView();
-	}
-
-	if (target.id.toLowerCase() == 'textview'){
-		berryCheckoutHighlight( 'textview' );
-		showTextView();
-	}
-
-	if (target.id.toLowerCase() == 'email'){
-		berryCheckoutHighlight( 'email' );
-		showEmail();
-	}
-
-	if (target.id.toLowerCase() == 'sendmail'){
-		sendMail();
-	}
-
-	if (target.id.toLowerCase() == 'urlcheck' && urlonly){
-		var urlcheck = YAHOO.util.Dom.get('urlcheck');
-		urlcheck.src = 'interfaces/default/images/check3.gif';
-		var parea =YAHOO.util.Dom.get('pretextarea');
-		urlonly = false;
-		
-		this.value='URL only view';
-		
-		populateUrlsAndMetadata(parea);
-		return;
-	}
-
-	if (target.id.toLowerCase() == 'urlcheck' && !urlonly ){
-		var urlcheck = YAHOO.util.Dom.get('urlcheck');
-		urlcheck.src = 'interfaces/default/images/check4.gif';
-		var parea =YAHOO.util.Dom.get('pretextarea');
-		populateUrls(parea);
-		urlonly = true;
-		
-		this.value='URL and Metadata view';
-		
-		return;
-	}
-
-	if (target.id.toLowerCase() == 'extextview' ){
-		if (textwin != null){
-			textwin.close();
-		}
-
-		textwin = window.open("","Berry basket plain text view","status=1,width=450,height=300");
-		textwin.moveTo(0,0);
-		var content = document.createElement('div');
-		buildPreview(content);
-		var body = textwin.document.getElementsByTagName('body')[0]; 
-		body.appendChild(content);
-		var prearea = textwin.document.getElementsByTagName('textarea')[0];
-		prearea.cols = '55';
-		prearea.rows = '15';
-	}
-
-	if (target.id.toLowerCase() == 'exemail' ){
-		if (mailwin != null){
-			mailwin.close();
-		}
-		mailwin = window.open("","Berry basket mail to a friend","status=1,width=450,height=350");
-		mailwin.moveTo(0,0);
-		var content = document.createElement('div');
-		getEmailContent(content);
-		var body = mailwin.document.getElementsByTagName('body')[0];
-		body.appendChild(content);
-		var prearea = mailwin.document.getElementsByTagName('textarea')[0];
-		prearea.cols = '50';
-		prearea.rows = '11';
-	}
-}
-
-function pageLoad(){
-	for(var j = 0; j < options.length; j++)
-	{
-		var ele = document.getElementById(options[j]);
-		YAHOO.util.Event.addListener(ele, 'click', navigate);
-	}
-	
-	showFullView();
-}
-
-function showFullView(){
-
-	var content =  YAHOO.util.Dom.get('berryBasketContent');
-	var fullview =  YAHOO.util.Dom.get('fullview');
-	berryCheckoutPageClear();
-
-	if (docList.length == 0){
-		content.appendChild(document.createTextNode("Your berry basket is empty."));
-		return;
-	}
-
-	var trashbin = document.createElement('div');
-	trashbin.id ='trashbin';
-
-	var binhandle = document.createElement('div');
-	binhandle.id = 'binhandle';
-	binhandle.appendChild(document.createElement('span'));
-	trashbin.appendChild(binhandle);
-	content.appendChild(trashbin);
-
-	var dd = new ygDDOnTop('trashbin');
-	dd.setHandleElId('binhandle');
-	new YAHOO.util.DDTarget('trashbin','trash');
-
-	var dlist = document.createElement('div');
-	content.appendChild(dlist);
-	var ol = document.createElement('ol');
-	dlist.appendChild(ol);
-
-	for (var i in docList){
-		var doc = docList[i];
-		var li = document.createElement('li');
-		var a = document.createElement('a');
-		var text ="";
-		a.href ="?a=d&c="+doc['collection']+"&d="+doc['name'];
-		a.appendChild(document.createTextNode(doc['title'])); 
-		if (doc['root_title'] != ""){
-			li.appendChild(document.createTextNode(doc['root_title']+": ")); 
-		}
-		li.appendChild(a);
-
-		var metadata = "";
-		for (var metaItem in doc && metaItem != 'title'){
-			metadata = "\n"+metaItem+": "+ doc[metaItem]+"\n";
-		}
-		text +=metadata+"\n";
-		li.appendChild(document.createTextNode(text));
-		li.id = doc['collection']+":"+ doc['name'];
-		li.className = 'berrydoc';
-		ol.appendChild(li);
-		new ygDDPlayer(li.id,'trash',docList);
-	}
-
-	/**
-	var extra = document.createElement('div');
-	var textview = document.createElement('span');
-	textview.id = 'extextview';
-	textview.className = 'extralink';
-	textview.appendChild(document.createTextNode("plain text version"));
-	var email = document.createElement('span');
-	email.appendChild(document.createTextNode("email to a friend"));
-	email.id = 'exemail';
-	email.className = 'extralink';
-	extra.appendChild(textview);
-	extra.appendChild(email);
-	content.appendChild(extra);
-	**/
-	//alert('x');
-
-}
-
-function showTextView(){
-
-	var content = YAHOO.util.Dom.get('berryBasketContent');
-	var textview = YAHOO.util.Dom.get('textview');
-
-	berryCheckoutPageClear();
-	if (docList.length == 0){
-		content.appendChild(document.createTextNode("Your berry basket is empty."));
-		return;
-	}
-	buildPreview(content);
-
-}
-
-function getEmailContent(content){
-	var item ;
-	var tr;
-	var td;
-	var input;
-
-	table = document.createElement('table');
-	table.setAttribute("class","mailtable");
-
-	for (item in mailinfo){
-		tr = document.createElement('tr');
-		td = document.createElement('td');
-		td.setAttribute("class","mailitem");
-		td.appendChild(document.createTextNode(mailinfo[item]));
-		tr.appendChild(td);
-		td = document.createElement('td');
-		input = document.createElement('input');
-		input.setAttribute("id", item);
-		input.setAttribute("class", "mailinput");
-		input.setAttribute("type", "text");
-		td.appendChild(input);
-		tr.appendChild(td);
-		table.appendChild(tr);
-	}
-
-	// an empty line
-	tr = document.createElement('tr');
-	td = document.createElement('td');
-	td.appendChild(document.createElement('br'));
-	tr.appendChild(td);
-	table.appendChild(tr);
-
-	content.appendChild(table);
-
-	buildPreview(content);
-
-	//send button
-	input = document.createElement('input');
-	input.setAttribute("id", 'sendmail');
-	input.setAttribute("class", "sendbutton");
-	input.setAttribute("type", "button");
-	input.setAttribute("value", "send");
-	content.appendChild(input);
-}
-
-function showEmail(){
-	var content = YAHOO.util.Dom.get('berryBasketContent');
-	var email = YAHOO.util.Dom.get('email');
-
-	berryCheckoutPageClear();
-
-	if (docList.length == 0){
-		content.appendChild(document.createTextNode("Your berry basket is empty."));
-		return;
-	}
-
-	var item;
-	var tr;
-	var td;
-	var input;
-
-	table = document.createElement('table');
-	table.setAttribute("class","mailtable");
-
-	for (item in mailinfo){
-		tr = document.createElement('tr');
-		td = document.createElement('td');
-		td.setAttribute("class","mailitem");
-		td.appendChild(document.createTextNode(mailinfo[item]));
-		tr.appendChild(td);
-
-		td = document.createElement('td');
-		input = document.createElement('input');
-		input.setAttribute("id", item);
-		input.setAttribute("class", "mailinput");
-		input.setAttribute("type", "text");
-		td.appendChild(input);
-		tr.appendChild(td);
-		table.appendChild(tr);
-
-	}
-
-	// an empty line
-	tr = document.createElement('tr');
-	td = document.createElement('td');
-	td.appendChild(document.createElement('br'));
-	tr.appendChild(td);
-	table.appendChild(tr);
-
-	content.appendChild(table);
-
-	buildPreview(content);
-
-	//send button
-	input = document.createElement('input');
-	input.setAttribute("id", 'sendmail');
-	input.setAttribute("class", "sendbutton");
-	input.setAttribute("type", "button");
-	input.setAttribute("value", "send");
-	content.appendChild(input);
-	
-	YAHOO.util.Event.addListener(input, 'click', navigate);
-}
-
-function buildPreview(parent){
-
-	var div = document.createElement('div');
-	var cb = document.createElement('input');
-	cb.setAttribute('class', 'sendbutton');
-	cb.type = 'button';
-	cb.id = 'urlcheck';
-	if (urlonly)
-	{
-		cb.value='URL and Metadata view';
-	}
-	else
-	{
-		cb.value='URL only view';
-	}
-
-	YAHOO.util.Event.addListener(cb, 'click', navigate);
-	
-	var img = document.createElement('img');
-	img.src = 'interfaces/default/images/check3.gif';
-	img.id = 'urlcheck';
-	div.appendChild(cb);
-	//div.appendChild(img);
-
-	var urls = document.createElement('span');
-	urls.id = 'urls';
-	urls.className = 'berrycheck';
-	//urls.appendChild(document.createTextNode('URL only'));
-	div.appendChild(urls);
-
-	// var urlsmetadata = document.createElement('span');
-	// urlsmetadata.id = 'urlsmetadata'
-	// urlsmetadata.className = 'berryradio';
-	// urlsmetadata.appendChild(document.createTextNode('URLs and Metadata'));
-	// div.appendChild(urlsmetadata);
-
-	parent.appendChild(div);
-
-	var parea = document.createElement('textarea');
-	parea.id = 'pretextarea';
-
-	parent.appendChild(parea);
-
-	if(urlonly)
-	{
-		populateUrls(parea);
-	}
-	else
-	{
-		populateUrlsAndMetadata(parea);
-	}
-}
-
-function populateUrls(parea){
-
-	var urls="";
-	var doc_url = document.URL;
-	var root_url = doc_url.substring(0,doc_url.indexOf('?'));
-
-	for (var i in docList){
-		var doc = docList[i];
-		urls +=root_url+"?a=d&c="+doc["collection"]+"&d="+doc["name"]+"\n\n";
-	}
-
-	parea.value = urls;
-
-}
-
-function populateUrlsAndMetadata(parea){
-
-	var doc_url = document.URL;
-	var root_url = doc_url.substring(0,doc_url.indexOf('?'));
-	var fulltext="";
-
-	for (var i in docList){
-		var doc = docList[i];
-		var url =root_url+"?a=d&c="+doc['collection']+"&d="+doc['name']+"\n";
-		for (var metaItem in doc){
-			var metadata = metaItem+": "+ doc[metaItem]+"\n";
-		}
-		fulltext +=url+metadata+"\n";
-	}
-
-	parea.value = fulltext;
-
-}
-
-function sendMail(){
-	var url = "?a=pr&rt=r&ro=1&s=SendMail&c=";
-	var request_type = "POST";
-	var postdata = "";
-	var i;
-	//get checked items
-	for (i in mailinfo) {
-		var input = YAHOO.util.Dom.get(i);
-		var value = input.value;
-		postdata +="&s1."+i+"="+value;
-	}
-
-	var content = YAHOO.util.Dom.get('pretextarea').value;
-
-	content = content.replace(/&/g,'-------');
-	postdata +="&s1.content="+content;
-
-	var callback = {
-		success: function(o) {
-			var result = o.responseText;
-			alert("Sending mail Succeeded");
-		} ,
-		failure: function(o) {
-			alert("Sending mail falied");
-		}
-	}
-	YAHOO.util.Connect.asyncRequest(request_type , url , callback, postdata);
-}	
-
-function berryCheckoutPageClear() {
-	var bbc = document.getElementById('berryBasketContent');
-	if ( bbc == null ) return;
-	bbc.innerHTML = '';
-}
-
-function berryCheckoutHighlight( id ) {
-
-	for ( var i=0; i<options.length; i++ ) {
-		var option = document.getElementById( options[i] );
-		if ( option != null ) {
-			if ( id == options[i] ) {
-				//YAHOO.util.Dom.addClass( option, 'current' );
-				option.className='current';
-			} else {
-				//YAHOO.util.Dom.removeClass( option, 'current' );
-				option.className='';
-			}
-		}
-	}
-
-	if ( option == null ) return;
-	option.style.className = 'current';
-
-}
-
-YAHOO.util.Event.addListener(window,'load', pageLoad);
-
-
Index: in/trunk/greenstone3/web/interfaces/oran/js/connection.js
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/js/connection.js	(revision 24017)
+++ 	(revision )
@@ -1,465 +1,0 @@
-/*
-Copyright (c) 2006 Yahoo! Inc. All rights reserved.
-version 0.9.0
-*/
-
-/**
- * The Connection Manager provides a simplified interface to the XMLHttpRequest
- * object.  It handles cross-browser instantiantion of XMLHttpRequest, negotiates the
- * interactive states and server response returning the results to a pre-defined
- * callback function you create.
- * @ class
- */
-YAHOO.util.Connect = {};
-
-YAHOO.util.Connect =
-{
-  /**
-   * Array of  MSFT ActiveX ids for XMLHttpRequest.
-   * @private
-   * @type array
-   */
-	_msxml_progid:[
-		'MSXML2.XMLHTTP.5.0',
-		'MSXML2.XMLHTTP.4.0',
-		'MSXML2.XMLHTTP.3.0',
-		'MSXML2.XMLHTTP',
-		'Microsoft.XMLHTTP'
-		],
-
-  /**
-   * Array of HTTP header(s)
-   * @private
-   * @type array
-   */
-	_http_header:[],
-
- /**
-  * Property modified by setForm() to determine if the transaction
-  * should be processed as a HTML form POST.
-  * @private
-  * @type boolean
-  */
-	_isFormPost:false,
-
- /**
-  * Property modified by setForm() to the HTML form POST body.
-  * @private
-  * @type string
-  */
-	_sFormData:null,
-
-  /**
-   * The polling frequency, in milliseconds, for HandleReadyState.
-   * when attempting to determine a transaction's XHR  readyState.
-   * The default is 300 milliseconds.
-   * @private
-   * @type int
-   */
-	_polling_interval:300,
-
-  /**
-   * A transaction counter that increments the transaction id for each transaction.
-   * @private
-   * @type int
-   */
-	_transaction_id:0,
-
-  /**
-   * Member to add an ActiveX id to the existing xml_progid array.
-   * In the event(unlikely) a new ActiveX id is introduced, it can be added
-   * without internal code modifications.
-   * @public
-   * @param string id The ActiveX id to be added to initialize the XHR object.
-   * @return void
-   */
-	setProgId:function(id)
-	{
-		this.msxml_progid.unshift(id);
-	},
-
-  /**
-   * Instantiates a XMLHttpRequest object and returns an object with two properties:
-   * the XMLHttpRequest instance and the transaction id.
-   * @private
-   * @param {int} transactionId Property containing the transaction id for this transaction.
-   * @return connection object
-   * @type object
-   */
-	createXhrObject:function(transactionId)
-	{
-		var obj,http;
-		try
-		{
-			// Instantiates XMLHttpRequest in non-IE browsers and assigns to http.
-			http = new XMLHttpRequest();
-			//  Object literal with http and id properties
-			obj = { conn:http, tId:transactionId };
-		}
-		catch(e)
-		{
-			for(var i=0; i<this._msxml_progid.length; ++i){
-				try
-				{
-					// Instantiates XMLHttpRequest for IE and assign to http.
-					http = new ActiveXObject(this._msxml_progid[i]);
-					//  Object literal with http and id properties
-					obj = { conn:http, tId:transactionId };
-				}
-				catch(e){}
-			}
-		}
-		finally
-		{
-			return obj;
-		}
-	},
-
-  /**
-   * This method is called by asyncRequest and syncRequest to create a
-   * valid connection object for the transaction.  It also passes a
-   * transaction id and increments the transaction id counter.
-   * @private
-   * @return object
-   */
-	getConnectionObject:function()
-	{
-		var o;
-		var tId = this._transaction_id;
-
-		try
-		{
-			o = this.createXhrObject(tId);
-			if(o){
-				this._transaction_id++;
-			}
-		}
-		catch(e){}
-		finally
-		{
-			return o;
-		}
-	},
-
-  /**
-   * Method for initiating an asynchronous request via the XHR object.
-   * @public
-   * @param {string} method HTTP transaction method
-   * @param {string} uri Fully qualified path of resource
-   * @param callback User-defined callback function or object
-   * @param callbackArg User-defined callback arguments
-   * @param {string} postData POST body
-   * @return {object} Returns the connection object
-   */
-	asyncRequest:function(method, uri, callback, postData)
-	{
-		var errorObj;
-		var o = this.getConnectionObject();
-
-		if(!o){
-			return null;
-		}
-		else{
-			var oConn = this;
-
-			o.conn.open(method, uri, true);
-		    this.handleReadyState(o, callback);
-
-			if(this._isFormPost){
-				postData = this._sFormData;
-				this._isFormPost = false;
-			}
-			else if(postData){
-				this.initHeader('Content-Type','application/x-www-form-urlencoded');
-			}
-
-			//Verify whether the transaction has any user-defined HTTP headers
-			//and set them.
-			if(this._http_header.length>0){
-				this.setHeader(o);
-			}
-			postData?o.conn.send(postData):o.conn.send(null);
-
-			return o;
-		}
-	},
-
-  /**
-   * This method serves as a timer that polls the XHR object's readyState
-   * property during a transaction, instead of binding a callback to the
-   * onreadystatechange event.  Upon readyState 4, handleTransactionResponse
-   * will process the response, and the timer will be cleared.
-   *
-   * @private
-   * @param {object} o The connection object
-   * @param callback User-defined callback object
-   * @param callbackArg User-defined arguments passed to the callback
-   * @return void
-   */
-	handleReadyState:function(o, callback)
-	{
-		var oConn = this;
-		var poll = window.setInterval(
-			function(){
-				if(o.conn.readyState==4){
-					oConn.handleTransactionResponse(o, callback);
-					window.clearInterval(poll);
-				}
-			}
-		,this._polling_interval);
-	},
-
-  /**
-   * This method attempts to interpret the server response and
-   * determine whether the transaction was successful, or if an error or
-   * exception was encountered.
-   *
-   * @private
-   * @param {object} o The connection object
-   * @param {function} callback - User-defined callback object
-   * @param {} callbackArg - User-defined arguments to be passed to the callback
-   * @return void
-   */
-	handleTransactionResponse:function(o, callback)
-	{
-		var httpStatus;
-		var responseObject;
-
-		try{
-			httpStatus = o.conn.status;
-		}
-		catch(e){
-			// 13030 is the custom code to indicate the condition -- in Mozilla/FF --
-			// when the o object's status and statusText properties are
-			// unavailable, and a query attempt throws an exception.
-			httpStatus = 13030;
-		}
-
-		if(httpStatus == 200){
-			responseObject = this.createResponseObject(o, callback.argument);
-			if(callback.success){
-				if(!callback.scope){
-					callback.success(responseObject);
-				}
-				else{
-					callback.success.apply(callback.scope, [responseObject]);
-				}
-			}
-		}
-		else{
-			switch(httpStatus){
-				// The following case labels are wininet.dll error codes that may be encountered.
-				// Server timeout
-				case 12002:
-				// 12029 to 12031 correspond to dropped connections.
-				case 12029:
-				case 12030:
-				case 12031:
-				// Connection closed by server.
-				case 12152:
-				// See above comments for variable status.
-				case 13030:
-					responseObject = this.createExceptionObject(o, callback.argument);
-					if(callback.failure){
-						if(!callback.scope){
-							callback.failure(responseObject);
-						}
-						else{
-							callback.failure.apply(callback.scope,[responseObject]);
-						}
-					}
-					break;
-				default:
-					responseObject = this.createResponseObject(o, callback.argument);
-					if(callback.failure){
-						if(!callback.scope){
-							callback.failure(responseObject);
-						}
-						else{
-							callback.failure.apply(callback.scope,[responseObject]);
-						}
-					}
-			}
-		}
-
-		this.releaseObject(o);
-	},
-
-  /**
-   * This method evaluates the server response, creates and returns the results via
-   * its properties.  Success and failure cases(and exceptions) will differ in their defined properties
-   * but property "type" will confirm the transaction's status.
-   * @private
-   * @param {object} o The connection object
-   * @param {} callbackArg User-defined arguments to be passed to the callback
-   * @param {boolean} isSuccess Indicates whether the transaction was successful or not.
-   * @return object
-   */
-	createResponseObject:function(o, callbackArg)
-	{
-		var obj = {};
-
-		obj.tId = o.tId;
-		obj.status = o.conn.status;
-		obj.statusText = o.conn.statusText;
-		obj.allResponseHeaders = o.conn.getAllResponseHeaders();
-		obj.responseText = o.conn.responseText;
-		obj.responseXML = o.conn.responseXML;
-		if(callbackArg){
-			obj.argument = callbackArg;
-		}
-
-		return obj;
-	},
-
-  /**
-   * If a transaction cannot be completed due to dropped or closed connections,
-   * there may be not be enough information to build a full response object.
-   * The object's property "type" value will be "failure", and two additional
-   * unique, properties are added - errorCode and errorText.
-   * @private
-   * @param {int} tId Transaction Id
-   * @param callbackArg The user-defined arguments
-   * @param {string} errorCode Error code associated with the exception.
-   * @param {string} errorText Error message describing the exception.
-   * @return object
-   */
-	createExceptionObject:function(tId, callbackArg)
-	{
-		var COMM_CODE = 0;
-		var COMM_ERROR = 'communication failure';
-
-		var obj = {};
-
-		obj.tId = tId;
-		obj.status = COMM_CODE;
-		obj.statusText = COMM_ERROR;
-		if(callbackArg){
-			obj.argument = callbackArg;
-		}
-
-		return obj;
-	},
-
-  /**
-   * Accessor that stores the HTTP headers for each transaction.
-   * @public
-   * @param {string} label The HTTP header label
-   * @param {string} value The HTTP header value
-   * @return void
-   */
-	initHeader:function(label,value)
-	{
-		var oHeader = [label,value];
-		this._http_header.push(oHeader);
-	},
-
-  /**
-   * Accessor that sets the HTTP headers for each transaction.
-   * @private
-   * @param {object} o The connection object for the transaction.
-   * @return void
-   */
-	setHeader:function(o)
-	{
-		var oHeader = this._http_header;
-		for(var i=0;i<oHeader.length;i++){
-			o.conn.setRequestHeader(oHeader[i][0],oHeader[i][1]);
-		}
-		oHeader.splice(0,oHeader.length);
-	},
-
-  /**
-   * This method assembles the form label and value pairs and
-   * constructs an encoded POST body.  Both syncRequest()
-   * and asyncRequest() will automatically initialize the
-   * transaction with a HTTP header Content-Type of
-   * application/x-www-form-urlencoded.
-   * @public
-   * @param {string} formName value of form name attribute
-   * @return void
-   */
-	setForm:function(formName)
-	{
-		this._sFormData = '';
-		var oForm = document.forms[formName];
-		var oElement, elName, elValue;
-		// iterate over the form elements collection to construct the
-		// label-value pairs.
-		for (var i=0; i<oForm.elements.length; i++){
-			oElement = oForm.elements[i];
-			elName = oForm.elements[i].name;
-			elValue = oForm.elements[i].value;
-			switch (oElement.type)
-			{
-				case 'select-multiple':
-					for(var j=0; j<oElement.options.length; j++){
-						if(oElement.options[j].selected){
-							this._sFormData += encodeURIComponent(elName) + '=' + encodeURIComponent(oElement.options[j].value) + '&';
-						}
-					}
-					break;
-				case 'radio':
-				case 'checkbox':
-					if(oElement.checked){
-						this._sFormData += encodeURIComponent(elName) + '=' + encodeURIComponent(elValue) + '&';
-					}
-					break;
-				case 'file':
-				// stub case as XMLHttpRequest will only send the file path as a string.
-					break;
-				case undefined:
-				// stub case for fieldset element which returns undefined.
-					break;
-				default:
-					this._sFormData += encodeURIComponent(elName) + '=' + encodeURIComponent(elValue) + '&';
-					break;
-			}
-		}
-		this._sFormData = this._sFormData.substr(0, this._sFormData.length - 1);
-		this._isFormPost = true;
-		this.initHeader('Content-Type','application/x-www-form-urlencoded');
-	},
-
-  /**
-   * Public method to terminate a transaction, if it has not reached readyState 4.
-   * @public
-   * @param {object} o The connection object returned by asyncRequest.
-   * @return void
-   */
-	abort:function(o)
-	{
-		if(this.isCallInProgress(o)){
-			o.conn.abort();
-			this.releaseObject(o);
-		}
-	},
-
-  /**
-   * Accessor to check if the transaction associated with the connection object
-   * is still being processed.
-   * @public
-   * @param {object} o The connection object returned by asyncRequest
-   * @return boolean
-   */
-	isCallInProgress:function(o)
-	{
-		if(o){
-			return o.conn.readyState != 4 && o.conn.readyState != 0;
-		}
-	},
-
-  /**
-   * Dereference the XHR instance and the connection object after the transaction is completed.
-   * @private
-   * @param {object} o The connection object
-   * @return void
-   */
-	releaseObject:function(o)
-	{
-			//dereference the XHR instance.
-			o.conn = null;
-			//dereference the connection object.
-			o = null;
-	}
-}
Index: in/trunk/greenstone3/web/interfaces/oran/js/dom.js
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/js/dom.js	(revision 24017)
+++ 	(revision )
@@ -1,433 +1,0 @@
-/*
-Copyright (c) 2006 Yahoo! Inc. All rights reserved.
-version 0.9.0
-*/
-
-/**
- * @class Provides helper methods for DOM elements.
- */
-YAHOO.util.Dom = new function() {
-
-   /**
-    * Returns an HTMLElement reference
-    * @param {String | HTMLElement} Accepts either a string to use as an ID for getting a DOM reference, or an actual DOM reference.
-    * @return {HTMLElement} A DOM reference to an HTML element.
-    */
-   this.get = function(el) {
-      if (typeof el == 'string') { // accept object or id
-         el = document.getElementById(el);
-      }
-
-      return el;
-   };
-
-   /**
-    * Normalizes currentStyle and ComputedStyle.
-    * @param {String | HTMLElement} Accepts either a string to use as an ID for getting a DOM reference, or an actual DOM reference.
-    * @param {String} property The style property whose value is returned.
-    * @return {String} The current value of the style property.
-    */
-   this.getStyle = function(el, property) {
-      var value = null;
-      var dv = document.defaultView;
-
-      el = this.get(el);
-
-      if (property == 'opacity' && el.filters) {// IE opacity
-         value = 1;
-         try {
-            value = el.filters.item('DXImageTransform.Microsoft.Alpha').opacity / 100;
-         } catch(e) {
-            try {
-               value = el.filters.item('alpha').opacity / 100;
-            } catch(e) {}
-         }
-      }
-      else if (el.style[property]) {
-         value = el.style[property];
-      }
-      else if (el.currentStyle && el.currentStyle[property]) {
-         value = el.currentStyle[property];
-      }
-      else if ( dv && dv.getComputedStyle )
-      {  // convert camelCase to hyphen-case
-
-         var converted = '';
-         for(i = 0, len = property.length;i < len; ++i) {
-            if (property.charAt(i) == property.charAt(i).toUpperCase()) {
-               converted = converted + '-' + property.charAt(i).toLowerCase();
-            } else {
-               converted = converted + property.charAt(i);
-            }
-         }
-
-         if (dv.getComputedStyle(el, '').getPropertyValue(converted)) {
-            value = dv.getComputedStyle(el, '').getPropertyValue(converted);
-         }
-      }
-
-      return value;
-   };
-
-   /**
-    * Wrapper for setting style properties of HTMLElements.  Normalizes "opacity" across modern browsers.
-    * @param {String | HTMLElement} Accepts either a string to use as an ID for getting a DOM reference, or an actual DOM reference.
-    * @param {String} property The style property to be set.
-    * @param {String} val The value to apply to the given property.
-    */
-   this.setStyle = function(el, property, val) {
-      el = this.get(el);
-      switch(property) {
-         case 'opacity' :
-            if (el.filters) {
-               el.style.filter = 'alpha(opacity=' + val * 100 + ')';
-
-               if (!el.currentStyle.hasLayout) {
-                  el.style.zoom = 1;
-               }
-            } else {
-               el.style.opacity = val;
-               el.style['-moz-opacity'] = val;
-               el.style['-khtml-opacity'] = val;
-            }
-            break;
-         default :
-            el.style[property] = val;
-      }
-   };
-
-   /**
-    * Gets the current position of an element based on page coordinates.  Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
-    * @param {String | HTMLElement} Accepts either a string to use as an ID for getting a DOM reference, or an actual DOM reference.
-    */
-   this.getXY = function(el) {
-      el = this.get(el);
-
-      // has to be part of document to have pageXY
-      if (el.parentNode === null || this.getStyle(el, 'display') == 'none') {
-         return false;
-      }
-
-      /**
-       * Position of the html element (x, y)
-       * @private
-       * @type Array
-       */
-      var parent = null;
-      var pos = [];
-      var box;
-
-      if (el.getBoundingClientRect) { // IE
-         box = el.getBoundingClientRect();
-         var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
-         var scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft;
-
-         return [box.left + scrollLeft, box.top + scrollTop];
-      }
-      else if (document.getBoxObjectFor) { // gecko
-         box = document.getBoxObjectFor(el);
-         pos = [box.x, box.y];
-      }
-      else { // safari/opera
-         pos = [el.offsetLeft, el.offsetTop];
-         parent = el.offsetParent;
-         if (parent != el) {
-            while (parent) {
-               pos[0] += parent.offsetLeft;
-               pos[1] += parent.offsetTop;
-               parent = parent.offsetParent;
-            }
-         }
-
-         // opera & (safari absolute) incorrectly account for body offsetTop
-         var ua = navigator.userAgent.toLowerCase();
-         if (
-            ua.indexOf('opera') != -1
-            || ( ua.indexOf('safari') != -1 && this.getStyle(el, 'position') == 'absolute' )
-         ) {
-            pos[1] -= document.body.offsetTop;
-         }
-      }
-
-      if (el.parentNode) { parent = el.parentNode; }
-      else { parent = null; }
-
-      while (parent && parent.tagName != 'BODY' && parent.tagName != 'HTML') {
-         pos[0] -= parent.scrollLeft;
-         pos[1] -= parent.scrollTop;
-
-         if (parent.parentNode) { parent = parent.parentNode; }
-         else { parent = null; }
-      }
-
-      return pos;
-   };
-
-   /**
-    * Gets the current X position of an element based on page coordinates.  The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
-    * @param {String | HTMLElement} Accepts either a string to use as an ID for getting a DOM reference, or an actual DOM reference.
-    */
-   this.getX = function(el) {
-      return this.getXY(el)[0];
-   };
-
-   /**
-    * Gets the current Y position of an element based on page coordinates.  Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
-    * @param {String | HTMLElement} Accepts either a string to use as an ID for getting a DOM reference, or an actual DOM reference.
-    */
-   this.getY = function(el) {
-      return this.getXY(el)[1];
-   };
-
-   /**
-    * Set the position of an html element in page coordinates, regardless of how the element is positioned.
-    * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
-    * @param {String | HTMLElement} Accepts either a string to use as an ID for getting a DOM reference, or an actual DOM reference.
-    * @param {array} pos Contains X & Y values for new position (coordinates are page-based)
-    */
-   this.setXY = function(el, pos, noRetry) {
-      el = this.get(el);
-      var pageXY = YAHOO.util.Dom.getXY(el);
-      if (pageXY === false) { return false; } // has to be part of doc to have pageXY
-
-      if (this.getStyle(el, 'position') == 'static') { // default to relative
-         this.setStyle(el, 'position', 'relative');
-      }
-
-      var delta = [
-         parseInt( YAHOO.util.Dom.getStyle(el, 'left'), 10 ),
-         parseInt( YAHOO.util.Dom.getStyle(el, 'top'), 10 )
-      ];
-
-      if ( isNaN(delta[0]) ) { delta[0] = 0; } // defalts to 'auto'
-      if ( isNaN(delta[1]) ) { delta[1] = 0; }
-
-      if (pos[0] !== null) { el.style.left = pos[0] - pageXY[0] + delta[0] + 'px'; }
-      if (pos[1] !== null) { el.style.top = pos[1] - pageXY[1] + delta[1] + 'px'; }
-
-      var newXY = this.getXY(el);
-
-      // if retry is true, try one more time if we miss
-      if (!noRetry && (newXY[0] != pos[0] || newXY[1] != pos[1]) ) {
-         this.setXY(el, pos, true);
-      }
-
-      return true;
-   };
-
-   /**
-    * Set the X position of an html element in page coordinates, regardless of how the element is positioned.
-    * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
-    * @param {String | HTMLElement} Accepts either a string to use as an ID for getting a DOM reference, or an actual DOM reference.
-    * @param {Int} x to use as the X coordinate.
-    */
-   this.setX = function(el, x) {
-      return this.setXY(el, [x, null]);
-   };
-
-   /**
-    * Set the Y position of an html element in page coordinates, regardless of how the element is positioned.
-    * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
-    * @param {String | HTMLElement} Accepts either a string to use as an ID for getting a DOM reference, or an actual DOM reference.
-    * @param {Int} Value to use as the Y coordinate.
-    */
-   this.setY = function(el, y) {
-      return this.setXY(el, [null, y]);
-   };
-
-   /**
-    * Returns the region position of the given element.
-    * The element must be part of the DOM tree to have a region (display:none or elements not appended return false).
-    * @param {String | HTMLElement} Accepts either a string to use as an ID for getting a DOM reference, or an actual DOM reference.
-    * @return {Region} A Region instance containing "top, left, bottom, right" member data.
-    */
-   this.getRegion = function(el) {
-      el = this.get(el);
-      return new YAHOO.util.Region.getRegion(el);
-   };
-
-   /**
-    * Returns the width of the client (viewport).
-    * @return {Int} The width of the viewable area of the page.
-    */
-   this.getClientWidth = function() {
-      return (
-         document.documentElement.offsetWidth
-         || document.body.offsetWidth
-      );
-   };
-
-   /**
-    * Returns the height of the client (viewport).
-    * @return {Int} The height of the viewable area of the page.
-    */
-   this.getClientHeight = function() {
-      return (
-         self.innerHeight
-         || document.documentElement.clientHeight
-         || document.body.clientHeight
-      );
-   };
-};
-
-/**
- * @class A region is a representation of an object on a grid.  It is defined
- * by the top, right, bottom, left extents, so is rectangular by default.  If
- * other shapes are required, this class could be extended to support it.
- *
- * @param {int} t the top extent
- * @param {int} r the right extent
- * @param {int} b the bottom extent
- * @param {int} l the left extent
- * @constructor
- */
-YAHOO.util.Region = function(t, r, b, l) {
-
-    /**
-     * The region's top extent
-     * @type int
-     */
-    this.top = t;
-
-    /**
-     * The region's right extent
-     * @type int
-     */
-    this.right = r;
-
-    /**
-     * The region's bottom extent
-     * @type int
-     */
-    this.bottom = b;
-
-    /**
-     * The region's left extent
-     * @type int
-     */
-    this.left = l;
-};
-
-/**
- * Returns true if this region contains the region passed in
- *
- * @param  {Region}  region The region to evaluate
- * @return {boolean}        True if the region is contained with this region,
- *                          else false
- */
-YAHOO.util.Region.prototype.contains = function(region) {
-    return ( region.left   >= this.left   &&
-             region.right  <= this.right  &&
-             region.top    >= this.top    &&
-             region.bottom <= this.bottom    );
-};
-
-/**
- * Returns the area of the region
- *
- * @return {int} the region's area
- */
-YAHOO.util.Region.prototype.getArea = function() {
-    return ( (this.bottom - this.top) * (this.right - this.left) );
-};
-
-/**
- * Returns the region where the passed in region overlaps with this one
- *
- * @param  {Region} region The region that intersects
- * @return {Region}        The overlap region, or null if there is no overlap
- */
-YAHOO.util.Region.prototype.intersect = function(region) {
-    var t = Math.max( this.top,    region.top    );
-    var r = Math.min( this.right,  region.right  );
-    var b = Math.min( this.bottom, region.bottom );
-    var l = Math.max( this.left,   region.left   );
-
-    if (b >= t && r >= l) {
-        return new YAHOO.util.Region(t, r, b, l);
-    } else {
-        return null;
-    }
-};
-
-/**
- * Returns the region representing the smallest region that can contain both
- * the passed in region and this region.
- *
- * @param  {Region} region The region that to create the union with
- * @return {Region}        The union region
- */
-YAHOO.util.Region.prototype.union = function(region) {
-    var t = Math.min( this.top,    region.top    );
-    var r = Math.max( this.right,  region.right  );
-    var b = Math.max( this.bottom, region.bottom );
-    var l = Math.min( this.left,   region.left   );
-
-    return new YAHOO.util.Region(t, r, b, l);
-};
-
-/**
- * toString
- * @return string the region properties
- */
-YAHOO.util.Region.prototype.toString = function() {
-    return ( "Region {" +
-             "  t: "    + this.top    +
-             ", r: "    + this.right  +
-             ", b: "    + this.bottom +
-             ", l: "    + this.left   +
-             "}" );
-}
-
-/**
- * Returns a region that is occupied by the DOM element
- *
- * @param  {HTMLElement} el The element
- * @return {Region}         The region that the element occupies
- * @static
- */
-YAHOO.util.Region.getRegion = function(el) {
-    var p = YAHOO.util.Dom.getXY(el);
-
-    var t = p[1];
-    var r = p[0] + el.offsetWidth;
-    var b = p[1] + el.offsetHeight;
-    var l = p[0];
-
-    return new YAHOO.util.Region(t, r, b, l);
-};
-
-/////////////////////////////////////////////////////////////////////////////
-
-
-/**
- * @class
- *
- * A point is a region that is special in that it represents a single point on
- * the grid.
- *
- * @param {int} x The X position of the point
- * @param {int} y The Y position of the point
- * @constructor
- * @extends Region
- */
-YAHOO.util.Point = function(x, y) {
-    /**
-     * The X position of the point
-     * @type int
-     */
-    this.x      = x;
-
-    /**
-     * The Y position of the point
-     * @type int
-     */
-    this.y      = y;
-
-    this.top    = y;
-    this.right  = x;
-    this.bottom = y;
-    this.left   = x;
-};
-
-YAHOO.util.Point.prototype = new YAHOO.util.Region();
Index: in/trunk/greenstone3/web/interfaces/oran/js/dragdrop-debug.js
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/js/dragdrop-debug.js	(revision 24017)
+++ 	(revision )
@@ -1,2517 +1,0 @@
-/*
-Copyright (c) 2006 Yahoo! Inc. All rights reserved.
-version 0.9.0
-*/
-
-/**
- * @class Defines the interface and base operation of items that that can be
- * dragged or can be drop targets.  It was designed to be extended, overriding
- * the event handlers for startDrag, onDrag, onDragOver, onDragOut.
- * Up to three html elements can be associated with a DragDrop instance:
- * <ul>
- * <li>linked element: the element that is passed into the constructor.
- * This is the element which defines the boundaries for interaction with
- * other DragDrop objects.</li>
- * <li>handle element(s): The drag operation only occurs if the element that
- * was clicked matches a handle element.  By default this is the linked
- * element, but there are times that you will want only a portion of the
- * linked element to initiate the drag operation, and the setHandleElId()
- * method provides a way to define this.</li>
- * <li>drag element: this represents an the element that would be moved along
- * with the cursor during a drag operation.  By default, this is the linked
- * element itself as in {@link YAHOO.util.DD}.  setDragElId() lets you define
- * a separate element that would be moved, as in {@link YAHOO.util.DDProxy}
- * </li>
- * </ul>
- * This class should not be instantiated until the onload event to ensure that
- * the associated elements are available.
- * The following would define a DragDrop obj that would interact with any
- * other * DragDrop obj in the "group1" group:
- * <pre>
- *  dd = new YAHOO.util.DragDrop("div1", "group1");
- * </pre>
- * Since none of the event handlers have been implemented, nothing would
- * actually happen if you were to run the code above.  Normally you would
- * override this class or one of the default implementations, but you can
- * also override the methods you want on an instance of the class...
- * <pre>
- *  dd.onDragDrop = function(e, id) {
- *   alert("dd was dropped on " + id);
- *  }
- * </pre>
- * @constructor
- * @param {String} id of the element that is linked to this instance
- * @param {String} sGroup the group of related DragDrop objects
- */
-YAHOO.util.DragDrop = function(id, sGroup) {
-    if (id) {
-        this.init(id, sGroup);
-    }
-};
-
-YAHOO.util.DragDrop.prototype = {
-
-    /**
-     * The id of the element associated with this object.  This is what we
-     * refer to as the "linked element" because the size and position of
-     * this element is used to determine when the drag and drop objects have
-     * interacted.
-     *
-     * @type String
-     */
-    id: null,
-
-    /**
-     * The id of the element that will be dragged.  By default this is same
-     * as the linked element , but could be changed to another element. Ex:
-     * YAHOO.util.DDProxy
-     *
-     * @type String
-     * @private
-     */
-    dragElId: null,
-
-    /**
-     * the id of the element that initiates the drag operation.  By default
-     * this is the linked element, but could be changed to be a child of this
-     * element.  This lets us do things like only starting the drag when the
-     * header element within the linked html element is clicked.
-     *
-     * @type String
-     * @private
-     */
-    handleElId: null,
-
-    /**
-     * An array of HTML tags that will be ignored if clicked.
-     */
-    invalidHandleTypes: null,
-
-    /**
-     * The linked element's absolute X position at the time the drag was
-     * started
-     *
-     * @type int
-     * @private
-     */
-    startPageX: 0,
-
-    /**
-     * The linked element's absolute X position at the time the drag was
-     * started
-     *
-     * @type int
-     * @private
-     */
-    startPageY: 0,
-
-    /**
-     * The group defines a logical collection of DragDrop objects that are
-     * related.  Instances only get events when interacting with other
-     * DragDrop object in the same group.  This lets us define multiple
-     * groups using a single DragDrop subclass if we want.
-     *
-     */
-    groups: null,
-
-    /**
-     * Individual drag/drop instances can be locked.  This will prevent
-     * onmousedown start drag.
-     *
-     * @type boolean
-     * @private
-     */
-    locked: false,
-
-    /**
-     * Lock this instance
-     */
-    lock: function() { this.locked = true; },
-
-    /**
-     * Unlock this instace
-     */
-    unlock: function() { this.locked = false; },
-
-    /**
-     * By default, all insances can be a drop target.  This can be disabled by
-     * setting isTarget to false.
-     *
-     * @type boolean
-     */
-    isTarget: true,
-
-    /**
-     * The padding configured for this drag and drop object for calculating
-     * the drop zone intersection with this object.
-     */
-    padding: null,
-
-    /**
-     * @private
-     */
-    _domRef: null,
-
-    /**
-     * Internal typeof flag
-     * @private
-     */
-    __ygDragDrop: true,
-
-    /**
-     * Set to true when horizontal contraints are applied
-     *
-     * @type boolean
-     * @private
-     */
-    constrainX: false,
-
-    /**
-     * Set to true when vertical contraints are applied
-     *
-     * @type boolean
-     * @private
-     */
-    constrainY: false,
-
-    /**
-     * The left constraint
-     *
-     * @type int
-     * @private
-     */
-    minX: 0,
-
-    /**
-     * The right constraint
-     *
-     * @type int
-     * @private
-     */
-    maxX: 0,
-
-    /**
-     * The up constraint
-     *
-     * @type int
-     * @private
-     */
-    minY: 0,
-
-    /**
-     * The down constraint
-     *
-     * @type int
-     * @private
-     */
-    maxY: 0,
-
-    /**
-     * Maintain offsets when we resetconstraints.  Used to maintain the
-     * slider thumb value, and this needs to be fixed.
-     * @type boolean
-     */
-    maintainOffset: false,
-
-    /**
-     * Array of pixel locations the element will snap to if we specified a
-     * horizontal graduation/interval.  This array is generated automatically
-     * when you define a tick interval.
-     * @type int[]
-     */
-    xTicks: null,
-
-    /**
-     * Array of pixel locations the element will snap to if we specified a
-     * vertical graduation/interval.  This array is generated automatically
-     * when you define a tick interval.
-     * @type int[]
-     */
-    yTicks: null,
-
-    /**
-     * By default the drag and drop instance will only respond to the primary
-     * button click (left button for a right-handed mouse).  Set to true to
-     * allow drag and drop to start with any mouse click that is propogated
-     * by the browser
-     * @type boolean
-     */
-    primaryButtonOnly: true,
-
-    /**
-     * Code that executes immediately before the startDrag event
-     * @private
-     */
-    b4StartDrag: function(x, y) { },
-
-    /**
-     * Abstract method called after a drag/drop object is clicked
-     * and the drag or mousedown time thresholds have beeen met.
-     *
-     * @param {int} X click location
-     * @param {int} Y click location
-     */
-    startDrag: function(x, y) { /* override this */ },
-
-    /**
-     * Code that executes immediately before the onDrag event
-     * @private
-     */
-    b4Drag: function(e) { },
-
-    /**
-     * Abstract method called during the onMouseMove event while dragging an
-     * object.
-     *
-     * @param {Event} e
-     */
-    onDrag: function(e) { /* override this */ },
-
-    /**
-     * Code that executes immediately before the onDragEnter event
-     * @private
-     */
-    // b4DragEnter: function(e) { },
-
-    /**
-     * Abstract method called when this element fist begins hovering over
-     * another DragDrop obj
-     *
-     * @param {Event} e
-     * @param {String || YAHOO.util.DragDrop[]} id In POINT mode, the element
-     * id this is hovering over.  In INTERSECT mode, an array of one or more
-     * dragdrop items being hovered over.
-     */
-    onDragEnter: function(e, id) { /* override this */ },
-
-    /**
-     * Code that executes immediately before the onDragOver event
-     * @private
-     */
-    b4DragOver: function(e) { },
-
-    /**
-     * Abstract method called when this element is hovering over another
-     * DragDrop obj
-     *
-     * @param {Event} e
-     * @param {String || YAHOO.util.DragDrop[]} id In POINT mode, the element
-     * id this is hovering over.  In INTERSECT mode, an array of dd items
-     * being hovered over.
-     */
-    onDragOver: function(e, id) { /* override this */ },
-
-    /**
-     * Code that executes immediately before the onDragOut event
-     * @private
-     */
-    b4DragOut: function(e) { },
-
-    /**
-     * Abstract method called when we are no longer hovering over an element
-     *
-     * @param {Event} e
-     * @param {String || YAHOO.util.DragDrop[]} id In POINT mode, the element
-     * id this was hovering over.  In INTERSECT mode, an array of dd items
-     * that the mouse is no longer over.
-     */
-    onDragOut: function(e, id) { /* override this */ },
-
-    /**
-     * Code that executes immediately before the onDragDrop event
-     * @private
-     */
-    b4DragDrop: function(e) { },
-
-    /**
-     * Abstract method called when this item is dropped on another DragDrop
-     * obj
-     *
-     * @param {Event} e
-     * @param {String || YAHOO.util.DragDrop[]} id In POINT mode, the element
-     * id this was dropped on.  In INTERSECT mode, an array of dd items this
-     * was dropped on.
-     */
-    onDragDrop: function(e, id) { /* override this */ },
-
-    /**
-     * Code that executes immediately before the endDrag event
-     * @private
-     */
-    b4EndDrag: function(e) { },
-
-    /**
-     * Fired when we are done dragging the object
-     *
-     * @param {Event} e
-     */
-    endDrag: function(e) { /* override this */ },
-
-    /**
-     * Code executed immediately before the onMouseDown event
-
-     * @param {Event} e
-     * @private
-     */
-    b4MouseDown: function(e) {  },
-
-    /**
-     * Event handler that fires when a drag/drop obj gets a mousedown
-     * @param {Event} e
-     */
-    onMouseDown: function(e) { /* override this */ },
-
-    /**
-     * Event handler that fires when a drag/drop obj gets a mouseup
-     * @param {Event} e
-     */
-    onMouseUp: function(e) { /* override this */ },
-
-    /**
-     * Returns a reference to the linked element
-     *
-     * @return {Object} the html element
-     */
-    getEl: function() {
-        if (!this._domRef) {
-            this._domRef = this.DDM.getElement(this.id);
-        }
-
-        return this._domRef;
-    },
-
-    /**
-     * Returns a reference to the actual element to drag.  By default this is
-     * the same as the html element, but it can be assigned to another
-     * element. An example of this can be found in YAHOO.util.DDProxy
-     *
-     * @return {Object} the html element
-     */
-    getDragEl: function() {
-        return this.DDM.getElement(this.dragElId);
-    },
-
-    /**
-     * Sets up the DragDrop object.  Must be called in the constructor of any
-     * YAHOO.util.DragDrop subclass
-     *
-     * @param id the id of the linked element
-     * @param {String} sGroup the group of related items
-     * element is supposed to be a target only, set to false.
-     */
-    init: function(id, sGroup) {
-        this.initTarget(id, sGroup);
-        YAHOO.util.Event.addListener(id, "mousedown",
-                                          this.handleMouseDown, this, true);
-    },
-
-    /**
-     * Initializes Targeting functionality only... the object does not
-     * get a mousedown handler.
-     *
-     * @param id the id of the linked element
-     * @param {String} sGroup the group of related items
-     * element is supposed to be a target only, set to false.
-     */
-    initTarget: function(id, sGroup) {
-
-        // create a local reference to the drag and drop manager
-        this.DDM = YAHOO.util.DDM;
-
-        // create a logger instance
-        this.logger = new ygLogger("DragDrop");
-
-        // set the default padding
-        this.padding = [0, 0, 0, 0];
-
-        // initialize the groups array
-        this.groups = {};
-
-        // set the id
-        this.id = id;
-
-        // the element is a drag handle by default
-        this.setDragElId(id);
-
-        // by default, clicked anchors will not start drag operations
-        this.invalidHandleTypes = {a : "a"};
-
-        // We don't want to register this as the handle with the manager
-        // so we just set the id rather than calling the setter
-        this.handleElId = id;
-
-        // cache the position of the element if we can
-        if (document && document.body) {
-            this.setInitPosition();
-        }
-
-        // add to an interaction group
-        this.addToGroup((sGroup) ? sGroup : "default");
-
-    },
-
-    /**
-     * Configures the padding for the target zone in px.  Effectively expands
-     * (or reduces) the virtual object size for targeting calculations.
-     * Supports css-style shorthand; if only one parameter is passed, all sides
-     * will have that padding, and if only two are passed, the top and bottom
-     * will have the first param, the left and right the second.
-     * @param {int} iTop    Top pad
-     * @param {int} iRight  Right pad
-     * @param {int} iBot    Bot pad
-     * @param {int} iLeft   Left pad
-     */
-    setPadding: function(iTop, iRight, iBot, iLeft) {
-        // this.padding = [iLeft, iRight, iTop, iBot];
-        if (!iRight && 0 !== iRight) {
-            this.padding = [iTop, iTop, iTop, iTop];
-        } else if (!iBot && 0 !== iBot) {
-            this.padding = [iTop, iRight, iTop, iRight];
-        } else {
-            this.padding = [iTop, iRight, iBot, iLeft];
-        }
-    },
-
-    /**
-     * Stores the initial placement of the dd element
-     */
-    setInitPosition: function(diffX, diffY) {
-        var el = this.getEl();
-
-        if (!this.DDM.verifyEl(el)) {
-            this.logger.debug(this.id + " element is broken");
-            return;
-        }
-
-        var dx = diffX || 0;
-        var dy = diffY || 0;
-
-        var p = YAHOO.util.Dom.getXY( el );
-
-        this.initPageX = p[0] - dx;
-        this.initPageY = p[1] - dy;
-
-        this.lastPageX = p[0];
-        this.lastPageY = p[1];
-
-        this.setStartPosition(p);
-    },
-
-    /**
-     * Sets the start position of the element.  This is set when the obj
-     * is initialized, the reset when a drag is started.
-     * @param pos current position (from previous lookup)
-     * @private
-     */
-    setStartPosition: function(pos) {
-
-        var p = pos || YAHOO.util.Dom.getXY( this.getEl() );
-
-        this.startPageX = p[0];
-        this.startPageY = p[1];
-    },
-
-    /**
-     * Add this instance to a group of related drag/drop objects.  All
-     * instances belong to at least one group, and can belong to as many
-     * groups as needed.
-     *
-     * @param sGroup {string} the name of the group
-     */
-    addToGroup: function(sGroup) {
-        this.groups[sGroup] = true;
-        this.DDM.regDragDrop(this, sGroup);
-    },
-
-    /**
-     * Allows you to specify that an element other than the linked element
-     * will be moved with the cursor during a drag
-     *
-     * @param id the id of the element that will be used to initiate the drag
-     */
-    setDragElId: function(id) {
-        this.dragElId = id;
-    },
-
-    /**
-     * Allows you to specify a child of the linked element that should be
-     * used to initiate the drag operation.  An example of this would be if
-     * you have a content div with text and links.  Clicking anywhere in the
-     * content area would normally start the drag operation.  Use this method
-     * to specify that an element inside of the content div is the element
-     * that starts the drag operation.
-     *
-     * @param id the id of the element that will be used to initiate the drag
-     */
-    setHandleElId: function(id) {
-        this.handleElId = id;
-        this.DDM.regHandle(this.id, id);
-    },
-
-    /**
-     * Allows you to set an element outside of the linked element as a drag
-     * handle
-     */
-    setOuterHandleElId: function(id) {
-        this.logger.debug("Adding outer handle event: " + id);
-        YAHOO.util.Event.addListener(id, "mousedown",
-                this.handleMouseDown, this, true);
-        this.setHandleElId(id);
-    },
-
-    /**
-     * Remove all drag and drop hooks for this element
-     */
-    unreg: function() {
-        this.logger.debug("DragDrop obj cleanup " + this.id);
-        YAHOO.util.Event.removeListener(this.id, "mousedown",
-                this.handleMouseDown);
-        this._domRef = null;
-        this.DDM._remove(this);
-    },
-
-    /**
-     * Returns true if this instance is locked, or the drag drop mgr is locked
-     * (meaning that all drag/drop is disabled on the page.)
-     *
-     * @return {boolean} true if this obj or all drag/drop is locked, else
-     * false
-     */
-    isLocked: function() {
-        return (this.DDM.isLocked() || this.locked);
-    },
-
-    /**
-     * Fired when this object is clicked
-     *
-     * @param {Event} e
-     * @param {YAHOO.util.DragDrop} oDD the clicked dd object (this dd obj)
-     * @private
-     */
-    handleMouseDown: function(e, oDD) {
-
-        this.logger.debug("isLocked: " + this.isLocked());
-
-        var EU = YAHOO.util.Event;
-
-
-        var button = e.which || e.button;
-        this.logger.debug("button: " + button);
-
-        if (this.primaryButtonOnly && button > 1) {
-            this.logger.debug("Mousedown was not produced by the primary button");
-            return;
-        }
-
-        if (this.isLocked()) {
-            this.logger.debug("Drag and drop is disabled, aborting");
-            return;
-        }
-
-        this.logger.debug("mousedown " + this.id);
-
-        this.DDM.refreshCache(this.groups);
-
-        // Only process the event if we really clicked within the linked
-        // element.  The reason we make this check is that in the case that
-        // another element was moved between the clicked element and the
-        // cursor in the time between the mousedown and mouseup events. When
-        // this happens, the element gets the next mousedown event
-        // regardless of where on the screen it happened.
-        var pt = new YAHOO.util.Point(EU.getPageX(e), EU.getPageY(e));
-        if ( this.DDM.isOverTarget(pt, this) )  {
-
-            this.logger.debug("click is legit");
-
-            //  check to see if the handle was clicked
-            var srcEl = EU.getTarget(e);
-
-            if (this.isValidHandleChild(srcEl) &&
-                    (this.id == this.handleElId ||
-                     this.DDM.handleWasClicked(srcEl, this.id)) ) {
-
-                // set the initial element position
-                this.setStartPosition();
-
-                this.logger.debug("firing onMouseDown events");
-
-
-                this.b4MouseDown(e);
-                this.onMouseDown(e);
-                this.DDM.handleMouseDown(e, this);
-
-                this.DDM.stopEvent(e);
-            }
-        }
-    },
-
-    /**
-     * Allows you to specify a tag name that should not start a drag operation
-     * when clicked.  This is designed to facilitate embedding links within a
-     * drag handle that do something other than start the drag.
-     *
-     * @param {string} tagName the type of element to exclude
-     */
-    addInvalidHandleType: function(tagName) {
-        var type = tagName.toUpperCase();
-        this.invalidHandleTypes[type] = type;
-    },
-
-    /**
-     * Unsets an excluded tag name set by addInvalidHandleType
-     *
-     * @param {string} tagName the type of element to unexclude
-     */
-    removeInvalidHandleType: function(tagName) {
-        var type = tagName.toUpperCase();
-        this.invalidHandleTypes[type] = null;
-    },
-
-    /**
-     * Checks the tag exclusion list to see if this click should be ignored
-     *
-     * @param {ygNode} node
-     * @return {boolean} true if this is a valid tag type, false if not
-     */
-    isValidHandleChild: function(node) {
-        var type = node.nodeName;
-
-        if (type == "#text") {
-            // this.logger.debug("text node, getting parent node type");
-            type = node.parentNode.nodeName;
-        }
-
-        return (!this.invalidHandleTypes[type]);
-    },
-
-    /**
-     * Create the array of horizontal tick marks if an interval was specified
-     * in setXConstraint().
-     *
-     * @private
-     */
-    setXTicks: function(iStartX, iTickSize) {
-        this.xTicks = [];
-        this.xTickSize = iTickSize;
-
-        var tickMap = {};
-
-        for (var i = this.initPageX; i >= this.minX; i = i - iTickSize) {
-            if (!tickMap[i]) {
-                this.xTicks[this.xTicks.length] = i;
-                tickMap[i] = true;
-            }
-        }
-
-        for (i = this.initPageX; i <= this.maxX; i = i + iTickSize) {
-            if (!tickMap[i]) {
-                this.xTicks[this.xTicks.length] = i;
-                tickMap[i] = true;
-            }
-        }
-
-        this.xTicks.sort(this.DDM.numericSort) ;
-        this.logger.debug("xTicks: " + this.xTicks.join());
-    },
-
-    /**
-     * Create the array of vertical tick marks if an interval was specified in
-     * setYConstraint().
-     *
-     * @private
-     */
-    setYTicks: function(iStartY, iTickSize) {
-        this.yTicks = [];
-        this.yTickSize = iTickSize;
-
-        var tickMap = {};
-
-        for (var i = this.initPageY; i >= this.minY; i = i - iTickSize) {
-            if (!tickMap[i]) {
-                this.yTicks[this.yTicks.length] = i;
-                tickMap[i] = true;
-            }
-        }
-
-        for (i = this.initPageY; i <= this.maxY; i = i + iTickSize) {
-            if (!tickMap[i]) {
-                this.yTicks[this.yTicks.length] = i;
-                tickMap[i] = true;
-            }
-        }
-
-        this.yTicks.sort(this.DDM.numericSort) ;
-        this.logger.debug("yTicks: " + this.yTicks.join());
-    },
-
-    /**
-     * By default, the element can be dragged any place on the screen.  Use
-     * this method to limit the horizontal travel of the element.  Pass in
-     * 0,0 for the parameters if you want to lock the drag to the y axis.
-     *
-     * @param {int} iLeft the number of pixels the element can move to the left
-     * @param {int} iRight the number of pixels the element can move to the
-     * right
-     * @param {int} iTickSize optional parameter for specifying that the
-     * element
-     * should move iTickSize pixels at a time.
-     */
-    setXConstraint: function(iLeft, iRight, iTickSize) {
-        this.leftConstraint = iLeft;
-        this.rightConstraint = iRight;
-
-        this.minX = this.initPageX - iLeft;
-        this.maxX = this.initPageX + iRight;
-        if (iTickSize) { this.setXTicks(this.initPageX, iTickSize); }
-
-        this.constrainX = true;
-        this.logger.debug("initPageX:" + this.initPageX + " minX:" + this.minX +
-                " maxX:" + this.maxX);
-    },
-
-    /**
-     * By default, the element can be dragged any place on the screen.  Set
-     * this to limit the vertical travel of the element.  Pass in 0,0 for the
-     * parameters if you want to lock the drag to the x axis.
-     *
-     * @param {int} iUp the number of pixels the element can move up
-     * @param {int} iDown the number of pixels the element can move down
-     * @param {int} iTickSize optional parameter for specifying that the
-     * element should move iTickSize pixels at a time.
-     */
-    setYConstraint: function(iUp, iDown, iTickSize) {
-        this.topConstraint = iUp;
-        this.bottomConstraint = iDown;
-
-        this.minY = this.initPageY - iUp;
-        this.maxY = this.initPageY + iDown;
-        if (iTickSize) { this.setYTicks(this.initPageY, iTickSize); }
-
-        this.constrainY = true;
-
-        this.logger.debug("initPageY:" + this.initPageY + " minY:" + this.minY +
-                " maxY:" + this.maxY);
-    },
-
-    /**
-     * resetConstraints must be called if you manually reposition a dd element.
-     * @param {boolean} maintainOffset
-     */
-    resetConstraints: function() {
-
-        // this.logger.debug("init pagexy: " + this.initPageX + ", " +
-        //      this.initPageY);
-        // this.logger.debug("last pagexy: " + this.lastPageX + ", " +
-        //      this.lastPageY);
-
-        // figure out how much this thing has moved
-        var dx = (this.maintainOffset) ? this.lastPageX - this.initPageX : 0;
-        var dy = (this.maintainOffset) ? this.lastPageY - this.initPageY : 0;
-
-        // this.logger.debug("diff: " + dx + ", " + dy);
-
-        // reset the initial location
-        this.setInitPosition(dx, dy);
-
-        if (this.constrainX) {
-            this.setXConstraint( this.leftConstraint,
-                                 this.rightConstraint,
-                                 this.xTickSize        );
-        }
-
-        if (this.constrainY) {
-            this.setYConstraint( this.topConstraint,
-                                 this.bottomConstraint,
-                                 this.yTickSize         );
-        }
-    },
-
-    /**
-     * Normally the drag element is moved pixel by pixel, but we can specify
-     * that it move a number of pixels at a time.  This method resolves the
-     * location when we have it set up like this.
-     *
-     * @param {int} val where we want to place the object
-     * @param {int[]} tickArray sorted array of valid points
-     * @return {int} the closest tick
-     * @private
-     */
-    getTick: function(val, tickArray) {
-
-        if (!tickArray) {
-            // If tick interval is not defined, it is effectively 1 pixel,
-            // so we return the value passed to us.
-            return val;
-        } else if (tickArray[0] >= val) {
-            // The value is lower than the first tick, so we return the first
-            // tick.
-            return tickArray[0];
-        } else {
-            for (var i = 0; i < tickArray.length; ++i) {
-                var next = i + 1;
-                if (tickArray[next] && tickArray[next] >= val) {
-                    var diff1 = val - tickArray[i];
-                    var diff2 = tickArray[next] - val;
-                    return (diff2 > diff1) ? tickArray[i] : tickArray[next];
-                }
-            }
-
-            // The value is larger than the last tick, so we return the last
-            // tick.
-            return tickArray[tickArray.length - 1];
-        }
-    },
-
-    /**
-     * toString method
-     * @return {string} string representation of the dd obj
-     */
-    toString: function(val, tickArray) {
-        return ("YAHOO.util.DragDrop {" + this.id + "}");
-    }
-
-};
-
-/* Copyright (c) 2006 Yahoo! Inc. All rights reserved. */
-
-// Only load the library once.  Rewriting the manager class would orphan
-// existing drag and drop instances.
-if (!YAHOO.util.DragDropMgr) {
-
-    /**
-     * @class Handles the element interaction for all DragDrop items in the
-     * window.  Generally, you will not call this class directly, but it does
-     * have helper methods that could be useful in your DragDrop
-     * implementations.  This class should not be instantiated; all methods
-     * are are static.
-     *
-     * @constructor
-     */
-    YAHOO.util.DragDropMgr = new function() {
-
-        /**
-         * utility package shorthand
-         * @private
-         */
-        var UTIL = YAHOO.util;
-
-        /**
-         * Two dimensional Array of registered DragDrop objects.  The first
-         * dimension is the DragDrop item group, the second the DragDrop
-         * object.
-         *
-         * @private
-         */
-        this.ids = {};
-
-        /**
-         * Array of element ids defined as drag handles.  Used to determine
-         * if the element that generated the mousedown event is actually the
-         * handle and not the html element itself.
-         *
-         * @private
-         */
-        this.handleIds = {};
-
-        /**
-         * the DragDrop object that is currently being dragged
-         *
-         * @type DragDrop
-         * @private
-         **/
-        this.dragCurrent = null;
-
-        /**
-         * the DragDrop object(s) that are being hovered over
-         *
-         * @type Array
-         * @private
-         */
-        this.dragOvers = {};
-
-        /**
-         * @private
-         */
-        this.logger = null;
-
-        /**
-         * the X distance between the cursor and the object being dragged
-         *
-         * @type int
-         * @private
-         */
-        this.deltaX = 0;
-
-        /**
-         * the Y distance between the cursor and the object being dragged
-         *
-         * @type int
-         * @private
-         */
-        this.deltaY = 0;
-
-        /**
-         * Flag to determine if we should prevent the default behavior of the
-         * events we define. By default this is true, but this can be set to
-         * false if you need the default behavior (not recommended)
-         *
-         * @type boolean
-         */
-        this.preventDefault = true;
-
-        /**
-         * Flag to determine if we should stop the propagation of the events
-         * we generate. This is true by default but you may want to set it to
-         * false if the html element contains other features that require the
-         * mouse click.
-         *
-         * @type boolean
-         */
-        this.stopPropagation = true;
-
-        /**
-         * @private
-         */
-        this.initalized = false;
-
-        /**
-         * All drag and drop can be disabled.
-         *
-         * @private
-         */
-        this.locked = false;
-
-        /**
-         * Called the first time an element is registered.
-         *
-         * @private
-         */
-        this.init = function() {
-            this.logger = new ygLogger("DragDropMgr");
-        };
-
-        /**
-         * In point mode, drag and drop interaction is defined by the
-         * location of the cursor during the drag/drop
-         * @type int
-         */
-        this.POINT     = 0;
-
-        /**
-         * In intersect mode, drag and drop interactio nis defined by the
-         * overlap of two or more drag and drop objects.
-         * @type int
-         */
-        this.INTERSECT = 1;
-
-        /**
-         * The current drag and drop mode.  Default it point mode
-         * @type int
-         */
-        this.mode = this.POINT;
-
-        /**
-         * Runs method on all drag and drop objects
-         * @private
-         */
-        this._execOnAll = function(sMethod, args) {
-            for (var i in this.ids) {
-                for (var j in this.ids[i]) {
-                    var oDD = this.ids[i][j];
-                    if (! this.isTypeOfDD(oDD)) {
-                        continue;
-                    }
-                    oDD[sMethod].apply(oDD, args);
-                }
-            }
-        };
-
-        /**
-         * Drag and drop initialization.  Sets up the global event handlers
-         * @private
-         */
-        this._onLoad = function() {
-
-            this._execOnAll("setInitPosition", []);
-
-            this.logger = new ygLogger("DragDropMgr");
-            this.logger.debug("DDM onload");
-
-            var EU = UTIL.Event;
-
-            EU.addListener(document, "mouseup",   this.handleMouseUp, this, true);
-            EU.addListener(document, "mousemove", this.handleMouseMove, this, true);
-            EU.addListener(window,   "unload",    this._onUnload, this, true);
-            EU.addListener(window,   "resize",    this._onResize, this, true);
-            // EU.addListener(window,   "mouseout",    this._test);
-
-            this.initalized = true;
-
-        };
-
-        /**
-         * Reset constraints on all drag and drop objs
-         * @private
-         */
-        this._onResize = function(e) {
-            this.logger.debug("window resize");
-            this._execOnAll("resetConstraints", []);
-        };
-
-        /**
-         * Lock all drag and drop functionality
-         */
-        this.lock = function() { this.locked = true; };
-
-        /**
-         * Unlock all drag and drop functionality
-         */
-        this.unlock = function() { this.locked = false; };
-
-        /**
-         * Is drag and drop locked?
-         *
-         * @return {boolean} True if drag and drop is locked, false otherwise.
-         */
-        this.isLocked = function() { return this.locked; };
-
-        /**
-         * Location cache that is set for all drag drop objects when a drag is
-         * initiated, cleared when the drag is finished.
-         *
-         * @private
-         */
-        this.locationCache = {};
-
-        /**
-         * Set useCache to false if you want to force object the lookup of each
-         * drag and drop linked element constantly during a drag.
-         * @type boolean
-         */
-        this.useCache = true;
-
-        /**
-         * The number of pixels that the mouse needs to move after the
-         * mousedown before the drag is initiated.  Default=3;
-         * @type int
-         */
-        this.clickPixelThresh = 3;
-
-        /**
-         * The number of milliseconds after the mousedown event to initiate the
-         * drag if we don't get a mouseup event. Default=1000
-         * @type int
-         */
-        this.clickTimeThresh = 1000;
-
-        /**
-         * Flag that indicates that either the drag pixel threshold or the
-         * mousdown time threshold has been met
-         * @type boolean
-         * @private
-         */
-        this.dragThreshMet = false;
-
-        /**
-         * Timeout used for the click time threshold
-         * @type Object
-         * @private
-         */
-        this.clickTimeout = null;
-
-        /**
-         * The X position of the mousedown event stored for later use when a
-         * drag threshold is met.
-         * @type int
-         * @private
-         */
-        this.startX = 0;
-
-        /**
-         * The Y position of the mousedown event stored for later use when a
-         * drag threshold is met.
-         * @type int
-         * @private
-         */
-        this.startY = 0;
-
-        /**
-         * Each DragDrop instance must be registered with the DragDropMgr.
-         * This is executed in ygDragDrop.init()
-         *
-         * @param {DragDrop} oDD the DragDrop object to register
-         * @param {String} sGroup the name of the group this element belongs to
-         */
-        this.regDragDrop = function(oDD, sGroup) {
-            if (!this.initialized) { this.init(); }
-
-            if (!this.ids[sGroup]) {
-                this.ids[sGroup] = {};
-            }
-            this.ids[sGroup][oDD.id] = oDD;
-        };
-
-        /**
-         * Unregisters a drag and drop item.  This is executed in
-         * ygDragDrop.unreg, use that method instead of calling this directly.
-         * @private
-         */
-        this._remove = function(oDD) {
-            for (var g in oDD.groups) {
-                if (g && this.ids[g][oDD.id]) {
-                    delete this.ids[g][oDD.id];
-                }
-            }
-            delete this.handleIds[oDD.id];
-        };
-
-        /**
-         * Each DragDrop handle element must be registered.  This is done
-         * automatically when executing ygDragDrop.setHandleElId()
-         *
-         * @param {String} sDDId the DragDrop id this element is a handle for
-         * @param {String} sHandleId the id of the element that is the drag
-         * handle
-         */
-        this.regHandle = function(sDDId, sHandleId) {
-            if (!this.handleIds[sDDId]) {
-                this.handleIds[sDDId] = {};
-            }
-            this.handleIds[sDDId][sHandleId] = sHandleId;
-        };
-
-        /**
-         * Utility function to determine if a given element has been
-         * registered as a drag drop item.
-         *
-         * @param {String} id the element id to check
-         * @return {boolean} true if this element is a DragDrop item,
-         * false otherwise
-         */
-        this.isDragDrop = function(id) {
-            return ( this.getDDById(id) ) ? true : false;
-        };
-
-        /**
-         * Returns the drag and drop instances that are in all groups the
-         * passed in instance belongs to.
-         *
-         * @param {ygDragDrop} p_oDD the obj to get related data for
-         * @param {boolean} bTargetsOnly if true, only return targetable objs
-         * @return {ygDragDrop[]} the related instances
-         */
-        this.getRelated = function(p_oDD, bTargetsOnly) {
-            var oDDs = [];
-            for (var i in p_oDD.groups) {
-                for (j in this.ids[i]) {
-                    var dd = this.ids[i][j];
-                    if (! this.isTypeOfDD(dd)) {
-                        continue;
-                    }
-                    if (!bTargetsOnly || dd.isTarget) {
-                        oDDs[oDDs.length] = dd;
-                    }
-                }
-            }
-
-            return oDDs;
-        };
-
-        /**
-         * Returns true if the specified dd target is a legal target for
-         * the specifice drag obj
-         *
-         * @param {ygDragDrop} the drag obj
-         * @param {ygDragDrop) the target
-         * @return {boolean} true if the target is a legal target for the
-         * dd obj
-         */
-        this.isLegalTarget = function (oDD, oTargetDD) {
-            var targets = this.getRelated(oDD);
-            for (var i =0;i<targets.length;++i) {
-                if (targets[i].id == oTargetDD.id) {
-                    return true;
-                }
-            }
-
-            return false;
-        };
-
-        /**
-         * My goal is to be able to transparently determine if an object is
-         * typeof ygDragDrop, and the exact subclass of ygDragDrop.  typeof
-         * returns "object", oDD.constructor.toString() always returns
-         * "ygDragDrop" and not the name of the subclass.  So for now it just
-         * evaluates a well-known variable in ygDragDrop.
-         *
-         * @param {Object} the object to evaluate
-         * @return {boolean} true if typeof oDD = ygDragDrop
-         */
-        this.isTypeOfDD = function (oDD) {
-            return (oDD && oDD.__ygDragDrop);
-        };
-
-        /**
-         * Utility function to determine if a given element has been
-         * registered as a drag drop handle for the given Drag Drop object.
-         *
-         * @param {String} id the element id to check
-         * @return {boolean} true if this element is a DragDrop handle, false
-         * otherwise
-         */
-        this.isHandle = function(sDDId, sHandleId) {
-            return ( this.handleIds[sDDId] &&
-                            this.handleIds[sDDId][sHandleId] );
-        };
-
-        /**
-         * Returns the DragDrop instance for a given id
-         *
-         * @param {String} id the id of the DragDrop object
-         * @return {DragDrop} the drag drop object, null if it is not found
-         */
-        this.getDDById = function(id) {
-            for (var i in this.ids) {
-                if (this.ids[i][id]) {
-                    return this.ids[i][id];
-                }
-            }
-            return null;
-        };
-
-        /**
-         * Fired after a registered DragDrop object gets the mousedown event.
-         * Sets up the events required to track the object being dragged
-         *
-         * @param {Event} e the event
-         * @param oDD the DragDrop object being dragged
-         * @private
-         */
-        this.handleMouseDown = function(e, oDD) {
-            this.logger.debug("mousedown - adding event handlers");
-            this.dragCurrent = oDD;
-
-            var el = oDD.getEl();
-
-            // track start position
-            this.startX = UTIL.Event.getPageX(e);
-            this.startY = UTIL.Event.getPageY(e);
-
-            this.deltaX = this.startX - el.offsetLeft;
-            this.deltaY = this.startY - el.offsetTop;
-
-            this.dragThreshMet = false;
-
-            this.clickTimeout = setTimeout(
-               "var DDM=YAHOO.util.DDM;DDM.startDrag(DDM.startX, DDM.startY)",
-               this.clickTimeThresh );
-        };
-
-        /**
-         * Fired when either the drag pixel threshol or the mousedown hold
-         * time threshold has been met.
-         *
-         * @param x {int} the X position of the original mousedown
-         * @param y {int} the Y position of the original mousedown
-         */
-        this.startDrag = function(x, y) {
-            this.logger.debug("firing drag start events");
-            clearTimeout(this.clickTimeout);
-            if (this.dragCurrent) {
-                this.dragCurrent.b4StartDrag(x, y);
-                this.dragCurrent.startDrag(x, y);
-            }
-            this.dragThreshMet = true;
-        };
-
-        /**
-         * Internal function to handle the mouseup event.  Will be invoked
-         * from the context of the document.
-         *
-         * @param {Event} e the event
-         * @private
-         */
-        this.handleMouseUp = function(e) {
-
-            if (! this.dragCurrent) {
-                return;
-            }
-
-            clearTimeout(this.clickTimeout);
-
-            if (this.dragThreshMet) {
-                this.logger.debug("mouseup detected - completing drag");
-                this.fireEvents(e, true);
-            } else {
-                this.logger.debug("drag threshold not met");
-            }
-
-            this.stopDrag(e);
-
-            this.stopEvent(e);
-        };
-
-        /**
-         * Utility to stop event propagation and event default, if these
-         * features are turned on.
-         *
-         * @param {Event} e the event as returned by this.getEvent()
-         */
-        this.stopEvent = function(e) {
-            if (this.stopPropagation) {
-                UTIL.Event.stopPropagation(e);
-            }
-
-            if (this.preventDefault) {
-                UTIL.Event.preventDefault(e);
-            }
-        };
-
-        /**
-         * Internal function to clean up event handlers after the drag
-         * operation is complete
-         *
-         * @param {Event} e the event
-         * @private
-         */
-        this.stopDrag = function(e) {
-            // this.logger.debug("mouseup - removing event handlers");
-
-            // Fire the drag end event for the item that was dragged
-            if (this.dragCurrent) {
-                if (this.dragThreshMet) {
-                    this.logger.debug("firing endDrag events");
-                    this.dragCurrent.b4EndDrag(e);
-                    this.dragCurrent.endDrag(e);
-                }
-
-                this.logger.debug("firing onMouseUp event");
-                this.dragCurrent.onMouseUp(e);
-            }
-
-            this.dragCurrent = null;
-            this.dragOvers = {};
-        };
-
-
-        /**
-         * Internal function to handle the mousemove event.  Will be invoked
-         * from the context of the html element.
-         *
-         * @TODO figure out what we can do about mouse events lost when the
-         * user drags objects beyond the window boundary.  Currently we can
-         * detect this in internet explorer by verifying that the mouse is
-         * down during the mousemove event.  Firefox doesn't give us the
-         * button state on the mousemove event.
-         *
-         * @param {Event} e the event
-         * @private
-         */
-        this.handleMouseMove = function(e) {
-            if (! this.dragCurrent) {
-                // this.logger.debug("no current drag obj");
-                return;
-            }
-
-            // var button = e.which || e.button;
-
-            this.logger.debug("which: " + e.which + ", button: "+ e.button);
-
-
-            // check for IE mouseup outside of page boundary
-            if (UTIL.Event.isIE && !e.button) {
-                this.stopEvent(e);
-                return this.handleMouseUp(e);
-                // this.logger.debug("button failure");
-            }
-
-            if (!this.dragThreshMet) {
-                var diffX = Math.abs(this.startX - UTIL.Event.getPageX(e));
-                var diffY = Math.abs(this.startY - UTIL.Event.getPageY(e));
-                // this.logger.debug("diffX: " + diffX + "diffY: " + diffY);
-                if (diffX > this.clickPixelThresh ||
-                            diffY > this.clickPixelThresh) {
-                    this.logger.debug("pixel threshold met");
-                    this.startDrag(this.startX, this.startY);
-                }
-            }
-
-            if (this.dragThreshMet) {
-                this.dragCurrent.b4Drag(e);
-                this.dragCurrent.onDrag(e);
-                this.fireEvents(e, false);
-            }
-
-            this.stopEvent(e);
-        };
-
-        /**
-         * Iterates over all of the DragDrop elements to find ones we are
-         * hovering over or dropping on
-         *
-         * @param {Event} e the event
-         * @param {boolean} isDrop is this a drop op or a mouseover op?
-         * @private
-         */
-        this.fireEvents = function(e, isDrop) {
-            var dc = this.dragCurrent;
-
-            // If the user did the mouse up outside of the window, we could
-            // get here even though we have ended the drag.
-            if (!dc || dc.isLocked()) {
-                return;
-            }
-
-            var x = UTIL.Event.getPageX(e);
-            var y = UTIL.Event.getPageY(e);
-            var pt = new YAHOO.util.Point(x,y);
-
-            // cache the previous dragOver array
-            var oldOvers = [];
-
-            var outEvts   = [];
-            var overEvts  = [];
-            var dropEvts  = [];
-            var enterEvts = [];
-
-            // Check to see if the object we were hovering over is no longer
-            // being hovered over so we can fire the onDragOut event
-            for (var i in this.dragOvers) {
-
-                var ddo = this.dragOvers[i];
-
-                if (! this.isTypeOfDD(ddo)) {
-                    continue;
-                }
-
-                if (! this.isOverTarget(pt, ddo, this.mode)) {
-                    outEvts.push( ddo );
-                }
-
-                oldOvers[i] = true;
-                delete this.dragOvers[i];
-            }
-
-            for (var sGroup in dc.groups) {
-                // this.logger.debug("Processing group " + sGroup);
-
-                if ("string" != typeof sGroup) {
-                    continue;
-                }
-
-                for (i in this.ids[sGroup]) {
-                    var oDD = this.ids[sGroup][i];
-                    if (! this.isTypeOfDD(oDD)) {
-                        continue;
-                    }
-
-                    if (oDD.isTarget && !oDD.isLocked() && oDD != dc) {
-                        if (this.isOverTarget(pt, oDD, this.mode)) {
-                            // look for drop interactions
-                            if (isDrop) {
-                                dropEvts.push( oDD );
-                            // look for drag enter and drag over interactions
-                            } else {
-
-                                // initial drag over: dragEnter fires
-                                if (!oldOvers[oDD.id]) {
-                                    enterEvts.push( oDD );
-                                // subsequent drag overs: dragOver fires
-                                } else {
-                                    overEvts.push( oDD );
-                                }
-
-                                this.dragOvers[oDD.id] = oDD;
-                            }
-                        }
-                    }
-                }
-            }
-
-            if (this.mode) {
-                if (outEvts.length > 0) {
-                    dc.b4DragOut(e, outEvts);
-                    dc.onDragOut(e, outEvts);
-                }
-
-                if (enterEvts.length > 0) {
-                    dc.onDragEnter(e, enterEvts);
-                }
-
-                if (overEvts.length > 0) {
-                    dc.b4DragOver(e, overEvts);
-                    dc.onDragOver(e, overEvts);
-                }
-
-                if (dropEvts.length > 0) {
-                    dc.b4DragDrop(e, dropEvts);
-                    dc.onDragDrop(e, dropEvts);
-                }
-
-            } else {
-                // fire dragout events
-                for (i=0; i < outEvts.length; ++i) {
-                    this.logger.debug(dc.id+" onDragOut: " + outEvts[i].id);
-                    dc.b4DragOut(e, outEvts[i].id);
-                    dc.onDragOut(e, outEvts[i].id);
-                }
-
-                // fire enter events
-                for (i=0; i < enterEvts.length; ++i) {
-                    this.logger.debug(dc.id + " dragEnter " + enterEvts[i].id);
-                    // dc.b4DragEnter(e, oDD.id);
-                    dc.onDragEnter(e, enterEvts[i].id);
-                }
-
-                // fire over events
-                for (i=0; i < overEvts.length; ++i) {
-                    this.logger.debug(dc.id + " dragOver " + overEvts[i].id);
-                    dc.b4DragOver(e, overEvts[i].id);
-                    dc.onDragOver(e, overEvts[i].id);
-                }
-
-                // fire drop events
-                for (i=0; i < dropEvts.length; ++i) {
-                    this.logger.debug(dc.id + " dragDrop " + dropEvts[i].id);
-                    dc.b4DragDrop(e, dropEvts[i].id);
-                    dc.onDragDrop(e, dropEvts[i].id);
-                }
-
-            }
-
-        };
-
-        /**
-         * Helper function for getting the best match from the list of drag
-         * and drop objects returned by the drag and drop events when we are
-         * in INTERSECT mode.  It returns either the first object that the
-         * cursor is over, or the object that has the greatest overlap with
-         * the dragged element.
-         *
-         * @param  {ygDragDrop[]} dds The array of drag and drop objects
-         * targeted
-         * @return {ygDragDrop}       The best single match
-         */
-        this.getBestMatch = function(dds) {
-            var winner = null;
-            // Return null if the input is not what we expect
-            //if (!dds || !dds.length || dds.length == 0) {
-               // winner = null;
-            // If there is only one item, it wins
-            //} else if (dds.length == 1) {
-
-            if (dds.length == 1) {
-                winner = dds[0];
-            } else {
-                // Loop through the targeted items
-                for (var i=0; i<dds.length; ++i) {
-                    var dd = dds[i];
-                    // If the cursor is over the object, it wins.  If the
-                    // cursor is over multiple matches, the first one we come
-                    // to wins.
-                    if (dd.cursorIsOver) {
-                        winner = dd;
-                        break;
-                    // Otherwise the object with the most overlap wins
-                    } else {
-                        if (!winner ||
-                            winner.overlap.getArea() < dd.overlap.getArea()) {
-                            winner = dd;
-                        }
-                    }
-                }
-            }
-
-            return winner;
-        };
-
-        /**
-         * Refreshes the cache of the top-left and bottom-right points of the
-         * drag and drop objects in the specified groups
-         *
-         * @param {Array} aGroups an associative array of groups to refresh
-         */
-        this.refreshCache = function(aGroups) {
-            this.logger.debug("refreshing element location cache");
-            for (sGroup in aGroups) {
-                if ("string" != typeof sGroup) {
-                    continue;
-                }
-                for (i in this.ids[sGroup]) {
-                    var oDD = this.ids[sGroup][i];
-
-                    if (this.isTypeOfDD(oDD)) {
-                        var loc = this.getLocation(oDD);
-                        if (loc) {
-                            this.locationCache[oDD.id] = loc;
-                        } else {
-                            delete this.locationCache[oDD.id];
-                            this.logger.debug("something is wrong with the element");
-                            // this will unregister the drag and drop object if
-                            // the element is not in a usable state
-                            oDD.unreg();
-                        }
-                    }
-                }
-            }
-        };
-
-        /**
-         * This checks to make sure an element exists and is in the DOM.  The
-         * main purpose is to handle cases where innerHTML is used to remove
-         * drag and drop objects from the DOM.  IE provides an 'unspecified
-         * error' when trying to access the offsetParent of such an element
-         * @param {HTMLElement} el the element to check
-         * @return {boolean} true if the element looks usable
-         */
-        this.verifyEl = function(el) {
-            try {
-                if (el) {
-                    var parent = el.offsetParent;
-                    if (parent) {
-                        return true;
-                    }
-                }
-            } catch(e) {
-                this.logger.debug("detected problem with an element");
-            }
-
-            return false;
-        };
-
-        /**
-         * Returns the an array containing the drag and drop element's position
-         * and size, including the ygDragDrop.padding configured for it
-         *
-         * @param {ygDragDrop} oDD the drag and drop object to get the
-         * location for
-         * @return array containing the top left and bottom right points of the
-         * element
-         */
-        this.getLocation = function(oDD) {
-            if (! this.isTypeOfDD(oDD)) {
-                this.logger.debug(oDD + " is not a DD obj");
-                return null;
-            }
-
-            var el = oDD.getEl();
-
-            if (!this.verifyEl(el)) {
-                this.logger.debug(oDD + " element is not usable");
-                return null;
-            }
-
-            // this.logger.debug(oDD.id + " padding: " + oDD.padding);
-
-            // var aPos = ygPos.getPos(el);
-            var aPos = YAHOO.util.Dom.getXY(el);
-
-            x1 = aPos[0];
-            x2 = x1 + el.offsetWidth;
-
-            y1 = aPos[1];
-            y2 = y1 + el.offsetHeight;
-
-            var t = y1 - oDD.padding[0];
-            var r = x2 + oDD.padding[1];
-            var b = y2 + oDD.padding[2];
-            var l = x1 - oDD.padding[3];
-
-            return new YAHOO.util.Region( t, r, b, l );
-
-        };
-
-        /**
-         * Checks the cursor location to see if it over the target
-         *
-         * @param {YAHOO.util.Point} pt The point to evaluate
-         * @param {ygDragDrop} oDDTarget the DragDrop object we are inspecting
-         * @return {boolean} true if the mouse is over the target
-         * @private
-         */
-        this.isOverTarget = function(pt, oDDTarget, intersect) {
-            // use cache if available
-            var loc = this.locationCache[oDDTarget.id];
-            if (!loc || !this.useCache) {
-                this.logger.debug("cache not populated");
-                loc = this.getLocation(oDDTarget);
-                this.locationCache[oDDTarget.id] = loc;
-
-                this.logger.debug("cache: " + loc);
-            }
-
-            // this.logger.debug("isOverTarget: " + x + "," + y + ", " + loc);
-
-            // var cursorIsOver =  (x >= loc[3] && x <= loc[1] && y >= loc[0] && y <= loc[2]);
-            //oDDTarget.cursorIsOver = loc.contains( new YAHOO.util.Point(x, y) );
-            oDDTarget.cursorIsOver = loc.contains( pt );
-            oDDTarget.overlap = null;
-
-            // if (this.INTERSECT == this.mode) {
-            if (intersect) {
-
-                var curRegion =
-                    YAHOO.util.Region.getRegion(this.dragCurrent.getDragEl());
-                var overlap = curRegion.intersect(loc);
-
-                if (overlap) {
-                    oDDTarget.overlap = overlap;
-                    return true;
-                } else {
-                    return false;
-                }
-
-            } else {
-                return oDDTarget.cursorIsOver;
-            }
-        };
-
-        /**
-         * @private
-         */
-        this._onUnload = function(e, me) {
-            this.unregAll();
-        };
-
-        /**
-         * Cleans up the drag and drop events and objects.
-         *
-         * @private
-         */
-        this.unregAll = function() {
-            this.logger.debug("unregister all");
-
-            if (this.dragCurrent) {
-                this.stopDrag();
-                this.dragCurrent = null;
-            }
-
-            this._execOnAll("unreg", []);
-
-            for (i in this.elementCache) {
-                delete this.elementCache[i];
-            }
-
-            this.elementCache = {};
-            this.ids = {};
-        };
-
-        /**
-         * A cache of DOM elements
-         *
-         * @private
-         */
-        this.elementCache = {};
-
-        /**
-         * Get the wrapper for the DOM element specified
-         *
-         * @param {String} id the id of the elment to get
-         * @return {YAHOO.util.DDM.ElementWrapper} the wrapped element
-         * @private
-         */
-        this.getElWrapper = function(id) {
-            var oWrapper = this.elementCache[id];
-            if (!oWrapper || !oWrapper.el) {
-                // this.logger.debug("adding element cache: " + id);
-                oWrapper = this.elementCache[id] =
-                    new this.ElementWrapper(document.getElementById(id));
-            }
-            return oWrapper;
-        };
-
-        /**
-         * Returns the actual DOM element
-         *
-         * @param {String} id the id of the elment to get
-         * @return {Object} The element
-         */
-        this.getElement = function(id) {
-            // return this.getElWrapper(id).el;
-            return document.getElementById(id);
-        };
-
-        /**
-         * Returns the style property for the DOM element (i.e.,
-         * document.getElById(id).style)
-         *
-         * @param {String} id the id of the elment to get
-         * @return {Object} The style property of the element
-         */
-        this.getCss = function(id) {
-            // return this.getElWrapper(id).css;
-            var css = null;
-            var el = document.getElementById(id);
-            if (el) {
-                css = el.style;
-            }
-
-            return css;
-        };
-
-        /**
-         * Inner class for cached elements
-         */
-        this.ElementWrapper = function(el) {
-                /**
-                 * @private
-                 */
-                this.el = el || null;
-                /**
-                 * @private
-                 */
-                this.id = this.el && el.id;
-                /**
-                 * @private
-                 */
-                this.css = this.el && el.style;
-            };
-
-        /**
-         * Returns the X position of an html element
-         * @param el the element for which to get the position
-         * @return {int} the X coordinate
-         */
-        this.getPosX = function(el) {
-            return YAHOO.util.Dom.getX(el);
-        };
-
-        /**
-         * Returns the Y position of an html element
-         * @param el the element for which to get the position
-         * @return {int} the Y coordinate
-         */
-        this.getPosY = function(el) {
-            return YAHOO.util.Dom.getY(el);
-        };
-
-        /**
-         * Swap two nodes.  In IE, we use the native method, for others we
-         * emulate the IE behavior
-         *
-         * @param n1 the first node to swap
-         * @param n2 the other node to swap
-         */
-        this.swapNode = function(n1, n2) {
-            if (n1.swapNode) {
-                n1.swapNode(n2);
-            } else {
-                // the node reference order for the swap is a little tricky.
-                var p = n2.parentNode;
-                var s = n2.nextSibling;
-                n1.parentNode.replaceChild(n2,n1);
-                p.insertBefore(n1,s);
-            }
-        };
-
-        /**
-         * @private
-         */
-        this.getScroll = function () {
-            var t, l;
-            if (document.documentElement && document.documentElement.scrollTop) {
-                t = document.documentElement.scrollTop;
-                l = document.documentElement.scrollLeft;
-            } else if (document.body) {
-                t = document.body.scrollTop;
-                l = document.body.scrollLeft;
-            }
-            return { top: t, left: l };
-        };
-
-        /**
-         * Returns the specified element style property
-         * @param {HTMLElement} el          the element
-         * @param {string}      styleProp   the style property
-         * @return {string}     The value of the style property
-         */
-        this.getStyle = function(el, styleProp) {
-            if (el.style.styleProp) {
-                return el.style.styleProp;
-            } else if (el.currentStyle) {
-                return el.currentStyle[styleProp];
-            } else if (document.defaultView) {
-                return document.defaultView.getComputedStyle(el, null).
-                    getPropertyValue(styleProp);
-            }
-        };
-
-        /**
-         * Gets the scrollTop
-         *
-         * @return {int} the document's scrollTop
-         */
-        this.getScrollTop = function () { return this.getScroll().top; };
-
-        /**
-         * Gets the scrollLeft
-         *
-         * @return {int} the document's scrollTop
-         */
-        this.getScrollLeft = function () { return this.getScroll().left; };
-
-        this.moveToEl = function (moveEl, targetEl) {
-            var aCoord = YAHOO.util.Dom.getXY(targetEl);
-            this.logger.debug("moveToEl: " + aCoord);
-            YAHOO.util.Dom.setXY(moveEl, aCoord);
-        };
-
-        /**
-         * Gets the client height
-         *
-         * @return {int} client height in px
-         */
-        this.getClientHeight = function() {
-            return (window.innerHeight) ? window.innerHeight :
-                (document.documentElement && document.documentElement.clientHeight) ?
-                document.documentElement.clientHeight : document.body.offsetHeight;
-        };
-
-        /**
-         * Gets the client width
-         *
-         * @return {int} client width in px
-         */
-        this.getClientWidth = function() {
-            return (window.innerWidth) ? window.innerWidth :
-                (document.documentElement && document.documentElement.clientWidth) ?
-                document.documentElement.clientWidth : document.body.offsetWidth;
-        };
-
-        /**
-         * numeric array sort function
-         */
-        this.numericSort = function(a, b) { return (a - b); };
-
-        /**
-         * @private
-         */
-        this._timeoutCount = 0;
-
-        /**
-         * @private
-         * Trying to make the load order less important.  Without this we get
-         * an error if this file is loaded before the Event Utility.
-         */
-        this._addListeners = function() {
-            if ( UTIL.Event &&
-                 document          &&
-                 document.body        ) {
-
-                this._onLoad();
-            } else {
-                if (this._timeoutCount > 500) {
-                    this.logger.debug("DragDrop requires the Event Utility");
-                } else {
-                    setTimeout("YAHOO.util.DDM._addListeners()", 10);
-                    this._timeoutCount += 1;
-                }
-            }
-
-        };
-
-        /**
-         * Recursively searches the immediate parent and all child nodes for
-         * the handle element in order to determine wheter or not it was
-         * clicked.
-         *
-         * @param node the html element to inspect
-         */
-        this.handleWasClicked = function(node, id) {
-            if (this.isHandle(id, node.id)) {
-                this.logger.debug("clicked node is a handle");
-                return true;
-            } else {
-                // check to see if this is a text node child of the one we want
-                var p = node.parentNode;
-                // this.logger.debug("p: " + p);
-
-                while (p) {
-                    if (this.isHandle(id, p.id)) {
-                        return true;
-                    } else {
-                        this.logger.debug(p.id + " is not a handle");
-                        p = p.parentNode;
-                    }
-                }
-            }
-
-            return false;
-        };
-
-    };
-
-    // shorter alias, save a few bytes
-    YAHOO.util.DDM = YAHOO.util.DragDropMgr;
-    YAHOO.util.DDM._addListeners();
-
-}
-
-/* Copyright (c) 2006 Yahoo! Inc. All rights reserved. */
-
-/**
- * @class a DragDrop implementation where the linked element follows the
- * mouse cursor.
- *
- * @extends DragDrop
- * @constructor
- * @param {String} id the id of the linked element
- * @param {String} sGroup the group of related DragDrop items
- */
-YAHOO.util.DD = function(id, sGroup) {
-    if (id) {
-        this.init(id, sGroup);
-        this.logger.setModuleName("DD");
-    }
-};
-
-YAHOO.util.DD.prototype = new YAHOO.util.DragDrop();
-
-/**
- * Should we auto-scroll? Defaults to true
- *
- * @type boolean
- */
-YAHOO.util.DD.prototype.scroll = true;
-
-/**
- * Sets the pointer offset to the distance between the linked element's top
- * left corner and the location the element was clicked
- *
- * @param {int} iPageX the X coordinate of the click
- * @param {int} iPageY the Y coordinate of the click
- */
-YAHOO.util.DD.prototype.autoOffset = function(iPageX, iPageY) {
-    var el = this.getEl();
-    var aCoord = YAHOO.util.Dom.getXY(el);
-    var x = iPageX - aCoord[0];
-    var y = iPageY - aCoord[1];
-    this.setDelta(x, y);
-    this.logger.debug("autoOffset el pos: " + aCoord + ", delta: " + x + "," + y);
-};
-
-/**
- * Sets the pointer offset.  You can call this directly to force the offset to
- * be in a particular location (e.g., pass in 0,0 to set it to the center of the
- * object, as done in ygDDSliderBG)
- *
- * @param {int} iDeltaX the distance from the left
- * @param {int} iDeltaY the distance from the top
- */
-YAHOO.util.DD.prototype.setDelta = function(iDeltaX, iDeltaY) {
-    this.deltaX = iDeltaX;
-    this.deltaY = iDeltaY;
-    this.logger.debug("deltaX:" + this.deltaX + ", deltaY:" + this.deltaY);
-};
-
-/**
- * Sets the drag element to the location of the mousedown or click event,
- * maintaining the cursor location relative to the location on the element
- * that was clicked.  Override this if you want to place the element in a
- * location other than where the cursor is.
- *
- * @param {int} iPageX the X coordinate of the mousedown or drag event
- * @param {int} iPageY the Y coordinate of the mousedown or drag event
- */
-
-YAHOO.util.DD.prototype.setDragElPos = function(iPageX, iPageY) {
-    this.alignElWithMouse(this.getDragEl(), iPageX, iPageY);
-};
-
-/**
- * Sets the element to the location of the mousedown or click event,
- * maintaining the cursor location relative to the location on the element
- * that was clicked.  Override this if you want to place the element in a
- * location other than where the cursor is.
- *
- * @param {HTMLElement} el the element to move
- * @param {int} iPageX the X coordinate of the mousedown or drag event
- * @param {int} iPageY the Y coordinate of the mousedown or drag event
- */
-YAHOO.util.DD.prototype.alignElWithMouse = function(el, iPageX, iPageY) {
-    var oCoord = this.getTargetCoord(iPageX, iPageY);
-    var aCoord = [oCoord.x, oCoord.y];
-    // this.logger.debug("****alignElWithMouse : " + el.id + ", " + aCoord + ", " + el.style.display);
-    YAHOO.util.Dom.setXY(el, aCoord);
-
-    this.cachePosition(oCoord.x, oCoord.y);
-
-    this.autoScroll(oCoord.x, oCoord.y, el.offsetHeight, el.offsetWidth);
-};
-
-/**
- * Saves the most recent position so that we can reset the constraints and
- * tick marks on-demand.  We need to know this so that we can calculate the
- * number of pixels the element is offset from its original position.
- */
-YAHOO.util.DD.prototype.cachePosition = function(iPageX, iPageY) {
-    if (iPageX) {
-        this.lastPageX = iPageX;
-        this.lastPageY = iPageY;
-    } else {
-        var aCoord = YAHOO.util.Dom.getXY(this.getEl());
-        this.lastPageX = aCoord[0];
-        this.lastPageY = aCoord[1];
-    }
-};
-
-/**
- * Auto-scroll the window if the dragged object has been moved beyond the
- * visible window boundary.
- *
- * @param {int} x the drag element's x position
- * @param {int} y the drag element's y position
- * @param {int} h the height of the drag element
- * @param {int} w the width of the drag element
- * @private
- */
-YAHOO.util.DD.prototype.autoScroll = function(x, y, h, w) {
-
-    if (this.scroll) {
-        // The client height
-        var clientH = this.DDM.getClientHeight();
-
-        // The client width
-        var clientW = this.DDM.getClientWidth();
-
-        // The amt scrolled down
-        var st = this.DDM.getScrollTop();
-
-        // The amt scrolled right
-        var sl = this.DDM.getScrollLeft();
-
-        // Location of the bottom of the element
-        var bot = h + y;
-
-        // Location of the right of the element
-        var right = w + x;
-
-        // The distance from the cursor to the bottom of the visible area,
-        // adjusted so that we don't scroll if the cursor is beyond the
-        // element drag constraints
-        var toBot = (clientH + st - y - this.deltaY);
-
-        // The distance from the cursor to the right of the visible area
-        var toRight = (clientW + sl - x - this.deltaX);
-
-        // this.logger.debug( " x: " + x + " y: " + y + " h: " + h +
-        // " clientH: " + clientH + " clientW: " + clientW +
-        // " st: " + st + " sl: " + sl + " bot: " + bot +
-        // " right: " + right + " toBot: " + toBot + " toRight: " + toRight);
-
-        // How close to the edge the cursor must be before we scroll
-        // var thresh = (document.all) ? 100 : 40;
-        var thresh = 40;
-
-        // How many pixels to scroll per autoscroll op.  This helps to reduce
-        // clunky scrolling. IE is more sensitive about this ... it needs this
-        // value to be higher.
-        var scrAmt = (document.all) ? 80 : 30;
-
-        // Scroll down if we are near the bottom of the visible page and the
-        // obj extends below the crease
-        if ( bot > clientH && toBot < thresh ) {
-            window.scrollTo(sl, st + scrAmt);
-        }
-
-        // Scroll up if the window is scrolled down and the top of the object
-        // goes above the top border
-        if ( y < st && st > 0 && y - st < thresh ) {
-            window.scrollTo(sl, st - scrAmt);
-        }
-
-        // Scroll right if the obj is beyond the right border and the cursor is
-        // near the border.
-        if ( right > clientW && toRight < thresh ) {
-            window.scrollTo(sl + scrAmt, st);
-        }
-
-        // Scroll left if the window has been scrolled to the right and the obj
-        // extends past the left border
-        if ( x < sl && sl > 0 && x - sl < thresh ) {
-            window.scrollTo(sl - scrAmt, st);
-        }
-    }
-};
-
-/**
- * Finds the location the element should be placed if we want to move
- * it to where the mouse location less the click offset would place us.
- *
- * @param {int} iPageX the X coordinate of the click
- * @param {int} iPageY the Y coordinate of the click
- * @return an object that contains the coordinates (Object.x and Object.y)
- * @private
- */
-YAHOO.util.DD.prototype.getTargetCoord = function(iPageX, iPageY) {
-
-    // this.logger.debug("getTargetCoord: " + iPageX + ", " + iPageY);
-
-    var x = iPageX - this.deltaX;
-    var y = iPageY - this.deltaY;
-
-    if (this.constrainX) {
-        if (x < this.minX) { x = this.minX; }
-        if (x > this.maxX) { x = this.maxX; }
-    }
-
-    if (this.constrainY) {
-        if (y < this.minY) { y = this.minY; }
-        if (y > this.maxY) { y = this.maxY; }
-    }
-
-    x = this.getTick(x, this.xTicks);
-    y = this.getTick(y, this.yTicks);
-
-    // this.logger.debug("getTargetCoord " +
-            // " iPageX: " + iPageX +
-            // " iPageY: " + iPageY +
-            // " x: " + x + ", y: " + y);
-
-    return {x:x, y:y};
-};
-
-// overrides YAHOO.util.DragDrop
-YAHOO.util.DD.prototype.b4MouseDown = function(e) {
-    // this.resetConstraints();
-    this.autoOffset(YAHOO.util.Event.getPageX(e),
-                        YAHOO.util.Event.getPageY(e));
-};
-
-// overrides YAHOO.util.DragDrop
-YAHOO.util.DD.prototype.b4Drag = function(e) {
-    this.setDragElPos(YAHOO.util.Event.getPageX(e),
-                        YAHOO.util.Event.getPageY(e));
-};
-
-
-///////////////////////////////////////////////////////////////////////////////
-// Debugging ygDragDrop events that can be overridden
-///////////////////////////////////////////////////////////////////////////////
-/*
-YAHOO.util.DD.prototype.startDrag = function(x, y) {
-    this.logger.debug(this.id.toString()  + " startDrag");
-};
-
-YAHOO.util.DD.prototype.onDrag = function(e) {
-    this.logger.debug(this.id.toString() + " onDrag");
-};
-
-YAHOO.util.DD.prototype.onDragEnter = function(e, id) {
-    this.logger.debug(this.id.toString() + " onDragEnter: " + id);
-};
-
-YAHOO.util.DD.prototype.onDragOver = function(e, id) {
-    this.logger.debug(this.id.toString() + " onDragOver: " + id);
-};
-
-YAHOO.util.DD.prototype.onDragOut = function(e, id) {
-    this.logger.debug(this.id.toString() + " onDragOut: " + id);
-};
-
-YAHOO.util.DD.prototype.onDragDrop = function(e, id) {
-    this.logger.debug(this.id.toString() + " onDragDrop: " + id);
-};
-
-YAHOO.util.DD.prototype.endDrag = function(e) {
-    this.logger.debug(this.id.toString() + " endDrag");
-};
-*/
-
-/* Copyright (c) 2006 Yahoo! Inc. All rights reserved. */
-
-/**
- * @class a DragDrop implementation that inserts an empty, bordered div into
- * the document that follows the cursor during drag operations.  At the time of
- * the click, the frame div is resized to the dimensions of the linked html
- * element, and moved to the exact location of the linked element.
- *
- * @extends YAHOO.util.DD
- * @constructor
- * @param {String} id the id of the linked html element
- * @param {String} sGroup the group of related DragDrop objects
- */
-YAHOO.util.DDProxy = function(id, sGroup) {
-    if (id) {
-        this.init(id, sGroup);
-        this.initFrame();
-        this.logger.setModuleName("DDProxy");
-    }
-};
-
-YAHOO.util.DDProxy.prototype = new YAHOO.util.DD();
-
-/**
- * A reference to the one div element we create for all instances of this class
- *
- * @type Object
- */
-YAHOO.util.DDProxy.frameDiv = null;
-
-/**
- * the drag frame div id
- *
- * @type String
- */
-YAHOO.util.DDProxy.dragElId = "ygddfdiv";
-
-/**
- * The border width of the frame.  This is used when we resize the frame to
- * the size of the linked element.  We substract the border width to make
- * the div the correct size.
- *
- * @TODO find a better way to handle this
- *
- * @type int
- */
-YAHOO.util.DDProxy.prototype.borderWidth = 2;
-
-/**
- * By default we resize the drag frame to be the same size as the element
- * we want to drag (this is to get the frame effect).  We can turn it off
- * if we want a different behavior (ex: ygDDMy2)
- *
- * @type boolean
- */
-YAHOO.util.DDProxy.prototype.resizeFrame = true;
-
-/**
- * By default the frame is positioned exactly where the drag element is, so
- * we use the cursor offset provided by YAHOO.util.DD.  Another option that works only if
- * you do not have constraints on the obj is to have the drag frame centered
- * around the cursor.  Set centerFrame to true for this effect.  Ex:
- * ygDDMy2
- *
- * @type boolean
- */
-YAHOO.util.DDProxy.prototype.centerFrame = false;
-
-/**
- * Create the drag frame if needed
- */
-YAHOO.util.DDProxy.createFrame = function() {
-    var THIS = YAHOO.util.DDProxy;
-
-    if (!document || !document.body) {
-        setTimeout(THIS.createFrame, 50);
-        return;
-    }
-
-    if (!THIS.frameDiv) {
-        THIS.frameDiv = document.createElement("div");
-        THIS.frameDiv.id = THIS.dragElId;
-        var s = THIS.frameDiv.style;
-        s.position = "absolute";
-        s.visibility = "hidden";
-        s.cursor = "move";
-        s.border = "2px solid #aaa";
-        s.zIndex = 999;
-
-        document.body.appendChild(THIS.frameDiv);
-    }
-};
-
-/**
- * Initialization for the drag frame element.  Must be called in the
- * constructor of all subclasses
- */
-YAHOO.util.DDProxy.prototype.initFrame = function() {
-    YAHOO.util.DDProxy.createFrame();
-    this.setDragElId(YAHOO.util.DDProxy.dragElId);
-    this.useAbsMath = true;
-};
-
-/**
- * Resizes the drag frame to the dimensions of the clicked object, positions
- * it over the object, and finally displays it
- *
- * @param {int} iPageX X click position
- * @param {int} iPageY Y click position
- * @private
- */
-YAHOO.util.DDProxy.prototype.showFrame = function(iPageX, iPageY) {
-    var el = this.getEl();
-
-    var s = this.getDragEl().style;
-
-    if (this.resizeFrame) {
-        s.width = (parseInt(el.offsetWidth) - (2*this.borderWidth)) + "px";
-        s.height = (parseInt(el.offsetHeight) - (2*this.borderWidth)) + "px";
-    }
-
-    if (this.centerFrame) {
-        this.setDelta(Math.round(parseInt(s.width)/2),
-                Math.round(parseInt(s.width)/2));
-    }
-
-    this.setDragElPos(iPageX, iPageY);
-
-    s.visibility = "";
-};
-
-// overrides YAHOO.util.DragDrop
-YAHOO.util.DDProxy.prototype.b4MouseDown = function(e) {
-    var x = YAHOO.util.Event.getPageX(e);
-    var y = YAHOO.util.Event.getPageY(e);
-    this.autoOffset(x, y);
-    this.setDragElPos(x, y);
-};
-
-// overrides YAHOO.util.DragDrop
-YAHOO.util.DDProxy.prototype.b4StartDrag = function(x, y) {
-    // show the drag frame
-    this.logger.debug("start drag show frame, x: " + x + ", y: " + y);
-    this.showFrame(x, y);
-};
-
-// overrides YAHOO.util.DragDrop
-YAHOO.util.DDProxy.prototype.b4EndDrag = function(e) {
-    this.logger.debug(this.id + " b4EndDrag");
-
-    // hide the drag frame
-    var s = this.getDragEl().style;
-    s.visibility = "hidden";
-};
-
-// overrides YAHOO.util.DragDrop
-// By default we try to move the element to the last location of the frame.
-// This is so that the default behavior mirrors that of YAHOO.util.DD.
-YAHOO.util.DDProxy.prototype.endDrag = function(e) {
-    this.logger.debug(this.id + " endDrag");
-    var lel = this.getEl();
-    var del = this.getDragEl();
-
-    // Show the drag frame briefly so we can get its position
-    del.style.visibility = "";
-
-    // Hide the linked element before the move to get around a Safari
-    // rendering bug.
-    lel.style.visibility = "hidden";
-    YAHOO.util.DDM.moveToEl(lel, del);
-    del.style.visibility = "hidden";
-    lel.style.visibility = "";
-};
-
-/* Copyright (c) 2006 Yahoo! Inc. All rights reserved. */
-
-/**
- * @class a DragDrop implementation that does not move, but can be a drop
- * target.  You would get the same result by simply omitting implementation
- * for the event callbacks, but this way we reduce the processing cost of the
- * event listener and the callbacks.
- *
- * @extends YAHOO.util.DragDrop
- * @constructor
- * @param {String} id the id of the element that is a drop target
- * @param {String} sGroup the group of related DragDrop objects
- */
-
-YAHOO.util.DDTarget = function(id, sGroup) {
-    if (id) {
-        this.initTarget(id, sGroup);
-        this.logger.setModuleName("DDTarget");
-    }
-};
-
-YAHOO.util.DDTarget.prototype = new YAHOO.util.DragDrop();
-
Index: in/trunk/greenstone3/web/interfaces/oran/js/dragdrop.js
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/js/dragdrop.js	(revision 24017)
+++ 	(revision )
@@ -1,2426 +1,0 @@
-/*
-Copyright (c) 2006 Yahoo! Inc. All rights reserved.
-version 0.9.0
-*/
-
-/**
- * @class Defines the interface and base operation of items that that can be
- * dragged or can be drop targets.  It was designed to be extended, overriding
- * the event handlers for startDrag, onDrag, onDragOver, onDragOut.
- * Up to three html elements can be associated with a DragDrop instance:
- * <ul>
- * <li>linked element: the element that is passed into the constructor.
- * This is the element which defines the boundaries for interaction with
- * other DragDrop objects.</li>
- * <li>handle element(s): The drag operation only occurs if the element that
- * was clicked matches a handle element.  By default this is the linked
- * element, but there are times that you will want only a portion of the
- * linked element to initiate the drag operation, and the setHandleElId()
- * method provides a way to define this.</li>
- * <li>drag element: this represents an the element that would be moved along
- * with the cursor during a drag operation.  By default, this is the linked
- * element itself as in {@link YAHOO.util.DD}.  setDragElId() lets you define
- * a separate element that would be moved, as in {@link YAHOO.util.DDProxy}
- * </li>
- * </ul>
- * This class should not be instantiated until the onload event to ensure that
- * the associated elements are available.
- * The following would define a DragDrop obj that would interact with any
- * other * DragDrop obj in the "group1" group:
- * <pre>
- *  dd = new YAHOO.util.DragDrop("div1", "group1");
- * </pre>
- * Since none of the event handlers have been implemented, nothing would
- * actually happen if you were to run the code above.  Normally you would
- * override this class or one of the default implementations, but you can
- * also override the methods you want on an instance of the class...
- * <pre>
- *  dd.onDragDrop = function(e, id) {
- *   alert("dd was dropped on " + id);
- *  }
- * </pre>
- * @constructor
- * @param {String} id of the element that is linked to this instance
- * @param {String} sGroup the group of related DragDrop objects
- */
-YAHOO.util.DragDrop = function(id, sGroup) {
-    if (id) {
-        this.init(id, sGroup);
-    }
-};
-
-YAHOO.util.DragDrop.prototype = {
-
-    /**
-     * The id of the element associated with this object.  This is what we
-     * refer to as the "linked element" because the size and position of
-     * this element is used to determine when the drag and drop objects have
-     * interacted.
-     *
-     * @type String
-     */
-    id: null,
-
-    /**
-     * The id of the element that will be dragged.  By default this is same
-     * as the linked element , but could be changed to another element. Ex:
-     * YAHOO.util.DDProxy
-     *
-     * @type String
-     * @private
-     */
-    dragElId: null,
-
-    /**
-     * the id of the element that initiates the drag operation.  By default
-     * this is the linked element, but could be changed to be a child of this
-     * element.  This lets us do things like only starting the drag when the
-     * header element within the linked html element is clicked.
-     *
-     * @type String
-     * @private
-     */
-    handleElId: null,
-
-    /**
-     * An array of HTML tags that will be ignored if clicked.
-     */
-    invalidHandleTypes: null,
-
-    /**
-     * The linked element's absolute X position at the time the drag was
-     * started
-     *
-     * @type int
-     * @private
-     */
-    startPageX: 0,
-
-    /**
-     * The linked element's absolute X position at the time the drag was
-     * started
-     *
-     * @type int
-     * @private
-     */
-    startPageY: 0,
-
-    /**
-     * The group defines a logical collection of DragDrop objects that are
-     * related.  Instances only get events when interacting with other
-     * DragDrop object in the same group.  This lets us define multiple
-     * groups using a single DragDrop subclass if we want.
-     *
-     */
-    groups: null,
-
-    /**
-     * Individual drag/drop instances can be locked.  This will prevent
-     * onmousedown start drag.
-     *
-     * @type boolean
-     * @private
-     */
-    locked: false,
-
-    /**
-     * Lock this instance
-     */
-    lock: function() { this.locked = true; },
-
-    /**
-     * Unlock this instace
-     */
-    unlock: function() { this.locked = false; },
-
-    /**
-     * By default, all insances can be a drop target.  This can be disabled by
-     * setting isTarget to false.
-     *
-     * @type boolean
-     */
-    isTarget: true,
-
-    /**
-     * The padding configured for this drag and drop object for calculating
-     * the drop zone intersection with this object.
-     */
-    padding: null,
-
-    /**
-     * @private
-     */
-    _domRef: null,
-
-    /**
-     * Internal typeof flag
-     * @private
-     */
-    __ygDragDrop: true,
-
-    /**
-     * Set to true when horizontal contraints are applied
-     *
-     * @type boolean
-     * @private
-     */
-    constrainX: false,
-
-    /**
-     * Set to true when vertical contraints are applied
-     *
-     * @type boolean
-     * @private
-     */
-    constrainY: false,
-
-    /**
-     * The left constraint
-     *
-     * @type int
-     * @private
-     */
-    minX: 0,
-
-    /**
-     * The right constraint
-     *
-     * @type int
-     * @private
-     */
-    maxX: 0,
-
-    /**
-     * The up constraint
-     *
-     * @type int
-     * @private
-     */
-    minY: 0,
-
-    /**
-     * The down constraint
-     *
-     * @type int
-     * @private
-     */
-    maxY: 0,
-
-    /**
-     * Maintain offsets when we resetconstraints.  Used to maintain the
-     * slider thumb value, and this needs to be fixed.
-     * @type boolean
-     */
-    maintainOffset: false,
-
-    /**
-     * Array of pixel locations the element will snap to if we specified a
-     * horizontal graduation/interval.  This array is generated automatically
-     * when you define a tick interval.
-     * @type int[]
-     */
-    xTicks: null,
-
-    /**
-     * Array of pixel locations the element will snap to if we specified a
-     * vertical graduation/interval.  This array is generated automatically
-     * when you define a tick interval.
-     * @type int[]
-     */
-    yTicks: null,
-
-    /**
-     * By default the drag and drop instance will only respond to the primary
-     * button click (left button for a right-handed mouse).  Set to true to
-     * allow drag and drop to start with any mouse click that is propogated
-     * by the browser
-     * @type boolean
-     */
-    primaryButtonOnly: true,
-
-    /**
-     * Code that executes immediately before the startDrag event
-     * @private
-     */
-    b4StartDrag: function(x, y) { },
-
-    /**
-     * Abstract method called after a drag/drop object is clicked
-     * and the drag or mousedown time thresholds have beeen met.
-     *
-     * @param {int} X click location
-     * @param {int} Y click location
-     */
-    startDrag: function(x, y) { /* override this */ },
-
-    /**
-     * Code that executes immediately before the onDrag event
-     * @private
-     */
-    b4Drag: function(e) { },
-
-    /**
-     * Abstract method called during the onMouseMove event while dragging an
-     * object.
-     *
-     * @param {Event} e
-     */
-    onDrag: function(e) { /* override this */ },
-
-    /**
-     * Code that executes immediately before the onDragEnter event
-     * @private
-     */
-    // b4DragEnter: function(e) { },
-
-    /**
-     * Abstract method called when this element fist begins hovering over
-     * another DragDrop obj
-     *
-     * @param {Event} e
-     * @param {String || YAHOO.util.DragDrop[]} id In POINT mode, the element
-     * id this is hovering over.  In INTERSECT mode, an array of one or more
-     * dragdrop items being hovered over.
-     */
-    onDragEnter: function(e, id) { /* override this */ },
-
-    /**
-     * Code that executes immediately before the onDragOver event
-     * @private
-     */
-    b4DragOver: function(e) { },
-
-    /**
-     * Abstract method called when this element is hovering over another
-     * DragDrop obj
-     *
-     * @param {Event} e
-     * @param {String || YAHOO.util.DragDrop[]} id In POINT mode, the element
-     * id this is hovering over.  In INTERSECT mode, an array of dd items
-     * being hovered over.
-     */
-    onDragOver: function(e, id) { /* override this */ },
-
-    /**
-     * Code that executes immediately before the onDragOut event
-     * @private
-     */
-    b4DragOut: function(e) { },
-
-    /**
-     * Abstract method called when we are no longer hovering over an element
-     *
-     * @param {Event} e
-     * @param {String || YAHOO.util.DragDrop[]} id In POINT mode, the element
-     * id this was hovering over.  In INTERSECT mode, an array of dd items
-     * that the mouse is no longer over.
-     */
-    onDragOut: function(e, id) { /* override this */ },
-
-    /**
-     * Code that executes immediately before the onDragDrop event
-     * @private
-     */
-    b4DragDrop: function(e) { },
-
-    /**
-     * Abstract method called when this item is dropped on another DragDrop
-     * obj
-     *
-     * @param {Event} e
-     * @param {String || YAHOO.util.DragDrop[]} id In POINT mode, the element
-     * id this was dropped on.  In INTERSECT mode, an array of dd items this
-     * was dropped on.
-     */
-    onDragDrop: function(e, id) { /* override this */ },
-
-    /**
-     * Code that executes immediately before the endDrag event
-     * @private
-     */
-    b4EndDrag: function(e) { },
-
-    /**
-     * Fired when we are done dragging the object
-     *
-     * @param {Event} e
-     */
-    endDrag: function(e) { /* override this */ },
-
-    /**
-     * Code executed immediately before the onMouseDown event
-
-     * @param {Event} e
-     * @private
-     */
-    b4MouseDown: function(e) {  },
-
-    /**
-     * Event handler that fires when a drag/drop obj gets a mousedown
-     * @param {Event} e
-     */
-    onMouseDown: function(e) { /* override this */ },
-
-    /**
-     * Event handler that fires when a drag/drop obj gets a mouseup
-     * @param {Event} e
-     */
-    onMouseUp: function(e) { /* override this */ },
-
-    /**
-     * Returns a reference to the linked element
-     *
-     * @return {Object} the html element
-     */
-    getEl: function() {
-        if (!this._domRef) {
-            this._domRef = this.DDM.getElement(this.id);
-        }
-
-        return this._domRef;
-    },
-
-    /**
-     * Returns a reference to the actual element to drag.  By default this is
-     * the same as the html element, but it can be assigned to another
-     * element. An example of this can be found in YAHOO.util.DDProxy
-     *
-     * @return {Object} the html element
-     */
-    getDragEl: function() {
-        return this.DDM.getElement(this.dragElId);
-    },
-
-    /**
-     * Sets up the DragDrop object.  Must be called in the constructor of any
-     * YAHOO.util.DragDrop subclass
-     *
-     * @param id the id of the linked element
-     * @param {String} sGroup the group of related items
-     * element is supposed to be a target only, set to false.
-     */
-    init: function(id, sGroup) {
-        this.initTarget(id, sGroup);
-        YAHOO.util.Event.addListener(id, "mousedown",
-                                          this.handleMouseDown, this, true);
-    },
-
-    /**
-     * Initializes Targeting functionality only... the object does not
-     * get a mousedown handler.
-     *
-     * @param id the id of the linked element
-     * @param {String} sGroup the group of related items
-     * element is supposed to be a target only, set to false.
-     */
-    initTarget: function(id, sGroup) {
-
-        // create a local reference to the drag and drop manager
-        this.DDM = YAHOO.util.DDM;
-
-
-        // set the default padding
-        this.padding = [0, 0, 0, 0];
-
-        // initialize the groups array
-        this.groups = {};
-
-        // set the id
-        this.id = id;
-
-        // the element is a drag handle by default
-        this.setDragElId(id);
-
-        // by default, clicked anchors will not start drag operations
-        this.invalidHandleTypes = {a : "a"};
-
-        // We don't want to register this as the handle with the manager
-        // so we just set the id rather than calling the setter
-        this.handleElId = id;
-
-        // cache the position of the element if we can
-        if (document && document.body) {
-            this.setInitPosition();
-        }
-
-        // add to an interaction group
-        this.addToGroup((sGroup) ? sGroup : "default");
-
-    },
-
-    /**
-     * Configures the padding for the target zone in px.  Effectively expands
-     * (or reduces) the virtual object size for targeting calculations.
-     * Supports css-style shorthand; if only one parameter is passed, all sides
-     * will have that padding, and if only two are passed, the top and bottom
-     * will have the first param, the left and right the second.
-     * @param {int} iTop    Top pad
-     * @param {int} iRight  Right pad
-     * @param {int} iBot    Bot pad
-     * @param {int} iLeft   Left pad
-     */
-    setPadding: function(iTop, iRight, iBot, iLeft) {
-        // this.padding = [iLeft, iRight, iTop, iBot];
-        if (!iRight && 0 !== iRight) {
-            this.padding = [iTop, iTop, iTop, iTop];
-        } else if (!iBot && 0 !== iBot) {
-            this.padding = [iTop, iRight, iTop, iRight];
-        } else {
-            this.padding = [iTop, iRight, iBot, iLeft];
-        }
-    },
-
-    /**
-     * Stores the initial placement of the dd element
-     */
-    setInitPosition: function(diffX, diffY) {
-        var el = this.getEl();
-
-        if (!this.DDM.verifyEl(el)) {
-            return;
-        }
-
-        var dx = diffX || 0;
-        var dy = diffY || 0;
-
-        var p = YAHOO.util.Dom.getXY( el );
-
-        this.initPageX = p[0] - dx;
-        this.initPageY = p[1] - dy;
-
-        this.lastPageX = p[0];
-        this.lastPageY = p[1];
-
-        this.setStartPosition(p);
-    },
-
-    /**
-     * Sets the start position of the element.  This is set when the obj
-     * is initialized, the reset when a drag is started.
-     * @param pos current position (from previous lookup)
-     * @private
-     */
-    setStartPosition: function(pos) {
-
-        var p = pos || YAHOO.util.Dom.getXY( this.getEl() );
-
-        this.startPageX = p[0];
-        this.startPageY = p[1];
-    },
-
-    /**
-     * Add this instance to a group of related drag/drop objects.  All
-     * instances belong to at least one group, and can belong to as many
-     * groups as needed.
-     *
-     * @param sGroup {string} the name of the group
-     */
-    addToGroup: function(sGroup) {
-        this.groups[sGroup] = true;
-        this.DDM.regDragDrop(this, sGroup);
-    },
-
-    /**
-     * Allows you to specify that an element other than the linked element
-     * will be moved with the cursor during a drag
-     *
-     * @param id the id of the element that will be used to initiate the drag
-     */
-    setDragElId: function(id) {
-        this.dragElId = id;
-    },
-
-    /**
-     * Allows you to specify a child of the linked element that should be
-     * used to initiate the drag operation.  An example of this would be if
-     * you have a content div with text and links.  Clicking anywhere in the
-     * content area would normally start the drag operation.  Use this method
-     * to specify that an element inside of the content div is the element
-     * that starts the drag operation.
-     *
-     * @param id the id of the element that will be used to initiate the drag
-     */
-    setHandleElId: function(id) {
-        this.handleElId = id;
-        this.DDM.regHandle(this.id, id);
-    },
-
-    /**
-     * Allows you to set an element outside of the linked element as a drag
-     * handle
-     */
-    setOuterHandleElId: function(id) {
-        YAHOO.util.Event.addListener(id, "mousedown",
-                this.handleMouseDown, this, true);
-        this.setHandleElId(id);
-    },
-
-    /**
-     * Remove all drag and drop hooks for this element
-     */
-    unreg: function() {
-        YAHOO.util.Event.removeListener(this.id, "mousedown",
-                this.handleMouseDown);
-        this._domRef = null;
-        this.DDM._remove(this);
-    },
-
-    /**
-     * Returns true if this instance is locked, or the drag drop mgr is locked
-     * (meaning that all drag/drop is disabled on the page.)
-     *
-     * @return {boolean} true if this obj or all drag/drop is locked, else
-     * false
-     */
-    isLocked: function() {
-        return (this.DDM.isLocked() || this.locked);
-    },
-
-    /**
-     * Fired when this object is clicked
-     *
-     * @param {Event} e
-     * @param {YAHOO.util.DragDrop} oDD the clicked dd object (this dd obj)
-     * @private
-     */
-    handleMouseDown: function(e, oDD) {
-
-
-        var EU = YAHOO.util.Event;
-
-
-        var button = e.which || e.button;
-
-        if (this.primaryButtonOnly && button > 1) {
-            return;
-        }
-
-        if (this.isLocked()) {
-            return;
-        }
-
-
-        this.DDM.refreshCache(this.groups);
-
-        // Only process the event if we really clicked within the linked
-        // element.  The reason we make this check is that in the case that
-        // another element was moved between the clicked element and the
-        // cursor in the time between the mousedown and mouseup events. When
-        // this happens, the element gets the next mousedown event
-        // regardless of where on the screen it happened.
-        var pt = new YAHOO.util.Point(EU.getPageX(e), EU.getPageY(e));
-        if ( this.DDM.isOverTarget(pt, this) )  {
-
-
-            //  check to see if the handle was clicked
-            var srcEl = EU.getTarget(e);
-
-            if (this.isValidHandleChild(srcEl) &&
-                    (this.id == this.handleElId ||
-                     this.DDM.handleWasClicked(srcEl, this.id)) ) {
-
-                // set the initial element position
-                this.setStartPosition();
-
-
-                this.b4MouseDown(e);
-                this.onMouseDown(e);
-                this.DDM.handleMouseDown(e, this);
-
-                this.DDM.stopEvent(e);
-            }
-        }
-    },
-
-    /**
-     * Allows you to specify a tag name that should not start a drag operation
-     * when clicked.  This is designed to facilitate embedding links within a
-     * drag handle that do something other than start the drag.
-     *
-     * @param {string} tagName the type of element to exclude
-     */
-    addInvalidHandleType: function(tagName) {
-        var type = tagName.toUpperCase();
-        this.invalidHandleTypes[type] = type;
-    },
-
-    /**
-     * Unsets an excluded tag name set by addInvalidHandleType
-     *
-     * @param {string} tagName the type of element to unexclude
-     */
-    removeInvalidHandleType: function(tagName) {
-        var type = tagName.toUpperCase();
-        this.invalidHandleTypes[type] = null;
-    },
-
-    /**
-     * Checks the tag exclusion list to see if this click should be ignored
-     *
-     * @param {ygNode} node
-     * @return {boolean} true if this is a valid tag type, false if not
-     */
-    isValidHandleChild: function(node) {
-        var type = node.nodeName;
-
-        if (type == "#text") {
-            type = node.parentNode.nodeName;
-        }
-
-        return (!this.invalidHandleTypes[type]);
-    },
-
-    /**
-     * Create the array of horizontal tick marks if an interval was specified
-     * in setXConstraint().
-     *
-     * @private
-     */
-    setXTicks: function(iStartX, iTickSize) {
-        this.xTicks = [];
-        this.xTickSize = iTickSize;
-
-        var tickMap = {};
-
-        for (var i = this.initPageX; i >= this.minX; i = i - iTickSize) {
-            if (!tickMap[i]) {
-                this.xTicks[this.xTicks.length] = i;
-                tickMap[i] = true;
-            }
-        }
-
-        for (i = this.initPageX; i <= this.maxX; i = i + iTickSize) {
-            if (!tickMap[i]) {
-                this.xTicks[this.xTicks.length] = i;
-                tickMap[i] = true;
-            }
-        }
-
-        this.xTicks.sort(this.DDM.numericSort) ;
-    },
-
-    /**
-     * Create the array of vertical tick marks if an interval was specified in
-     * setYConstraint().
-     *
-     * @private
-     */
-    setYTicks: function(iStartY, iTickSize) {
-        this.yTicks = [];
-        this.yTickSize = iTickSize;
-
-        var tickMap = {};
-
-        for (var i = this.initPageY; i >= this.minY; i = i - iTickSize) {
-            if (!tickMap[i]) {
-                this.yTicks[this.yTicks.length] = i;
-                tickMap[i] = true;
-            }
-        }
-
-        for (i = this.initPageY; i <= this.maxY; i = i + iTickSize) {
-            if (!tickMap[i]) {
-                this.yTicks[this.yTicks.length] = i;
-                tickMap[i] = true;
-            }
-        }
-
-        this.yTicks.sort(this.DDM.numericSort) ;
-    },
-
-    /**
-     * By default, the element can be dragged any place on the screen.  Use
-     * this method to limit the horizontal travel of the element.  Pass in
-     * 0,0 for the parameters if you want to lock the drag to the y axis.
-     *
-     * @param {int} iLeft the number of pixels the element can move to the left
-     * @param {int} iRight the number of pixels the element can move to the
-     * right
-     * @param {int} iTickSize optional parameter for specifying that the
-     * element
-     * should move iTickSize pixels at a time.
-     */
-    setXConstraint: function(iLeft, iRight, iTickSize) {
-        this.leftConstraint = iLeft;
-        this.rightConstraint = iRight;
-
-        this.minX = this.initPageX - iLeft;
-        this.maxX = this.initPageX + iRight;
-        if (iTickSize) { this.setXTicks(this.initPageX, iTickSize); }
-
-        this.constrainX = true;
-    },
-
-    /**
-     * By default, the element can be dragged any place on the screen.  Set
-     * this to limit the vertical travel of the element.  Pass in 0,0 for the
-     * parameters if you want to lock the drag to the x axis.
-     *
-     * @param {int} iUp the number of pixels the element can move up
-     * @param {int} iDown the number of pixels the element can move down
-     * @param {int} iTickSize optional parameter for specifying that the
-     * element should move iTickSize pixels at a time.
-     */
-    setYConstraint: function(iUp, iDown, iTickSize) {
-        this.topConstraint = iUp;
-        this.bottomConstraint = iDown;
-
-        this.minY = this.initPageY - iUp;
-        this.maxY = this.initPageY + iDown;
-        if (iTickSize) { this.setYTicks(this.initPageY, iTickSize); }
-
-        this.constrainY = true;
-
-    },
-
-    /**
-     * resetConstraints must be called if you manually reposition a dd element.
-     * @param {boolean} maintainOffset
-     */
-    resetConstraints: function() {
-
-
-        // figure out how much this thing has moved
-        var dx = (this.maintainOffset) ? this.lastPageX - this.initPageX : 0;
-        var dy = (this.maintainOffset) ? this.lastPageY - this.initPageY : 0;
-
-
-        // reset the initial location
-        this.setInitPosition(dx, dy);
-
-        if (this.constrainX) {
-            this.setXConstraint( this.leftConstraint,
-                                 this.rightConstraint,
-                                 this.xTickSize        );
-        }
-
-        if (this.constrainY) {
-            this.setYConstraint( this.topConstraint,
-                                 this.bottomConstraint,
-                                 this.yTickSize         );
-        }
-    },
-
-    /**
-     * Normally the drag element is moved pixel by pixel, but we can specify
-     * that it move a number of pixels at a time.  This method resolves the
-     * location when we have it set up like this.
-     *
-     * @param {int} val where we want to place the object
-     * @param {int[]} tickArray sorted array of valid points
-     * @return {int} the closest tick
-     * @private
-     */
-    getTick: function(val, tickArray) {
-
-        if (!tickArray) {
-            // If tick interval is not defined, it is effectively 1 pixel,
-            // so we return the value passed to us.
-            return val;
-        } else if (tickArray[0] >= val) {
-            // The value is lower than the first tick, so we return the first
-            // tick.
-            return tickArray[0];
-        } else {
-            for (var i = 0; i < tickArray.length; ++i) {
-                var next = i + 1;
-                if (tickArray[next] && tickArray[next] >= val) {
-                    var diff1 = val - tickArray[i];
-                    var diff2 = tickArray[next] - val;
-                    return (diff2 > diff1) ? tickArray[i] : tickArray[next];
-                }
-            }
-
-            // The value is larger than the last tick, so we return the last
-            // tick.
-            return tickArray[tickArray.length - 1];
-        }
-    },
-
-    /**
-     * toString method
-     * @return {string} string representation of the dd obj
-     */
-    toString: function(val, tickArray) {
-        return ("YAHOO.util.DragDrop {" + this.id + "}");
-    }
-
-};
-
-/* Copyright (c) 2006 Yahoo! Inc. All rights reserved. */
-
-// Only load the library once.  Rewriting the manager class would orphan
-// existing drag and drop instances.
-if (!YAHOO.util.DragDropMgr) {
-
-    /**
-     * @class Handles the element interaction for all DragDrop items in the
-     * window.  Generally, you will not call this class directly, but it does
-     * have helper methods that could be useful in your DragDrop
-     * implementations.  This class should not be instantiated; all methods
-     * are are static.
-     *
-     * @constructor
-     */
-    YAHOO.util.DragDropMgr = new function() {
-
-        /**
-         * utility package shorthand
-         * @private
-         */
-        var UTIL = YAHOO.util;
-
-        /**
-         * Two dimensional Array of registered DragDrop objects.  The first
-         * dimension is the DragDrop item group, the second the DragDrop
-         * object.
-         *
-         * @private
-         */
-        this.ids = {};
-
-        /**
-         * Array of element ids defined as drag handles.  Used to determine
-         * if the element that generated the mousedown event is actually the
-         * handle and not the html element itself.
-         *
-         * @private
-         */
-        this.handleIds = {};
-
-        /**
-         * the DragDrop object that is currently being dragged
-         *
-         * @type DragDrop
-         * @private
-         **/
-        this.dragCurrent = null;
-
-        /**
-         * the DragDrop object(s) that are being hovered over
-         *
-         * @type Array
-         * @private
-         */
-        this.dragOvers = {};
-
-        /**
-         * @private
-         */
-
-        /**
-         * the X distance between the cursor and the object being dragged
-         *
-         * @type int
-         * @private
-         */
-        this.deltaX = 0;
-
-        /**
-         * the Y distance between the cursor and the object being dragged
-         *
-         * @type int
-         * @private
-         */
-        this.deltaY = 0;
-
-        /**
-         * Flag to determine if we should prevent the default behavior of the
-         * events we define. By default this is true, but this can be set to
-         * false if you need the default behavior (not recommended)
-         *
-         * @type boolean
-         */
-        this.preventDefault = true;
-
-        /**
-         * Flag to determine if we should stop the propagation of the events
-         * we generate. This is true by default but you may want to set it to
-         * false if the html element contains other features that require the
-         * mouse click.
-         *
-         * @type boolean
-         */
-        this.stopPropagation = true;
-
-        /**
-         * @private
-         */
-        this.initalized = false;
-
-        /**
-         * All drag and drop can be disabled.
-         *
-         * @private
-         */
-        this.locked = false;
-
-        /**
-         * Called the first time an element is registered.
-         *
-         * @private
-         */
-        this.init = function() {
-        };
-
-        /**
-         * In point mode, drag and drop interaction is defined by the
-         * location of the cursor during the drag/drop
-         * @type int
-         */
-        this.POINT     = 0;
-
-        /**
-         * In intersect mode, drag and drop interactio nis defined by the
-         * overlap of two or more drag and drop objects.
-         * @type int
-         */
-        this.INTERSECT = 1;
-
-        /**
-         * The current drag and drop mode.  Default it point mode
-         * @type int
-         */
-        this.mode = this.POINT;
-
-        /**
-         * Runs method on all drag and drop objects
-         * @private
-         */
-        this._execOnAll = function(sMethod, args) {
-            for (var i in this.ids) {
-                for (var j in this.ids[i]) {
-                    var oDD = this.ids[i][j];
-                    if (! this.isTypeOfDD(oDD)) {
-                        continue;
-                    }
-                    oDD[sMethod].apply(oDD, args);
-                }
-            }
-        };
-
-        /**
-         * Drag and drop initialization.  Sets up the global event handlers
-         * @private
-         */
-        this._onLoad = function() {
-
-            this._execOnAll("setInitPosition", []);
-
-
-            var EU = UTIL.Event;
-
-            EU.addListener(document, "mouseup",   this.handleMouseUp, this, true);
-            EU.addListener(document, "mousemove", this.handleMouseMove, this, true);
-            EU.addListener(window,   "unload",    this._onUnload, this, true);
-            EU.addListener(window,   "resize",    this._onResize, this, true);
-            // EU.addListener(window,   "mouseout",    this._test);
-
-            this.initalized = true;
-
-        };
-
-        /**
-         * Reset constraints on all drag and drop objs
-         * @private
-         */
-        this._onResize = function(e) {
-            this._execOnAll("resetConstraints", []);
-        };
-
-        /**
-         * Lock all drag and drop functionality
-         */
-        this.lock = function() { this.locked = true; };
-
-        /**
-         * Unlock all drag and drop functionality
-         */
-        this.unlock = function() { this.locked = false; };
-
-        /**
-         * Is drag and drop locked?
-         *
-         * @return {boolean} True if drag and drop is locked, false otherwise.
-         */
-        this.isLocked = function() { return this.locked; };
-
-        /**
-         * Location cache that is set for all drag drop objects when a drag is
-         * initiated, cleared when the drag is finished.
-         *
-         * @private
-         */
-        this.locationCache = {};
-
-        /**
-         * Set useCache to false if you want to force object the lookup of each
-         * drag and drop linked element constantly during a drag.
-         * @type boolean
-         */
-        this.useCache = true;
-
-        /**
-         * The number of pixels that the mouse needs to move after the
-         * mousedown before the drag is initiated.  Default=3;
-         * @type int
-         */
-        this.clickPixelThresh = 3;
-
-        /**
-         * The number of milliseconds after the mousedown event to initiate the
-         * drag if we don't get a mouseup event. Default=1000
-         * @type int
-         */
-        this.clickTimeThresh = 1000;
-
-        /**
-         * Flag that indicates that either the drag pixel threshold or the
-         * mousdown time threshold has been met
-         * @type boolean
-         * @private
-         */
-        this.dragThreshMet = false;
-
-        /**
-         * Timeout used for the click time threshold
-         * @type Object
-         * @private
-         */
-        this.clickTimeout = null;
-
-        /**
-         * The X position of the mousedown event stored for later use when a
-         * drag threshold is met.
-         * @type int
-         * @private
-         */
-        this.startX = 0;
-
-        /**
-         * The Y position of the mousedown event stored for later use when a
-         * drag threshold is met.
-         * @type int
-         * @private
-         */
-        this.startY = 0;
-
-        /**
-         * Each DragDrop instance must be registered with the DragDropMgr.
-         * This is executed in ygDragDrop.init()
-         *
-         * @param {DragDrop} oDD the DragDrop object to register
-         * @param {String} sGroup the name of the group this element belongs to
-         */
-        this.regDragDrop = function(oDD, sGroup) {
-            if (!this.initialized) { this.init(); }
-
-            if (!this.ids[sGroup]) {
-                this.ids[sGroup] = {};
-            }
-            this.ids[sGroup][oDD.id] = oDD;
-        };
-
-        /**
-         * Unregisters a drag and drop item.  This is executed in
-         * ygDragDrop.unreg, use that method instead of calling this directly.
-         * @private
-         */
-        this._remove = function(oDD) {
-            for (var g in oDD.groups) {
-                if (g && this.ids[g][oDD.id]) {
-                    delete this.ids[g][oDD.id];
-                }
-            }
-            delete this.handleIds[oDD.id];
-        };
-
-        /**
-         * Each DragDrop handle element must be registered.  This is done
-         * automatically when executing ygDragDrop.setHandleElId()
-         *
-         * @param {String} sDDId the DragDrop id this element is a handle for
-         * @param {String} sHandleId the id of the element that is the drag
-         * handle
-         */
-        this.regHandle = function(sDDId, sHandleId) {
-            if (!this.handleIds[sDDId]) {
-                this.handleIds[sDDId] = {};
-            }
-            this.handleIds[sDDId][sHandleId] = sHandleId;
-        };
-
-        /**
-         * Utility function to determine if a given element has been
-         * registered as a drag drop item.
-         *
-         * @param {String} id the element id to check
-         * @return {boolean} true if this element is a DragDrop item,
-         * false otherwise
-         */
-        this.isDragDrop = function(id) {
-            return ( this.getDDById(id) ) ? true : false;
-        };
-
-        /**
-         * Returns the drag and drop instances that are in all groups the
-         * passed in instance belongs to.
-         *
-         * @param {ygDragDrop} p_oDD the obj to get related data for
-         * @param {boolean} bTargetsOnly if true, only return targetable objs
-         * @return {ygDragDrop[]} the related instances
-         */
-        this.getRelated = function(p_oDD, bTargetsOnly) {
-            var oDDs = [];
-            for (var i in p_oDD.groups) {
-                for (j in this.ids[i]) {
-                    var dd = this.ids[i][j];
-                    if (! this.isTypeOfDD(dd)) {
-                        continue;
-                    }
-                    if (!bTargetsOnly || dd.isTarget) {
-                        oDDs[oDDs.length] = dd;
-                    }
-                }
-            }
-
-            return oDDs;
-        };
-
-        /**
-         * Returns true if the specified dd target is a legal target for
-         * the specifice drag obj
-         *
-         * @param {ygDragDrop} the drag obj
-         * @param {ygDragDrop) the target
-         * @return {boolean} true if the target is a legal target for the
-         * dd obj
-         */
-        this.isLegalTarget = function (oDD, oTargetDD) {
-            var targets = this.getRelated(oDD);
-            for (var i =0;i<targets.length;++i) {
-                if (targets[i].id == oTargetDD.id) {
-                    return true;
-                }
-            }
-
-            return false;
-        };
-
-        /**
-         * My goal is to be able to transparently determine if an object is
-         * typeof ygDragDrop, and the exact subclass of ygDragDrop.  typeof
-         * returns "object", oDD.constructor.toString() always returns
-         * "ygDragDrop" and not the name of the subclass.  So for now it just
-         * evaluates a well-known variable in ygDragDrop.
-         *
-         * @param {Object} the object to evaluate
-         * @return {boolean} true if typeof oDD = ygDragDrop
-         */
-        this.isTypeOfDD = function (oDD) {
-            return (oDD && oDD.__ygDragDrop);
-        };
-
-        /**
-         * Utility function to determine if a given element has been
-         * registered as a drag drop handle for the given Drag Drop object.
-         *
-         * @param {String} id the element id to check
-         * @return {boolean} true if this element is a DragDrop handle, false
-         * otherwise
-         */
-        this.isHandle = function(sDDId, sHandleId) {
-            return ( this.handleIds[sDDId] &&
-                            this.handleIds[sDDId][sHandleId] );
-        };
-
-        /**
-         * Returns the DragDrop instance for a given id
-         *
-         * @param {String} id the id of the DragDrop object
-         * @return {DragDrop} the drag drop object, null if it is not found
-         */
-        this.getDDById = function(id) {
-            for (var i in this.ids) {
-                if (this.ids[i][id]) {
-                    return this.ids[i][id];
-                }
-            }
-            return null;
-        };
-
-        /**
-         * Fired after a registered DragDrop object gets the mousedown event.
-         * Sets up the events required to track the object being dragged
-         *
-         * @param {Event} e the event
-         * @param oDD the DragDrop object being dragged
-         * @private
-         */
-        this.handleMouseDown = function(e, oDD) {
-            this.dragCurrent = oDD;
-
-            var el = oDD.getEl();
-
-            // track start position
-            this.startX = UTIL.Event.getPageX(e);
-            this.startY = UTIL.Event.getPageY(e);
-
-            this.deltaX = this.startX - el.offsetLeft;
-            this.deltaY = this.startY - el.offsetTop;
-
-            this.dragThreshMet = false;
-
-            this.clickTimeout = setTimeout(
-               "var DDM=YAHOO.util.DDM;DDM.startDrag(DDM.startX, DDM.startY)",
-               this.clickTimeThresh );
-        };
-
-        /**
-         * Fired when either the drag pixel threshol or the mousedown hold
-         * time threshold has been met.
-         *
-         * @param x {int} the X position of the original mousedown
-         * @param y {int} the Y position of the original mousedown
-         */
-        this.startDrag = function(x, y) {
-            clearTimeout(this.clickTimeout);
-            if (this.dragCurrent) {
-                this.dragCurrent.b4StartDrag(x, y);
-                this.dragCurrent.startDrag(x, y);
-            }
-            this.dragThreshMet = true;
-        };
-
-        /**
-         * Internal function to handle the mouseup event.  Will be invoked
-         * from the context of the document.
-         *
-         * @param {Event} e the event
-         * @private
-         */
-        this.handleMouseUp = function(e) {
-
-            if (! this.dragCurrent) {
-                return;
-            }
-
-            clearTimeout(this.clickTimeout);
-
-            if (this.dragThreshMet) {
-                this.fireEvents(e, true);
-            } else {
-            }
-
-            this.stopDrag(e);
-
-            this.stopEvent(e);
-        };
-
-        /**
-         * Utility to stop event propagation and event default, if these
-         * features are turned on.
-         *
-         * @param {Event} e the event as returned by this.getEvent()
-         */
-        this.stopEvent = function(e) {
-            if (this.stopPropagation) {
-                UTIL.Event.stopPropagation(e);
-            }
-
-            if (this.preventDefault) {
-                UTIL.Event.preventDefault(e);
-            }
-        };
-
-        /**
-         * Internal function to clean up event handlers after the drag
-         * operation is complete
-         *
-         * @param {Event} e the event
-         * @private
-         */
-        this.stopDrag = function(e) {
-
-            // Fire the drag end event for the item that was dragged
-            if (this.dragCurrent) {
-                if (this.dragThreshMet) {
-                    this.dragCurrent.b4EndDrag(e);
-                    this.dragCurrent.endDrag(e);
-                }
-
-                this.dragCurrent.onMouseUp(e);
-            }
-
-            this.dragCurrent = null;
-            this.dragOvers = {};
-        };
-
-        /**
-         * Internal function to handle the mousemove event.  Will be invoked
-         * from the context of the html element.
-         *
-         * @TODO figure out what we can do about mouse events lost when the
-         * user drags objects beyond the window boundary.  Currently we can
-         * detect this in internet explorer by verifying that the mouse is
-         * down during the mousemove event.  Firefox doesn't give us the
-         * button state on the mousemove event.
-         *
-         * @param {Event} e the event
-         * @private
-         */
-        this.handleMouseMove = function(e) {
-            if (! this.dragCurrent) {
-                return;
-            }
-
-            // var button = e.which || e.button;
-
-
-            // check for IE mouseup outside of page boundary
-            if (UTIL.Event.isIE && !e.button) {
-                this.stopEvent(e);
-                return this.handleMouseUp(e);
-            }
-
-            if (!this.dragThreshMet) {
-                var diffX = Math.abs(this.startX - UTIL.Event.getPageX(e));
-                var diffY = Math.abs(this.startY - UTIL.Event.getPageY(e));
-                if (diffX > this.clickPixelThresh ||
-                            diffY > this.clickPixelThresh) {
-                    this.startDrag(this.startX, this.startY);
-                }
-            }
-
-            if (this.dragThreshMet) {
-                this.dragCurrent.b4Drag(e);
-                this.dragCurrent.onDrag(e);
-                this.fireEvents(e, false);
-            }
-
-            this.stopEvent(e);
-        };
-
-        /**
-         * Iterates over all of the DragDrop elements to find ones we are
-         * hovering over or dropping on
-         *
-         * @param {Event} e the event
-         * @param {boolean} isDrop is this a drop op or a mouseover op?
-         * @private
-         */
-        this.fireEvents = function(e, isDrop) {
-            var dc = this.dragCurrent;
-
-            // If the user did the mouse up outside of the window, we could
-            // get here even though we have ended the drag.
-            if (!dc || dc.isLocked()) {
-                return;
-            }
-
-            var x = UTIL.Event.getPageX(e);
-            var y = UTIL.Event.getPageY(e);
-            var pt = new YAHOO.util.Point(x,y);
-
-            // cache the previous dragOver array
-            var oldOvers = [];
-
-            var outEvts   = [];
-            var overEvts  = [];
-            var dropEvts  = [];
-            var enterEvts = [];
-
-            // Check to see if the object we were hovering over is no longer
-            // being hovered over so we can fire the onDragOut event
-            for (var i in this.dragOvers) {
-
-                var ddo = this.dragOvers[i];
-
-                if (! this.isTypeOfDD(ddo)) {
-                    continue;
-                }
-
-                if (! this.isOverTarget(pt, ddo, this.mode)) {
-                    outEvts.push( ddo );
-                }
-
-                oldOvers[i] = true;
-                delete this.dragOvers[i];
-            }
-
-            for (var sGroup in dc.groups) {
-
-                if ("string" != typeof sGroup) {
-                    continue;
-                }
-
-                for (i in this.ids[sGroup]) {
-                    var oDD = this.ids[sGroup][i];
-                    if (! this.isTypeOfDD(oDD)) {
-                        continue;
-                    }
-
-                    if (oDD.isTarget && !oDD.isLocked() && oDD != dc) {
-                        if (this.isOverTarget(pt, oDD, this.mode)) {
-                            // look for drop interactions
-                            if (isDrop) {
-                                dropEvts.push( oDD );
-                            // look for drag enter and drag over interactions
-                            } else {
-
-                                // initial drag over: dragEnter fires
-                                if (!oldOvers[oDD.id]) {
-                                    enterEvts.push( oDD );
-                                // subsequent drag overs: dragOver fires
-                                } else {
-                                    overEvts.push( oDD );
-                                }
-
-                                this.dragOvers[oDD.id] = oDD;
-                            }
-                        }
-                    }
-                }
-            }
-
-            if (this.mode) {
-                if (outEvts.length > 0) {
-                    dc.b4DragOut(e, outEvts);
-                    dc.onDragOut(e, outEvts);
-                }
-
-                if (enterEvts.length > 0) {
-                    dc.onDragEnter(e, enterEvts);
-                }
-
-                if (overEvts.length > 0) {
-                    dc.b4DragOver(e, overEvts);
-                    dc.onDragOver(e, overEvts);
-                }
-
-                if (dropEvts.length > 0) {
-                    dc.b4DragDrop(e, dropEvts);
-                    dc.onDragDrop(e, dropEvts);
-                }
-
-            } else {
-                // fire dragout events
-                for (i=0; i < outEvts.length; ++i) {
-                    dc.b4DragOut(e, outEvts[i].id);
-                    dc.onDragOut(e, outEvts[i].id);
-                }
-
-                // fire enter events
-                for (i=0; i < enterEvts.length; ++i) {
-                    // dc.b4DragEnter(e, oDD.id);
-                    dc.onDragEnter(e, enterEvts[i].id);
-                }
-
-                // fire over events
-                for (i=0; i < overEvts.length; ++i) {
-                    dc.b4DragOver(e, overEvts[i].id);
-                    dc.onDragOver(e, overEvts[i].id);
-                }
-
-                // fire drop events
-                for (i=0; i < dropEvts.length; ++i) {
-                    dc.b4DragDrop(e, dropEvts[i].id);
-                    dc.onDragDrop(e, dropEvts[i].id);
-                }
-
-            }
-
-        };
-
-        /**
-         * Helper function for getting the best match from the list of drag
-         * and drop objects returned by the drag and drop events when we are
-         * in INTERSECT mode.  It returns either the first object that the
-         * cursor is over, or the object that has the greatest overlap with
-         * the dragged element.
-         *
-         * @param  {ygDragDrop[]} dds The array of drag and drop objects
-         * targeted
-         * @return {ygDragDrop}       The best single match
-         */
-        this.getBestMatch = function(dds) {
-            var winner = null;
-            // Return null if the input is not what we expect
-            //if (!dds || !dds.length || dds.length == 0) {
-               // winner = null;
-            // If there is only one item, it wins
-            //} else if (dds.length == 1) {
-
-            if (dds.length == 1) {
-                winner = dds[0];
-            } else {
-                // Loop through the targeted items
-                for (var i=0; i<dds.length; ++i) {
-                    var dd = dds[i];
-                    // If the cursor is over the object, it wins.  If the
-                    // cursor is over multiple matches, the first one we come
-                    // to wins.
-                    if (dd.cursorIsOver) {
-                        winner = dd;
-                        break;
-                    // Otherwise the object with the most overlap wins
-                    } else {
-                        if (!winner ||
-                            winner.overlap.getArea() < dd.overlap.getArea()) {
-                            winner = dd;
-                        }
-                    }
-                }
-            }
-
-            return winner;
-        };
-
-        /**
-         * Refreshes the cache of the top-left and bottom-right points of the
-         * drag and drop objects in the specified groups
-         *
-         * @param {Array} aGroups an associative array of groups to refresh
-         */
-        this.refreshCache = function(aGroups) {
-            for (sGroup in aGroups) {
-                if ("string" != typeof sGroup) {
-                    continue;
-                }
-                for (i in this.ids[sGroup]) {
-                    var oDD = this.ids[sGroup][i];
-
-                    if (this.isTypeOfDD(oDD)) {
-                        var loc = this.getLocation(oDD);
-                        if (loc) {
-                            this.locationCache[oDD.id] = loc;
-                        } else {
-                            delete this.locationCache[oDD.id];
-                            // this will unregister the drag and drop object if
-                            // the element is not in a usable state
-                            oDD.unreg();
-                        }
-                    }
-                }
-            }
-        };
-
-        /**
-         * This checks to make sure an element exists and is in the DOM.  The
-         * main purpose is to handle cases where innerHTML is used to remove
-         * drag and drop objects from the DOM.  IE provides an 'unspecified
-         * error' when trying to access the offsetParent of such an element
-         * @param {HTMLElement} el the element to check
-         * @return {boolean} true if the element looks usable
-         */
-        this.verifyEl = function(el) {
-            try {
-                if (el) {
-                    var parent = el.offsetParent;
-                    if (parent) {
-                        return true;
-                    }
-                }
-            } catch(e) {
-            }
-
-            return false;
-        };
-
-        /**
-         * Returns the an array containing the drag and drop element's position
-         * and size, including the ygDragDrop.padding configured for it
-         *
-         * @param {ygDragDrop} oDD the drag and drop object to get the
-         * location for
-         * @return array containing the top left and bottom right points of the
-         * element
-         */
-        this.getLocation = function(oDD) {
-            if (! this.isTypeOfDD(oDD)) {
-                return null;
-            }
-
-            var el = oDD.getEl();
-
-            if (!this.verifyEl(el)) {
-                return null;
-            }
-
-
-            // var aPos = ygPos.getPos(el);
-            var aPos = YAHOO.util.Dom.getXY(el);
-
-            x1 = aPos[0];
-            x2 = x1 + el.offsetWidth;
-
-            y1 = aPos[1];
-            y2 = y1 + el.offsetHeight;
-
-            var t = y1 - oDD.padding[0];
-            var r = x2 + oDD.padding[1];
-            var b = y2 + oDD.padding[2];
-            var l = x1 - oDD.padding[3];
-
-            return new YAHOO.util.Region( t, r, b, l );
-
-        };
-
-        /**
-         * Checks the cursor location to see if it over the target
-         *
-         * @param {YAHOO.util.Point} pt The point to evaluate
-         * @param {ygDragDrop} oDDTarget the DragDrop object we are inspecting
-         * @return {boolean} true if the mouse is over the target
-         * @private
-         */
-        this.isOverTarget = function(pt, oDDTarget, intersect) {
-            // use cache if available
-            var loc = this.locationCache[oDDTarget.id];
-            if (!loc || !this.useCache) {
-                loc = this.getLocation(oDDTarget);
-                this.locationCache[oDDTarget.id] = loc;
-
-            }
-
-
-            // var cursorIsOver =  (x >= loc[3] && x <= loc[1] && y >= loc[0] && y <= loc[2]);
-            //oDDTarget.cursorIsOver = loc.contains( new YAHOO.util.Point(x, y) );
-            oDDTarget.cursorIsOver = loc.contains( pt );
-            oDDTarget.overlap = null;
-
-            // if (this.INTERSECT == this.mode) {
-            if (intersect) {
-
-                var curRegion =
-                    YAHOO.util.Region.getRegion(this.dragCurrent.getDragEl());
-                var overlap = curRegion.intersect(loc);
-
-                if (overlap) {
-                    oDDTarget.overlap = overlap;
-                    return true;
-                } else {
-                    return false;
-                }
-
-            } else {
-                return oDDTarget.cursorIsOver;
-            }
-        };
-
-        /**
-         * @private
-         */
-        this._onUnload = function(e, me) {
-            this.unregAll();
-        };
-
-        /**
-         * Cleans up the drag and drop events and objects.
-         *
-         * @private
-         */
-        this.unregAll = function() {
-
-            if (this.dragCurrent) {
-                this.stopDrag();
-                this.dragCurrent = null;
-            }
-
-            this._execOnAll("unreg", []);
-
-            for (i in this.elementCache) {
-                delete this.elementCache[i];
-            }
-
-            this.elementCache = {};
-            this.ids = {};
-        };
-
-        /**
-         * A cache of DOM elements
-         *
-         * @private
-         */
-        this.elementCache = {};
-
-        /**
-         * Get the wrapper for the DOM element specified
-         *
-         * @param {String} id the id of the elment to get
-         * @return {YAHOO.util.DDM.ElementWrapper} the wrapped element
-         * @private
-         */
-        this.getElWrapper = function(id) {
-            var oWrapper = this.elementCache[id];
-            if (!oWrapper || !oWrapper.el) {
-                oWrapper = this.elementCache[id] =
-                    new this.ElementWrapper(document.getElementById(id));
-            }
-            return oWrapper;
-        };
-
-        /**
-         * Returns the actual DOM element
-         *
-         * @param {String} id the id of the elment to get
-         * @return {Object} The element
-         */
-        this.getElement = function(id) {
-            // return this.getElWrapper(id).el;
-            return document.getElementById(id);
-        };
-
-        /**
-         * Returns the style property for the DOM element (i.e.,
-         * document.getElById(id).style)
-         *
-         * @param {String} id the id of the elment to get
-         * @return {Object} The style property of the element
-         */
-        this.getCss = function(id) {
-            // return this.getElWrapper(id).css;
-            var css = null;
-            var el = document.getElementById(id);
-            if (el) {
-                css = el.style;
-            }
-
-            return css;
-        };
-
-        /**
-         * Inner class for cached elements
-         */
-        this.ElementWrapper = function(el) {
-                /**
-                 * @private
-                 */
-                this.el = el || null;
-                /**
-                 * @private
-                 */
-                this.id = this.el && el.id;
-                /**
-                 * @private
-                 */
-                this.css = this.el && el.style;
-            };
-
-        /**
-         * Returns the X position of an html element
-         * @param el the element for which to get the position
-         * @return {int} the X coordinate
-         */
-        this.getPosX = function(el) {
-            return YAHOO.util.Dom.getX(el);
-        };
-
-        /**
-         * Returns the Y position of an html element
-         * @param el the element for which to get the position
-         * @return {int} the Y coordinate
-         */
-        this.getPosY = function(el) {
-            return YAHOO.util.Dom.getY(el);
-        };
-
-        /**
-         * Swap two nodes.  In IE, we use the native method, for others we
-         * emulate the IE behavior
-         *
-         * @param n1 the first node to swap
-         * @param n2 the other node to swap
-         */
-        this.swapNode = function(n1, n2) {
-            if (n1.swapNode) {
-                n1.swapNode(n2);
-            } else {
-                // the node reference order for the swap is a little tricky.
-                var p = n2.parentNode;
-                var s = n2.nextSibling;
-                n1.parentNode.replaceChild(n2,n1);
-                p.insertBefore(n1,s);
-            }
-        };
-
-        /**
-         * @private
-         */
-        this.getScroll = function () {
-            var t, l;
-            if (document.documentElement && document.documentElement.scrollTop) {
-                t = document.documentElement.scrollTop;
-                l = document.documentElement.scrollLeft;
-            } else if (document.body) {
-                t = document.body.scrollTop;
-                l = document.body.scrollLeft;
-            }
-            return { top: t, left: l };
-        };
-
-        /**
-         * Returns the specified element style property
-         * @param {HTMLElement} el          the element
-         * @param {string}      styleProp   the style property
-         * @return {string}     The value of the style property
-         */
-        this.getStyle = function(el, styleProp) {
-            if (el.style.styleProp) {
-                return el.style.styleProp;
-            } else if (el.currentStyle) {
-                return el.currentStyle[styleProp];
-            } else if (document.defaultView) {
-                return document.defaultView.getComputedStyle(el, null).
-                    getPropertyValue(styleProp);
-            }
-        };
-
-        /**
-         * Gets the scrollTop
-         *
-         * @return {int} the document's scrollTop
-         */
-        this.getScrollTop = function () { return this.getScroll().top; };
-
-        /**
-         * Gets the scrollLeft
-         *
-         * @return {int} the document's scrollTop
-         */
-        this.getScrollLeft = function () { return this.getScroll().left; };
-
-        this.moveToEl = function (moveEl, targetEl) {
-            var aCoord = YAHOO.util.Dom.getXY(targetEl);
-            YAHOO.util.Dom.setXY(moveEl, aCoord);
-        };
-
-        /**
-         * Gets the client height
-         *
-         * @return {int} client height in px
-         */
-        this.getClientHeight = function() {
-            return (window.innerHeight) ? window.innerHeight :
-                (document.documentElement && document.documentElement.clientHeight) ?
-                document.documentElement.clientHeight : document.body.offsetHeight;
-        };
-
-        /**
-         * Gets the client width
-         *
-         * @return {int} client width in px
-         */
-        this.getClientWidth = function() {
-            return (window.innerWidth) ? window.innerWidth :
-                (document.documentElement && document.documentElement.clientWidth) ?
-                document.documentElement.clientWidth : document.body.offsetWidth;
-        };
-
-        /**
-         * numeric array sort function
-         */
-        this.numericSort = function(a, b) { return (a - b); };
-
-        /**
-         * @private
-         */
-        this._timeoutCount = 0;
-
-        /**
-         * @private
-         * Trying to make the load order less important.  Without this we get
-         * an error if this file is loaded before the Event Utility.
-         */
-        this._addListeners = function() {
-            if ( UTIL.Event &&
-                 document          &&
-                 document.body        ) {
-
-                this._onLoad();
-            } else {
-                if (this._timeoutCount > 500) {
-                } else {
-                    setTimeout("YAHOO.util.DDM._addListeners()", 10);
-                    this._timeoutCount += 1;
-                }
-            }
-
-        };
-
-        /**
-         * Recursively searches the immediate parent and all child nodes for
-         * the handle element in order to determine wheter or not it was
-         * clicked.
-         *
-         * @param node the html element to inspect
-         */
-        this.handleWasClicked = function(node, id) {
-            if (this.isHandle(id, node.id)) {
-                return true;
-            } else {
-                // check to see if this is a text node child of the one we want
-                var p = node.parentNode;
-
-                while (p) {
-                    if (this.isHandle(id, p.id)) {
-                        return true;
-                    } else {
-                        p = p.parentNode;
-                    }
-                }
-            }
-
-            return false;
-        };
-
-    };
-
-    // shorter alias, save a few bytes
-    YAHOO.util.DDM = YAHOO.util.DragDropMgr;
-    YAHOO.util.DDM._addListeners();
-
-}
-
-/* Copyright (c) 2006 Yahoo! Inc. All rights reserved. */
-
-/**
- * @class a DragDrop implementation where the linked element follows the
- * mouse cursor.
- *
- * @extends DragDrop
- * @constructor
- * @param {String} id the id of the linked element
- * @param {String} sGroup the group of related DragDrop items
- */
-YAHOO.util.DD = function(id, sGroup) {
-    if (id) {
-        this.init(id, sGroup);
-    }
-};
-
-YAHOO.util.DD.prototype = new YAHOO.util.DragDrop();
-
-/**
- * Should we auto-scroll? Defaults to true
- *
- * @type boolean
- */
-YAHOO.util.DD.prototype.scroll = true;
-
-/**
- * Sets the pointer offset to the distance between the linked element's top
- * left corner and the location the element was clicked
- *
- * @param {int} iPageX the X coordinate of the click
- * @param {int} iPageY the Y coordinate of the click
- */
-YAHOO.util.DD.prototype.autoOffset = function(iPageX, iPageY) {
-    var el = this.getEl();
-    var aCoord = YAHOO.util.Dom.getXY(el);
-    var x = iPageX - aCoord[0];
-    var y = iPageY - aCoord[1];
-    this.setDelta(x, y);
-};
-
-/**
- * Sets the pointer offset.  You can call this directly to force the offset to
- * be in a particular location (e.g., pass in 0,0 to set it to the center of the
- * object, as done in ygDDSliderBG)
- *
- * @param {int} iDeltaX the distance from the left
- * @param {int} iDeltaY the distance from the top
- */
-YAHOO.util.DD.prototype.setDelta = function(iDeltaX, iDeltaY) {
-    this.deltaX = iDeltaX;
-    this.deltaY = iDeltaY;
-};
-
-/**
- * Sets the drag element to the location of the mousedown or click event,
- * maintaining the cursor location relative to the location on the element
- * that was clicked.  Override this if you want to place the element in a
- * location other than where the cursor is.
- *
- * @param {int} iPageX the X coordinate of the mousedown or drag event
- * @param {int} iPageY the Y coordinate of the mousedown or drag event
- */
-
-YAHOO.util.DD.prototype.setDragElPos = function(iPageX, iPageY) {
-    this.alignElWithMouse(this.getDragEl(), iPageX, iPageY);
-};
-
-/**
- * Sets the element to the location of the mousedown or click event,
- * maintaining the cursor location relative to the location on the element
- * that was clicked.  Override this if you want to place the element in a
- * location other than where the cursor is.
- *
- * @param {HTMLElement} el the element to move
- * @param {int} iPageX the X coordinate of the mousedown or drag event
- * @param {int} iPageY the Y coordinate of the mousedown or drag event
- */
-YAHOO.util.DD.prototype.alignElWithMouse = function(el, iPageX, iPageY) {
-    var oCoord = this.getTargetCoord(iPageX, iPageY);
-    var aCoord = [oCoord.x, oCoord.y];
-    YAHOO.util.Dom.setXY(el, aCoord);
-
-    this.cachePosition(oCoord.x, oCoord.y);
-
-    this.autoScroll(oCoord.x, oCoord.y, el.offsetHeight, el.offsetWidth);
-};
-
-/**
- * Saves the most recent position so that we can reset the constraints and
- * tick marks on-demand.  We need to know this so that we can calculate the
- * number of pixels the element is offset from its original position.
- */
-YAHOO.util.DD.prototype.cachePosition = function(iPageX, iPageY) {
-    if (iPageX) {
-        this.lastPageX = iPageX;
-        this.lastPageY = iPageY;
-    } else {
-        var aCoord = YAHOO.util.Dom.getXY(this.getEl());
-        this.lastPageX = aCoord[0];
-        this.lastPageY = aCoord[1];
-    }
-};
-
-/**
- * Auto-scroll the window if the dragged object has been moved beyond the
- * visible window boundary.
- *
- * @param {int} x the drag element's x position
- * @param {int} y the drag element's y position
- * @param {int} h the height of the drag element
- * @param {int} w the width of the drag element
- * @private
- */
-YAHOO.util.DD.prototype.autoScroll = function(x, y, h, w) {
-
-    if (this.scroll) {
-        // The client height
-        var clientH = this.DDM.getClientHeight();
-
-        // The client width
-        var clientW = this.DDM.getClientWidth();
-
-        // The amt scrolled down
-        var st = this.DDM.getScrollTop();
-
-        // The amt scrolled right
-        var sl = this.DDM.getScrollLeft();
-
-        // Location of the bottom of the element
-        var bot = h + y;
-
-        // Location of the right of the element
-        var right = w + x;
-
-        // The distance from the cursor to the bottom of the visible area,
-        // adjusted so that we don't scroll if the cursor is beyond the
-        // element drag constraints
-        var toBot = (clientH + st - y - this.deltaY);
-
-        // The distance from the cursor to the right of the visible area
-        var toRight = (clientW + sl - x - this.deltaX);
-
-
-        // How close to the edge the cursor must be before we scroll
-        // var thresh = (document.all) ? 100 : 40;
-        var thresh = 40;
-
-        // How many pixels to scroll per autoscroll op.  This helps to reduce
-        // clunky scrolling. IE is more sensitive about this ... it needs this
-        // value to be higher.
-        var scrAmt = (document.all) ? 80 : 30;
-
-        // Scroll down if we are near the bottom of the visible page and the
-        // obj extends below the crease
-        if ( bot > clientH && toBot < thresh ) {
-            window.scrollTo(sl, st + scrAmt);
-        }
-
-        // Scroll up if the window is scrolled down and the top of the object
-        // goes above the top border
-        if ( y < st && st > 0 && y - st < thresh ) {
-            window.scrollTo(sl, st - scrAmt);
-        }
-
-        // Scroll right if the obj is beyond the right border and the cursor is
-        // near the border.
-        if ( right > clientW && toRight < thresh ) {
-            window.scrollTo(sl + scrAmt, st);
-        }
-
-        // Scroll left if the window has been scrolled to the right and the obj
-        // extends past the left border
-        if ( x < sl && sl > 0 && x - sl < thresh ) {
-            window.scrollTo(sl - scrAmt, st);
-        }
-    }
-};
-
-/**
- * Finds the location the element should be placed if we want to move
- * it to where the mouse location less the click offset would place us.
- *
- * @param {int} iPageX the X coordinate of the click
- * @param {int} iPageY the Y coordinate of the click
- * @return an object that contains the coordinates (Object.x and Object.y)
- * @private
- */
-YAHOO.util.DD.prototype.getTargetCoord = function(iPageX, iPageY) {
-
-
-    var x = iPageX - this.deltaX;
-    var y = iPageY - this.deltaY;
-
-    if (this.constrainX) {
-        if (x < this.minX) { x = this.minX; }
-        if (x > this.maxX) { x = this.maxX; }
-    }
-
-    if (this.constrainY) {
-        if (y < this.minY) { y = this.minY; }
-        if (y > this.maxY) { y = this.maxY; }
-    }
-
-    x = this.getTick(x, this.xTicks);
-    y = this.getTick(y, this.yTicks);
-
-
-    return {x:x, y:y};
-};
-
-// overrides YAHOO.util.DragDrop
-YAHOO.util.DD.prototype.b4MouseDown = function(e) {
-    // this.resetConstraints();
-    this.autoOffset(YAHOO.util.Event.getPageX(e),
-                        YAHOO.util.Event.getPageY(e));
-};
-
-// overrides YAHOO.util.DragDrop
-YAHOO.util.DD.prototype.b4Drag = function(e) {
-    this.setDragElPos(YAHOO.util.Event.getPageX(e),
-                        YAHOO.util.Event.getPageY(e));
-};
-
-///////////////////////////////////////////////////////////////////////////////
-// Debugging ygDragDrop events that can be overridden
-///////////////////////////////////////////////////////////////////////////////
-/*
-YAHOO.util.DD.prototype.startDrag = function(x, y) {
-};
-
-YAHOO.util.DD.prototype.onDrag = function(e) {
-};
-
-YAHOO.util.DD.prototype.onDragEnter = function(e, id) {
-};
-
-YAHOO.util.DD.prototype.onDragOver = function(e, id) {
-};
-
-YAHOO.util.DD.prototype.onDragOut = function(e, id) {
-};
-
-YAHOO.util.DD.prototype.onDragDrop = function(e, id) {
-};
-
-YAHOO.util.DD.prototype.endDrag = function(e) {
-};
-*/
-
-/* Copyright (c) 2006 Yahoo! Inc. All rights reserved. */
-
-/**
- * @class a DragDrop implementation that inserts an empty, bordered div into
- * the document that follows the cursor during drag operations.  At the time of
- * the click, the frame div is resized to the dimensions of the linked html
- * element, and moved to the exact location of the linked element.
- *
- * @extends YAHOO.util.DD
- * @constructor
- * @param {String} id the id of the linked html element
- * @param {String} sGroup the group of related DragDrop objects
- */
-YAHOO.util.DDProxy = function(id, sGroup) {
-    if (id) {
-        this.init(id, sGroup);
-        this.initFrame();
-    }
-};
-
-YAHOO.util.DDProxy.prototype = new YAHOO.util.DD();
-
-/**
- * A reference to the one div element we create for all instances of this class
- *
- * @type Object
- */
-YAHOO.util.DDProxy.frameDiv = null;
-
-/**
- * the drag frame div id
- *
- * @type String
- */
-YAHOO.util.DDProxy.dragElId = "ygddfdiv";
-
-/**
- * The border width of the frame.  This is used when we resize the frame to
- * the size of the linked element.  We substract the border width to make
- * the div the correct size.
- *
- * @TODO find a better way to handle this
- *
- * @type int
- */
-YAHOO.util.DDProxy.prototype.borderWidth = 2;
-
-/**
- * By default we resize the drag frame to be the same size as the element
- * we want to drag (this is to get the frame effect).  We can turn it off
- * if we want a different behavior (ex: ygDDMy2)
- *
- * @type boolean
- */
-YAHOO.util.DDProxy.prototype.resizeFrame = true;
-
-/**
- * By default the frame is positioned exactly where the drag element is, so
- * we use the cursor offset provided by YAHOO.util.DD.  Another option that works only if
- * you do not have constraints on the obj is to have the drag frame centered
- * around the cursor.  Set centerFrame to true for this effect.  Ex:
- * ygDDMy2
- *
- * @type boolean
- */
-YAHOO.util.DDProxy.prototype.centerFrame = false;
-
-/**
- * Create the drag frame if needed
- */
-YAHOO.util.DDProxy.createFrame = function() {
-    var THIS = YAHOO.util.DDProxy;
-
-    if (!document || !document.body) {
-        setTimeout(THIS.createFrame, 50);
-        return;
-    }
-
-    if (!THIS.frameDiv) {
-        THIS.frameDiv = document.createElement("div");
-        THIS.frameDiv.id = THIS.dragElId;
-        var s = THIS.frameDiv.style;
-        s.position = "absolute";
-        s.visibility = "hidden";
-        s.cursor = "move";
-        s.border = "2px solid #aaa";
-        s.zIndex = 999;
-
-        document.body.appendChild(THIS.frameDiv);
-    }
-};
-
-/**
- * Initialization for the drag frame element.  Must be called in the
- * constructor of all subclasses
- */
-YAHOO.util.DDProxy.prototype.initFrame = function() {
-    YAHOO.util.DDProxy.createFrame();
-    this.setDragElId(YAHOO.util.DDProxy.dragElId);
-    this.useAbsMath = true;
-};
-
-/**
- * Resizes the drag frame to the dimensions of the clicked object, positions
- * it over the object, and finally displays it
- *
- * @param {int} iPageX X click position
- * @param {int} iPageY Y click position
- * @private
- */
-YAHOO.util.DDProxy.prototype.showFrame = function(iPageX, iPageY) {
-    var el = this.getEl();
-
-    var s = this.getDragEl().style;
-
-    if (this.resizeFrame) {
-        s.width = (parseInt(el.offsetWidth) - (2*this.borderWidth)) + "px";
-        s.height = (parseInt(el.offsetHeight) - (2*this.borderWidth)) + "px";
-    }
-
-    if (this.centerFrame) {
-        this.setDelta(Math.round(parseInt(s.width)/2),
-                Math.round(parseInt(s.width)/2));
-    }
-
-    this.setDragElPos(iPageX, iPageY);
-
-    s.visibility = "";
-};
-
-// overrides YAHOO.util.DragDrop
-YAHOO.util.DDProxy.prototype.b4MouseDown = function(e) {
-    var x = YAHOO.util.Event.getPageX(e);
-    var y = YAHOO.util.Event.getPageY(e);
-    this.autoOffset(x, y);
-    this.setDragElPos(x, y);
-};
-
-// overrides YAHOO.util.DragDrop
-YAHOO.util.DDProxy.prototype.b4StartDrag = function(x, y) {
-    // show the drag frame
-    this.showFrame(x, y);
-};
-
-// overrides YAHOO.util.DragDrop
-YAHOO.util.DDProxy.prototype.b4EndDrag = function(e) {
-
-    // hide the drag frame
-    var s = this.getDragEl().style;
-    s.visibility = "hidden";
-};
-
-// overrides YAHOO.util.DragDrop
-// By default we try to move the element to the last location of the frame.
-// This is so that the default behavior mirrors that of YAHOO.util.DD.
-YAHOO.util.DDProxy.prototype.endDrag = function(e) {
-    var lel = this.getEl();
-    var del = this.getDragEl();
-
-    // Show the drag frame briefly so we can get its position
-    del.style.visibility = "";
-
-    // Hide the linked element before the move to get around a Safari
-    // rendering bug.
-    lel.style.visibility = "hidden";
-    YAHOO.util.DDM.moveToEl(lel, del);
-    del.style.visibility = "hidden";
-    lel.style.visibility = "";
-};
-
-/* Copyright (c) 2006 Yahoo! Inc. All rights reserved. */
-
-/**
- * @class a DragDrop implementation that does not move, but can be a drop
- * target.  You would get the same result by simply omitting implementation
- * for the event callbacks, but this way we reduce the processing cost of the
- * event listener and the callbacks.
- *
- * @extends YAHOO.util.DragDrop
- * @constructor
- * @param {String} id the id of the element that is a drop target
- * @param {String} sGroup the group of related DragDrop objects
- */
-
-YAHOO.util.DDTarget = function(id, sGroup) {
-    if (id) {
-        this.initTarget(id, sGroup);
-    }
-};
-
-YAHOO.util.DDTarget.prototype = new YAHOO.util.DragDrop();
-
Index: in/trunk/greenstone3/web/interfaces/oran/js/event.js
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/js/event.js	(revision 24017)
+++ 	(revision )
@@ -1,901 +1,0 @@
-/*
-Copyright (c) 2006 Yahoo! Inc. All rights reserved.
-version 0.9.0
-*/
-
-/**
- * @class The CustomEvent class lets you define events for your application
- * that can be subscribed to by one or more independent component.
- * @param {String} type The type of event, which is passed to the callback
- *                 when the event fires
- * @param {Object} oScope The context the event will fire from.  "this" will
- *                 refer to this object in the callback.  Default value:
- *                 the window object.  The listener can override this.
- * @constructor
- */
-YAHOO.util.CustomEvent = function(type, oScope) {
-    /**
-     * The type of event, returned to subscribers when the event fires
-     * @type string
-     */
-    this.type = type;
-
-    /**
-     * The scope the the event will fire from.  Defaults to the window obj
-     * @type object
-     */
-    this.scope = oScope || window;
-
-    /**
-     * The subscribers to this event
-     * @type array
-     */
-    this.subscribers = [];
-
-    // Register with the event utility for automatic cleanup.  Made optional
-    // so that CustomEvent can be used independently of pe.event
-    if (YAHOO.util["Event"]) {
-        YAHOO.util.Event.regCE(this);
-    }
-};
-
-YAHOO.util.CustomEvent.prototype = {
-    /**
-     * Subscribes the caller to this event
-     * @param {Function} fn       The function to execute
-     * @param {Object}   obj      An object to be passed along when the event fires
-     * @param {boolean}  bOverride If true, the obj passed in becomes the execution
-     *                            scope of the listener
-     */
-    subscribe: function(fn, obj, bOverride) {
-        this.subscribers.push( new YAHOO.util.Subscriber(fn, obj, bOverride) );
-    },
-
-    /**
-     * Unsubscribes the caller from this event
-     * @param {Function} fn  The function to execute
-     * @param {Object}   obj An object to be passed along when the event fires
-     * @return {boolean} True if the subscriber was found and detached.
-     */
-    unsubscribe: function(fn, obj) {
-        var found = false;
-        for (var i=0; i<this.subscribers.length; ++i) {
-            var s = this.subscribers[i];
-            if (s && s.contains(fn, obj)) {
-                this._delete(i);
-                found = true;
-            }
-        }
-
-        return found;
-    },
-
-    /**
-     * Notifies the subscribers.  The callback functions will be executed
-     * from the scope specified when the event was created, and with the following
-     * parameters:
-     *   <pre>
-     *   - The type of event
-     *   - All of the arguments fire() was executed with as an array
-     *   - The custom object (if any) that was passed into the subscribe() method
-     *   </pre>
-     *
-     * @param {Array} an arbitrary set of parameters to pass to the handler
-     */
-    fire: function() {
-        for (var i=0; i<this.subscribers.length; ++i) {
-            var s = this.subscribers[i];
-            if (s) {
-                var scope = (s.override) ? s.obj : this.scope;
-                s.fn.call(scope, this.type, arguments, s.obj);
-            }
-        }
-    },
-
-    /**
-     * Removes all listeners
-     */
-    unsubscribeAll: function() {
-        for (var i=0; i<this.subscribers.length; ++i) {
-            this._delete(i);
-        }
-    },
-
-    /**
-     * @private
-     */
-    _delete: function(index) {
-        var s = this.subscribers[index];
-        if (s) {
-            delete s.fn;
-            delete s.obj;
-        }
-
-        delete this.subscribers[index];
-    }
-};
-
-/////////////////////////////////////////////////////////////////////
-
-/**
- * @class
- * @param {Function} fn       The function to execute
- * @param {Object}   obj      An object to be passed along when the event fires
- * @param {boolean}  bOverride If true, the obj passed in becomes the execution
- *                            scope of the listener
- * @constructor
- */
-YAHOO.util.Subscriber = function(fn, obj, bOverride) {
-    /**
-     * The callback that will be execute when the event fires
-     * @type function
-     */
-    this.fn = fn;
-
-    /**
-     * An optional custom object that will passed to the callback when
-     * the event fires
-     * @type object
-     */
-    this.obj = obj || null;
-
-    /**
-     * The default execution scope for the event listener is defined when the
-     * event is created (usually the object which contains the event).
-     * By setting override to true, the execution scope becomes the custom
-     * object passed in by the subscriber
-     * @type boolean
-     */
-    this.override = (bOverride);
-};
-
-/**
- * Returns true if the fn and obj match this objects properties.
- * Used by the unsubscribe method to match the right subscriber.
- *
- * @param {Function} fn the function to execute
- * @param {Object} obj an object to be passed along when the event fires
- * @return {boolean} true if the supplied arguments match this
- *                   subscriber's signature.
- */
-YAHOO.util.Subscriber.prototype.contains = function(fn, obj) {
-    return (this.fn == fn && this.obj == obj);
-};
-
-/* Copyright (c) 2006 Yahoo! Inc. All rights reserved. */
-
-// Only load this library once.  If it is loaded a second time, existing
-// events cannot be detached.
-if (!YAHOO.util.Event) {
-
-/**
- * The event utility provides functions to add and remove event listeners,
- * event cleansing.  It also tries to automatically remove listeners it
- * registers during the unload event.
- * @class
- * @constructor
- */
-    YAHOO.util.Event = function() {
-
-        /**
-         * True after the onload event has fired
-         * @type boolean
-         * @private
-         */
-        var loadComplete =  false;
-
-        /**
-         * Cache of wrapped listeners
-         * @type array
-         * @private
-         */
-        var listeners = [];
-
-        /**
-         * Listeners that will be attached during the onload event
-         * @type array
-         * @private
-         */
-        var delayedListeners = [];
-
-        /**
-         * User-defined unload function that will be fired before all events
-         * are detached
-         * @type array
-         * @private
-         */
-        var unloadListeners = [];
-
-        /**
-         * Cache of the custom events that have been defined.  Used for
-         * automatic cleanup
-         * @type array
-         * @private
-         */
-        var customEvents = [];
-
-        /**
-         * Cache of DOM0 event handlers to work around issues with DOM2 events
-         * in Safari
-         * @private
-         */
-        var legacyEvents = [];
-
-        /**
-         * Listener stack for DOM0 events
-         * @private
-         */
-        var legacyHandlers = [];
-
-        return { // PREPROCESS
-
-            /**
-             * Element to bind, int constant
-             * @type int
-             */
-            EL: 0,
-
-            /**
-             * Type of event, int constant
-             * @type int
-             */
-            TYPE: 1,
-
-            /**
-             * Function to execute, int constant
-             * @type int
-             */
-            FN: 2,
-
-            /**
-             * Function wrapped for scope correction and cleanup, int constant
-             * @type int
-             */
-            WFN: 3,
-
-            /**
-             * Object passed in by the user that will be returned as a
-             * parameter to the callback, int constant
-             * @type int
-             */
-            SCOPE: 3,
-
-            /**
-             * Adjusted scope, either the element we are registering the event
-             * on or the custom object passed in by the listener, int constant
-             * @type int
-             */
-            ADJ_SCOPE: 4,
-
-            /**
-             * Safari detection is necessary to work around the preventDefault
-             * bug that makes it so you can't cancel a href click from the
-             * handler.  There is not a capabilities check we can use here.
-             * @private
-             */
-            isSafari: (navigator.userAgent.match(/safari/gi)),
-
-            /**
-             * @private
-             * IE detection needed to properly calculate pageX and pageY.
-             * capabilities checking didn't seem to work because another
-             * browser that does not provide the properties have the values
-             * calculated in a different manner than IE.
-             */
-            isIE: (!this.isSafari && navigator.userAgent.match(/msie/gi)),
-
-            /**
-             * Appends an event handler
-             *
-             * @param {Object}   el        The html element to assign the
-             *                             event to
-             * @param {String}   sType     The type of event to append
-             * @param {Function} fn        The method the event invokes
-             * @param {Object}   oScope    An arbitrary object that will be
-             *                             passed as a parameter to the handler
-             * @param {boolean}  bOverride If true, the obj passed in becomes
-             *                             the execution scope of the listener
-             * @return {boolean} True if the action was successful or defered,
-             *                        false if one or more of the elements
-             *                        could not have the event bound to it.
-             */
-            addListener: function(el, sType, fn, oScope, bOverride) {
-
-                // The el argument can be an array of elements or element ids.
-                if ( this._isValidCollection(el)) {
-                    var ok = true;
-                    for (var i=0; i< el.length; ++i) {
-                        ok = ( this.on(el[i],
-                                       sType,
-                                       fn,
-                                       oScope,
-                                       bOverride) && ok );
-                    }
-                    return ok;
-
-                } else if (typeof el == "string") {
-                    // If the el argument is a string, we assume it is
-                    // actually the id of the element.  If the page is loaded
-                    // we convert el to the actual element, otherwise we
-                    // defer attaching the event until onload event fires
-
-                    // check to see if we need to delay hooking up the event
-                    // until after the page loads.
-                    if (loadComplete) {
-                        el = this.getEl(el);
-                    } else {
-                        // defer adding the event until onload fires
-                        delayedListeners[delayedListeners.length] =
-                            [el, sType, fn, oScope, bOverride];
-
-                        return true;
-                    }
-                }
-
-                // Element should be an html element or an array if we get
-                // here.
-                if (!el) {
-                    return false;
-                }
-
-                // we need to make sure we fire registered unload events
-                // prior to automatically unhooking them.  So we hang on to
-                // these instead of attaching them to the window and fire the
-                // handles explicitly during our one unload event.
-                if ("unload" == sType && oScope !== this) {
-                    unloadListeners[unloadListeners.length] =
-                            [el, sType, fn, oScope, bOverride];
-                    return true;
-                }
-
-
-                // if the user chooses to override the scope, we use the custom
-                // object passed in, otherwise the executing scope will be the
-                // HTML element that the event is registered on
-                var scope = (bOverride) ? oScope : el;
-
-                // wrap the function so we can return the oScope object when
-                // the event fires;
-                var wrappedFn = function(e) {
-                        return fn.call(scope, YAHOO.util.Event.getEvent(e),
-                                oScope);
-                    };
-
-                var li = [el, sType, fn, wrappedFn, scope];
-                var index = listeners.length;
-                // cache the listener so we can try to automatically unload
-                listeners[index] = li;
-
-                if (this.useLegacyEvent(el, sType)) {
-                    var legacyIndex = this.getLegacyIndex(el, sType);
-                    if (legacyIndex == -1) {
-
-                        legacyIndex = legacyEvents.length;
-                        // cache the signature for the DOM0 event, and
-                        // include the existing handler for the event, if any
-                        legacyEvents[legacyIndex] =
-                            [el, sType, el["on" + sType]];
-                        legacyHandlers[legacyIndex] = [];
-
-                        el["on" + sType] =
-                            function(e) {
-                                YAHOO.util.Event.fireLegacyEvent(
-                                    YAHOO.util.Event.getEvent(e), legacyIndex);
-                            };
-                    }
-
-                    // add a reference to the wrapped listener to our custom
-                    // stack of events
-                    legacyHandlers[legacyIndex].push(index);
-
-                // DOM2 Event model
-                } else if (el.addEventListener) {
-                    el.addEventListener(sType, wrappedFn, false);
-                // Internet Explorer abstraction
-                } else if (el.attachEvent) {
-                    el.attachEvent("on" + sType, wrappedFn);
-                }
-
-                return true;
-
-            },
-
-            /**
-             * Shorthand for YAHOO.util.Event.addListener
-             * @type function
-             */
-            // on: this.addListener,
-
-            /**
-             * When using legacy events, the handler is routed to this object
-             * so we can fire our custom listener stack.
-             * @private
-             */
-            fireLegacyEvent: function(e, legacyIndex) {
-                // alert("fireLegacyEvent " + legacyIndex);
-                var ok = true;
-
-                // var el = legacyEvents[YAHOO.util.Event.EL];
-
-                /* this is not working because the property may get populated
-                // fire the event we replaced, if it exists
-                var origHandler = legacyEvents[2];
-                alert(origHandler);
-                if (origHandler && origHandler.call) {
-                    var ret = origHandler.call(el, e);
-                    ok = (ret);
-                }
-                */
-
-                var le = legacyHandlers[legacyIndex];
-                for (i=0; i < le.length; ++i) {
-                    var index = le[i];
-                    // alert(index);
-                    if (index) {
-                        var li = listeners[index];
-                        var scope = li[this.ADJ_SCOPE];
-                        var ret = li[this.WFN].call(scope, e);
-                        ok = (ok && ret);
-                        // alert(ok);
-                    }
-                }
-
-                return ok;
-            },
-
-            /**
-             * Returns the legacy event index that matches the supplied
-             * signature
-             * @private
-             */
-            getLegacyIndex: function(el, sType) {
-                for (var i=0; i < legacyEvents.length; ++i) {
-                    var le = legacyEvents[i];
-                    if (le && le[0] == el && le[1] == sType) {
-                        return i;
-                    }
-                }
-
-                return -1;
-            },
-
-            /**
-             * Logic that determines when we should automatically use legacy
-             * events instead of DOM2 events.
-             * @private
-             */
-            useLegacyEvent: function(el, sType) {
-
-                return ( (!el.addEventListener && !el.attachEvent) ||
-                                (sType == "click" && this.isSafari) );
-            },
-
-            /**
-             * Removes an event handler
-             *
-             * @param {Object} el the html element or the id of the element to
-             * assign the event to.
-             * @param {String} sType the type of event to remove
-             * @param {Function} fn the method the event invokes
-             * @return {boolean} true if the unbind was successful, false
-             * otherwise
-             */
-            removeListener: function(el, sType, fn) {
-
-                // The el argument can be a string
-                if (typeof el == "string") {
-                    el = this.getEl(el);
-                // The el argument can be an array of elements or element ids.
-                } else if ( this._isValidCollection(el)) {
-                    var ok = true;
-                    for (var i=0; i< el.length; ++i) {
-                        ok = ( this.removeListener(el[i], sType, fn) && ok );
-                    }
-                    return ok;
-                }
-
-                var cacheItem = null;
-                var index = this._getCacheIndex(el, sType, fn);
-
-                if (index >= 0) {
-                    cacheItem = listeners[index];
-                }
-
-                if (!el || !cacheItem) {
-                    return false;
-                }
-
-
-                if (el.removeEventListener) {
-                    el.removeEventListener(sType, cacheItem[this.WFN], false);
-                    // alert("adsf");
-                } else if (el.detachEvent) {
-                    el.detachEvent("on" + sType, cacheItem[this.WFN]);
-                }
-
-                // removed the wrapped handler
-                delete listeners[index][this.WFN];
-                delete listeners[index][this.FN];
-                delete listeners[index];
-
-                return true;
-
-            },
-
-            /**
-             * Returns the event's target element
-             * @param {Event} ev the event
-             * @param {boolean} resolveTextNode when set to true the target's
-             *                  parent will be returned if the target is a
-             *                  text node
-             * @return {HTMLElement} the event's target
-             */
-            getTarget: function(ev, resolveTextNode) {
-                var t = ev.target || ev.srcElement;
-
-                if (resolveTextNode && t && "#text" == t.nodeName) {
-                    return t.parentNode;
-                } else {
-                    return t;
-                }
-            },
-
-            /**
-             * Returns the event's pageX
-             * @param {Event} ev the event
-             * @return {int} the event's pageX
-             */
-            getPageX: function(ev) {
-                var x = ev.pageX;
-                if (!x && 0 !== x) {
-                    x = ev.clientX || 0;
-
-                    if ( this.isIE ) {
-                        x += this._getScrollLeft();
-                    }
-                }
-
-                return x;
-            },
-
-            /**
-             * Returns the event's pageY
-             * @param {Event} ev the event
-             * @return {int} the event's pageY
-             */
-            getPageY: function(ev) {
-                var y = ev.pageY;
-                if (!y && 0 !== y) {
-                    y = ev.clientY || 0;
-
-                    if ( this.isIE ) {
-                        y += this._getScrollTop();
-                    }
-                }
-
-                return y;
-            },
-
-            /**
-             * Returns the event's related target
-             * @param {Event} ev the event
-             * @return {HTMLElement} the event's relatedTarget
-             */
-            getRelatedTarget: function(ev) {
-                var t = ev.relatedTarget;
-                if (!t) {
-                    if (ev.type == "mouseout") {
-                        t = ev.toElement;
-                    } else if (ev.type == "mouseover") {
-                        t = ev.fromElement;
-                    }
-                }
-
-                return t;
-            },
-
-            /**
-             * Returns the time of the event.  If the time is not included, the
-             * event is modified using the current time.
-             * @param {Event} ev the event
-             * @return {Date} the time of the event
-             */
-            getTime: function(ev) {
-                if (!ev.time) {
-                    var t = new Date().getTime();
-                    try {
-                        ev.time = t;
-                    } catch(e) {
-                        // can't set the time property
-                        return t;
-                    }
-                }
-
-                return ev.time;
-            },
-
-            /**
-             * Convenience method for stopPropagation + preventDefault
-             * @param {Event} ev the event
-             */
-            stopEvent: function(ev) {
-                this.stopPropagation(ev);
-                this.preventDefault(ev);
-            },
-
-            /**
-             * Stops event propagation
-             * @param {Event} ev the event
-             */
-            stopPropagation: function(ev) {
-                if (ev.stopPropagation) {
-                    ev.stopPropagation();
-                } else {
-                    ev.cancelBubble = true;
-                }
-            },
-
-            /**
-             * Prevents the default behavior of the event
-             * @param {Event} ev the event
-             */
-            preventDefault: function(ev) {
-                if (ev.preventDefault) {
-                    ev.preventDefault();
-                } else {
-                    ev.returnValue = false;
-                }
-            },
-
-            /**
-             * Returns the event, should not be necessary for user to call
-             * @param {Event} the event parameter from the handler
-             * @return {Event} the event
-             */
-            getEvent: function(e) {
-                var ev = e || window.event;
-
-                if (!ev) {
-                    var c = this.getEvent.caller;
-                    while (c) {
-                        ev = c.arguments[0];
-                        if (ev && Event == ev.constructor) {
-                            break;
-                        }
-                        c = c.caller;
-                    }
-                }
-
-                return ev;
-            },
-
-            /**
-             * Returns the charcode for an event
-             * @param {Event} ev the event
-             * @return {int} the event's charCode
-             */
-            getCharCode: function(ev) {
-                return ev.charCode || (ev.type == "keypress") ? ev.keyCode : 0;
-            },
-
-            /**
-             * @private
-             * Locating the saved event handler data by function ref
-             */
-            _getCacheIndex: function(el, sType, fn) {
-                for (var i=0; i< listeners.length; ++i) {
-                    var li = listeners[i];
-                    if ( li                 &&
-                         li[this.FN] == fn  &&
-                         li[this.EL] == el  &&
-                         li[this.TYPE] == sType ) {
-                        return i;
-                    }
-                }
-
-                return -1;
-            },
-
-            /**
-             * We want to be able to use getElementsByTagName as a collection
-             * to attach a group of events to.  Unfortunately, different
-             * browsers return different types of collections.  This function
-             * tests to determine if the object is array-like.  It will also
-             * fail if the object is an array, but is empty.
-             * @param o the object to test
-             * @return {boolean} true if the object is array-like and populated
-             */
-            _isValidCollection: function(o) {
-                // alert(o.constructor.toString())
-                // alert(typeof o)
-
-                return ( o                    && // o is something
-                         o.length             && // o is indexed
-                         typeof o != "string" && // o is not a string
-                         !o.tagName           && // o is not an HTML element
-                         !o.alert             && // o is not a window
-                         typeof o[0] != "undefined" );
-
-            },
-
-            /**
-             * @private
-             * DOM element cache
-             */
-            elCache: {},
-
-            /**
-             * We cache elements bound by id because when the unload event
-             * fires, we can no longer use document.getElementById
-             * @private
-             */
-            getEl: function(id) {
-                /*
-                // this is a problem when replaced via document.getElementById
-                if (! this.elCache[id]) {
-                    try {
-                        var el = document.getElementById(id);
-                        if (el) {
-                            this.elCache[id] = el;
-                        }
-                    } catch (er) {
-                    }
-                }
-                return this.elCache[id];
-                */
-
-                return document.getElementById(id);
-            },
-
-            /**
-             * Clears the element cache
-             */
-            clearCache: function() {
-                for (i in this.elCache) {
-                    delete this.elCache[i];
-                }
-            },
-
-            /**
-             * Called by CustomEvent instances to provide a handle to the
-             * event * that can be removed later on.  Should be package
-             * protected.
-             * @private
-             */
-            regCE: function(ce) {
-                customEvents.push(ce);
-            },
-
-            /**
-             * @private
-             * hook up any deferred listeners
-             */
-            _load: function(e) {
-                loadComplete = true;
-            },
-
-            /**
-             * Polling function that runs before the onload event fires,
-             * attempting * to attach to DOM Nodes as soon as they are
-             * available
-             * @private
-             */
-            _tryPreloadAttach: function() {
-
-                // keep trying until after the page is loaded.  We need to
-                // check the page load state prior to trying to bind the
-                // elements so that we can be certain all elements have been
-                // tested appropriately
-                var tryAgain = !loadComplete;
-
-                for (var i=0; i < delayedListeners.length; ++i) {
-                    var d = delayedListeners[i];
-                    // There may be a race condition here, so we need to
-                    // verify the array element is usable.
-                    if (d) {
-
-                        // el will be null if document.getElementById did not
-                        // work
-                        var el = this.getEl(d[this.EL]);
-
-                        if (el) {
-                            this.on(el, d[this.TYPE], d[this.FN],
-                                    d[this.SCOPE], d[this.ADJ_SCOPE]);
-                            delete delayedListeners[i];
-                        }
-                    }
-                }
-
-                if (tryAgain) {
-                    setTimeout("YAHOO.util.Event._tryPreloadAttach()", 50);
-                }
-            },
-
-            /**
-             * Removes all listeners registered by pe.event.  Called
-             * automatically during the unload event.
-             */
-            _unload: function(e, me) {
-                for (var i=0; i < unloadListeners.length; ++i) {
-                    var l = unloadListeners[i];
-                    if (l) {
-                        var scope = (l[this.ADJ_SCOPE]) ? l[this.SCOPE]: window;
-                        l[this.FN].call(scope, this.getEvent(e), l[this.SCOPE] );
-                    }
-                }
-
-                if (listeners && listeners.length > 0) {
-                    for (i = 0; i < listeners.length; ++i) {
-                        l = listeners[i];
-                        if (l) {
-                            this.removeListener(l[this.EL], l[this.TYPE],
-                                    l[this.FN]);
-                        }
-                    }
-
-                    this.clearCache();
-                }
-
-                for (i = 0; i < customEvents.length; ++i) {
-                    customEvents[i].unsubscribeAll();
-                    delete customEvents[i];
-                }
-
-                for (i = 0; i < legacyEvents.length; ++i) {
-                    // dereference the element
-                    delete legacyEvents[i][0];
-                    // delete the array item
-                    delete legacyEvents[i];
-                }
-            },
-
-            /**
-             * Returns scrollLeft
-             * @private
-             */
-            _getScrollLeft: function() {
-                return this._getScroll()[1];
-            },
-
-            /**
-             * Returns scrollTop
-             * @private
-             */
-            _getScrollTop: function() {
-                return this._getScroll()[0];
-            },
-
-            /**
-             * Returns the scrollTop and scrollLeft.  Used to calculate the
-             * pageX and pageY in Internet Explorer
-             * @private
-             */
-            _getScroll: function() {
-                var dd = document.documentElement; db = document.body;
-                if (dd && dd.scrollTop) {
-                    return [dd.scrollTop, dd.scrollLeft];
-                } else if (db) {
-                    return [db.scrollTop, db.scrollLeft];
-                } else {
-                    return [0, 0];
-                }
-            }
-        };
-    } ();
-
-    YAHOO.util.Event.on = YAHOO.util.Event.addListener;
-
-    if (document && document.body) {
-        YAHOO.util.Event._load();
-    } else {
-        YAHOO.util.Event.on(window, "load", YAHOO.util.Event._load,
-                YAHOO.util.Event, true);
-    }
-
-    YAHOO.util.Event.on(window, "unload", YAHOO.util.Event._unload,
-                YAHOO.util.Event, true);
-
-    YAHOO.util.Event._tryPreloadAttach();
-
-}
-
Index: in/trunk/greenstone3/web/interfaces/oran/js/key.js
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/js/key.js	(revision 24017)
+++ 	(revision )
@@ -1,34 +1,0 @@
-/* Copyright (c) 2006 Yahoo! Inc. All rights reserved. */
-
-YAHOO.util.Key = new function() {
-	// this.logger	= new ygLogger("ygEventUtil");
-	// DOM key constants 
-	this.DOM_VK_UNDEFINED               = 0x0;
-	this.DOM_VK_RIGHT_ALT               = 0x12;
-	this.DOM_VK_LEFT_ALT                = 0x12;
-	this.DOM_VK_LEFT_CONTROL            = 0x11;
-	this.DOM_VK_RIGHT_CONTROL           = 0x11;
-	this.DOM_VK_LEFT_SHIFT              = 0x10;
-	this.DOM_VK_RIGHT_SHIFT             = 0x10;
-	this.DOM_VK_META                    = 0x9D;
-	this.DOM_VK_BACK_SPACE              = 0x08;
-	this.DOM_VK_CAPS_LOCK               = 0x14;
-	this.DOM_VK_DELETE                  = 0x7F;
-	this.DOM_VK_END                     = 0x23;
-	this.DOM_VK_ENTER                   = 0x0D;
-	this.DOM_VK_ESCAPE                  = 0x1B;
-	this.DOM_VK_HOME                    = 0x24;
-	this.DOM_VK_NUM_LOCK                = 0x90;
-	this.DOM_VK_PAUSE                   = 0x13;
-	this.DOM_VK_PRINTSCREEN             = 0x9A;
-	this.DOM_VK_SCROLL_LOCK             = 0x91;
-	this.DOM_VK_SPACE                   = 0x20;
-	this.DOM_VK_TAB                     = 0x09;
-	this.DOM_VK_LEFT                    = 0x25;
-	this.DOM_VK_RIGHT                   = 0x27;
-	this.DOM_VK_UP                      = 0x26;
-	this.DOM_VK_DOWN                    = 0x28;
-	this.DOM_VK_PAGE_DOWN               = 0x22;
-	this.DOM_VK_PAGE_UP                 = 0x21;
-};
-
Index: in/trunk/greenstone3/web/interfaces/oran/js/ygDDOnTop.js
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/js/ygDDOnTop.js	(revision 24017)
+++ 	(revision )
@@ -1,46 +1,0 @@
-
-/* Copyright (c) 2006 Yahoo! Inc. All rights reserved. */
-
-/**
- * @class a DragDrop implementation that moves the object as it is being dragged,
- * and keeps the object being dragged on top.  This is a subclass of ygDD rather
- * than DragDrop, and inherits the implementation of most of the event listeners
- * from that class.
- *
- * @extends ygDD
- * @constructor
- * @param {String} id the id of the linked element
- * @param {String} sGroup the group of related DragDrop items
- */
-function ygDDOnTop(id, sGroup) {
-	if (id) {
-		this.init(id, sGroup);
-	
-	}
-}
-
-ygDDOnTop.prototype = new YAHOO.util.DD();
-
-/**
- * The inital z-index of the element, stored so we can restore it later
- *
- * @type int
- */
-ygDDOnTop.prototype.origZ = 0;
-
-ygDDOnTop.prototype.startDrag = function(x, y) {
-
-	var style = this.getEl().style;
-
-	// store the original z-index
-	this.origZ = style.zIndex;
-
-	// The z-index needs to be set very high so the element will indeed be on top
-	style.zIndex = 999;
-}
-
-ygDDOnTop.prototype.endDrag = function(e) {
-
-	// restore the original z-index
-	this.getEl().style.zIndex = this.origZ;
-};
Index: in/trunk/greenstone3/web/interfaces/oran/js/ygDDPlayer.js
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/js/ygDDPlayer.js	(revision 24017)
+++ 	(revision )
@@ -1,346 +1,0 @@
-/* Copyright (c) 2006 Yahoo! Inc. All rights reserved. */
-
-function ygDDStack(id, sGroup) {
-	if (id) {
-		this.init(id, sGroup);
-		this.initFrame();
-	}
-}
-
-ygDDStack.prototype = new YAHOO.util.DDTarget();
-
-ygDDPlayer.TYPE = "ygDDPlayer";
-
-/**
- * @class a YAHOO.util.DDFramed implementation. During the drag over event, the
- * dragged element is inserted before the dragged-over element.
- *
- * @extends YAHOO.util.DDProxy
- * @constructor
- * @param {String} id the id of the linked element
- * @param {String} sGroup the group of related DragDrop objects
- */
-function ygDDPlayer(id, sGroup,bl) {
-    this.initPlayer(id, sGroup);
-    this.berryList = bl;     
-            
-}
-
-ygDDPlayer.prototype = new YAHOO.util.DDProxy();
-
-ygDDPlayer.prototype.berryList = new Array();
-
-ygDDPlayer.prototype.initPlayer = function(id, sGroup) {
-	if (!id) { return; }
-
-    this.init(id, sGroup);
-    this.initFrame();
-    var s = this.getDragEl().style;
-    s.borderColor = "transparent";
-    // s.backgroundColor = "#cccccc";
-    s.opacity = 0.76;
-    s.filter = "alpha(opacity=76)";
-
-    // specify that this is not currently a drop target
-    this.isTarget = false;
-
-    this.originalStyles = [];
-
-    this.type = ygDDPlayer.TYPE;
-    this.slot = null;
-    this.startPos = YAHOO.util.Dom.getXY( this.getEl() );
-   
-}
-
-ygDDPlayer.prototype.startDrag = function(x, y) {
-	
-	var dragEl = this.getDragEl();
-	var clickEl = this.getEl();
-       
-       	dragEl.innerHTML = clickEl.innerHTML;
-	//dragEl.className = clickEl.className;
-    	//dragEl.style.color = clickEl.style.color;
-	//dragEl.style.backgroundColor = clickEl.style.backgroundColor;
-        //dragEl.style.visibility = clickEl.style.visibility;
-               
- 	while (dragEl.hasChildNodes())	{
-        	 dragEl.removeChild(dragEl.firstChild);
-	}	
-       
-         var img = document.createElement('img');
-         img.src = 'interfaces/oran/images/berry.png';
-         dragEl.appendChild(img);
-       
-        var added = true;
-
-      	var s = clickEl.style;
-	s.opacity = .1;
-	s.filter = "alpha(opacity=10)";
-
-	var targets = YAHOO.util.DDM.getRelated(this, true);
-	
-	for (var i=0; i<targets.length; i++) {
-		
-		var targetEl = this.getTargetDomRef(targets[i]);
-
-		if (!this.originalStyles[targetEl.id]) {
-			this.originalStyles[targetEl.id] = targetEl.className;
-		}
-
-		targetEl.className = "target";
-	}
-	correctBerryExpandCollapseButtons();
-};
-
-ygDDPlayer.prototype.getTargetDomRef = function(oDD) {
-	if (oDD.player) {
-		return oDD.player.getEl();
-	} else {
-		return oDD.getEl();
-	}
-};
-
-ygDDPlayer.prototype.endDrag = function(e) {
-	// reset the linked element styles
-	var s = this.getEl().style;
-	s.opacity = 1;
-	s.filter = "alpha(opacity=100)";
-
-	this.resetTargets();
-};
-
-ygDDPlayer.prototype.resetTargets = function() {
-
-	// reset the target styles
-	var targets = YAHOO.util.DDM.getRelated(this, true);
-	for (var i=0; i<targets.length; i++) {
-		var targetEl = this.getTargetDomRef(targets[i]);
-		var oldStyle = this.originalStyles[targetEl.id];
-		if (oldStyle) {
-			targetEl.className = oldStyle;
-		}
-	}
-};
-
-var request_type = "GET";
-var addurlPath ="?a=pr&rt=r&ro=1&s=AddItem&c=&s1.id=2&o=XML&s1.item=";
-var delurlPath ="?a=pr&rt=r&ro=1&s=DeleteItem&c=&o=XML&s1.item=";
-var postdata = null;
-
-ygDDPlayer.prototype.onDragDrop = function(e, id) {
-	// get the drag and drop object that was targeted
-     var oDD;
-     var player = this;
-   
-    if ("string" == typeof id) {
-        oDD = YAHOO.util.DDM.getDDById(id);
-    } else {
-        oDD = YAHOO.util.DDM.getBestMatch(id);
-    }
-
-
-   var el = this.getEl();
-
-	// check if the slot has a player in it already
-	if (oDD.player) {
-		// check if the dragged player was already in a slot
-		if (this.slot) {
-	  		// check to see if the player that is already in the
-			// slot can go to the slot the dragged player is in
-			// YAHOO.util.DDM.isLegalTarget is a new method
-			if ( YAHOO.util.DDM.isLegalTarget(oDD.player, this.slot) ) {
-				YAHOO.util.DDM.moveToEl(oDD.player.getEl(), el);
-				this.slot.player = oDD.player;
-				oDD.player.slot = this.slot;
-			} else {
-				YAHOO.util.Dom.setXY(oDD.player.getEl(), oDD.player.startPos);
-				this.slot.player = null;
-				oDD.player.slot = null
-			}
-		} else {
-		        // the player in the slot will be moved to the dragged
-			// players start position
-			//oDD.player.slot = null;
-			//YAHOO.util.DDM.moveToEl(oDD.player.getEl(), el);
-		}
-	}else {
-		// Move the player into the emply slot
-		// I may be moving off a slot so I need to clear the player ref
-	   	if (this.slot) {
-			this.slot.player = null;
-		}
-	}
-
-     var  addurl = addurlPath + el.id;	
-     var addSuccess = function(o){ 
-                 var text = o.responseText;
-	         var result = o.responseXML;
-                 var items = result.getElementsByTagName('item');
-                 if (items.length > 0){
-                    var item = items[0];
-                    var berrybasket = YAHOO.util.Dom.get('berrybasket');
-        	    var berries = YAHOO.util.Dom.get('berries');
-                    player.berryList[player.berryList.length]= item;     
-                
-                    var itemID = item.getAttribute('collection')+":"+item.getAttribute('name');
-                    var parent =el.parentNode;
-                    parent.removeChild(el);
- 	        	
-                    if (parent !=null && parent.id == "documentberries"){
-                         var root = YAHOO.util.Dom.get(itemID+":root");
-                         var section = YAHOO.util.Dom.get(itemID+":section");
-                         if(root!=null && root.id.indexOf(itemID) !=-1){
-                             parent.removeChild(root);
-                          }
-     
-	                  if(section!=null && section.id.indexOf(itemID) !=-1){
-                             parent.removeChild(section);
-        	          }                                                
-                     }
-                   
-
-                    if (!YAHOO.util.Dom.get('hideview') && player.berryList.length <13){
-                       
-                       while (berries.hasChildNodes()) {
-       	                   berries.removeChild(berries.firstChild);
-	                }
-                        
-                     for (var i =0; i < player.berryList.length; i++ ){
-                             var img = document.createElement('img');
-                              img.src = 'interfaces/oran/images/berry.png';
-                              berries.appendChild(img);
-                       }
-
-				correctBerryExpandCollapseButtons();
-      	                                   
-	          }
-                 else{
-                      
-        
-                    if (YAHOO.util.Dom.get('hideview')){
-                      
-                        var berryBasket  = YAHOO.util.Dom.get('berrybasket');
-                        var berries  = YAHOO.util.Dom.get('berries');
-                        var doclist = YAHOO.util.Dom.get('doclist'); 
-                        var tid = el.id;                                  
-                        var berryItem; 
-                        var berryElement = document.createElement('li');
-                         for (var i in player.berryList){
-                             berryItem = player.berryList[i];
-                             var id = berryItem.getAttribute('collection')+":"+berryItem.getAttribute('name');
-                             if (id == tid){
-                               var title = berryItem.getAttribute('title');
-                               var root_title = berryItem.getAttribute('root_title');  
-                                if (root_title != ""){
-                                      root_title +=":";
-                                     }
-	    
-                                title = root_title+title;	
-                                if (title.length > 50){
-                                   title = title.substring(0,20)+" ... "+title.substr(title.length-35,35);
-                                }
-                                
-                               berryElement.appendChild(document.createTextNode(title));
-                               berryElement.setAttribute("class","berryitem");
-                               doclist.appendChild(berryElement);
-                               var heightStr =  berryBasket.style.height+"";
-                               var height =parseInt(heightStr.substring(0,heightStr.length-2)) +18;                             
-                               berryBasket.style.height = height;
-                               berries.style.height = height;
-                               break;
-                            }
-                         }
-                         }    
-                 
-                 }
-               }
-                
-                       
-
-         }
-
-     var addFailure = function(o){ }
-
-
-     var addcallback = {
-        	success:addSuccess,
-     	        failure:addFailure,  
-                argument:player
-                }
-    
-
-    var  delurl = delurlPath + el.id;
-     var delSuccess = function(o){ 
- 		 var result = o.responseXML;
-                    var parent =el.parentNode;
-                    if (parent == null) return;                   
-
-                    parent.removeChild(el);
-                     
-                    for (var i in player.berryList){
-                       var berry = player.berryList[i];
-                  
-                       var id = berry['collection']+":"+berry['name'];
-                       
-                       if (id == el.id){
-                             player.berryList.splice(i,1);
-                                    
-                             break;
-                         }
-
-                   }
-
-                   if (!parent.hasChildNodes()){
-                         var content =  YAHOO.util.Dom.get('content');
-                           while (content.hasChildNodes()) {
-		              content.removeChild(content.firstChild);
-	                }  
-                        content.appendChild(document.createTextNode('Your berry basket is empty.'));
-                     }
-                   var trashbin =  YAHOO.util.Dom.get('trashbin');
-                   if ( trashbin !=null){
-                         trashbin.style.background = 'url("interfaces/default/images/trash-full.png") 0 0 no-repeat';
-                  }
-              }                                       
-         
-
-     var delFailure = function(o){ }
-
-
-     var delcallback = {
-        	success:delSuccess,
-     	        failure:delFailure,  
-                argument:player
-                }
-    
-
-	if (id == 'berrybasket'){
-		YAHOO.util.Connect.asyncRequest(request_type , addurl , addcallback);         
-	} else {
-		if (id == 'trashbin'){
-			YAHOO.util.Connect.asyncRequest(request_type , delurl , delcallback); 
-		}
-	}
-
-	this.resetTargets();  	
-	this.slot = oDD;	
-	this.slot.player = this;
- 
-};
-
-ygDDPlayer.prototype.swap = function(el1, el2) {
-    var dom = YAHOO.util.Dom;
-	var pos1 = dom.getXY(el1);
-	var pos2 = dom.getXY(el2);
-	dom.setXY(el1, pos2);
-	dom.setXY(el2, pos1);
-};
-
-ygDDPlayer.prototype.onDragOver = function(e, id) {};
-
-ygDDPlayer.prototype.onDrag = function(e, id) {};
-
-
-
-
-
Index: /main/trunk/greenstone3/web/interfaces/oran/js/yui/connection-min.js
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/js/yui/connection-min.js	(revision 24018)
+++ /main/trunk/greenstone3/web/interfaces/oran/js/yui/connection-min.js	(revision 24018)
@@ -0,0 +1,9 @@
+/*
+Copyright (c) 2011, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.com/yui/license.html
+version: 2.9.0
+*/
+YAHOO.util.Connect={_msxml_progid:["Microsoft.XMLHTTP","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"],_http_headers:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:"application/x-www-form-urlencoded; charset=UTF-8",_default_form_header:"application/x-www-form-urlencoded",_use_default_xhr_header:true,_default_xhr_header:"XMLHttpRequest",_has_default_headers:true,_isFormSubmit:false,_default_headers:{},_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,startEvent:new YAHOO.util.CustomEvent("start"),completeEvent:new YAHOO.util.CustomEvent("complete"),successEvent:new YAHOO.util.CustomEvent("success"),failureEvent:new YAHOO.util.CustomEvent("failure"),abortEvent:new YAHOO.util.CustomEvent("abort"),_customEvents:{onStart:["startEvent","start"],onComplete:["completeEvent","complete"],onSuccess:["successEvent","success"],onFailure:["failureEvent","failure"],onUpload:["uploadEvent","upload"],onAbort:["abortEvent","abort"]},setProgId:function(a){this._msxml_progid.unshift(a);},setDefaultPostHeader:function(a){if(typeof a=="string"){this._default_post_header=a;this._use_default_post_header=true;}else{if(typeof a=="boolean"){this._use_default_post_header=a;}}},setDefaultXhrHeader:function(a){if(typeof a=="string"){this._default_xhr_header=a;}else{this._use_default_xhr_header=a;}},setPollingInterval:function(a){if(typeof a=="number"&&isFinite(a)){this._polling_interval=a;}},createXhrObject:function(g){var d,a,b;try{a=new XMLHttpRequest();d={conn:a,tId:g,xhr:true};}catch(c){for(b=0;b<this._msxml_progid.length;++b){try{a=new ActiveXObject(this._msxml_progid[b]);d={conn:a,tId:g,xhr:true};break;}catch(f){}}}finally{return d;}},getConnectionObject:function(a){var c,d=this._transaction_id;try{if(!a){c=this.createXhrObject(d);}else{c={tId:d};if(a==="xdr"){c.conn=this._transport;c.xdr=true;}else{if(a==="upload"){c.upload=true;}}}if(c){this._transaction_id++;}}catch(b){}return c;},asyncRequest:function(h,d,g,a){var b=g&&g.argument?g.argument:null,e=this,f,c;if(this._isFileUpload){c="upload";}else{if(g&&g.xdr){c="xdr";}}f=this.getConnectionObject(c);if(!f){return null;}else{if(g&&g.customevents){this.initCustomEvents(f,g);}if(this._isFormSubmit){if(this._isFileUpload){window.setTimeout(function(){e.uploadFile(f,g,d,a);},10);return f;}if(h.toUpperCase()=="GET"){if(this._sFormData.length!==0){d+=((d.indexOf("?")==-1)?"?":"&")+this._sFormData;}}else{if(h.toUpperCase()=="POST"){a=a?this._sFormData+"&"+a:this._sFormData;}}}if(h.toUpperCase()=="GET"&&(g&&g.cache===false)){d+=((d.indexOf("?")==-1)?"?":"&")+"rnd="+new Date().valueOf().toString();}if(this._use_default_xhr_header){if(!this._default_headers["X-Requested-With"]){this.initHeader("X-Requested-With",this._default_xhr_header,true);}}if((h.toUpperCase()==="POST"&&this._use_default_post_header)&&this._isFormSubmit===false){this.initHeader("Content-Type",this._default_post_header);}if(f.xdr){this.xdr(f,h,d,g,a);return f;}f.conn.open(h,d,true);if(this._has_default_headers||this._has_http_headers){this.setHeader(f);}this.handleReadyState(f,g);f.conn.send(a||"");if(this._isFormSubmit===true){this.resetFormState();}this.startEvent.fire(f,b);if(f.startEvent){f.startEvent.fire(f,b);}return f;}},initCustomEvents:function(a,c){var b;for(b in c.customevents){if(this._customEvents[b][0]){a[this._customEvents[b][0]]=new YAHOO.util.CustomEvent(this._customEvents[b][1],(c.scope)?c.scope:null);a[this._customEvents[b][0]].subscribe(c.customevents[b]);}}},handleReadyState:function(c,d){var b=this,a=(d&&d.argument)?d.argument:null;if(d&&d.timeout){this._timeOut[c.tId]=window.setTimeout(function(){b.abort(c,d,true);},d.timeout);}this._poll[c.tId]=window.setInterval(function(){if(c.conn&&c.conn.readyState===4){window.clearInterval(b._poll[c.tId]);delete b._poll[c.tId];if(d&&d.timeout){window.clearTimeout(b._timeOut[c.tId]);delete b._timeOut[c.tId];}b.completeEvent.fire(c,a);if(c.completeEvent){c.completeEvent.fire(c,a);}b.handleTransactionResponse(c,d);}},this._polling_interval);},handleTransactionResponse:function(b,j,d){var f,a,h=(j&&j.argument)?j.argument:null,c=(b.r&&b.r.statusText==="xdr:success")?true:false,i=(b.r&&b.r.statusText==="xdr:failure")?true:false,k=d;try{if((b.conn.status!==undefined&&b.conn.status!==0)||c){f=b.conn.status;}else{if(i&&!k){f=0;}else{f=13030;}}}catch(g){f=13030;}if((f>=200&&f<300)||f===1223||c){a=b.xdr?b.r:this.createResponseObject(b,h);if(j&&j.success){if(!j.scope){j.success(a);}else{j.success.apply(j.scope,[a]);}}this.successEvent.fire(a);if(b.successEvent){b.successEvent.fire(a);}}else{switch(f){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:a=this.createExceptionObject(b.tId,h,(d?d:false));if(j&&j.failure){if(!j.scope){j.failure(a);}else{j.failure.apply(j.scope,[a]);}}break;default:a=(b.xdr)?b.response:this.createResponseObject(b,h);if(j&&j.failure){if(!j.scope){j.failure(a);}else{j.failure.apply(j.scope,[a]);}}}this.failureEvent.fire(a);if(b.failureEvent){b.failureEvent.fire(a);}}this.releaseObject(b);a=null;},createResponseObject:function(a,h){var d={},k={},f,c,g,b;try{c=a.conn.getAllResponseHeaders();g=c.split("\n");for(f=0;f<g.length;f++){b=g[f].indexOf(":");if(b!=-1){k[g[f].substring(0,b)]=YAHOO.lang.trim(g[f].substring(b+2));}}}catch(j){}d.tId=a.tId;d.status=(a.conn.status==1223)?204:a.conn.status;d.statusText=(a.conn.status==1223)?"No Content":a.conn.statusText;d.getResponseHeader=k;d.getAllResponseHeaders=c;d.responseText=a.conn.responseText;d.responseXML=a.conn.responseXML;if(h){d.argument=h;}return d;},createExceptionObject:function(h,d,a){var f=0,g="communication failure",c=-1,b="transaction aborted",e={};e.tId=h;if(a){e.status=c;e.statusText=b;}else{e.status=f;e.statusText=g;}if(d){e.argument=d;}return e;},initHeader:function(a,d,c){var b=(c)?this._default_headers:this._http_headers;b[a]=d;if(c){this._has_default_headers=true;}else{this._has_http_headers=true;}},setHeader:function(a){var b;if(this._has_default_headers){for(b in this._default_headers){if(YAHOO.lang.hasOwnProperty(this._default_headers,b)){a.conn.setRequestHeader(b,this._default_headers[b]);
+}}}if(this._has_http_headers){for(b in this._http_headers){if(YAHOO.lang.hasOwnProperty(this._http_headers,b)){a.conn.setRequestHeader(b,this._http_headers[b]);}}this._http_headers={};this._has_http_headers=false;}},resetDefaultHeaders:function(){this._default_headers={};this._has_default_headers=false;},abort:function(e,g,a){var d,b=(g&&g.argument)?g.argument:null;e=e||{};if(e.conn){if(e.xhr){if(this.isCallInProgress(e)){e.conn.abort();window.clearInterval(this._poll[e.tId]);delete this._poll[e.tId];if(a){window.clearTimeout(this._timeOut[e.tId]);delete this._timeOut[e.tId];}d=true;}}else{if(e.xdr){e.conn.abort(e.tId);d=true;}}}else{if(e.upload){var c="yuiIO"+e.tId;var f=document.getElementById(c);if(f){YAHOO.util.Event.removeListener(f,"load");document.body.removeChild(f);if(a){window.clearTimeout(this._timeOut[e.tId]);delete this._timeOut[e.tId];}d=true;}}else{d=false;}}if(d===true){this.abortEvent.fire(e,b);if(e.abortEvent){e.abortEvent.fire(e,b);}this.handleTransactionResponse(e,g,true);}return d;},isCallInProgress:function(a){a=a||{};if(a.xhr&&a.conn){return a.conn.readyState!==4&&a.conn.readyState!==0;}else{if(a.xdr&&a.conn){return a.conn.isCallInProgress(a.tId);}else{if(a.upload===true){return document.getElementById("yuiIO"+a.tId)?true:false;}else{return false;}}}},releaseObject:function(a){if(a&&a.conn){a.conn=null;a=null;}}};(function(){var g=YAHOO.util.Connect,h={};function d(i){var j='<object id="YUIConnectionSwf" type="application/x-shockwave-flash" data="'+i+'" width="0" height="0">'+'<param name="movie" value="'+i+'">'+'<param name="allowScriptAccess" value="always">'+"</object>",k=document.createElement("div");document.body.appendChild(k);k.innerHTML=j;}function b(l,i,j,n,k){h[parseInt(l.tId)]={"o":l,"c":n};if(k){n.method=i;n.data=k;}l.conn.send(j,n,l.tId);}function e(i){d(i);g._transport=document.getElementById("YUIConnectionSwf");}function c(){g.xdrReadyEvent.fire();}function a(j,i){if(j){g.startEvent.fire(j,i.argument);if(j.startEvent){j.startEvent.fire(j,i.argument);}}}function f(j){var k=h[j.tId].o,i=h[j.tId].c;if(j.statusText==="xdr:start"){a(k,i);return;}j.responseText=decodeURI(j.responseText);k.r=j;if(i.argument){k.r.argument=i.argument;}this.handleTransactionResponse(k,i,j.statusText==="xdr:abort"?true:false);delete h[j.tId];}g.xdr=b;g.swf=d;g.transport=e;g.xdrReadyEvent=new YAHOO.util.CustomEvent("xdrReady");g.xdrReady=c;g.handleXdrResponse=f;})();(function(){var e=YAHOO.util.Connect,g=YAHOO.util.Event,a=document.documentMode?document.documentMode:false;e._isFileUpload=false;e._formNode=null;e._sFormData=null;e._submitElementValue=null;e.uploadEvent=new YAHOO.util.CustomEvent("upload");e._hasSubmitListener=function(){if(g){g.addListener(document,"click",function(k){var j=g.getTarget(k),i=j.nodeName.toLowerCase();if((i==="input"||i==="button")&&(j.type&&j.type.toLowerCase()=="submit")){e._submitElementValue=encodeURIComponent(j.name)+"="+encodeURIComponent(j.value);}});return true;}return false;}();function h(w,r,m){var v,l,u,s,z,t=false,p=[],y=0,o,q,n,x,k;this.resetFormState();if(typeof w=="string"){v=(document.getElementById(w)||document.forms[w]);}else{if(typeof w=="object"){v=w;}else{return;}}if(r){this.createFrame(m?m:null);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=v;return;}for(o=0,q=v.elements.length;o<q;++o){l=v.elements[o];z=l.disabled;u=l.name;if(!z&&u){u=encodeURIComponent(u)+"=";s=encodeURIComponent(l.value);switch(l.type){case"select-one":if(l.selectedIndex>-1){k=l.options[l.selectedIndex];p[y++]=u+encodeURIComponent((k.attributes.value&&k.attributes.value.specified)?k.value:k.text);}break;case"select-multiple":if(l.selectedIndex>-1){for(n=l.selectedIndex,x=l.options.length;n<x;++n){k=l.options[n];if(k.selected){p[y++]=u+encodeURIComponent((k.attributes.value&&k.attributes.value.specified)?k.value:k.text);}}}break;case"radio":case"checkbox":if(l.checked){p[y++]=u+s;}break;case"file":case undefined:case"reset":case"button":break;case"submit":if(t===false){if(this._hasSubmitListener&&this._submitElementValue){p[y++]=this._submitElementValue;}t=true;}break;default:p[y++]=u+s;}}}this._isFormSubmit=true;this._sFormData=p.join("&");this.initHeader("Content-Type",this._default_form_header);return this._sFormData;}function d(){this._isFormSubmit=false;this._isFileUpload=false;this._formNode=null;this._sFormData="";}function c(i){var j="yuiIO"+this._transaction_id,l=(a===9)?true:false,k;if(YAHOO.env.ua.ie&&!l){k=document.createElement('<iframe id="'+j+'" name="'+j+'" />');if(typeof i=="boolean"){k.src="javascript:false";}}else{k=document.createElement("iframe");k.id=j;k.name=j;}k.style.position="absolute";k.style.top="-1000px";k.style.left="-1000px";document.body.appendChild(k);}function f(j){var m=[],k=j.split("&"),l,n;for(l=0;l<k.length;l++){n=k[l].indexOf("=");if(n!=-1){m[l]=document.createElement("input");m[l].type="hidden";m[l].name=decodeURIComponent(k[l].substring(0,n));m[l].value=decodeURIComponent(k[l].substring(n+1));this._formNode.appendChild(m[l]);}}return m;}function b(m,y,n,l){var t="yuiIO"+m.tId,u="multipart/form-data",w=document.getElementById(t),p=(a>=8)?true:false,z=this,v=(y&&y.argument)?y.argument:null,x,s,k,r,j,q;j={action:this._formNode.getAttribute("action"),method:this._formNode.getAttribute("method"),target:this._formNode.getAttribute("target")};this._formNode.setAttribute("action",n);this._formNode.setAttribute("method","POST");this._formNode.setAttribute("target",t);if(YAHOO.env.ua.ie&&!p){this._formNode.setAttribute("encoding",u);}else{this._formNode.setAttribute("enctype",u);}if(l){x=this.appendPostData(l);}this._formNode.submit();this.startEvent.fire(m,v);if(m.startEvent){m.startEvent.fire(m,v);}if(y&&y.timeout){this._timeOut[m.tId]=window.setTimeout(function(){z.abort(m,y,true);},y.timeout);}if(x&&x.length>0){for(s=0;s<x.length;s++){this._formNode.removeChild(x[s]);}}for(k in j){if(YAHOO.lang.hasOwnProperty(j,k)){if(j[k]){this._formNode.setAttribute(k,j[k]);}else{this._formNode.removeAttribute(k);}}}this.resetFormState();
+q=function(){var i,A,B;if(y&&y.timeout){window.clearTimeout(z._timeOut[m.tId]);delete z._timeOut[m.tId];}z.completeEvent.fire(m,v);if(m.completeEvent){m.completeEvent.fire(m,v);}r={tId:m.tId,argument:v};try{i=w.contentWindow.document.getElementsByTagName("body")[0];A=w.contentWindow.document.getElementsByTagName("pre")[0];if(i){if(A){B=A.textContent?A.textContent:A.innerText;}else{B=i.textContent?i.textContent:i.innerText;}}r.responseText=B;r.responseXML=w.contentWindow.document.XMLDocument?w.contentWindow.document.XMLDocument:w.contentWindow.document;}catch(o){}if(y&&y.upload){if(!y.scope){y.upload(r);}else{y.upload.apply(y.scope,[r]);}}z.uploadEvent.fire(r);if(m.uploadEvent){m.uploadEvent.fire(r);}g.removeListener(w,"load",q);setTimeout(function(){document.body.removeChild(w);z.releaseObject(m);},100);};g.addListener(w,"load",q);}e.setForm=h;e.resetFormState=d;e.createFrame=c;e.appendPostData=f;e.uploadFile=b;})();YAHOO.register("connection",YAHOO.util.Connect,{version:"2.9.0",build:"2800"});
Index: /main/trunk/greenstone3/web/interfaces/oran/js/yui/cookie-min.js
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/js/yui/cookie-min.js	(revision 24018)
+++ /main/trunk/greenstone3/web/interfaces/oran/js/yui/cookie-min.js	(revision 24018)
@@ -0,0 +1,7 @@
+/*
+Copyright (c) 2011, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.com/yui/license.html
+version: 2.9.0
+*/
+YAHOO.namespace("util");YAHOO.util.Cookie={_createCookieString:function(B,D,C,A){var F=YAHOO.lang,E=encodeURIComponent(B)+"="+(C?encodeURIComponent(D):D);if(F.isObject(A)){if(A.expires instanceof Date){E+="; expires="+A.expires.toUTCString();}if(F.isString(A.path)&&A.path!==""){E+="; path="+A.path;}if(F.isString(A.domain)&&A.domain!==""){E+="; domain="+A.domain;}if(A.secure===true){E+="; secure";}}return E;},_createCookieHashString:function(B){var D=YAHOO.lang;if(!D.isObject(B)){throw new TypeError("Cookie._createCookieHashString(): Argument must be an object.");}var C=[];for(var A in B){if(D.hasOwnProperty(B,A)&&!D.isFunction(B[A])&&!D.isUndefined(B[A])){C.push(encodeURIComponent(A)+"="+encodeURIComponent(String(B[A])));}}return C.join("&");},_parseCookieHash:function(E){var D=E.split("&"),F=null,C={};if(E.length>0){for(var B=0,A=D.length;B<A;B++){F=D[B].split("=");C[decodeURIComponent(F[0])]=decodeURIComponent(F[1]);}}return C;},_parseCookieString:function(J,A){var K={};if(YAHOO.lang.isString(J)&&J.length>0){var B=(A===false?function(L){return L;}:decodeURIComponent);var H=J.split(/;\s/g),I=null,C=null,E=null;for(var D=0,F=H.length;D<F;D++){E=H[D].match(/([^=]+)=/i);if(E instanceof Array){try{I=decodeURIComponent(E[1]);C=B(H[D].substring(E[1].length+1));}catch(G){}}else{I=decodeURIComponent(H[D]);C="";}K[I]=C;}}return K;},exists:function(A){if(!YAHOO.lang.isString(A)||A===""){throw new TypeError("Cookie.exists(): Cookie name must be a non-empty string.");}var B=this._parseCookieString(document.cookie,true);return B.hasOwnProperty(A);},get:function(B,A){var E=YAHOO.lang,C;if(E.isFunction(A)){C=A;A={};}else{if(E.isObject(A)){C=A.converter;}else{A={};}}var D=this._parseCookieString(document.cookie,!A.raw);if(!E.isString(B)||B===""){throw new TypeError("Cookie.get(): Cookie name must be a non-empty string.");}if(E.isUndefined(D[B])){return null;}if(!E.isFunction(C)){return D[B];}else{return C(D[B]);}},getSub:function(A,C,B){var E=YAHOO.lang,D=this.getSubs(A);if(D!==null){if(!E.isString(C)||C===""){throw new TypeError("Cookie.getSub(): Subcookie name must be a non-empty string.");}if(E.isUndefined(D[C])){return null;}if(!E.isFunction(B)){return D[C];}else{return B(D[C]);}}else{return null;}},getSubs:function(B){var A=YAHOO.lang.isString;if(!A(B)||B===""){throw new TypeError("Cookie.getSubs(): Cookie name must be a non-empty string.");}var C=this._parseCookieString(document.cookie,false);if(A(C[B])){return this._parseCookieHash(C[B]);}return null;},remove:function(B,A){if(!YAHOO.lang.isString(B)||B===""){throw new TypeError("Cookie.remove(): Cookie name must be a non-empty string.");}A=YAHOO.lang.merge(A||{},{expires:new Date(0)});return this.set(B,"",A);},removeSub:function(B,E,A){var F=YAHOO.lang;A=A||{};if(!F.isString(B)||B===""){throw new TypeError("Cookie.removeSub(): Cookie name must be a non-empty string.");}if(!F.isString(E)||E===""){throw new TypeError("Cookie.removeSub(): Subcookie name must be a non-empty string.");}var D=this.getSubs(B);if(F.isObject(D)&&F.hasOwnProperty(D,E)){delete D[E];if(!A.removeIfEmpty){return this.setSubs(B,D,A);}else{for(var C in D){if(F.hasOwnProperty(D,C)&&!F.isFunction(D[C])&&!F.isUndefined(D[C])){return this.setSubs(B,D,A);}}return this.remove(B,A);}}else{return"";}},set:function(B,C,A){var E=YAHOO.lang;A=A||{};if(!E.isString(B)){throw new TypeError("Cookie.set(): Cookie name must be a string.");}if(E.isUndefined(C)){throw new TypeError("Cookie.set(): Value cannot be undefined.");}var D=this._createCookieString(B,C,!A.raw,A);document.cookie=D;return D;},setSub:function(B,D,C,A){var F=YAHOO.lang;if(!F.isString(B)||B===""){throw new TypeError("Cookie.setSub(): Cookie name must be a non-empty string.");}if(!F.isString(D)||D===""){throw new TypeError("Cookie.setSub(): Subcookie name must be a non-empty string.");}if(F.isUndefined(C)){throw new TypeError("Cookie.setSub(): Subcookie value cannot be undefined.");}var E=this.getSubs(B);if(!F.isObject(E)){E={};}E[D]=C;return this.setSubs(B,E,A);},setSubs:function(B,C,A){var E=YAHOO.lang;if(!E.isString(B)){throw new TypeError("Cookie.setSubs(): Cookie name must be a string.");}if(!E.isObject(C)){throw new TypeError("Cookie.setSubs(): Cookie value must be an object.");}var D=this._createCookieString(B,this._createCookieHashString(C),false,A);document.cookie=D;return D;}};YAHOO.register("cookie",YAHOO.util.Cookie,{version:"2.9.0",build:"2800"});
Index: /main/trunk/greenstone3/web/interfaces/oran/js/yui/dom-min.js
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/js/yui/dom-min.js	(revision 24018)
+++ /main/trunk/greenstone3/web/interfaces/oran/js/yui/dom-min.js	(revision 24018)
@@ -0,0 +1,9 @@
+/*
+Copyright (c) 2011, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.com/yui/license.html
+version: 2.9.0
+*/
+(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
+if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
+if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});
Index: /main/trunk/greenstone3/web/interfaces/oran/js/yui/dragdrop-min.js
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/js/yui/dragdrop-min.js	(revision 24018)
+++ /main/trunk/greenstone3/web/interfaces/oran/js/yui/dragdrop-min.js	(revision 24018)
@@ -0,0 +1,10 @@
+/*
+Copyright (c) 2011, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.com/yui/license.html
+version: 2.9.0
+*/
+if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMgr=function(){var A=YAHOO.util.Event,B=YAHOO.util.Dom;return{useShim:false,_shimActive:false,_shimState:false,_debugShim:false,_createShim:function(){var C=document.createElement("div");C.id="yui-ddm-shim";if(document.body.firstChild){document.body.insertBefore(C,document.body.firstChild);}else{document.body.appendChild(C);}C.style.display="none";C.style.backgroundColor="red";C.style.position="absolute";C.style.zIndex="99999";B.setStyle(C,"opacity","0");this._shim=C;A.on(C,"mouseup",this.handleMouseUp,this,true);A.on(C,"mousemove",this.handleMouseMove,this,true);A.on(window,"scroll",this._sizeShim,this,true);},_sizeShim:function(){if(this._shimActive){var C=this._shim;C.style.height=B.getDocumentHeight()+"px";C.style.width=B.getDocumentWidth()+"px";C.style.top="0";C.style.left="0";}},_activateShim:function(){if(this.useShim){if(!this._shim){this._createShim();}this._shimActive=true;var C=this._shim,D="0";if(this._debugShim){D=".5";}B.setStyle(C,"opacity",D);this._sizeShim();C.style.display="block";}},_deactivateShim:function(){this._shim.style.display="none";this._shimActive=false;},_shim:null,ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,interactionInfo:null,init:function(){this.initialized=true;},POINT:0,INTERSECT:1,STRICT_INTERSECT:2,mode:0,_execOnAll:function(E,D){for(var F in this.ids){for(var C in this.ids[F]){var G=this.ids[F][C];if(!this.isTypeOfDD(G)){continue;}G[E].apply(G,D);}}},_onLoad:function(){this.init();A.on(document,"mouseup",this.handleMouseUp,this,true);A.on(document,"mousemove",this.handleMouseMove,this,true);A.on(window,"unload",this._onUnload,this,true);A.on(window,"resize",this._onResize,this,true);},_onResize:function(C){this._execOnAll("resetConstraints",[]);},lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isLocked:function(){return this.locked;},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:1000,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,fromTimeout:false,regDragDrop:function(D,C){if(!this.initialized){this.init();}if(!this.ids[C]){this.ids[C]={};}this.ids[C][D.id]=D;},removeDDFromGroup:function(E,C){if(!this.ids[C]){this.ids[C]={};}var D=this.ids[C];if(D&&D[E.id]){delete D[E.id];}},_remove:function(E){for(var D in E.groups){if(D){var C=this.ids[D];if(C&&C[E.id]){delete C[E.id];}}}delete this.handleIds[E.id];},regHandle:function(D,C){if(!this.handleIds[D]){this.handleIds[D]={};}this.handleIds[D][C]=C;},isDragDrop:function(C){return(this.getDDById(C))?true:false;},getRelated:function(H,D){var G=[];for(var F in H.groups){for(var E in this.ids[F]){var C=this.ids[F][E];if(!this.isTypeOfDD(C)){continue;}if(!D||C.isTarget){G[G.length]=C;}}}return G;},isLegalTarget:function(G,F){var D=this.getRelated(G,true);for(var E=0,C=D.length;E<C;++E){if(D[E].id==F.id){return true;}}return false;},isTypeOfDD:function(C){return(C&&C.__ygDragDrop);},isHandle:function(D,C){return(this.handleIds[D]&&this.handleIds[D][C]);},getDDById:function(D){for(var C in this.ids){if(this.ids[C][D]){return this.ids[C][D];}}return null;},handleMouseDown:function(E,D){this.currentTarget=YAHOO.util.Event.getTarget(E);this.dragCurrent=D;var C=D.getEl();this.startX=YAHOO.util.Event.getPageX(E);this.startY=YAHOO.util.Event.getPageY(E);this.deltaX=this.startX-C.offsetLeft;this.deltaY=this.startY-C.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var F=YAHOO.util.DDM;F.startDrag(F.startX,F.startY);F.fromTimeout=true;},this.clickTimeThresh);},startDrag:function(C,E){if(this.dragCurrent&&this.dragCurrent.useShim){this._shimState=this.useShim;this.useShim=true;}this._activateShim();clearTimeout(this.clickTimeout);var D=this.dragCurrent;if(D&&D.events.b4StartDrag){D.b4StartDrag(C,E);D.fireEvent("b4StartDragEvent",{x:C,y:E});}if(D&&D.events.startDrag){D.startDrag(C,E);D.fireEvent("startDragEvent",{x:C,y:E});}this.dragThreshMet=true;},handleMouseUp:function(C){if(this.dragCurrent){clearTimeout(this.clickTimeout);if(this.dragThreshMet){if(this.fromTimeout){this.fromTimeout=false;this.handleMouseMove(C);}this.fromTimeout=false;this.fireEvents(C,true);}else{}this.stopDrag(C);this.stopEvent(C);}},stopEvent:function(C){if(this.stopPropagation){YAHOO.util.Event.stopPropagation(C);}if(this.preventDefault){YAHOO.util.Event.preventDefault(C);}},stopDrag:function(E,D){var C=this.dragCurrent;if(C&&!D){if(this.dragThreshMet){if(C.events.b4EndDrag){C.b4EndDrag(E);C.fireEvent("b4EndDragEvent",{e:E});}if(C.events.endDrag){C.endDrag(E);C.fireEvent("endDragEvent",{e:E});}}if(C.events.mouseUp){C.onMouseUp(E);C.fireEvent("mouseUpEvent",{e:E});}}if(this._shimActive){this._deactivateShim();if(this.dragCurrent&&this.dragCurrent.useShim){this.useShim=this._shimState;this._shimState=false;}}this.dragCurrent=null;this.dragOvers={};},handleMouseMove:function(F){var C=this.dragCurrent;if(C){if(YAHOO.env.ua.ie&&(YAHOO.env.ua.ie<9)&&!F.button){this.stopEvent(F);return this.handleMouseUp(F);}else{if(F.clientX<0||F.clientY<0){}}if(!this.dragThreshMet){var E=Math.abs(this.startX-YAHOO.util.Event.getPageX(F));var D=Math.abs(this.startY-YAHOO.util.Event.getPageY(F));if(E>this.clickPixelThresh||D>this.clickPixelThresh){this.startDrag(this.startX,this.startY);}}if(this.dragThreshMet){if(C&&C.events.b4Drag){C.b4Drag(F);C.fireEvent("b4DragEvent",{e:F});}if(C&&C.events.drag){C.onDrag(F);C.fireEvent("dragEvent",{e:F});}if(C){this.fireEvents(F,false);}}this.stopEvent(F);}},fireEvents:function(W,M){var c=this.dragCurrent;if(!c||c.isLocked()||c.dragOnly){return;}var O=YAHOO.util.Event.getPageX(W),N=YAHOO.util.Event.getPageY(W),Q=new YAHOO.util.Point(O,N),K=c.getTargetCoord(Q.x,Q.y),F=c.getDragEl(),E=["out","over","drop","enter"],V=new YAHOO.util.Region(K.y,K.x+F.offsetWidth,K.y+F.offsetHeight,K.x),I=[],D={},L={},R=[],d={outEvts:[],overEvts:[],dropEvts:[],enterEvts:[]};for(var T in this.dragOvers){var f=this.dragOvers[T];if(!this.isTypeOfDD(f)){continue;
+}if(!this.isOverTarget(Q,f,this.mode,V)){d.outEvts.push(f);}I[T]=true;delete this.dragOvers[T];}for(var S in c.groups){if("string"!=typeof S){continue;}for(T in this.ids[S]){var G=this.ids[S][T];if(!this.isTypeOfDD(G)){continue;}if(G.isTarget&&!G.isLocked()&&G!=c){if(this.isOverTarget(Q,G,this.mode,V)){D[S]=true;if(M){d.dropEvts.push(G);}else{if(!I[G.id]){d.enterEvts.push(G);}else{d.overEvts.push(G);}this.dragOvers[G.id]=G;}}}}}this.interactionInfo={out:d.outEvts,enter:d.enterEvts,over:d.overEvts,drop:d.dropEvts,point:Q,draggedRegion:V,sourceRegion:this.locationCache[c.id],validDrop:M};for(var C in D){R.push(C);}if(M&&!d.dropEvts.length){this.interactionInfo.validDrop=false;if(c.events.invalidDrop){c.onInvalidDrop(W);c.fireEvent("invalidDropEvent",{e:W});}}for(T=0;T<E.length;T++){var Z=null;if(d[E[T]+"Evts"]){Z=d[E[T]+"Evts"];}if(Z&&Z.length){var H=E[T].charAt(0).toUpperCase()+E[T].substr(1),Y="onDrag"+H,J="b4Drag"+H,P="drag"+H+"Event",X="drag"+H;if(this.mode){if(c.events[J]){c[J](W,Z,R);L[Y]=c.fireEvent(J+"Event",{event:W,info:Z,group:R});}if(c.events[X]&&(L[Y]!==false)){c[Y](W,Z,R);c.fireEvent(P,{event:W,info:Z,group:R});}}else{for(var a=0,U=Z.length;a<U;++a){if(c.events[J]){c[J](W,Z[a].id,R[0]);L[Y]=c.fireEvent(J+"Event",{event:W,info:Z[a].id,group:R[0]});}if(c.events[X]&&(L[Y]!==false)){c[Y](W,Z[a].id,R[0]);c.fireEvent(P,{event:W,info:Z[a].id,group:R[0]});}}}}}},getBestMatch:function(E){var G=null;var D=E.length;if(D==1){G=E[0];}else{for(var F=0;F<D;++F){var C=E[F];if(this.mode==this.INTERSECT&&C.cursorIsOver){G=C;break;}else{if(!G||!G.overlap||(C.overlap&&G.overlap.getArea()<C.overlap.getArea())){G=C;}}}}return G;},refreshCache:function(D){var F=D||this.ids;for(var C in F){if("string"!=typeof C){continue;}for(var E in this.ids[C]){var G=this.ids[C][E];if(this.isTypeOfDD(G)){var H=this.getLocation(G);if(H){this.locationCache[G.id]=H;}else{delete this.locationCache[G.id];}}}}},verifyEl:function(D){try{if(D){var C=D.offsetParent;if(C){return true;}}}catch(E){}return false;},getLocation:function(H){if(!this.isTypeOfDD(H)){return null;}var F=H.getEl(),K,E,D,M,L,N,C,J,G;try{K=YAHOO.util.Dom.getXY(F);}catch(I){}if(!K){return null;}E=K[0];D=E+F.offsetWidth;M=K[1];L=M+F.offsetHeight;N=M-H.padding[0];C=D+H.padding[1];J=L+H.padding[2];G=E-H.padding[3];return new YAHOO.util.Region(N,C,J,G);},isOverTarget:function(K,C,E,F){var G=this.locationCache[C.id];if(!G||!this.useCache){G=this.getLocation(C);this.locationCache[C.id]=G;}if(!G){return false;}C.cursorIsOver=G.contains(K);var J=this.dragCurrent;if(!J||(!E&&!J.constrainX&&!J.constrainY)){return C.cursorIsOver;}C.overlap=null;if(!F){var H=J.getTargetCoord(K.x,K.y);var D=J.getDragEl();F=new YAHOO.util.Region(H.y,H.x+D.offsetWidth,H.y+D.offsetHeight,H.x);}var I=F.intersect(G);if(I){C.overlap=I;return(E)?true:C.cursorIsOver;}else{return false;}},_onUnload:function(D,C){this.unregAll();},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null;}this._execOnAll("unreg",[]);this.ids={};},elementCache:{},getElWrapper:function(D){var C=this.elementCache[D];if(!C||!C.el){C=this.elementCache[D]=new this.ElementWrapper(YAHOO.util.Dom.get(D));}return C;},getElement:function(C){return YAHOO.util.Dom.get(C);},getCss:function(D){var C=YAHOO.util.Dom.get(D);return(C)?C.style:null;},ElementWrapper:function(C){this.el=C||null;this.id=this.el&&C.id;this.css=this.el&&C.style;},getPosX:function(C){return YAHOO.util.Dom.getX(C);},getPosY:function(C){return YAHOO.util.Dom.getY(C);},swapNode:function(E,C){if(E.swapNode){E.swapNode(C);}else{var F=C.parentNode;var D=C.nextSibling;if(D==E){F.insertBefore(E,C);}else{if(C==E.nextSibling){F.insertBefore(C,E);}else{E.parentNode.replaceChild(C,E);F.insertBefore(E,D);}}}},getScroll:function(){var E,C,F=document.documentElement,D=document.body;if(F&&(F.scrollTop||F.scrollLeft)){E=F.scrollTop;C=F.scrollLeft;}else{if(D){E=D.scrollTop;C=D.scrollLeft;}else{}}return{top:E,left:C};},getStyle:function(D,C){return YAHOO.util.Dom.getStyle(D,C);},getScrollTop:function(){return this.getScroll().top;},getScrollLeft:function(){return this.getScroll().left;},moveToEl:function(C,E){var D=YAHOO.util.Dom.getXY(E);YAHOO.util.Dom.setXY(C,D);},getClientHeight:function(){return YAHOO.util.Dom.getViewportHeight();},getClientWidth:function(){return YAHOO.util.Dom.getViewportWidth();},numericSort:function(D,C){return(D-C);},_timeoutCount:0,_addListeners:function(){var C=YAHOO.util.DDM;if(YAHOO.util.Event&&document){C._onLoad();}else{if(C._timeoutCount>2000){}else{setTimeout(C._addListeners,10);if(document&&document.body){C._timeoutCount+=1;}}}},handleWasClicked:function(C,E){if(this.isHandle(E,C.id)){return true;}else{var D=C.parentNode;while(D){if(this.isHandle(E,D.id)){return true;}else{D=D.parentNode;}}}return false;}};}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners();}(function(){var A=YAHOO.util.Event;var B=YAHOO.util.Dom;YAHOO.util.DragDrop=function(E,C,D){if(E){this.init(E,C,D);}};YAHOO.util.DragDrop.prototype={events:null,on:function(){this.subscribe.apply(this,arguments);},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isTarget:true,padding:null,dragOnly:false,useShim:false,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,deltaX:0,deltaY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,cursorIsOver:false,overlap:null,b4StartDrag:function(C,D){},startDrag:function(C,D){},b4Drag:function(C){},onDrag:function(C){},onDragEnter:function(C,D){},b4DragOver:function(C){},onDragOver:function(C,D){},b4DragOut:function(C){},onDragOut:function(C,D){},b4DragDrop:function(C){},onDragDrop:function(C,D){},onInvalidDrop:function(C){},b4EndDrag:function(C){},endDrag:function(C){},b4MouseDown:function(C){},onMouseDown:function(C){},onMouseUp:function(C){},onAvailable:function(){},getEl:function(){if(!this._domRef){this._domRef=B.get(this.id);
+}return this._domRef;},getDragEl:function(){return B.get(this.dragElId);},init:function(F,C,D){this.initTarget(F,C,D);A.on(this._domRef||this.id,"mousedown",this.handleMouseDown,this,true);for(var E in this.events){this.createEvent(E+"Event");}},initTarget:function(E,C,D){this.config=D||{};this.events={};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof E!=="string"){this._domRef=E;E=B.generateId(E);}this.id=E;this.addToGroup((C)?C:"default");this.handleElId=E;A.onAvailable(E,this.handleOnAvailable,this,true);this.setDragElId(E);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();},applyConfig:function(){this.events={mouseDown:true,b4MouseDown:true,mouseUp:true,b4StartDrag:true,startDrag:true,b4EndDrag:true,endDrag:true,drag:true,b4Drag:true,invalidDrop:true,b4DragOut:true,dragOut:true,dragEnter:true,b4DragOver:true,dragOver:true,b4DragDrop:true,dragDrop:true};if(this.config.events){for(var C in this.config.events){if(this.config.events[C]===false){this.events[C]=false;}}}this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false);this.dragOnly=((this.config.dragOnly===true)?true:false);this.useShim=((this.config.useShim===true)?true:false);},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable();},setPadding:function(E,C,F,D){if(!C&&0!==C){this.padding=[E,E,E,E];}else{if(!F&&0!==F){this.padding=[E,C,E,C];}else{this.padding=[E,C,F,D];}}},setInitPosition:function(F,E){var G=this.getEl();if(!this.DDM.verifyEl(G)){if(G&&G.style&&(G.style.display=="none")){}else{}return;}var D=F||0;var C=E||0;var H=B.getXY(G);this.initPageX=H[0]-D;this.initPageY=H[1]-C;this.lastPageX=H[0];this.lastPageY=H[1];this.setStartPosition(H);},setStartPosition:function(D){var C=D||B.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=C[0];this.startPageY=C[1];},addToGroup:function(C){this.groups[C]=true;this.DDM.regDragDrop(this,C);},removeFromGroup:function(C){if(this.groups[C]){delete this.groups[C];}this.DDM.removeDDFromGroup(this,C);},setDragElId:function(C){this.dragElId=C;},setHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.handleElId=C;this.DDM.regHandle(this.id,C);},setOuterHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}A.on(C,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(C);this.hasOuterHandles=true;},unreg:function(){A.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this);},isLocked:function(){return(this.DDM.isLocked()||this.locked);},handleMouseDown:function(J,I){var D=J.which||J.button;if(this.primaryButtonOnly&&D>1){return;}if(this.isLocked()){return;}var C=this.b4MouseDown(J),F=true;if(this.events.b4MouseDown){F=this.fireEvent("b4MouseDownEvent",J);}var E=this.onMouseDown(J),H=true;if(this.events.mouseDown){if(E===false){H=false;}else{H=this.fireEvent("mouseDownEvent",J);}}if((C===false)||(E===false)||(F===false)||(H===false)){return;}this.DDM.refreshCache(this.groups);var G=new YAHOO.util.Point(A.getPageX(J),A.getPageY(J));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(G,this)){}else{if(this.clickValidator(J)){this.setStartPosition();this.DDM.handleMouseDown(J,this);this.DDM.stopEvent(J);}else{}}},clickValidator:function(D){var C=YAHOO.util.Event.getTarget(D);return(this.isValidHandleChild(C)&&(this.id==this.handleElId||this.DDM.handleWasClicked(C,this.id)));},getTargetCoord:function(E,D){var C=E-this.deltaX;var F=D-this.deltaY;if(this.constrainX){if(C<this.minX){C=this.minX;}if(C>this.maxX){C=this.maxX;}}if(this.constrainY){if(F<this.minY){F=this.minY;}if(F>this.maxY){F=this.maxY;}}C=this.getTick(C,this.xTicks);F=this.getTick(F,this.yTicks);return{x:C,y:F};},addInvalidHandleType:function(C){var D=C.toUpperCase();this.invalidHandleTypes[D]=D;},addInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.invalidHandleIds[C]=C;},addInvalidHandleClass:function(C){this.invalidHandleClasses.push(C);},removeInvalidHandleType:function(C){var D=C.toUpperCase();delete this.invalidHandleTypes[D];},removeInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}delete this.invalidHandleIds[C];},removeInvalidHandleClass:function(D){for(var E=0,C=this.invalidHandleClasses.length;E<C;++E){if(this.invalidHandleClasses[E]==D){delete this.invalidHandleClasses[E];}}},isValidHandleChild:function(F){var E=true;var H;try{H=F.nodeName.toUpperCase();}catch(G){H=F.nodeName;}E=E&&!this.invalidHandleTypes[H];E=E&&!this.invalidHandleIds[F.id];for(var D=0,C=this.invalidHandleClasses.length;E&&D<C;++D){E=!B.hasClass(F,this.invalidHandleClasses[D]);}return E;},setXTicks:function(F,C){this.xTicks=[];this.xTickSize=C;var E={};for(var D=this.initPageX;D>=this.minX;D=D-C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}for(D=this.initPageX;D<=this.maxX;D=D+C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}this.xTicks.sort(this.DDM.numericSort);},setYTicks:function(F,C){this.yTicks=[];this.yTickSize=C;var E={};for(var D=this.initPageY;D>=this.minY;D=D-C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}for(D=this.initPageY;D<=this.maxY;D=D+C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}this.yTicks.sort(this.DDM.numericSort);},setXConstraint:function(E,D,C){this.leftConstraint=parseInt(E,10);this.rightConstraint=parseInt(D,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(C){this.setXTicks(this.initPageX,C);}this.constrainX=true;},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks();},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0;},setYConstraint:function(C,E,D){this.topConstraint=parseInt(C,10);this.bottomConstraint=parseInt(E,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this.bottomConstraint;
+if(D){this.setYTicks(this.initPageY,D);}this.constrainY=true;},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var D=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var C=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(D,C);}else{this.setInitPosition();}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize);}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize);}},getTick:function(I,F){if(!F){return I;}else{if(F[0]>=I){return F[0];}else{for(var D=0,C=F.length;D<C;++D){var E=D+1;if(F[E]&&F[E]>=I){var H=I-F[D];var G=F[E]-I;return(G>H)?F[D]:F[E];}}return F[F.length-1];}}},toString:function(){return("DragDrop "+this.id);}};YAHOO.augment(YAHOO.util.DragDrop,YAHOO.util.EventProvider);})();YAHOO.util.DD=function(C,A,B){if(C){this.init(C,A,B);}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(C,B){var A=C-this.startPageX;var D=B-this.startPageY;this.setDelta(A,D);},setDelta:function(B,A){this.deltaX=B;this.deltaY=A;},setDragElPos:function(C,B){var A=this.getDragEl();this.alignElWithMouse(A,C,B);},alignElWithMouse:function(C,G,F){var E=this.getTargetCoord(G,F);if(!this.deltaSetXY){var H=[E.x,E.y];YAHOO.util.Dom.setXY(C,H);var D=parseInt(YAHOO.util.Dom.getStyle(C,"left"),10);var B=parseInt(YAHOO.util.Dom.getStyle(C,"top"),10);this.deltaSetXY=[D-E.x,B-E.y];}else{YAHOO.util.Dom.setStyle(C,"left",(E.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(C,"top",(E.y+this.deltaSetXY[1])+"px");}this.cachePosition(E.x,E.y);var A=this;setTimeout(function(){A.autoScroll.call(A,E.x,E.y,C.offsetHeight,C.offsetWidth);},0);},cachePosition:function(B,A){if(B){this.lastPageX=B;this.lastPageY=A;}else{var C=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=C[0];this.lastPageY=C[1];}},autoScroll:function(J,I,E,K){if(this.scroll){var L=this.DDM.getClientHeight();var B=this.DDM.getClientWidth();var N=this.DDM.getScrollTop();var D=this.DDM.getScrollLeft();var H=E+I;var M=K+J;var G=(L+N-I-this.deltaY);var F=(B+D-J-this.deltaX);var C=40;var A=(document.all)?80:30;if(H>L&&G<C){window.scrollTo(D,N+A);}if(I<N&&N>0&&I-N<C){window.scrollTo(D,N-A);}if(M>B&&F<C){window.scrollTo(D+A,N);}if(J<D&&D>0&&J-D<C){window.scrollTo(D-A,N);}}},applyConfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false);},b4MouseDown:function(A){this.setStartPosition();this.autoOffset(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},b4Drag:function(A){this.setDragElPos(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},toString:function(){return("DD "+this.id);}});YAHOO.util.DDProxy=function(C,A,B){if(C){this.init(C,A,B);this.initFrame();}};YAHOO.util.DDProxy.dragElId="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var B=this,A=document.body;if(!A||!A.firstChild){setTimeout(function(){B.createFrame();},50);return;}var F=this.getDragEl(),E=YAHOO.util.Dom;if(!F){F=document.createElement("div");F.id=this.dragElId;var D=F.style;D.position="absolute";D.visibility="hidden";D.cursor="move";D.border="2px solid #aaa";D.zIndex=999;D.height="25px";D.width="25px";var C=document.createElement("div");E.setStyle(C,"height","100%");E.setStyle(C,"width","100%");E.setStyle(C,"background-color","#ccc");E.setStyle(C,"opacity","0");F.appendChild(C);A.insertBefore(F,A.firstChild);}},initFrame:function(){this.createFrame();},applyConfig:function(){YAHOO.util.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||YAHOO.util.DDProxy.dragElId);},showFrame:function(E,D){var C=this.getEl();var A=this.getDragEl();var B=A.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(B.width,10)/2),Math.round(parseInt(B.height,10)/2));}this.setDragElPos(E,D);YAHOO.util.Dom.setStyle(A,"visibility","visible");},_resizeProxy:function(){if(this.resizeFrame){var H=YAHOO.util.Dom;var B=this.getEl();var C=this.getDragEl();var G=parseInt(H.getStyle(C,"borderTopWidth"),10);var I=parseInt(H.getStyle(C,"borderRightWidth"),10);var F=parseInt(H.getStyle(C,"borderBottomWidth"),10);var D=parseInt(H.getStyle(C,"borderLeftWidth"),10);if(isNaN(G)){G=0;}if(isNaN(I)){I=0;}if(isNaN(F)){F=0;}if(isNaN(D)){D=0;}var E=Math.max(0,B.offsetWidth-I-D);var A=Math.max(0,B.offsetHeight-G-F);H.setStyle(C,"width",E+"px");H.setStyle(C,"height",A+"px");}},b4MouseDown:function(B){this.setStartPosition();var A=YAHOO.util.Event.getPageX(B);var C=YAHOO.util.Event.getPageY(B);this.autoOffset(A,C);},b4StartDrag:function(A,B){this.showFrame(A,B);},b4EndDrag:function(A){YAHOO.util.Dom.setStyle(this.getDragEl(),"visibility","hidden");},endDrag:function(D){var C=YAHOO.util.Dom;var B=this.getEl();var A=this.getDragEl();C.setStyle(A,"visibility","");C.setStyle(B,"visibility","hidden");YAHOO.util.DDM.moveToEl(B,A);C.setStyle(A,"visibility","hidden");C.setStyle(B,"visibility","");},toString:function(){return("DDProxy "+this.id);}});YAHOO.util.DDTarget=function(C,A,B){if(C){this.initTarget(C,A,B);}};YAHOO.extend(YAHOO.util.DDTarget,YAHOO.util.DragDrop,{toString:function(){return("DDTarget "+this.id);}});YAHOO.register("dragdrop",YAHOO.util.DragDropMgr,{version:"2.9.0",build:"2800"});
Index: /main/trunk/greenstone3/web/interfaces/oran/js/yui/event-min.js
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/js/yui/event-min.js	(revision 24018)
+++ /main/trunk/greenstone3/web/interfaces/oran/js/yui/event-min.js	(revision 24018)
@@ -0,0 +1,11 @@
+/*
+Copyright (c) 2011, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.com/yui/license.html
+version: 2.9.0
+*/
+YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
+if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
+/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
+if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
+}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});
Index: /main/trunk/greenstone3/web/interfaces/oran/js/yui/yahoo-min.js
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/js/yui/yahoo-min.js	(revision 24018)
+++ /main/trunk/greenstone3/web/interfaces/oran/js/yui/yahoo-min.js	(revision 24018)
@@ -0,0 +1,8 @@
+/*
+Copyright (c) 2011, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.com/yui/license.html
+version: 2.9.0
+*/
+if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
+}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});
Index: /main/trunk/greenstone3/web/interfaces/oran/style/berry.css
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/style/berry.css	(revision 24017)
+++ /main/trunk/greenstone3/web/interfaces/oran/style/berry.css	(revision 24018)
@@ -2,5 +2,5 @@
 	min-height: 22px;
 	padding: 5px;
-	margin: 0 0 1em 0;
+	/*margin: 0 0 1em 0;*/
 	/* background: #E0F0E0 url("../images/berrybasket.png") scroll no-repeat 0 0; */
 	background: transparent url("../images/kete2.png") scroll repeat 0 0;
@@ -9,20 +9,4 @@
 	font-size: 80%;
 	min-height: 2em;
-}
-
-#berrybasket_new {
-	min-height: 22px;
-	padding: 5px;
-	/* background: #E0F0E0 url("../images/berrybasket.png") scroll no-repeat 0 0; */
-	background: transparent url("../images/kete2.png") scroll repeat 0 0;
-	z-index:10;
-	/*cursor: pointer;*/
-	font-size: 80%;
-	min-height: 2em;
-	top:120px;
-	right:0;
-	position:fixed;
-	height:500px;
-	width:9.5%;
 }
 
Index: /main/trunk/greenstone3/web/interfaces/oran/style/core.css
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/style/core.css	(revision 24017)
+++ /main/trunk/greenstone3/web/interfaces/oran/style/core.css	(revision 24018)
@@ -63,6 +63,6 @@
 
 .sectionNumberSpan{
-	/*Uncomment this line to disable automatic section numbering*/
-	/*display:none;*/
+	/*Comment out this line to enable automatic section numbering*/
+	display:none;
 }
 
@@ -85,27 +85,4 @@
 	height:16px;
 	width:16px;
-}
-
-#rbOptionDiv {
-	background-repeat: no-repeat;
-	background-image: url('../images/rbook.png');
-	height: 32px;
-	width: 32px;
-}
-
-#highlightOptionDiv {
-	background-repeat: no-repeat;
-	background-image: url('../images/hl.png');
-	height: 32px;
-	width: 32px;
-}
-
-.optionCheckBox {
-	margin-left:35px; 
-	margin-top:10px;
-}
-
-#bookdiv {
-	
 }
 
@@ -394,7 +371,9 @@
 }
 
-.navList li {
-	float: left;
-	margin: 0 0 0 20px;
+.navList td {
+	/*float: left;*/
+	padding-left: 3em;
+	padding-right: 3em;
+	text-align:center;
 	cursor: pointer;
 	color: #fff;
@@ -407,5 +386,5 @@
 }
 
-.navList li.current {
+.navList td.current {
 	background-color: #efea6e;
 	color: #444;
@@ -447,5 +426,4 @@
 #results .document a:visited { background-image: url('../images/book-visited.png'); color: #999; }
 #results .shelf>a { background-image: url('../images/bookshelf.png'); }
-c
 
 /* corners of the banner */
Index: /main/trunk/greenstone3/web/interfaces/oran/transform/document-scripts.xsl
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/transform/document-scripts.xsl	(revision 24017)
+++ /main/trunk/greenstone3/web/interfaces/oran/transform/document-scripts.xsl	(revision 24018)
@@ -169,5 +169,5 @@
 				{
 					var textDiv = document.getElementById("gs-document-text");
-					textDiv.style.display = "none";
+					textDiv.style.visibility = "hidden";
 				}
 				
@@ -175,5 +175,5 @@
 				{
 					var textDiv = document.getElementById("gs-document-text");
-					textDiv.style.display = "block";
+					textDiv.style.visibility = "visible";
 				}
 				
@@ -183,4 +183,12 @@
 					bookDiv.style.visibility = "hidden";
 					bookDiv.style.height = "0px";
+					
+					var bookObject = document.getElementById("bookObject");
+					bookObject.style.visibility = "hidden";
+					bookObject.style.height = "0px";
+					
+					var bookEmbed = document.getElementById("bookEmbed");
+					bookEmbed.style.visibility = "hidden";
+					bookEmbed.style.height = "0px";
 				}
 				
@@ -190,4 +198,25 @@
 					bookDiv.style.visibility = "visible";
 					bookDiv.style.height = "600px";
+					
+					var bookObject = document.getElementById("bookObject");
+					bookObject.style.visibility = "visible";
+					bookObject.style.height = "600px";
+					
+					var bookEmbed = document.getElementById("bookEmbed");
+					bookEmbed.style.visibility = "visible";
+					bookEmbed.style.height = "600px";
+				}
+				
+				function swapLinkJavascript(rbOn)
+				{
+					var option = document.getElementById("rbOption");
+					if(rbOn)
+					{
+						option.setAttribute("onclick", "hideText(); showBook(); swapLinkJavascript(false);");
+					}
+					else
+					{
+						option.setAttribute("onclick", "hideBook(); showText(); swapLinkJavascript(true);");
+					}
 				}
 				
@@ -201,64 +230,42 @@
 				}
 				
-				function swapLinkJavascript(rbOn)
-				{
-					var option = document.getElementById("rbOption");
-					if(rbOn)
-					{
-						option.setAttribute("onclick", "hideText(); showBook(); swapLinkJavascript(false);");
-					}
-					else
-					{
-						option.setAttribute("onclick", "hideBook(); showText(); swapLinkJavascript(true);");
-					}
-				}
-				
 				function loadBook()
 				{
-					//Work out the URL to the cover image and the document
-					var img_cover = '</xsl:text><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<xsl:value-of select="metadataList/metadata[@name='assocfilepath']"/>/cover.jpg<xsl:text disable-output-escaping="yes">';
 					var doc_url = document.URL; 
 					doc_url = doc_url.replace(/(&amp;|\?)book=[a-z]+/gi,'');
-					doc_url += '&amp;book=flashxml';	
-					
-					//The outer OBJECT element
-					var objectElem = document.createElement("OBJECT");
-					objectElem.setAttribute("align", "middle");
-					objectElem.setAttribute("classid", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000");
-					objectElem.setAttribute("codebase", "http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0");
-					objectElem.setAttribute("height", "600px");
-					objectElem.setAttribute("width", "70%");
-					objectElem.setAttribute("id", "bookObject");
-					
-					//Parameter list
-					var params = new Array();
-					params[0] = createParam("allowScriptAccess", "always");
-					params[1] = createParam("movie", "RealisticBook.swf?src_image=" + escape(img_cover) + "&amp;doc_url=" + escape(doc_url));
-					params[2] = createParam("quality", "high");
-					params[3] = createParam("bgcolor", "#FFFFFF");
-					
-					//The embed element that goes into the object element
-					var embedElem = document.createElement("EMBED");
-					embedElem.setAttribute("allowScriptAccess", "always");
-					embedElem.setAttribute("swLiveConnect", "true");
-					embedElem.setAttribute("bgcolor", "#FFFFFF");
-					embedElem.setAttribute("height", "600px");
-					embedElem.setAttribute("name", "Book");
-					embedElem.setAttribute("pluginspage", "http://www.macromedia.com/go/getflashplayer");
-					embedElem.setAttribute("quality", "high");
-					embedElem.setAttribute("src", "RealisticBook.swf?src_image=" + escape(img_cover) + "&amp;doc_url=" + escape(doc_url));
-					embedElem.setAttribute("type", "application/x-shockwave-flash");
-					embedElem.setAttribute("width", "70%");
-					
-					//Append the param and embed elements to the object element
-					for(var i = 0; i &lt; params.length; i++)
-					{
-						objectElem.appendChild(params[i]);
-					}
-					objectElem.appendChild(embedElem);
-					
-					//Append the object element to the page
-					var flashDiv = document.getElementById("bookdiv");
-					flashDiv.appendChild(objectElem);
+					doc_url += '&amp;book=flashxml';
+					
+					var img_cover = '</xsl:text><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<xsl:value-of select="metadataList/metadata[@name='assocfilepath']"/>/cover.jpg<xsl:text disable-output-escaping="yes">';
+
+					var flash_plug_html = ""
+					flash_plug_html += '&lt;OBJECT align="middle" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" \n';
+					flash_plug_html += '  height="600px" id="bookObject" swLiveConnect="true" \n';
+					flash_plug_html += '  codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" \n';
+					flash_plug_html += '  width="70%"&gt;\n';
+					flash_plug_html += '    &lt;PARAM name="allowScriptAccess" value="always" /&gt;\n';
+					flash_plug_html += '    &lt;PARAM name="movie" value="Book.swf';
+					flash_plug_html += '?src_image=' + escape(img_cover);
+					flash_plug_html += '&amp;doc_url=' + escape(doc_url)
+					flash_plug_html += '" /&gt;\n';
+					flash_plug_html += '    &lt;PARAM name="quality" value="high" /&gt;\n';
+					flash_plug_html += '    &lt;PARAM name="bgcolor" value="#FFFFFF" /&gt;\n';
+					flash_plug_html += '    &lt;EMBED align="middle" \n';
+					flash_plug_html += '      allowScriptAccess="always" swLiveConnect="true" \n';
+					flash_plug_html += '      bgcolor="#FFFFFF" height="600px" name="Book" \n';
+					flash_plug_html += '      pluginspage="http://www.macromedia.com/go/getflashplayer" \n';
+					flash_plug_html += '      quality="high" id="bookEmbed"\n';
+					flash_plug_html += '      src="Book.swf';
+					flash_plug_html += '?src_image=' + escape(img_cover);
+					flash_plug_html += '&amp;doc_url=' + escape(doc_url);
+					flash_plug_html += '"\n'; 
+					flash_plug_html += '      type="application/x-shockwave-flash" width="70%" /&gt;\n';
+					flash_plug_html += '&lt;/OBJECT&gt;\n';
+					var flash_div = document.getElementById("bookdiv");
+					flash_div.innerHTML = flash_plug_html;
+				}
+				
+				if(document.URL.indexOf("book=on") != -1)
+				{
+					loadBook();
 				}
 			</xsl:text>
Index: /main/trunk/greenstone3/web/interfaces/oran/transform/pages/berry.xsl
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/transform/pages/berry.xsl	(revision 24017)
+++ /main/trunk/greenstone3/web/interfaces/oran/transform/pages/berry.xsl	(revision 24018)
@@ -20,8 +20,13 @@
 	<xsl:template match="/page">
 		<xsl:variable name="clusterName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
-		<script type="text/javascript" src="interfaces/oran/js/berrycheckout.js"><xsl:text> </xsl:text></script>
+		<script type="text/javascript" src="interfaces/oran/js/berrybasket/berrycheckout.js"><xsl:text> </xsl:text></script>
 		<script type="text/javascript">
-			var doc;
-			var docList = new Array();
+			<xsl:text disable-output-escaping="yes">
+				var doc;
+				var docList = new Array();
+				
+				//Slight hack so we can do things in the dev skin specifically
+				window.interfaceName = "dev";
+			</xsl:text>
 			<xsl:for-each select="/page/pageResponse/berryList/item">
 				<xsl:text disable-output-escaping="yes">doc = new Array();</xsl:text>
@@ -39,12 +44,12 @@
 		</script>
 
-		<div class="navList" id="berryCheckoutOptions">
-			<ul>
-				<li id="fullview" class="current"><span>Full View</span></li>
-				<li id="textview"><span>Text View</span></li>
-				<li id="email"><span>Email</span></li>
-			</ul>
+		<table class="navList" id="berryCheckoutOptions">
+			<tr>
+				<td id="fullview" class="current"><span>Full View</span></td>
+				<td id="textview"><span>Text View</span></td>
+				<td id="email"><span>Email</span></td>
+			</tr>
 			<div class="clear"><xsl:text> </xsl:text></div>
-		</div>
+		</table>
 		<div id="berryBasketContent"><span><xsl:text> </xsl:text></span></div>
 
Index: /main/trunk/greenstone3/web/interfaces/oran/transform/pages/classifier.xsl
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/transform/pages/classifier.xsl	(revision 24017)
+++ /main/trunk/greenstone3/web/interfaces/oran/transform/pages/classifier.xsl	(revision 24018)
@@ -103,4 +103,5 @@
 				var expandImageURL = "</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'expand_image')"/><xsl:text disable-output-escaping="yes">";
 				var loadingImageURL = "</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'loading_image')"/><xsl:text disable-output-escaping="yes">";
+				var berryBaskets = "</xsl:text><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/><xsl:text disable-output-escaping="yes">";
 				var inProgress = new Array();
 			
@@ -156,5 +157,10 @@
 
 						var url = document.URL;
-						url = url.replace(/(&amp;|\?)cl=([a-z\.0-9]+)/gi, "$1cl=" + sectionID + "&amp;excerptid=div" + sectionID);
+						url = url.replace(/(&amp;|\?)cl=[a-z\.0-9]+/gi, "$1cl=" + sectionID + "&amp;excerptid=div" + sectionID);
+			
+						if(berryBaskets == "on")
+						{
+							url = url + "&amp;berrybasket=on";
+						}
 
 						httpRequest.open('GET', url, true);
@@ -177,7 +183,12 @@
 										parent.appendChild(newDiv);
 									}
-
+									
 									newDiv.innerHTML = httpRequest.responseText;
 									sectionToggle.setAttribute("src", collapseImageURL);
+									
+									if(berryBaskets == "on")
+									{
+										checkout();
+									}
 								}
 								else
Index: /main/trunk/greenstone3/web/interfaces/oran/transform/pages/document.xsl
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/transform/pages/document.xsl	(revision 24017)
+++ /main/trunk/greenstone3/web/interfaces/oran/transform/pages/document.xsl	(revision 24018)
@@ -63,5 +63,11 @@
 	<xsl:template match="/page/pageResponse/document">
 		<xsl:if test="$bookswitch = 'off'">
-			<div id="bookdiv" style="visibility:hidden; height:0px;"><xsl:text> </xsl:text></div>
+			<div id="bookdiv" style="visibility:hidden; height:0px; display:inline;"><xsl:text> </xsl:text></div>
+		
+			<!-- Adds the realistic books javascript if necessary ( *** in document-scripts.xsl *** ) -->
+			<xsl:if test="/page/pageResponse/collection[@name = $collName]/metadataList/metadata[@name = 'tidyoption'] = 'tidy'">
+				<xsl:call-template name="realisticBooksScript"/>
+			</xsl:if>
+			
 			<!-- Add the Javascript that adds and removes highlighting ( *** in document-scripts.xsl *** ) -->
 			<xsl:call-template name="highlightingScript"/>
@@ -107,4 +113,5 @@
 			<xsl:when test="$bookswitch = 'on'">
 				<!-- *** in document-scripts.xsl *** -->
+				<div id="bookdiv" style="display:inline;"><xsl:text> </xsl:text></div>
 				<xsl:call-template name="realisticBooksScript"/>
 			</xsl:when>
@@ -306,5 +313,4 @@
 	
 	<xsl:template name="viewOptions">
-		<xsl:call-template name="realisticBooksScript"/>
 		<table class="viewOptions"><tr>
 			<!-- Realistic books link -->
@@ -312,5 +318,8 @@
 				<td>
 					<!-- old url = {$library_name}?a=d&amp;c={$collName}&amp;d={/page/pageResponse/document/documentNode[1]/@nodeID}&amp;dt={/page/pageResponse/document/documentNode/@docType}&amp;p.a=b&amp;p.s={/page/pageResponse/service/@name}&amp;book=on&amp;ed=1 -->
-					<div title="Realistic book view" id="rbOptionDiv"><input id="rbOption" type="checkbox" onclick="bookInit();" class="optionCheckBox"/></div>
+					<img>
+						<xsl:attribute name="src"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'realistic_books_image')"/></xsl:attribute>
+					</img>
+					<input id="rbOption" type="checkbox" onclick="bookInit();" class="optionCheckBox"/>
 				</td>
 			</xsl:if>
@@ -319,21 +328,22 @@
 			<xsl:if test="/page/pageRequest/paramList/param[@name = 'p.a']/@value = 'q'">
 				<td>
-					<div id="highlightOptionDiv" title="Search term highlighting">
-						<input id="highlightOption" type="checkbox" class="optionCheckBox">
-							<xsl:choose>
-								<xsl:when test="/page/pageRequest/paramList/param[@name = 'hl']/@value = 'on'">
-									<xsl:attribute name="onclick">
-										<xsl:text>removeHighlight();</xsl:text>
-									</xsl:attribute>
-									<xsl:attribute name="checked">true</xsl:attribute>
-								</xsl:when>
-								<xsl:otherwise>
-									<xsl:attribute name="onclick">
-										<xsl:text>addHighlight();</xsl:text>
-									</xsl:attribute>
-								</xsl:otherwise>
-							</xsl:choose>
-						</input>
-					</div>
+					<img>
+						<xsl:attribute name="src"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'highlight_image')"/></xsl:attribute>
+					</img>
+					<input id="highlightOption" type="checkbox" class="optionCheckBox">
+						<xsl:choose>
+							<xsl:when test="/page/pageRequest/paramList/param[@name = 'hl']/@value = 'on'">
+								<xsl:attribute name="onclick">
+									<xsl:text>removeHighlight();</xsl:text>
+								</xsl:attribute>
+								<xsl:attribute name="checked">true</xsl:attribute>
+							</xsl:when>
+							<xsl:otherwise>
+								<xsl:attribute name="onclick">
+									<xsl:text>addHighlight();</xsl:text>
+								</xsl:attribute>
+							</xsl:otherwise>
+						</xsl:choose>
+					</input>
 				</td>
 			</xsl:if>
Index: /main/trunk/greenstone3/web/interfaces/oran/transform/util.xsl
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/transform/util.xsl	(revision 24017)
+++ /main/trunk/greenstone3/web/interfaces/oran/transform/util.xsl	(revision 24018)
@@ -9,4 +9,5 @@
     <xsl:value-of select="/page/pageResponse/metadataList/metadata[@name='siteName']"/>
   </xsl:template>
+  
   <xsl:template name="siteLink">
     <a href="./{$library_name}">
@@ -15,12 +16,17 @@
     </a>
   </xsl:template>
+  
   <xsl:variable name="a">
     <xsl:value-of select="/page/pageRequest/paramList/param[@name='a']/@value"/>
   </xsl:variable>
+  
   <xsl:variable name="collections" select="/page/pageResponse/collectionList/collection"/>
+  
   <xsl:variable name="berrybasketswitch">
     <xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/>
   </xsl:variable>
+  
   <xsl:variable name="berryBasketOn" select="/page/pageRequest/paramList/param[@name='berrybasket' and @value='on']"/>
+  
   <!-- template to get the name of the current collection -->
   <xsl:template name="collectionName">
@@ -32,4 +38,5 @@
     </xsl:choose>
   </xsl:template>
+  
   <xsl:template name="collectionNameShort">
     <xsl:value-of select="/page/pageResponse/collection/@name"/>
@@ -43,8 +50,10 @@
     </xsl:if>
   </xsl:template>
+  
   <!-- text to get the name of the current service ("Browse","Search" etc) -->
   <xsl:template name="serviceName">
     <xsl:value-of select="/page/pageResponse/service/displayItem[@name='name']"/>
   </xsl:template>
+  
   <xsl:template name="textDirectionAttribute">
     <xsl:attribute name="dir">
@@ -55,4 +64,5 @@
     </xsl:attribute>
   </xsl:template>
+  
   <xsl:template name="actionClass">
     <xsl:attribute name="class"><xsl:value-of select="/page/pageRequest/@action"/>Action <xsl:if test="/page/pageRequest/@subaction"><xsl:value-of select="/page/pageRequest/@subaction"/>Subaction</xsl:if></xsl:attribute>
@@ -83,4 +93,5 @@
     </xsl:choose>
   </xsl:template>
+  
   <xsl:template match="error">
     Error: <xsl:value-of select="."/>
@@ -125,13 +136,17 @@
     </xsl:if>
   </xsl:template>
+  
   <xsl:template name="noTextBar">
     <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
   </xsl:template>
+  
   <xsl:template name="poweredByGS3TextBar">
     <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gs3power')"/>
   </xsl:template>
+  
   <xsl:template name="rightArrow">
     <xsl:text disable-output-escaping="yes"> &amp;raquo; </xsl:text>
   </xsl:template>
+  
   <!-- site home ....................................................................... -->
   <xsl:template name="siteHomePageTitle">
@@ -140,10 +155,13 @@
     <xsl:text> </xsl:text>
   </xsl:template>
+  
   <xsl:template name="selectACollectionTextBar">
     <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.select_a_collection')"/>
   </xsl:template>
+  
   <xsl:template name="crossCollectionQuickSearchForm">
     <xsl:apply-templates select="serviceList/service[@name='TextQuery']"/>
   </xsl:template>
+  
   <xsl:template match="service[@name='TextQuery']">
     <form name="QuickSearch" method="get" action="{$library_name}">
@@ -160,4 +178,5 @@
     </form>
   </xsl:template>
+  
   <xsl:template name="collectionLinkWithImage">
     <xsl:choose>
@@ -185,7 +204,9 @@
     </xsl:choose>
   </xsl:template>
+  
   <xsl:template name="serviceClusterList">
     <xsl:apply-templates select="serviceClusterList"/>
   </xsl:template>
+  
   <xsl:template match="serviceClusterList">
     <xsl:for-each select="serviceCluster">
@@ -196,4 +217,5 @@
     </xsl:for-each>
   </xsl:template>
+  
   <xsl:template name="serviceLink">
     <div class="paramLabel">
@@ -207,4 +229,5 @@
     <br class="clear"/>
   </xsl:template>
+  
   <xsl:template name="authenticationLink">
     <xsl:for-each select="serviceList/service[@type='authen']">
@@ -217,4 +240,5 @@
     </xsl:for-each>
   </xsl:template>
+  
   <xsl:template name="libraryInterfaceLink">
     <li>
@@ -224,7 +248,9 @@
     </li>
   </xsl:template>
+  
   <xsl:template name="greenstoneLogoAlternateText">
     <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
   </xsl:template>
+  
   <!-- about page - collection home ....................................................................... -->
   <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
@@ -233,4 +259,5 @@
   <xsl:variable name="this-element" select="/page/pageResponse/collection|/page/pageResponse/serviceCluster"/>
   <xsl:variable name="this-service" select="/page/pageResponse/service/@name"/>
+  
   <xsl:template name="aboutCollectionPageTitle">
     <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
@@ -238,4 +265,5 @@
     <xsl:text> </xsl:text>
   </xsl:template>
+  
   <xsl:template name="collectionHomeLinkWithLogoIfAvailable">
     <a href="{$library_name}?a=p&amp;sa=about&amp;c={$collName}">
@@ -258,4 +286,5 @@
     </a>
   </xsl:template>
+  
   <xsl:template name="homeButtonTop">
     <a href="{$library_name}?a=p&amp;sa=home">
@@ -266,4 +295,5 @@
     </a>
   </xsl:template>
+  
   <xsl:template name="helpButtonTop">
     <xsl:choose>
@@ -287,4 +317,5 @@
     </xsl:choose>
   </xsl:template>
+  
   <xsl:template name="preferencesButtonTop">
     <xsl:choose>
@@ -308,4 +339,5 @@
     </xsl:choose>
   </xsl:template>
+  
   <xsl:template name="servicesNavigationBar">
     <xsl:for-each select="$this-element/serviceList/service">
@@ -343,4 +375,5 @@
     </xsl:for-each>
   </xsl:template>
+  
   <xsl:template name="collectionDescriptionTextAndServicesLinks">
     <xsl:apply-templates select="pageResponse/collection|serviceCluster"/>
@@ -352,4 +385,5 @@
     </xsl:apply-templates>
   </xsl:template>
+  
   <xsl:template match="serviceList">	
 	<xsl:param name="collName"/>
@@ -397,4 +431,5 @@
 	</xsl:if>
   </xsl:template>
+  
   <!-- classifier page ............................................................................ -->
   <xsl:template name="collapsedNavigationTab">
@@ -416,4 +451,5 @@
     </li>
   </xsl:template>
+  
   <xsl:template name="navigationTab">
     <xsl:variable name="isCurrent" select="@name=/page/pageResponse/service/@name"/>
@@ -451,4 +487,5 @@
     </xsl:if>
   </xsl:template>
+  
   <xsl:template name="classifierLink">
     <xsl:if test="@name=/page/pageResponse/classifier/@name">
@@ -459,4 +496,5 @@
     </a>
   </xsl:template>
+  
   <!-- query page ............................................................................ -->
   <xsl:template name="indexName">
@@ -471,4 +509,5 @@
     </xsl:choose>
   </xsl:template>
+  
   <!--
 BERRY BASKET TEMPLATES
@@ -498,16 +537,19 @@
     </xsl:if>
   </xsl:template>
+  
   <!-- include the required javascript and css for berry baskets -->
   <xsl:template name="berryBasketHeadTags">
-    <script type="text/javascript" src="interfaces/{$interface_name}/js/YAHOO.js"><xsl:text> </xsl:text></script>
-    <script type="text/javascript" src="interfaces/{$interface_name}/js/event.js"><xsl:text> </xsl:text></script>
-    <script type="text/javascript" src="interfaces/{$interface_name}/js/connection.js"><xsl:text> </xsl:text></script>
-    <script type="text/javascript" src="interfaces/{$interface_name}/js/dom.js"><xsl:text> </xsl:text></script>
-    <script type="text/javascript" src="interfaces/{$interface_name}/js/dragdrop.js"><xsl:text> </xsl:text></script>
-    <script type="text/javascript" src="interfaces/{$interface_name}/js/ygDDPlayer.js"><xsl:text> </xsl:text></script>
-    <script type="text/javascript" src="interfaces/{$interface_name}/js/ygDDOnTop.js"><xsl:text> </xsl:text></script>
-    <script type="text/javascript" src="interfaces/{$interface_name}/js/berrybasket.js"><xsl:text> </xsl:text></script>
+    <script type="text/javascript" src="interfaces/{$interface_name}/js/yui/yahoo-min.js"><xsl:text> </xsl:text></script>
+    <script type="text/javascript" src="interfaces/{$interface_name}/js/yui/event-min.js"><xsl:text> </xsl:text></script>
+    <script type="text/javascript" src="interfaces/{$interface_name}/js/yui/connection-min.js"><xsl:text> </xsl:text></script>
+    <script type="text/javascript" src="interfaces/{$interface_name}/js/yui/dom-min.js"><xsl:text> </xsl:text></script>
+    <script type="text/javascript" src="interfaces/{$interface_name}/js/yui/dragdrop-min.js"><xsl:text> </xsl:text></script>
+	<script type="text/javascript" src="interfaces/{$interface_name}/js/yui/cookie-min.js"><xsl:text> </xsl:text></script>
+	<script type="text/javascript" src="interfaces/{$interface_name}/js/berrybasket/ygDDPlayer.js"><xsl:text> </xsl:text></script>
+    <script type="text/javascript" src="interfaces/{$interface_name}/js/berrybasket/ygDDOnTop.js"><xsl:text> </xsl:text></script>
+    <script type="text/javascript" src="interfaces/{$interface_name}/js/berrybasket/berrybasket.js"><xsl:text> </xsl:text></script>
     <link rel="stylesheet" href="interfaces/{$interface_name}/style/berry.css" type="text/css"/>
   </xsl:template>
+  
   <!--
 create a little berry which can be drag&dropped onto the berry basket
@@ -521,4 +563,5 @@
     </xsl:if>
   </xsl:template>
+  
   <!--
 create little berrys which can be drag&dropped onto the berry basket
@@ -543,4 +586,5 @@
     </xsl:if>
   </xsl:template>
+  
   <!-- document page -->
   <xsl:template name="documentTitle">
@@ -552,4 +596,5 @@
     </img>
   </xsl:template>
+  
   <xsl:template name="previousNextButtons">
     <!-- prev -->
@@ -564,3 +609,4 @@
     </a>
   </xsl:template>
+  
 </xsl:stylesheet>
