Index: main/trunk/model-cols-dev/peijones/js/documentmaker/documentmaker/BrowserDetect.js
===================================================================
--- main/trunk/model-cols-dev/peijones/js/documentmaker/documentmaker/BrowserDetect.js	(revision 24778)
+++ main/trunk/model-cols-dev/peijones/js/documentmaker/documentmaker/BrowserDetect.js	(revision 24778)
@@ -0,0 +1,116 @@
+var BrowserDetect = {
+	init: function () {
+		this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
+		this.version = this.searchVersion(navigator.userAgent)
+			|| this.searchVersion(navigator.appVersion)
+			|| "an unknown version";
+		this.OS = this.searchString(this.dataOS) || "an unknown OS";
+	},
+	searchString: function (data) {
+		for (var i=0;i<data.length;i++)	{
+			var dataString = data[i].string;
+			var dataProp = data[i].prop;
+			this.versionSearchString = data[i].versionSearch || data[i].identity;
+			if (dataString) {
+				if (dataString.indexOf(data[i].subString) != -1)
+					return data[i].identity;
+			}
+			else if (dataProp)
+				return data[i].identity;
+		}
+	},
+	searchVersion: function (dataString) {
+		var index = dataString.indexOf(this.versionSearchString);
+		if (index == -1) return;
+		return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
+	},
+	dataBrowser: [
+		{
+			string: navigator.userAgent,
+			subString: "Chrome",
+			identity: "Chrome"
+		},
+		{ 	string: navigator.userAgent,
+			subString: "OmniWeb",
+			versionSearch: "OmniWeb/",
+			identity: "OmniWeb"
+		},
+		{
+			string: navigator.vendor,
+			subString: "Apple",
+			identity: "Safari",
+			versionSearch: "Version"
+		},
+		{
+			prop: window.opera,
+			identity: "Opera"
+		},
+		{
+			string: navigator.vendor,
+			subString: "iCab",
+			identity: "iCab"
+		},
+		{
+			string: navigator.vendor,
+			subString: "KDE",
+			identity: "Konqueror"
+		},
+		{
+			string: navigator.userAgent,
+			subString: "Firefox",
+			identity: "Firefox"
+		},
+		{
+			string: navigator.vendor,
+			subString: "Camino",
+			identity: "Camino"
+		},
+		{		// for newer Netscapes (6+)
+			string: navigator.userAgent,
+			subString: "Netscape",
+			identity: "Netscape"
+		},
+		{
+			string: navigator.userAgent,
+			subString: "MSIE",
+			identity: "Explorer",
+			versionSearch: "MSIE"
+		},
+		{
+			string: navigator.userAgent,
+			subString: "Gecko",
+			identity: "Mozilla",
+			versionSearch: "rv"
+		},
+		{ 		// for older Netscapes (4-)
+			string: navigator.userAgent,
+			subString: "Mozilla",
+			identity: "Netscape",
+			versionSearch: "Mozilla"
+		}
+	],
+	dataOS : [
+		{
+			string: navigator.platform,
+			subString: "Win",
+			identity: "Windows"
+		},
+		{
+			string: navigator.platform,
+			subString: "Mac",
+			identity: "Mac"
+		},
+		{
+			   string: navigator.userAgent,
+			   subString: "iPhone",
+			   identity: "iPhone/iPod"
+	    },
+		{
+			string: navigator.platform,
+			subString: "Linux",
+			identity: "Linux"
+		}
+	]
+
+};
+BrowserDetect.init();
Index: main/trunk/model-cols-dev/peijones/js/documentmaker/documentmaker/PhotoNotes-1.5.js
===================================================================
--- main/trunk/model-cols-dev/peijones/js/documentmaker/documentmaker/PhotoNotes-1.5.js	(revision 24778)
+++ main/trunk/model-cols-dev/peijones/js/documentmaker/documentmaker/PhotoNotes-1.5.js	(revision 24778)
@@ -0,0 +1,898 @@
+/*
+Copyright (c) 2006 Dusty Davidson - http://www.dustyd.net
+(portions Copyright (c) 2005 Angus Turnbull http://www.twinhelix.come)
+
+Permission is hereby granted, free of charge, to any person obtaining 
+a copy of this software and associated documentation files (the "Software"), 
+to deal in the Software without restriction, including without limitation 
+the rights to use, copy, modify, merge, publish, distribute, sublicense, 
+and/or sell copies of the Software, and to permit persons to whom the Software 
+is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in 
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 
+IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+/*********************************************************/
+/*** Photo Notes Container *******************************/
+/*********************************************************/
+function PhotoNoteContainer(element, config)
+{
+    var props = {
+        element: element,
+        dragresize: null,
+        notes: new Array(),
+        editing: false
+    };
+
+    for (var p in props)
+    {
+        this[p] = (!config || typeof config[p] == 'undefined') ? props[p] : config[p];
+    }
+        
+};
+
+PhotoNoteContainer.prototype.DeleteNote = function(note)
+{
+    note.UnSelect();
+
+    /* remove from the DOM */
+    this.element.removeChild(note.gui.ElementRect);
+    this.element.removeChild(note.gui.ElementNote);
+    
+    /* remove from the array... */
+    this.notes.remove(note);
+}
+
+PhotoNoteContainer.prototype.AddNote = function(note)
+{
+    if(!this.editing)
+    {
+        /* add the note to the array of notes, and set its container */
+        this.notes[this.notes.length] = note;
+        note.container = this;
+
+        /* add the note to the DOM */
+        this.element.appendChild(note.gui.ElementRect);
+        this.element.appendChild(note.gui.ElementNote);    
+    }
+};
+
+/* hide all of the "text" parts of the notes. Primarily called when hovering a note, at which
+    point we want to hide all of the other note texts */
+PhotoNoteContainer.prototype.HideAllNoteTexts = function()
+{
+    for (var i = 0;i<this.notes.length;i++)
+        this.notes[i].HideNoteText();
+};
+
+
+PhotoNoteContainer.prototype.DisableAllNotes = function()
+{
+    for (var i = 0;i<this.notes.length;i++)
+        this.notes[i].DisableNote();
+};
+
+PhotoNoteContainer.prototype.HideAllNotes = function()
+{
+    for (var i = 0;i<this.notes.length;i++)
+        this.notes[i].HideNote();
+};
+
+PhotoNoteContainer.prototype.ShowAllNotes = function()
+{
+    for (var i = 0;i<this.notes.length;i++)
+        this.notes[i].ShowNote();
+};
+
+PhotoNoteContainer.prototype.EnableAllNotes = function()
+{
+    for (var i = 0;i<this.notes.length;i++)
+        this.notes[i].EnableNote();
+};
+
+
+
+/*********************************************************/
+/*** Photo Note ******************************************/
+/*********************************************************/
+function PhotoNote(text,id,rect)
+{
+    var props = {
+        text: text,                   
+        id: id,
+        rect: rect,                    
+        selected: false,
+        container: null,
+        dragresize: null,
+        oldRect: null,
+        YOffset: 10,
+        XOffset: 0,
+        onsave: null,
+        ondelete: null,
+        gui: null                  
+        
+    };
+
+    for (var p in props)
+    {
+        this[p] = props[p];
+    }
+    
+    this.CreateElements();
+}
+
+PhotoNote.prototype.Select = function()
+{
+    //window.status = 'container: ' + this.container;
+    if(!this.container.editing)
+    {
+        this.ShowNoteText();
+        this.dragresize.select(this.gui.ElementRect);
+        this.selected = true;
+        this.SetEditable(true);
+    }    
+}
+
+PhotoNote.prototype.UnSelect = function()
+{
+    this.dragresize.deselect(false);
+    this.selected = false;
+    this.SetEditable(false);
+    this.HideNoteText();
+}
+
+PhotoNote.prototype.Save = function()
+{
+    this.oldRect = null;
+    this.gui.TextTitle.innerHTML = this.gui.TextBox.value;
+    this.text = this.gui.TextBox.value
+    this.UnSelect();
+}
+
+PhotoNote.prototype.Cancel = function()
+{
+    //if the note is still new, then we actually want to delete it, not cancel it..
+    if(this.id < 0)
+    {
+        this.container.DeleteNote(this)
+    }
+    else
+    {
+       //reset the node to it's old position 
+        if(this.oldRect != null)
+        {
+            this.rect = this.oldRect;                
+        }
+        this.oldRect = null;               
+        this.gui.TextBox.value = this.text;                
+        this.PositionNote();
+        this.UnSelect();
+    }
+}
+
+PhotoNote.prototype.ShowNoteText = function()
+{
+    if(!this.container.editing)
+    {
+        this.container.HideAllNoteTexts();
+        this.container.DisableAllNotes();
+        this.EnableNote();
+
+        this.gui.ElementNote.style.display='block';
+		if(BrowserDetect.browser == 'Explorer')
+		{
+		    this.gui.ElementRect.firstChild.filters.alpha.opacity = '85';
+		    this.gui.ElementRect.firstChild.firstChild.filters.alpha.opacity = '85';
+		} else {
+		    this.gui.ElementRect.firstChild.firstChild.style.opacity = '.85';
+		    this.gui.ElementRect.firstChild.style.opacity = '.85';
+		}
+
+    }
+}
+
+PhotoNote.prototype.DisableNote = function ()
+{
+    this.dragresize.enabled=false;
+}
+
+PhotoNote.prototype.EnableNote = function ()
+{
+    this.dragresize.enabled=true;
+}
+
+PhotoNote.prototype.HideNoteText = function ()
+{
+    this.gui.ElementNote.style.display='none';
+	if(BrowserDetect.browser == 'Explorer')
+	{
+        this.gui.ElementRect.firstChild.firstChild.filters.alpha.opacity = '40';
+        this.gui.ElementRect.firstChild.filters.alpha.opacity = '40';
+	} else {
+    	this.gui.ElementRect.firstChild.style.opacity = '0.4';
+        this.gui.ElementRect.firstChild.firstChild.style.opacity = '0.4';
+	}
+}
+
+PhotoNote.prototype.HideNote = function ()
+{
+    this.gui.ElementRect.style.display='none';
+    this.gui.ElementNote.style.display='none';
+}
+
+PhotoNote.prototype.ShowNote = function ()
+{
+    this.gui.ElementRect.style.display='block';
+    this.gui.ElementNote.style.display='none';
+}
+
+PhotoNote.prototype.SetEditable = function(editable)
+{
+    this.container.editing = editable;
+    
+    if(editable)
+    {
+        //the first child of the note is the text
+        this.gui.TextTitle.style.display = 'none';
+        
+        //the second child is the edit area...
+        this.gui.EditArea.style.display = 'block';
+        
+        //if this is a "new" note, then hide the delete button
+        if(this.id <= 0)
+            this.gui.DeleteButton.style.display = 'none';
+        else
+            this.gui.DeleteButton.style.display = 'inline';
+        
+        // get the textarea and select the text...
+        this.HighlightTextbox();
+   }
+    else
+    {
+        //the first child of the note is the text
+        this.gui.TextTitle.style.display = 'block';
+        
+        //the second child is the edit area...
+        this.gui.EditArea.style.display = 'none';
+    }
+}
+
+PhotoNote.prototype.HighlightTextbox = function ()
+{
+    // get the textarea and select the text...
+    if(this.gui.EditArea.style.display=='block')
+    {
+        var textfield = this.gui.TextBox;
+        setTimeout(function() {
+                try
+                {
+                    textfield.focus();
+                    textfield.select();
+                }
+                catch(e) {}
+            }, 200);
+    }
+
+}
+
+PhotoNote.prototype.CreateElements = function()
+{
+    this.gui = new PhotoNoteGUI();
+
+    var newArea = document.createElement('div');
+    this.dragresize = new DragResize('dragresize', { allowBlur: false });
+    newArea.className = 'fn-area';
+    newArea.id = 'fn-area-new';
+
+    var newAreaBlack = document.createElement('div');
+    newAreaBlack.className = 'fn-area-blackborder';
+    var newAreaWhite = document.createElement('div');
+    newAreaWhite.className = 'fn-area-whiteborder';
+    
+    var currentNote = this;
+
+    var newAreaInner = document.createElement('div');
+    newAreaInner.className = 'fn-area-inner';
+    newAreaWhite.appendChild(newAreaInner);
+
+    //attach mouse events to this element...
+    addEvent(newAreaInner, 'mouseover', function() {
+            currentNote.ShowNoteText();
+        });
+    addEvent(newAreaInner, 'mouseout', function() {
+
+            if(!currentNote.selected)
+            {
+                setTimeout(function () {
+                    currentNote.HideNoteText();
+                    }, 250);
+                    
+            }
+        });
+        
+    addEvent(newAreaInner, 'mousedown', function() {
+            if(!currentNote.selected)
+            {
+                //window.status = 'mouseDown2!';
+                currentNote.Select();
+            }
+        });
+    
+    newAreaBlack.appendChild(newAreaWhite);
+    newArea.appendChild(newAreaBlack);
+    
+    // add the notes area
+    var noteArea = document.createElement('div');
+    noteArea.className = 'fn-note';
+    
+    var titleArea = document.createElement('div');
+    titleArea.className = 'fn-note-text';
+    var t = document.createTextNode(this.text);
+    titleArea.appendChild(t);
+    noteArea.appendChild(titleArea);
+    
+    var editArea = document.createElement('div');
+    editArea.className = 'fn-note-edit';
+    
+    var editAreaText = document.createElement('div');
+    editAreaText.className = 'fn-note-edit-text';
+    
+    var newTextbox = document.createElement('textarea');
+    newTextbox.value = this.text;
+    editAreaText.appendChild(newTextbox);
+    editArea.appendChild(editAreaText);
+    
+    var buttonsDiv = document.createElement('div');
+    var newButtonOK = document.createElement('input');
+    newButtonOK.type='button';
+    newButtonOK.className = 'Butt';
+    newButtonOK.value='SAVE';
+    newButtonOK.onclick = function() {
+            if(currentNote.onsave) 
+            {
+				currentNote.text = newTextbox.value;
+                var res = currentNote.onsave(currentNote);
+                if(res > 0)
+                {
+                    //window.status = '';
+                    currentNote.id = res;
+                    currentNote.Save();
+                }
+                else
+                {
+                    alert("error saving note");
+                    currentNote.Cancel();                        
+                }
+            }
+            else
+            {
+                alert("onsave must be implemented in order to *actually* save");
+                currentNote.Cancel();                        
+            }
+        };
+    buttonsDiv.appendChild(newButtonOK);
+    
+    var newButtonCancel = document.createElement('input');
+    newButtonCancel.type='button';
+    newButtonCancel.className = 'CancelButt';
+    newButtonCancel.value='CANCEL';
+    newButtonCancel.onclick = function() {
+            currentNote.Cancel();            
+            
+        };
+    buttonsDiv.appendChild(newButtonCancel);
+
+    var newButtonDelete = document.createElement('input');
+    newButtonDelete.type='button';
+    newButtonDelete.className = 'CancelButt';
+    newButtonDelete.value='DELETE';
+    newButtonDelete.onclick = function() {
+            
+            if(currentNote.ondelete) 
+            {
+                var res = currentNote.ondelete(currentNote);
+                if(res)
+                {
+                    currentNote.container.DeleteNote(currentNote);
+                }
+                else
+                {
+                    alert("error deleting note");
+                }
+            }
+            else
+            {
+                alert("ondelete must be implemented in order to *actually* delete");
+            }
+        };
+    buttonsDiv.appendChild(newButtonDelete);
+
+    editArea.appendChild(buttonsDiv);
+    noteArea.appendChild(editArea);
+    
+    /********* DRAG & RESIZE EVENTS **********************/
+    this.dragresize.isElement = function(elm)
+        {
+            if(elm.className == 'fn-area')
+            {
+                this.maxRight = currentNote.container.element.offsetWidth;
+                this.maxBottom = currentNote.container.element.offsetHeight - 3;
+                return true;
+            }
+        };
+    this.dragresize.isHandle = function(elm)
+        {
+            if(elm.className == 'fn-area')
+                return true;
+        };
+    this.dragresize.ondragfocus = function()
+        {
+            currentNote.gui.ElementRect.style.cursor = 'move';
+        };
+    this.dragresize.ondragblur = function()
+        {
+            currentNote.gui.ElementRect.style.cursor = 'pointer';
+        };
+    this.dragresize.ondragstart = function()
+        {
+            if(currentNote.oldRect == null)
+            {
+                var r = currentNote.rect;
+                currentNote.oldRect = new PhotoNoteRect(r.left,r.top,r.width,r.height);
+            }
+        };
+    this.dragresize.ondragend = function()
+        {
+            //window.status = 'LKSFDLKJDFSLKJFDLKJ';
+            currentNote.HighlightTextbox();
+        };
+    this.dragresize.ondragmove = function()
+        {
+            currentNote.rect.left = parseInt(this.element.style.left);
+            currentNote.rect.top = parseInt(this.element.style.top);
+            currentNote.rect.width = parseInt(this.element.style.width);
+            currentNote.rect.height = parseInt(this.element.style.height);
+            currentNote.PositionNote();
+        };
+
+    this.dragresize.apply(document);
+    
+    /* setup the GUI object */
+    this.gui.ElementRect = newArea;
+    this.gui.ElementNote = noteArea;
+    this.gui.EditArea = editArea;
+    this.gui.TextBox = newTextbox;
+    this.gui.TextTitle = titleArea;
+    this.gui.DeleteButton = newButtonDelete;
+    
+    /* position the note text below the note area */
+    this.PositionNote();
+}
+
+PhotoNote.prototype.PositionNote = function()
+{
+    /* outer most box */
+    this.gui.ElementRect.style.left  = this.rect.left + 'px';
+    this.gui.ElementRect.style.top  = this.rect.top + 'px';
+    this.gui.ElementRect.style.width  = this.rect.width + 'px';
+    this.gui.ElementRect.style.height  = this.rect.height + 'px';
+    
+    // black border
+    this.gui.ElementRect.firstChild.style.width  = parseInt(this.gui.ElementRect.style.width) - 2 + 'px';
+    this.gui.ElementRect.firstChild.style.height  = parseInt(this.gui.ElementRect.style.height) - 2 + 'px';        
+    
+    // white border
+    this.gui.ElementRect.firstChild.firstChild.style.width  = parseInt(this.gui.ElementRect.style.width) - 4 + 'px';
+    this.gui.ElementRect.firstChild.firstChild.style.height  = parseInt(this.gui.ElementRect.style.height) - 4 + 'px';        
+
+    // inner box
+    this.gui.ElementRect.firstChild.firstChild.firstChild.style.width  = parseInt(this.gui.ElementRect.style.width) - 6 + 'px';
+    this.gui.ElementRect.firstChild.firstChild.firstChild.style.height  = parseInt(this.gui.ElementRect.style.height) - 6 + 'px';        
+ 
+    this.gui.ElementNote.style.left  = this.rect.left + this.XOffset + 'px';
+    this.gui.ElementNote.style.top  = this.rect.top + this.YOffset + this.rect.height + 'px';
+   
+}
+
+/*********************************************************/
+/*** Photo Note GUI Object *******************************/
+/*********************************************************/
+function PhotoNoteGUI()
+{
+    this.ElementRect = null;
+    
+    // the note text area...
+    this.ElementNote = null;
+    this.TextTitle = null;
+    this.EditArea = null;
+    this.TextBox = null;
+    
+    // buttons
+    this.DeleteButton = null;
+}
+
+
+
+/*********************************************************/
+/*** Rectangle *******************************************/
+/*********************************************************/
+function PhotoNoteRect(left,top,width,height)
+{
+    this.left = left;
+    this.top = top;
+    this.width = width;
+    this.height = height;
+}
+
+/* for debugging purposes */
+PhotoNoteRect.prototype.toString = function()
+{
+    return 'left: ' + this.left + ', top: ' + this.top + ', width: ' + this.width + ', height: ' + this.height;
+}
+
+
+// *** Common API Code ***
+// (c) 2005 Angus Turnbull http://www.twinhelix.com
+
+var aeOL = [];
+function addEvent(o, n, f, l)
+{
+ var a = 'addEventListener', h = 'on'+n, b = '', s = '';
+ if (o[a] && !l) return o[a](n, f, false);
+ o._c |= 0;
+ if (o[h])
+ {
+  b = '_f' + o._c++;
+  o[b] = o[h];
+ }
+ s = '_f' + o._c++;
+ o[s] = f;
+ o[h] = function(e)
+ {
+  e = e || window.event;
+  var r = true;
+  if (b) r = o[b](e) != false && r;
+  r = o[s](e) != false && r;
+  return r;
+ };
+ aeOL[aeOL.length] = { o: o, h: h };
+};
+addEvent(window, 'unload', function() {
+ for (var i = 0; i < aeOL.length; i++) with (aeOL[i])
+ {
+  o[h] = null;
+  for (var c = 0; o['_f' + c]; c++) o['_f' + c] = null;
+ }
+});
+
+function cancelEvent(e, c)
+{
+ e.returnValue = false;
+ if (e.preventDefault) e.preventDefault();
+ if (c)
+ {
+  e.cancelBubble = true;
+  if (e.stopPropagation) e.stopPropagation();
+ }
+};
+
+function addLoadEvent(func) {
+  var oldonload = window.onload;
+  if (typeof window.onload != 'function') {
+    window.onload = func;
+  } else {
+    window.onload = function() {
+      oldonload();
+      func();
+    }
+  }
+}
+
+
+/* Extend the Array object with some useful features 
+   http://www.ditchnet.org/wp/?p=8
+*/
+
+Array.prototype.clear = function () {
+    this.length = 0;
+};
+
+Array.prototype.remove = function (element) {
+	var result = false;
+	var array = [];
+	for (var i = 0; i < this.length; i++) {
+		if (this[i] == element) {
+			result = true;
+		} else {
+			array.push(this[i]);
+		}
+	}
+	this.clear();
+	for (var i = 0; i < array.length; i++) {
+		this.push(array[i]);
+	}
+	array = null;
+	return result;
+};
+
+
+// *** Drag and Resize Library Code ***
+// (c) 2005 Angus Turnbull http://www.twinhelix.come
+
+function DragResize(myName, config)
+{
+    var props = {
+        myName: myName,                  // Name of the object.
+        enabled: true,                   // Global toggle of drag/resize.
+        handles: ['tl', 'tm', 'tr',
+        'ml', 'mr', 'bl', 'bm', 'br'], // Array of drag handles: top/mid/.
+        isElement: null,                 // Function ref to test for an element.
+        isHandle: null,                  // Function ref to test for move handle.
+        element: null,                   // The currently selected element.
+        dragging: null,                  // Active handle reference of the element.
+        minWidth: 10, minHeight: 10,     // Minimum pixel size of elements.
+        minLeft: 0, maxRight: 9999,      // Bounding box area.
+        minTop: 0, maxBottom: 9999,
+        zIndex: 1,                       // The highest Z-Index yet allocated.
+        mouseX: 0, mouseY: 0,            // Current mouse position, recorded live.
+        lastMouseX: 0, lastMouseY: 0,    // Last processed mouse positions.
+        mOffX: 0, mOffY: 0,              // A known offset between position & mouse.
+        elmX: 0, elmY: 0,                // Element position.
+        elmW: 0, elmH: 0,                // Element size.
+        allowBlur: true,                 // Whether to allow automatic blur onclick.
+        ondragfocus: null,               // Event handler functions.
+        ondragstart: null,
+        ondragmove: null,
+        ondragend: null,
+        ondragblur: null
+    };
+
+    for (var p in props)
+    {
+        this[p] = (typeof config[p] == 'undefined') ? props[p] : config[p];
+    }
+};
+
+DragResize.prototype.apply = function(node)
+{
+    // Adds object event handlers to the specified DOM node.
+
+    var obj = this;
+    addEvent(node, 'mousedown', function(e) { obj.mouseDown(e) } );
+    addEvent(node, 'mousemove', function(e) { obj.mouseMove(e) } );
+    addEvent(node, 'mouseup', function(e) { obj.mouseUp(e) } );
+};
+
+DragResize.prototype.handleSet = function(elm, show) { with (this)
+{
+    // Either creates, shows or hides the resize handles within an element.
+
+    // If we're showing them, and no handles have been created, create 4 new ones.
+    if (!elm._handle_tr)
+    {
+        for (var h = 0; h < handles.length; h++)
+        {
+            // Create 4 news divs, assign each a generic + specific class.
+            var hDiv = document.createElement('div');
+            hDiv.className = myName + ' ' +  myName + '-' + handles[h];
+            elm['_handle_' + handles[h]] = elm.appendChild(hDiv);
+        }
+    }
+
+    // We now have handles. Find them all and show/hide.
+    for (var h = 0; h < handles.length; h++)
+    {
+        elm['_handle_' + handles[h]].style.visibility = show ? 'inherit' : 'hidden';
+    }
+}};
+
+
+DragResize.prototype.select = function(newElement) { with (this)
+{
+    // Selects an element for dragging.
+
+    if (!document.getElementById || !enabled) return;
+
+    // Activate and record our new dragging element.
+    if (newElement && (newElement != element) && enabled)
+    {
+        element = newElement;
+        // Elevate it and give it resize handles.
+        element.style.zIndex = ++zIndex;
+        handleSet(element, true);
+        // Record element attributes for mouseMove().
+        elmX = parseInt(element.style.left);
+        elmY = parseInt(element.style.top);
+        elmW = element.offsetWidth;
+        elmH = element.offsetHeight;
+        if (ondragfocus) this.ondragfocus();
+    //window.status = 'start elmX=' + element.className;
+        
+    }
+}};
+
+
+DragResize.prototype.deselect = function(keepHandles) { with (this)
+{
+    // Immediately stops dragging an element. If 'keepHandles' is false, this
+    // remove the handles from the element and clears the element flag,
+    // completely resetting the .
+
+    if (!document.getElementById || !enabled) return;
+
+    if (!keepHandles)
+    {
+        if (ondragblur) this.ondragblur();
+        handleSet(element, false);
+        element = null;
+    }
+
+    dragging = null;
+    mOffX = 0;
+    mOffY = 0;
+}};
+
+
+DragResize.prototype.mouseDown = function(e) { with (this)
+{
+    //window.status = 'mouseDown!';
+    // Suitable elements are selected for drag/resize on mousedown.
+    // We also initialise the resize boxes, and drag parameters like mouse position etc.
+    if (!document.getElementById || !enabled) return true;
+
+    var elm = e.target || e.srcElement,
+    newElement = null,
+    newHandle = null,
+    hRE = new RegExp(myName + '-([trmbl]{2})', '');
+
+    while (elm)
+    {
+        // Loop up the DOM looking for matching elements. Remember one if found.
+        if (elm.className)
+        {
+        if (!newHandle && (hRE.test(elm.className) || isHandle(elm))) newHandle = elm;
+        if (isElement(elm)) { newElement = elm; break }
+        }
+        elm = elm.parentNode;
+    }
+
+    // If this isn't on the last dragged element, call deselect(false),
+    // which will hide its handles and clear element.
+    if (element && (element != newElement) && allowBlur) deselect(false);
+
+    // If we have a new matching element, call select().
+    if (newElement && (!element || (newElement == element)))
+    {
+        // Stop mouse selections.
+        cancelEvent(e);
+        select(newElement, newHandle);
+        dragging = newHandle;
+        if (dragging && ondragstart) this.ondragstart();
+    }
+}};
+
+
+DragResize.prototype.mouseMove = function(e) { with (this)
+{
+    // This continually offsets the dragged element by the difference between the
+    // last recorded mouse position (mouseX/Y) and the current mouse position.
+    if (!document.getElementById || !enabled) return true;
+
+    // We always record the current mouse position.
+    mouseX = e.pageX || e.clientX + document.documentElement.scrollLeft;
+    mouseY = e.pageY || e.clientY + document.documentElement.scrollTop;
+    // Record the relative mouse movement, in case we're dragging.
+    // Add any previously stored&ignored offset to the calculations.
+    var diffX = mouseX - lastMouseX + mOffX;
+    var diffY = mouseY - lastMouseY + mOffY;
+    mOffX = mOffY = 0;
+    // Update last processed mouse positions.
+    lastMouseX = mouseX;
+    lastMouseY = mouseY;
+
+    // That's all we do if we're not dragging anything.
+    if (!dragging) return true;
+
+    // Establish which handle is being dragged -- retrieve handle name from className.
+    var hClass = dragging && dragging.className &&
+    dragging.className.match(new RegExp(myName + '-([tmblr]{2})')) ? RegExp.$1 : '';
+
+    // If the hClass is one of the resize handles, resize one or two dimensions.
+    // Bounds checking is the hard bit -- basically for each edge, check that the
+    // element doesn't go under minimum size, and doesn't go beyond its boundary.
+    var rs = 0, dY = diffY, dX = diffX;
+    if (hClass.indexOf('t') >= 0)
+    {
+        rs = 1;
+        if (elmH - dY < minHeight) mOffY = (dY - (diffY = elmH - minHeight));
+        else if (elmY + dY < minTop) mOffY = (dY - (diffY = minTop - elmY));
+        elmY += diffY;
+        elmH -= diffY;
+    }
+    if (hClass.indexOf('b') >= 0)
+    {
+        rs = 1;
+        if (elmH + dY < minHeight) mOffY = (dY - (diffY = minHeight - elmH));
+        else if (elmY + elmH + dY > maxBottom) mOffY = (dY - (diffY = maxBottom - elmY - elmH));
+        elmH += diffY;
+    }
+    if (hClass.indexOf('l') >= 0)
+    {
+        rs = 1;
+        if (elmW - dX < minWidth) mOffX = (dX - (diffX = elmW - minWidth));
+        else if (elmX + dX < minLeft) mOffX = (dX - (diffX = minLeft - elmX));
+        elmX += diffX;
+        elmW -= diffX;
+    }
+    if (hClass.indexOf('r') >= 0)
+    {
+        rs = 1;
+        if (elmW + dX < minWidth) mOffX = (dX - (diffX = minWidth - elmW));
+        else if (elmX + elmW + dX > maxRight) mOffX = (dX - (diffX = maxRight - elmX - elmW));
+        elmW += diffX;
+        window.status = 'diffX:' + diffX;
+    }
+    // If 'rs' isn't set, we must be dragging the whole element, so move that.
+    if (dragging && !rs)
+    {
+        // Bounds check left-right...
+        if (elmX + dX < minLeft) mOffX = (dX - (diffX = minLeft - elmX));
+        else if (elmX + elmW + dX > maxRight) mOffX = (dX - (diffX = maxRight - elmX - elmW));
+        // ...and up-down.
+        if (elmY + dY < minTop) mOffY = (dY - (diffY = minTop - elmY));
+        else if (elmY + elmH + dY > maxBottom) mOffY = (dY - (diffY = maxBottom - elmY - elmH));
+        //window.status = 'diffX-' + diffX + ' , elmX-' + elmX;
+        elmX += diffX;
+        elmY += diffY;
+    }
+    
+    //window.status = 'elmX=' + elmX;
+    // Assign new info back to the element, with minimum dimensions.
+    with (element.style)
+    {
+        left =   elmX + 'px';
+        width =  elmW + 'px';
+        top =    elmY + 'px';
+        height = elmH + 'px';
+    }
+
+    // Evil, dirty, hackish Opera select-as-you-drag fix.
+    if (window.opera && document.documentElement)
+    {
+        var oDF = document.getElementById('op-drag-fix');
+        if (!oDF)
+        {
+            var oDF = document.createElement('input');
+            oDF.id = 'op-drag-fix';
+            oDF.style.display = 'none';
+            document.body.appendChild(oDF);
+        }
+        oDF.focus();
+    }
+
+    if (ondragmove) this.ondragmove();
+
+    // Stop a normal drag event.
+    cancelEvent(e);
+}};
+
+
+DragResize.prototype.mouseUp = function(e) { with (this)
+{
+    // On mouseup, stop dragging, but don't reset handler visibility.
+    if (!document.getElementById || !enabled) return;
+
+    if (ondragend) this.ondragend();
+    deselect(true);
+}};
+
+
+
Index: main/trunk/model-cols-dev/peijones/js/documentmaker/documentmaker/documentMakerDragDrop.js
===================================================================
--- main/trunk/model-cols-dev/peijones/js/documentmaker/documentmaker/documentMakerDragDrop.js	(revision 24778)
+++ main/trunk/model-cols-dev/peijones/js/documentmaker/documentmaker/documentMakerDragDrop.js	(revision 24778)
@@ -0,0 +1,346 @@
+/* Copyright (c) 2006 Yahoo! Inc. All rights reserved. */
+
+function documentMakerDDStack(id, sGroup) {
+	if (id) {
+		this.init(id, sGroup);
+		this.initFrame();
+	}
+}
+
+documentMakerDDStack.prototype = new YAHOO.util.DDTarget();
+
+documentMakerDDPlayer.TYPE = "documentMakerDDPlayer";
+
+/**
+* @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 documentMakerDDPlayer(id, sGroup, bl) {
+	this.initPlayer(id, sGroup);
+	this.berryList = bl;     
+	
+}
+
+documentMakerDDPlayer.prototype = new YAHOO.util.DDProxy();
+
+documentMakerDDPlayer.prototype.berryList = new Array();
+
+documentMakerDDPlayer.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 = documentMakerDDPlayer.TYPE;
+	this.slot = null;
+	this.startPos = YAHOO.util.Dom.getXY( this.getEl() );
+
+}
+
+documentMakerDDPlayer.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/book.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();
+};
+
+documentMakerDDPlayer.prototype.getTargetDomRef = function(oDD) {
+	if (oDD.player) {
+		return oDD.player.getEl();
+	} else {
+		return oDD.getEl();
+	}
+};
+
+documentMakerDDPlayer.prototype.endDrag = function(e) {
+	// reset the linked element styles
+	var s = this.getEl().style;
+	s.opacity = 1;
+	s.filter = "alpha(opacity=100)";
+
+	this.resetTargets();
+};
+
+documentMakerDDPlayer.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 docAddurlPath ="?a=pr&rt=r&ro=1&s=AddDocument&c=&s1.id=2&o=XML&hhf=[{\"name\":\"Cache-Control\", \"value\":\"no-cache\"}]&s1.item=";
+var docDelurlPath ="?a=pr&rt=r&ro=1&s=DeleteDocument&c=&o=XML&hhf=[{\"name\":\"Cache-Control\", \"value\":\"no-cache\"}]&s1.item=";
+var postdata = null;
+
+documentMakerDDPlayer.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 = docAddurlPath + el.id;	
+	var addSuccess = function(o){
+		//alert("HERE!" + 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('documentmaker');
+			var berries = YAHOO.util.Dom.get('documentpages');
+			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/book.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
+		dmcheckout();
+	}
+
+	var addFailure = function(o){ alert("Adding berry failed" + o); }
+
+
+	var addcallback = {
+		success:addSuccess,
+		failure:addFailure,  
+		argument:player
+	}
+	
+
+	var  delurl = docDelurlPath + 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 == 'documentmaker'){
+		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;
+};
+
+documentMakerDDPlayer.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);
+};
+
+documentMakerDDPlayer.prototype.onDragOver = function(e, id) {};
+
+documentMakerDDPlayer.prototype.onDrag = function(e, id) {};
+
+
+
+
+
Index: main/trunk/model-cols-dev/peijones/js/documentmaker/documentmaker/documentcheckout.js
===================================================================
--- main/trunk/model-cols-dev/peijones/js/documentmaker/documentmaker/documentcheckout.js	(revision 24778)
+++ main/trunk/model-cols-dev/peijones/js/documentmaker/documentmaker/documentcheckout.js	(revision 24778)
@@ -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'){
+		documentCheckoutHighlight( 'fullview' );
+		showFullView();
+	}
+
+	if (target.id.toLowerCase() == 'textview'){
+		documentCheckoutHighlight( 'textview' );
+		showTextView();
+	}
+
+	if (target.id.toLowerCase() == 'email'){
+		documentCheckoutHighlight( '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("","Book Maker 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("","Book Maker 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('documentMakerContent');
+	var fullview =  YAHOO.util.Dom.get('fullview');
+	docuemtnCheckoutPageClear();
+
+	if (docList.length == 0){
+		content.appendChild(document.createTextNode("Your Book Maker 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/book.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 = 'documentdoc';
+		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('documentMakerContent');
+	var textview = YAHOO.util.Dom.get('textview');
+
+	documentCheckoutPageClear();
+	if (docList.length == 0){
+		content.appendChild(document.createTextNode("Your Book Maker 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('documentMakerContent');
+	var email = YAHOO.util.Dom.get('email');
+
+	berryCheckoutPageClear();
+
+	if (docList.length == 0){
+		content.appendChild(document.createTextNode("Your Book Maker 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 = 'documentcheck';
+	//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 documentCheckoutPageClear() {
+	var bbc = document.getElementById('documentMakerContent');
+	if ( bbc == null ) return;
+	bbc.innerHTML = '';
+}
+
+function documentCheckoutHighlight( 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/model-cols-dev/peijones/js/documentmaker/documentmaker/documentmaker.js
===================================================================
--- main/trunk/model-cols-dev/peijones/js/documentmaker/documentmaker/documentmaker.js	(revision 24778)
+++ main/trunk/model-cols-dev/peijones/js/documentmaker/documentmaker/documentmaker.js	(revision 24778)
@@ -0,0 +1,370 @@
+//used to stored the current items in document maker, 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 documentMakerDDPlayer.js). It is used to show the contents of the berry basket.
+
+var show = false;
+var docList =  new Array();
+
+var oldHeight=120;
+var oldWidth=140;
+var oldBg;
+
+var dd = new ygDDOnTop('documentmaker');
+dd.setHandleElId('documenthandle');
+
+var dmcheckout = function(){
+
+	if ( document.getElementById('documentmaker') == null ) return;
+	
+	var request_type = "GET";
+	var url = "?a=pr&rt=r&ro=1&s=GetDocuments&o=XML&hhf=[{\"name\":\"Cache-Control\", \"value\":\"no-cache\"}]&c=";
+
+	var responseSuccess = function(o){
+		//alert(o.responseText);
+		var response = o.responseXML;
+		var size = response.getElementsByTagName('size').item(0).getAttribute('value');
+
+		var items = response.getElementsByTagName('item');
+
+		docList = new Array();
+		for (var i=0;i < items.length ; i++ )
+		{
+			// remove document images from the document maker if it already contains this item
+			var itemID = "dmbook" + 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);
+			}
+			docList[docList.length] = items[i];
+		}
+
+		//add document image into the document maker
+		updateDocumentImages();
+
+		// set document images visible
+		// they are set to be invisible to prevent flickering when first loaded (see documentmaker.css)
+
+		var docs = document.getElementsByTagName('img');
+		new YAHOO.util.DDTarget('documentmaker','documentbox');
+
+		for (var j=0; j < docs.length; j++){
+			var doc = docs[j]; 
+			var parent = doc.parentNode;
+
+			if (doc.id.indexOf("dmbook") != -1){
+				doc.style.visibility = "visible";
+				new documentMakerDDPlayer(doc.id,'documentbox',docList); 
+			}
+		}
+		//updateDocumentCount();
+		correctDocumentExpandCollapseButtons();
+	}
+
+	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 updateDocumentImages(){
+
+	var docs = YAHOO.util.Dom.get('documentpages');
+	if ( docs == null ) return;
+	
+	while(docs.hasChildNodes())
+	{
+		docs.removeChild(docs.firstChild);
+	}
+	
+	for (var i = 0; i < docList.length && i < 12; i++ ){
+		var img = document.createElement('img');
+		img.src = 'interfaces/oran/images/book.png';
+		docs.appendChild(img);
+	}
+
+	//show the help message if there are no docs
+	if ( docList.length == 0 ) {
+		var docHelpMsg = document.createElement('span');
+		docs.appendChild(docHelpMsg);
+		docHelpMsg.appendChild(document.createTextNode('Drop your document/pages here'));
+		docHelpMsg.setAttribute('id','docHelpMsg');
+	}
+
+	//show the expand buttons
+	correctDocumentExpandCollapseButtons();
+
+}
+
+function correctDocumentExpandCollapseButtons() {
+	var bbecl = YAHOO.util.Dom.get('documentMakerExpandCollapseLinks');
+	if ( bbecl == null ) return;
+	if ( docList.length > 0 ) {
+		YAHOO.util.Dom.get('documentMakerExpandCollapseLinks').style.display='';
+	} else {
+		YAHOO.util.Dom.get('documentMakerExpandCollapseLinks').style.display='none';
+	}
+}
+
+function updateDocumentCount() {
+	var docs = YAHOO.util.Dom.get('documentpages');
+	var documentCount = YAHOO.util.Dom.get('documentCount');
+	if ( docs == null || documentCount == null ) return;
+	if ( docList.length == 0 ) {
+		documentCount.innerHTML = "empty";
+	} else {
+		documentCount.innerHTML = docList.length;
+	}
+}
+
+function documentBoxUpdate(e) {
+//alert( arguments.callee );
+	var target = e.target;
+	if ((target.id.toLowerCase() == 'documentmaker' || target.id.toLowerCase() == 'documentpages') && !show){
+		showDocumentBox();
+		show = true;
+	}else{
+		if (target.id.toLowerCase() == 'hideview' && show){
+			hideDocumentBox();
+			show = false;
+		}
+	}
+
+	if (target.className == 'pick'){
+		addDocument(target);
+	}
+}
+
+function showDocumentBox() {
+//alert( arguments.callee );
+	var documentMaker= YAHOO.util.Dom.get('documentmaker');
+	var documentHandle = YAHOO.util.Dom.get('documenthandle');
+	var documentPages = YAHOO.util.Dom.get('documentpages');
+	var width = 500;
+	var height = 40;
+	var i=0;
+
+	//remove berryImages in the berry basket
+	while (documentPages.hasChildNodes()) {
+		documentPages.removeChild(documentPages.firstChild);
+	}
+	while (documentHandle.hasChildNodes()) {
+		documentHandle.removeChild(documentHandle.firstChild);
+	}
+	
+	var div = document.createElement('div');
+	documentPages.appendChild(div);
+	var list = document.createElement('ol');
+	div.appendChild(list);
+	
+	list.id = 'doclist';
+
+	//put the document pages in
+	for (i; i < docList.length; i++){
+		var documentItem = docList[i];
+		var documentElement = document.createElement('li');
+		list.appendChild(documentElement);
+		var title = documentItem.getAttribute('title');
+		var root_title = documentItem.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);
+		}
+		
+		documentElement.setAttribute("class","documentitem");
+		documentElement.setAttribute("title",title);
+		documentElement.innerHTML = title;
+		height +=40;
+	}
+
+	oldHeight = documentMaker.style.height;
+	oldWidth = documentMaker.style.width;
+	oldBg = documentMaker.style.background;
+
+	documentMaker.style.background ='url("interfaces/default/images/kete2.png") 0 0 repeat';
+	documentMaker.style.cursor = "default";
+	documentMaker.className = "show";
+
+	//put the full view link in
+	var fullView = document.createElement('a');
+	documentPages.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=documentmaker&c=&s=DisplayDocumentList&rt=r&p.c=" + collectionName);
+	fullView.setAttribute("id","documentpagesFullViewLink");
+
+	//toggle expand/collapse links
+	var expandLink = YAHOO.util.Dom.get('documentMakerExpandLink');
+	var collapseLink = YAHOO.util.Dom.get('documentMakerCollapseLink');
+	if ( expandLink != null && collapseLink != null ) {
+		expandLink.style.display = 'none';
+		collapseLink.style.display = '';
+	}
+
+}
+
+function hideDocumentBox() {
+//alert( arguments.callee );
+	var i = 0;
+	var documentMaker = YAHOO.util.Dom.get('documentmaker');
+	var documentHandle = YAHOO.util.Dom.get('documenthandle');
+	var documentPages = YAHOO.util.Dom.get('documentpages');
+	documentMaker.style.height = oldHeight;
+	documentMaker.style.width = oldWidth;
+	documentMaker.style.background = oldBg;
+	documentMaker.style.cursor = "pointer";
+	documentMaker.className = "hide";
+
+	while (documentPages.hasChildNodes()) {
+		documentPages.removeChild(documentPages.firstChild);
+	}
+
+	while (documentHandle.hasChildNodes()) {
+		documentHandle.removeChild(documentHandle.firstChild);
+	}
+
+	updateDocumentImages();
+	//updateDocumentCount();
+
+	//toggle expand/collapse links
+	var expandLink = YAHOO.util.Dom.get('documentMakerExpandLink');
+	var collapseLink = YAHOO.util.Dom.get('documentMakerCollapseLink');
+	if ( expandLink != null && collapseLink != null ) {
+		expandLink.style.display = '';
+		collapseLink.style.display = 'none';
+	}
+	
+}
+
+
+function addDocument(el){
+	var addurl = "?a=pr&rt=r&ro=1&s=AddDocument&c=&s1.id=2&o=XML&hhf=[{\"name\":\"Cache-Control\", \"value\":\"no-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 documentmaker = YAHOO.util.Dom.get('documentmaker');
+			var documentPages = YAHOO.util.Dom.get('documentpages');
+			docList[docList.length]= item;
+			var parent =el.parentNode;
+			if (parent == null) return;
+			parent.removeChild(el);
+			var itemID = item.getAttribute('collection')+":"+item.getAttribute('name');
+//added
+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') && docList.length < 13){
+
+				while (documentpages.hasChildNodes()) {
+					documentpages.removeChild(documentpages.firstChild);
+				}
+
+				for (var i =0; i < docList.length; i++ ){
+					var img = document.createElement('img');
+					img.src = 'interfaces/oran/images/book.png';
+					documentpages.appendChild(img);
+				}
+
+			}  else {
+
+				if (YAHOO.util.Dom.get('hideview')){
+					var documentMaker = YAHOO.util.Dom.get('documentmaker');
+					var documentPages = YAHOO.util.Dom.get('documentpages');
+					var doclist = YAHOO.util.Dom.get('doclist');
+					var tid = el.id;
+					var documentItem;
+					var documentElement = document.createElement('li');
+
+					for (var i in docList){
+						documentItem = docList[i];
+						var id = documentItem.getAttribute('collection')+":"+documentItem.getAttribute('name');
+
+						if (id == tid){
+							var title = documentItem.getAttribute('title');
+							var root_title = documentItem.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);
+							}
+
+							documentElement.appendChild(document.createTextNode(title));
+							documentElement.setAttribute("class","documentitem");
+							doclist.appendChild(documentElement);
+							var heightStr = documentMaker.style.height+"";
+							var height =parseInt(heightStr.substring(0,heightStr.length-2)) +18;
+							documentMaker.style.height = height;
+							documentPages.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', dmcheckout);
+//YAHOO.util.Event.addListener(window, 'click', documentBoxUpdate);
+
Index: main/trunk/model-cols-dev/peijones/js/documentmaker/documentmaker/yahoo-dom-event.js
===================================================================
--- main/trunk/model-cols-dev/peijones/js/documentmaker/documentmaker/yahoo-dom-event.js	(revision 24778)
+++ main/trunk/model-cols-dev/peijones/js/documentmaker/documentmaker/yahoo-dom-event.js	(revision 24778)
@@ -0,0 +1,14 @@
+/*
+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"});(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"});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"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
Index: main/trunk/model-cols-dev/peijones/js/documentmaker/documentmaker/yuiloader-min.js
===================================================================
--- main/trunk/model-cols-dev/peijones/js/documentmaker/documentmaker/yuiloader-min.js	(revision 24778)
+++ main/trunk/model-cols-dev/peijones/js/documentmaker/documentmaker/yuiloader-min.js	(revision 24778)
@@ -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
+*/
+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"});YAHOO.util.Get=function(){var m={},k=0,r=0,l=false,n=YAHOO.env.ua,s=YAHOO.lang,q,d,e,i=function(x,t,y){var u=y||window,z=u.document,A=z.createElement(x),v;for(v in t){if(t.hasOwnProperty(v)){A.setAttribute(v,t[v]);}}return A;},h=function(u,v,t){var w={id:"yui__dyn_"+(r++),type:"text/css",rel:"stylesheet",href:u};if(t){s.augmentObject(w,t);}return i("link",w,v);},p=function(u,v,t){var w={id:"yui__dyn_"+(r++),type:"text/javascript",src:u};if(t){s.augmentObject(w,t);}return i("script",w,v);},a=function(t,u){return{tId:t.tId,win:t.win,data:t.data,nodes:t.nodes,msg:u,purge:function(){d(this.tId);}};},b=function(t,w){var u=m[w],v=(s.isString(t))?u.win.document.getElementById(t):t;if(!v){q(w,"target node not found: "+t);}return v;},c=function(w){YAHOO.log("Finishing transaction "+w);var u=m[w],v,t;u.finished=true;if(u.aborted){v="transaction "+w+" was aborted";q(w,v);return;}if(u.onSuccess){t=u.scope||u.win;u.onSuccess.call(t,a(u));}},o=function(v){YAHOO.log("Timeout "+v,"info","get");var u=m[v],t;if(u.onTimeout){t=u.scope||u;u.onTimeout.call(t,a(u));}},f=function(v,A){YAHOO.log("_next: "+v+", loaded: "+A,"info","Get");var u=m[v],D=u.win,C=D.document,B=C.getElementsByTagName("head")[0],x,y,t,E,z;if(u.timer){u.timer.cancel();}if(u.aborted){y="transaction "+v+" was aborted";q(v,y);return;}if(A){u.url.shift();if(u.varName){u.varName.shift();}}else{u.url=(s.isString(u.url))?[u.url]:u.url;if(u.varName){u.varName=(s.isString(u.varName))?[u.varName]:u.varName;}}if(u.url.length===0){if(u.type==="script"&&n.webkit&&n.webkit<420&&!u.finalpass&&!u.varName){z=p(null,u.win,u.attributes);z.innerHTML='YAHOO.util.Get._finalize("'+v+'");';u.nodes.push(z);B.appendChild(z);}else{c(v);}return;}t=u.url[0];if(!t){u.url.shift();YAHOO.log("skipping empty url");return f(v);}YAHOO.log("attempting to load "+t,"info","Get");if(u.timeout){u.timer=s.later(u.timeout,u,o,v);}if(u.type==="script"){x=p(t,D,u.attributes);}else{x=h(t,D,u.attributes);}e(u.type,x,v,t,D,u.url.length);u.nodes.push(x);if(u.insertBefore){E=b(u.insertBefore,v);if(E){E.parentNode.insertBefore(x,E);}}else{B.appendChild(x);}YAHOO.log("Appending node: "+t,"info","Get");if((n.webkit||n.gecko)&&u.type==="css"){f(v,t);}},j=function(){if(l){return;}l=true;var t,u;for(t in m){if(m.hasOwnProperty(t)){u=m[t];if(u.autopurge&&u.finished){d(u.tId);delete m[t];}}}l=false;},g=function(u,t,v){var x="q"+(k++),w;v=v||{};if(k%YAHOO.util.Get.PURGE_THRESH===0){j();}m[x]=s.merge(v,{tId:x,type:u,url:t,finished:false,aborted:false,nodes:[]});w=m[x];w.win=w.win||window;w.scope=w.scope||w.win;w.autopurge=("autopurge" in w)?w.autopurge:(u==="script")?true:false;w.attributes=w.attributes||{};w.attributes.charset=v.charset||w.attributes.charset||"utf-8";s.later(0,w,f,x);return{tId:x};};e=function(H,z,x,u,D,E,G){var F=G||f,B,t,I,v,J,A,C,y;if(n.ie){z.onreadystatechange=function(){B=this.readyState;if("loaded"===B||"complete"===B){YAHOO.log(x+" onload "+u,"info","Get");z.onreadystatechange=null;F(x,u);}};}else{if(n.webkit){if(H==="script"){if(n.webkit>=420){z.addEventListener("load",function(){YAHOO.log(x+" DOM2 onload "+u,"info","Get");F(x,u);});}else{t=m[x];if(t.varName){v=YAHOO.util.Get.POLL_FREQ;YAHOO.log("Polling for "+t.varName[0]);t.maxattempts=YAHOO.util.Get.TIMEOUT/v;t.attempts=0;t._cache=t.varName[0].split(".");t.timer=s.later(v,t,function(w){I=this._cache;A=I.length;J=this.win;for(C=0;C<A;C=C+1){J=J[I[C]];if(!J){this.attempts++;if(this.attempts++>this.maxattempts){y="Over retry limit, giving up";t.timer.cancel();q(x,y);}else{YAHOO.log(I[C]+" failed, retrying");}return;}}YAHOO.log("Safari poll complete");t.timer.cancel();F(x,u);},null,true);}else{s.later(YAHOO.util.Get.POLL_FREQ,null,F,[x,u]);}}}}else{z.onload=function(){YAHOO.log(x+" onload "+u,"info","Get");F(x,u);};}}};q=function(w,v){YAHOO.log("get failure: "+v,"warn","Get");var u=m[w],t;if(u.onFailure){t=u.scope||u.win;u.onFailure.call(t,a(u,v));}};d=function(z){if(m[z]){var t=m[z],u=t.nodes,x=u.length,C=t.win.document,A=C.getElementsByTagName("head")[0],v,y,w,B;if(t.insertBefore){v=b(t.insertBefore,z);if(v){A=v.parentNode;}}for(y=0;y<x;y=y+1){w=u[y];if(w.clearAttributes){w.clearAttributes();}else{for(B in w){if(w.hasOwnProperty(B)){delete w[B];}}}A.removeChild(w);}t.nodes=[];}};return{POLL_FREQ:10,PURGE_THRESH:20,TIMEOUT:2000,_finalize:function(t){YAHOO.log(t+" finalized ","info","Get");s.later(0,null,c,t);},abort:function(u){var v=(s.isString(u))?u:u.tId,t=m[v];if(t){YAHOO.log("Aborting "+v,"info","Get");t.aborted=true;}},script:function(t,u){return g("script",t,u);},css:function(t,u){return g("css",t,u);}};}();YAHOO.register("get",YAHOO.util.Get,{version:"2.9.0",build:"2800"});(function(){var Y=YAHOO,util=Y.util,lang=Y.lang,env=Y.env,PROV="_provides",SUPER="_supersedes",REQ="expanded",AFTER="_after",VERSION="2.9.0";var YUI={dupsAllowed:{"yahoo":true,"get":true},info:{"root":VERSION+"/build/","base":"http://yui.yahooapis.com/"+VERSION+"/build/","comboBase":"http://yui.yahooapis.com/combo?","skin":{"defaultSkin":"sam","base":"assets/skins/","path":"skin.css","after":["reset","fonts","grids","base"],"rollup":3},dupsAllowed:["yahoo","get"],"moduleInfo":{"animation":{"type":"js","path":"animation/animation-min.js","requires":["dom","event"]},"autocomplete":{"type":"js","path":"autocomplete/autocomplete-min.js","requires":["dom","event","datasource"],"optional":["connection","animation"],"skinnable":true},"base":{"type":"css","path":"base/base-min.css","after":["reset","fonts","grids"]},"button":{"type":"js","path":"button/button-min.js","requires":["element"],"optional":["menu"],"skinnable":true},"calendar":{"type":"js","path":"calendar/calendar-min.js","requires":["event","dom"],supersedes:["datemath"],"skinnable":true},"carousel":{"type":"js","path":"carousel/carousel-min.js","requires":["element"],"optional":["animation"],"skinnable":true},"charts":{"type":"js","path":"charts/charts-min.js","requires":["element","json","datasource","swf"]},"colorpicker":{"type":"js","path":"colorpicker/colorpicker-min.js","requires":["slider","element"],"optional":["animation"],"skinnable":true},"connection":{"type":"js","path":"connection/connection-min.js","requires":["event"],"supersedes":["connectioncore"]},"connectioncore":{"type":"js","path":"connection/connection_core-min.js","requires":["event"],"pkg":"connection"},"container":{"type":"js","path":"container/container-min.js","requires":["dom","event"],"optional":["dragdrop","animation","connection"],"supersedes":["containercore"],"skinnable":true},"containercore":{"type":"js","path":"container/container_core-min.js","requires":["dom","event"],"pkg":"container"},"cookie":{"type":"js","path":"cookie/cookie-min.js","requires":["yahoo"]},"datasource":{"type":"js","path":"datasource/datasource-min.js","requires":["event"],"optional":["connection"]},"datatable":{"type":"js","path":"datatable/datatable-min.js","requires":["element","datasource"],"optional":["calendar","dragdrop","paginator"],"skinnable":true},datemath:{"type":"js","path":"datemath/datemath-min.js","requires":["yahoo"]},"dom":{"type":"js","path":"dom/dom-min.js","requires":["yahoo"]},"dragdrop":{"type":"js","path":"dragdrop/dragdrop-min.js","requires":["dom","event"]},"editor":{"type":"js","path":"editor/editor-min.js","requires":["menu","element","button"],"optional":["animation","dragdrop"],"supersedes":["simpleeditor"],"skinnable":true},"element":{"type":"js","path":"element/element-min.js","requires":["dom","event"],"optional":["event-mouseenter","event-delegate"]},"element-delegate":{"type":"js","path":"element-delegate/element-delegate-min.js","requires":["element"]},"event":{"type":"js","path":"event/event-min.js","requires":["yahoo"]},"event-simulate":{"type":"js","path":"event-simulate/event-simulate-min.js","requires":["event"]},"event-delegate":{"type":"js","path":"event-delegate/event-delegate-min.js","requires":["event"],"optional":["selector"]},"event-mouseenter":{"type":"js","path":"event-mouseenter/event-mouseenter-min.js","requires":["dom","event"]},"fonts":{"type":"css","path":"fonts/fonts-min.css"},"get":{"type":"js","path":"get/get-min.js","requires":["yahoo"]},"grids":{"type":"css","path":"grids/grids-min.css","requires":["fonts"],"optional":["reset"]},"history":{"type":"js","path":"history/history-min.js","requires":["event"]},"imagecropper":{"type":"js","path":"imagecropper/imagecropper-min.js","requires":["dragdrop","element","resize"],"skinnable":true},"imageloader":{"type":"js","path":"imageloader/imageloader-min.js","requires":["event","dom"]},"json":{"type":"js","path":"json/json-min.js","requires":["yahoo"]},"layout":{"type":"js","path":"layout/layout-min.js","requires":["element"],"optional":["animation","dragdrop","resize","selector"],"skinnable":true},"logger":{"type":"js","path":"logger/logger-min.js","requires":["event","dom"],"optional":["dragdrop"],"skinnable":true},"menu":{"type":"js","path":"menu/menu-min.js","requires":["containercore"],"skinnable":true},"paginator":{"type":"js","path":"paginator/paginator-min.js","requires":["element"],"skinnable":true},"profiler":{"type":"js","path":"profiler/profiler-min.js","requires":["yahoo"]},"profilerviewer":{"type":"js","path":"profilerviewer/profilerviewer-min.js","requires":["profiler","yuiloader","element"],"skinnable":true},"progressbar":{"type":"js","path":"progressbar/progressbar-min.js","requires":["element"],"optional":["animation"],"skinnable":true},"reset":{"type":"css","path":"reset/reset-min.css"},"reset-fonts-grids":{"type":"css","path":"reset-fonts-grids/reset-fonts-grids.css","supersedes":["reset","fonts","grids","reset-fonts"],"rollup":4},"reset-fonts":{"type":"css","path":"reset-fonts/reset-fonts.css","supersedes":["reset","fonts"],"rollup":2},"resize":{"type":"js","path":"resize/resize-min.js","requires":["dragdrop","element"],"optional":["animation"],"skinnable":true},"selector":{"type":"js","path":"selector/selector-min.js","requires":["yahoo","dom"]},"simpleeditor":{"type":"js","path":"editor/simpleeditor-min.js","requires":["element"],"optional":["containercore","menu","button","animation","dragdrop"],"skinnable":true,"pkg":"editor"},"slider":{"type":"js","path":"slider/slider-min.js","requires":["dragdrop"],"optional":["animation"],"skinnable":true},"storage":{"type":"js","path":"storage/storage-min.js","requires":["yahoo","event","cookie"],"optional":["swfstore"]},"stylesheet":{"type":"js","path":"stylesheet/stylesheet-min.js","requires":["yahoo"]},"swf":{"type":"js","path":"swf/swf-min.js","requires":["element"],"supersedes":["swfdetect"]},"swfdetect":{"type":"js","path":"swfdetect/swfdetect-min.js","requires":["yahoo"]},"swfstore":{"type":"js","path":"swfstore/swfstore-min.js","requires":["element","cookie","swf"]},"tabview":{"type":"js","path":"tabview/tabview-min.js","requires":["element"],"optional":["connection"],"skinnable":true},"treeview":{"type":"js","path":"treeview/treeview-min.js","requires":["event","dom"],"optional":["json","animation","calendar"],"skinnable":true},"uploader":{"type":"js","path":"uploader/uploader-min.js","requires":["element"]},"utilities":{"type":"js","path":"utilities/utilities.js","supersedes":["yahoo","event","dragdrop","animation","dom","connection","element","yahoo-dom-event","get","yuiloader","yuiloader-dom-event"],"rollup":8},"yahoo":{"type":"js","path":"yahoo/yahoo-min.js"},"yahoo-dom-event":{"type":"js","path":"yahoo-dom-event/yahoo-dom-event.js","supersedes":["yahoo","event","dom"],"rollup":3},"yuiloader":{"type":"js","path":"yuiloader/yuiloader-min.js","supersedes":["yahoo","get"]},"yuiloader-dom-event":{"type":"js","path":"yuiloader-dom-event/yuiloader-dom-event.js","supersedes":["yahoo","dom","event","get","yuiloader","yahoo-dom-event"],"rollup":5},"yuitest":{"type":"js","path":"yuitest/yuitest-min.js","requires":["logger"],"optional":["event-simulate"],"skinnable":true}}},ObjectUtil:{appendArray:function(o,a){if(a){for(var i=0;
+i<a.length;i=i+1){o[a[i]]=true;}}},keys:function(o,ordered){var a=[],i;for(i in o){if(lang.hasOwnProperty(o,i)){a.push(i);}}return a;}},ArrayUtil:{appendArray:function(a1,a2){Array.prototype.push.apply(a1,a2);},indexOf:function(a,val){for(var i=0;i<a.length;i=i+1){if(a[i]===val){return i;}}return -1;},toObject:function(a){var o={};for(var i=0;i<a.length;i=i+1){o[a[i]]=true;}return o;},uniq:function(a){return YUI.ObjectUtil.keys(YUI.ArrayUtil.toObject(a));}}};YAHOO.util.YUILoader=function(o){this._internalCallback=null;this._useYahooListener=false;this.onSuccess=null;this.onFailure=Y.log;this.onProgress=null;this.onTimeout=null;this.scope=this;this.data=null;this.insertBefore=null;this.charset=null;this.varName=null;this.base=YUI.info.base;this.comboBase=YUI.info.comboBase;this.combine=false;this.root=YUI.info.root;this.timeout=0;this.ignore=null;this.force=null;this.allowRollup=true;this.filter=null;this.required={};this.moduleInfo=lang.merge(YUI.info.moduleInfo);this.rollups=null;this.loadOptional=false;this.sorted=[];this.loaded={};this.dirty=true;this.inserted={};var self=this;env.listeners.push(function(m){if(self._useYahooListener){self.loadNext(m.name);}});this.skin=lang.merge(YUI.info.skin);this._config(o);};Y.util.YUILoader.prototype={FILTERS:{RAW:{"searchExp":"-min\\.js","replaceStr":".js"},DEBUG:{"searchExp":"-min\\.js","replaceStr":"-debug.js"}},SKIN_PREFIX:"skin-",_config:function(o){if(o){for(var i in o){if(lang.hasOwnProperty(o,i)){if(i=="require"){this.require(o[i]);}else{this[i]=o[i];}}}}var f=this.filter;if(lang.isString(f)){f=f.toUpperCase();if(f==="DEBUG"){this.require("logger");}if(!Y.widget.LogWriter){Y.widget.LogWriter=function(){return Y;};}this.filter=this.FILTERS[f];}},addModule:function(o){if(!o||!o.name||!o.type||(!o.path&&!o.fullpath)){return false;}o.ext=("ext" in o)?o.ext:true;o.requires=o.requires||[];this.moduleInfo[o.name]=o;this.dirty=true;return true;},require:function(what){var a=(typeof what==="string")?arguments:what;this.dirty=true;YUI.ObjectUtil.appendArray(this.required,a);},_addSkin:function(skin,mod){var name=this.formatSkin(skin),info=this.moduleInfo,sinf=this.skin,ext=info[mod]&&info[mod].ext;if(!info[name]){this.addModule({"name":name,"type":"css","path":sinf.base+skin+"/"+sinf.path,"after":sinf.after,"rollup":sinf.rollup,"ext":ext});}if(mod){name=this.formatSkin(skin,mod);if(!info[name]){var mdef=info[mod],pkg=mdef.pkg||mod;this.addModule({"name":name,"type":"css","after":sinf.after,"path":pkg+"/"+sinf.base+skin+"/"+mod+".css","ext":ext});}}return name;},getRequires:function(mod){if(!mod){return[];}if(!this.dirty&&mod.expanded){return mod.expanded;}mod.requires=mod.requires||[];var i,d=[],r=mod.requires,o=mod.optional,info=this.moduleInfo,m;for(i=0;i<r.length;i=i+1){d.push(r[i]);m=info[r[i]];YUI.ArrayUtil.appendArray(d,this.getRequires(m));}if(o&&this.loadOptional){for(i=0;i<o.length;i=i+1){d.push(o[i]);YUI.ArrayUtil.appendArray(d,this.getRequires(info[o[i]]));}}mod.expanded=YUI.ArrayUtil.uniq(d);return mod.expanded;},getProvides:function(name,notMe){var addMe=!(notMe),ckey=(addMe)?PROV:SUPER,m=this.moduleInfo[name],o={};if(!m){return o;}if(m[ckey]){return m[ckey];}var s=m.supersedes,done={},me=this;var add=function(mm){if(!done[mm]){done[mm]=true;lang.augmentObject(o,me.getProvides(mm));}};if(s){for(var i=0;i<s.length;i=i+1){add(s[i]);}}m[SUPER]=o;m[PROV]=lang.merge(o);m[PROV][name]=true;return m[ckey];},calculate:function(o){if(o||this.dirty){this._config(o);this._setup();this._explode();if(this.allowRollup){this._rollup();}this._reduce();this._sort();this.dirty=false;}},_setup:function(){var info=this.moduleInfo,name,i,j;for(name in info){if(lang.hasOwnProperty(info,name)){var m=info[name];if(m&&m.skinnable){var o=this.skin.overrides,smod;if(o&&o[name]){for(i=0;i<o[name].length;i=i+1){smod=this._addSkin(o[name][i],name);}}else{smod=this._addSkin(this.skin.defaultSkin,name);}if(YUI.ArrayUtil.indexOf(m.requires,smod)==-1){m.requires.push(smod);}}}}var l=lang.merge(this.inserted);if(!this._sandbox){l=lang.merge(l,env.modules);}if(this.ignore){YUI.ObjectUtil.appendArray(l,this.ignore);}if(this.force){for(i=0;i<this.force.length;i=i+1){if(this.force[i] in l){delete l[this.force[i]];}}}for(j in l){if(lang.hasOwnProperty(l,j)){lang.augmentObject(l,this.getProvides(j));}}this.loaded=l;},_explode:function(){var r=this.required,i,mod;for(i in r){if(lang.hasOwnProperty(r,i)){mod=this.moduleInfo[i];if(mod){var req=this.getRequires(mod);if(req){YUI.ObjectUtil.appendArray(r,req);}}}}},_skin:function(){},formatSkin:function(skin,mod){var s=this.SKIN_PREFIX+skin;if(mod){s=s+"-"+mod;}return s;},parseSkin:function(mod){if(mod.indexOf(this.SKIN_PREFIX)===0){var a=mod.split("-");return{skin:a[1],module:a[2]};}return null;},_rollup:function(){var i,j,m,s,rollups={},r=this.required,roll,info=this.moduleInfo;if(this.dirty||!this.rollups){for(i in info){if(lang.hasOwnProperty(info,i)){m=info[i];if(m&&m.rollup){rollups[i]=m;}}}this.rollups=rollups;}for(;;){var rolled=false;for(i in rollups){if(!r[i]&&!this.loaded[i]){m=info[i];s=m.supersedes;roll=false;if(!m.rollup){continue;}var skin=(m.ext)?false:this.parseSkin(i),c=0;if(skin){for(j in r){if(lang.hasOwnProperty(r,j)){if(i!==j&&this.parseSkin(j)){c++;roll=(c>=m.rollup);if(roll){break;}}}}}else{for(j=0;j<s.length;j=j+1){if(this.loaded[s[j]]&&(!YUI.dupsAllowed[s[j]])){roll=false;break;}else{if(r[s[j]]){c++;roll=(c>=m.rollup);if(roll){break;}}}}}if(roll){r[i]=true;rolled=true;this.getRequires(m);}}}if(!rolled){break;}}},_reduce:function(){var i,j,s,m,r=this.required;for(i in r){if(i in this.loaded){delete r[i];}else{var skinDef=this.parseSkin(i);if(skinDef){if(!skinDef.module){var skin_pre=this.SKIN_PREFIX+skinDef.skin;for(j in r){if(lang.hasOwnProperty(r,j)){m=this.moduleInfo[j];var ext=m&&m.ext;if(!ext&&j!==i&&j.indexOf(skin_pre)>-1){delete r[j];}}}}}else{m=this.moduleInfo[i];s=m&&m.supersedes;if(s){for(j=0;j<s.length;j=j+1){if(s[j] in r){delete r[s[j]];}}}}}}},_onFailure:function(msg){YAHOO.log("Failure","info","loader");
+var f=this.onFailure;if(f){f.call(this.scope,{msg:"failure: "+msg,data:this.data,success:false});}},_onTimeout:function(){YAHOO.log("Timeout","info","loader");var f=this.onTimeout;if(f){f.call(this.scope,{msg:"timeout",data:this.data,success:false});}},_sort:function(){var s=[],info=this.moduleInfo,loaded=this.loaded,checkOptional=!this.loadOptional,me=this;var requires=function(aa,bb){var mm=info[aa];if(loaded[bb]||!mm){return false;}var ii,rr=mm.expanded,after=mm.after,other=info[bb],optional=mm.optional;if(rr&&YUI.ArrayUtil.indexOf(rr,bb)>-1){return true;}if(after&&YUI.ArrayUtil.indexOf(after,bb)>-1){return true;}if(checkOptional&&optional&&YUI.ArrayUtil.indexOf(optional,bb)>-1){return true;}var ss=info[bb]&&info[bb].supersedes;if(ss){for(ii=0;ii<ss.length;ii=ii+1){if(requires(aa,ss[ii])){return true;}}}if(mm.ext&&mm.type=="css"&&!other.ext&&other.type=="css"){return true;}return false;};for(var i in this.required){if(lang.hasOwnProperty(this.required,i)){s.push(i);}}var p=0;for(;;){var l=s.length,a,b,j,k,moved=false;for(j=p;j<l;j=j+1){a=s[j];for(k=j+1;k<l;k=k+1){if(requires(a,s[k])){b=s.splice(k,1);s.splice(j,0,b[0]);moved=true;break;}}if(moved){break;}else{p=p+1;}}if(!moved){break;}}this.sorted=s;},toString:function(){var o={type:"YUILoader",base:this.base,filter:this.filter,required:this.required,loaded:this.loaded,inserted:this.inserted};lang.dump(o,1);},_combine:function(){this._combining=[];var self=this,s=this.sorted,len=s.length,js=this.comboBase,css=this.comboBase,target,startLen=js.length,i,m,type=this.loadType;YAHOO.log("type "+type);for(i=0;i<len;i=i+1){m=this.moduleInfo[s[i]];if(m&&!m.ext&&(!type||type===m.type)){target=this.root+m.path;target+="&";if(m.type=="js"){js+=target;}else{css+=target;}this._combining.push(s[i]);}}if(this._combining.length){YAHOO.log("Attempting to combine: "+this._combining,"info","loader");var callback=function(o){var c=this._combining,len=c.length,i,m;for(i=0;i<len;i=i+1){this.inserted[c[i]]=true;}this.loadNext(o.data);},loadScript=function(){if(js.length>startLen){YAHOO.util.Get.script(self._filter(js),{data:self._loading,onSuccess:callback,onFailure:self._onFailure,onTimeout:self._onTimeout,insertBefore:self.insertBefore,charset:self.charset,timeout:self.timeout,scope:self});}else{this.loadNext();}};if(css.length>startLen){YAHOO.util.Get.css(this._filter(css),{data:this._loading,onSuccess:loadScript,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,scope:self});}else{loadScript();}return;}else{this.loadNext(this._loading);}},insert:function(o,type){this.calculate(o);this._loading=true;this.loadType=type;if(this.combine){return this._combine();}if(!type){var self=this;this._internalCallback=function(){self._internalCallback=null;self.insert(null,"js");};this.insert(null,"css");return;}this.loadNext();},sandbox:function(o,type){var self=this,success=function(o){var idx=o.argument[0],name=o.argument[2];self._scriptText[idx]=o.responseText;if(self.onProgress){self.onProgress.call(self.scope,{name:name,scriptText:o.responseText,xhrResponse:o,data:self.data});}self._loadCount++;if(self._loadCount>=self._stopCount){var v=self.varName||"YAHOO";var t="(function() {\n";var b="\nreturn "+v+";\n})();";var ref=eval(t+self._scriptText.join("\n")+b);self._pushEvents(ref);if(ref){self.onSuccess.call(self.scope,{reference:ref,data:self.data});}else{self._onFailure.call(self.varName+" reference failure");}}},failure=function(o){self.onFailure.call(self.scope,{msg:"XHR failure",xhrResponse:o,data:self.data});};self._config(o);if(!self.onSuccess){throw new Error("You must supply an onSuccess handler for your sandbox");}self._sandbox=true;if(!type||type!=="js"){self._internalCallback=function(){self._internalCallback=null;self.sandbox(null,"js");};self.insert(null,"css");return;}if(!util.Connect){var ld=new YAHOO.util.YUILoader();ld.insert({base:self.base,filter:self.filter,require:"connection",insertBefore:self.insertBefore,charset:self.charset,onSuccess:function(){self.sandbox(null,"js");},scope:self},"js");return;}self._scriptText=[];self._loadCount=0;self._stopCount=self.sorted.length;self._xhr=[];self.calculate();var s=self.sorted,l=s.length,i,m,url;for(i=0;i<l;i=i+1){m=self.moduleInfo[s[i]];if(!m){self._onFailure("undefined module "+m);for(var j=0;j<self._xhr.length;j=j+1){self._xhr[j].abort();}return;}if(m.type!=="js"){self._loadCount++;continue;}url=m.fullpath;url=(url)?self._filter(url):self._url(m.path);var xhrData={success:success,failure:failure,scope:self,argument:[i,url,s[i]]};self._xhr.push(util.Connect.asyncRequest("GET",url,xhrData));}},loadNext:function(mname){if(!this._loading){return;}var self=this,donext=function(o){self.loadNext(o.data);},successfn,s=this.sorted,len=s.length,i,fn,m,url;if(mname){if(mname!==this._loading){return;}this.inserted[mname]=true;if(this.onProgress){this.onProgress.call(this.scope,{name:mname,data:this.data});}}for(i=0;i<len;i=i+1){if(s[i] in this.inserted){continue;}if(s[i]===this._loading){return;}m=this.moduleInfo[s[i]];if(!m){this.onFailure.call(this.scope,{msg:"undefined module "+m,data:this.data});return;}if(!this.loadType||this.loadType===m.type){successfn=donext;this._loading=s[i];fn=(m.type==="css")?util.Get.css:util.Get.script;url=m.fullpath;url=(url)?this._filter(url):this._url(m.path);if(env.ua.webkit&&env.ua.webkit<420&&m.type==="js"&&!m.varName){successfn=null;this._useYahooListener=true;}fn(url,{data:s[i],onSuccess:successfn,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,varName:m.varName,scope:self});return;}}this._loading=null;if(this._internalCallback){var f=this._internalCallback;this._internalCallback=null;f.call(this);}else{if(this.onSuccess){this._pushEvents();this.onSuccess.call(this.scope,{data:this.data});}}},_pushEvents:function(ref){var r=ref||YAHOO;if(r.util&&r.util.Event){r.util.Event._load();}},_filter:function(str){var f=this.filter;return(f)?str.replace(new RegExp(f.searchExp,"g"),f.replaceStr):str;
+},_url:function(path){return this._filter((this.base||"")+path);}};})();YAHOO.register("yuiloader",YAHOO.util.YUILoader,{version:"2.9.0",build:"2800"});
Index: main/trunk/model-cols-dev/peijones/js/documentmaker/documentmaker/zoomer.jquery.js
===================================================================
--- main/trunk/model-cols-dev/peijones/js/documentmaker/documentmaker/zoomer.jquery.js	(revision 24778)
+++ main/trunk/model-cols-dev/peijones/js/documentmaker/documentmaker/zoomer.jquery.js	(revision 24778)
@@ -0,0 +1,157 @@
+
+(function($) {
+  
+    $.anythingZoomer = {
+    
+        defaults: {
+            smallArea: "#small",
+            largeArea: "#large",
+            zoomPort: "#overlay",
+            mover: "#mover",
+            expansionSize: 30,
+            speedMultiplier: 1.5
+            
+        }
+            
+    }
+    
+    $.fn.extend({
+        anythingZoomer:function(config) {
+        
+            var config = $.extend({}, $.anythingZoomer.defaults, config); 
+            
+            var wrap = $(this);
+        
+            var smallArea = $(config.smallArea);
+            var largeArea = $(config.largeArea);
+            var zoomPort = $(config.zoomPort);
+            var mover = $(config.mover);
+            
+            var expansionSize = config.expansionSize;
+            var speedMultiplier = config.speedMultiplier;
+			
+			var over = false;
+            
+            function setup(smallArea, largeArea, wrap, zoomPort, mover, expansionSize, speedMultiplier) {
+            
+                smallArea
+                    .show();
+                    
+                zoomPort
+                    .fadeIn();
+                    
+                mover
+                    .css({
+                        width: mover.data("origWidth"),
+                        height: mover.data("origHeight"),
+                        overflow: "hidden",
+                        position: "absolute"
+                    })
+
+                wrap
+                    .css({
+                        //width: "auto"
+                    })
+            		.mousemove(function(e){
+            			var x = e.pageX - smallArea.offset().left;
+            			var y = e.pageY - smallArea.offset().top;
+            			
+            			if ( (x < -expansionSize) || (x > smallArea.width() + expansionSize) || (y < -expansionSize) || (y > smallArea.height() + expansionSize) ) {
+							if(over)
+							{
+								mover.fadeOut(50);
+								over = false;
+							}
+							return;
+            			}
+						else
+						{
+							if(!over)
+							{
+								mover.fadeIn();
+								over = true;
+							}
+						}
+            							
+            			mover.css({
+            				top: y - (mover.height()/2),
+            				left: x - (mover.width()/2)
+            			});
+            			
+            			largeArea.css({
+            			
+            			    left: (-(e.pageX - smallArea.offset().left)*speedMultiplier)+(mover.width()/2),
+            			    top: (-(e.pageY - smallArea.offset().top)*speedMultiplier)+(mover.height()/2),
+            			
+            			});
+            			
+            		})
+            		.dblclick(function() {
+            		
+                        expand(smallArea, largeArea, wrap, zoomPort, mover, expansionSize, speedMultiplier);
+            
+            		});
+            
+            };
+            
+            function expand(smallArea, largeArea, wrap, zoomPort, mover, expansionSize, speedMultiplier) {
+            
+                  smallArea
+        		      .hide(); 
+        		      
+        		  zoomPort
+        		      .hide();       		      
+        		  
+        		  mover
+        		      .fadeIn()
+        		      .data("origWidth", mover.width())
+        		      .data("origHeight", mover.height())
+        		      .css({
+        		          position: "static",
+        		          height: "auto",
+        		          width: "auto",
+        			      overflow: "visible"
+        		      });
+        		      
+        		  wrap
+        		      .css({
+        		          width: "100%"
+        		      })
+        		      .unbind()
+        		      .dblclick(function(){
+        		          setup(smallArea, largeArea, wrap, zoomPort, mover, expansionSize, speedMultiplier);
+        		      });
+        		      
+        		      
+        		  largeArea   
+        		      .css({
+        		          left: 0,
+        		          top: 0,
+        		          width: largeArea.data("origWidth")
+        		      });
+        		              
+            };
+            
+            mover
+		      .data("origWidth", mover.width())
+		      .data("origHeight", mover.height());
+		    
+		    // Because the largeArea is often hidden, the width() function returns zero, take width from CSS instead  
+		    largeArea
+		      .data("origWidth", largeArea.css("width"));
+
+            setup(smallArea, largeArea, wrap, zoomPort, mover, expansionSize, speedMultiplier);
+        
+            return this;
+        
+        }
+        
+    });
+  
+})(jQuery);
+
+
+
+
+
+
