commit 625dcc400cea74155d426e620d7e4a5bf109e93b
Author: Bill Marquette <bill.marquette@gmail.com>
Date:   Sat Mar 14 14:41:04 2009 -0500

    Massive javascript cleanup, all .js files now live in $g['www_path']/javascript
    Purged unused JS

diff --git a/usr/local/www/auto_complete_helper.js b/usr/local/www/auto_complete_helper.js
deleted file mode 100755
index 943eaeab5f..0000000000
--- a/usr/local/www/auto_complete_helper.js
+++ /dev/null
@@ -1,366 +0,0 @@
-
-/* ---- Variables ---- */
-var actb_timeOut = -1; // Autocomplete Timeout in ms (-1: autocomplete never time out)
-var actb_lim = 5;    // Number of elements autocomplete can show (-1: no limit)
-var actb_firstText = false; // should the auto complete be limited to the beginning of keyword?
-/* ---- Variables ---- */
-
-/* --- Styles --- */
-var actb_bgColor = '#FFFFFF';
-var actb_textColor = '#000000';
-var actb_hBgColor = '#990000';
-var actb_htextColor = '#FFFFFF';
-var actb_fFamily = 'Courier';
-var actb_fSize = '14px';
-var actb_hStyle = 'text-decoration:underline;font-weight="bold"';
-/* --- Styles --- */
-
-/* ---- Constants ---- */
-var actb_keywords = new Array();
-var actb_display = true;
-var actb_pos = 0;
-var actb_total = 0;
-var actb_curr = null;
-var actb_rangeu = 0;
-var actb_ranged = 0;
-var actb_bool = new Array();
-var actb_pre = 0;
-var actb_toid;
-var actb_tomake = true;
-/* ---- Constants ---- */
-
-function actb_parse(n){
-    var t = escape(actb_curr.value);
-    var tobuild = '';
-    var i;
-    var re = "";
-
-    if (actb_firstText){
-        re = new RegExp("^" + t, "i");
-    }else{
-        re = new RegExp(t, "i");
-    }
-    var p = n.search(re);
-
-    for (i=0;i<p;i++){
-        tobuild += n.substr(i,1);
-    }
-    tobuild += "";
-    for (i=p;i<t.length+p;i++){
-        tobuild += n.substr(i,1);
-    }
-    tobuild += "";
-    for (i=t.length+p;i<n.length;i++){
-        tobuild += n.substr(i,1);
-    }
-    return tobuild;
-}
-function actb_generate(){
-    if(navigator.appName == "Microsoft Internet Explorer") {
-        if(window.location.protocol == 'https:') return;
-        if(actb_keywords.length < 1) return; // if no items setup, do not invoke code.  prevent ie crashing.
-        if (document.getElementById('tat_frame')) document.body.removeChild(document.getElementById('tat_frame'));
-    }
-    if (document.getElementById('tat_table')) document.body.removeChild(document.getElementById('tat_table'));
-    if(navigator.appName == "Microsoft Internet Explorer") {
-        frame = document.createElement('iframe');
-        frame.cellSpacing='1px';
-        frame.cellPadding='2px';
-        frame.style.zIndex = 3;
-        frame.style.position='absolute';
-        frame.style.top = eval(curTop() + actb_curr.offsetHeight) + "px";
-        frame.style.left = curLeft() + "px";
-        frame.style.backgroundColor=actb_bgColor;
-        frame.id = 'tat_frame';
-    }
-    a = document.createElement('table');
-    a.cellSpacing='1px';
-    a.cellPadding='2px';
-    a.style.border = '1px solid #990000';
-    a.style.zIndex = 5;
-    a.style.position='absolute';
-    a.style.top = eval(curTop() + actb_curr.offsetHeight) + "px";
-    a.style.left = curLeft() + "px";
-    a.style.backgroundColor=actb_bgColor;
-    a.id = 'tat_table';
-    if(navigator.appName == "Microsoft Internet Explorer")
-        document.body.appendChild(frame);
-    document.body.appendChild(a);
-    var i;
-    var first = true;
-    var j = 1;
-    var height = 0;
-    var counter = 0;
-    for (i=0;i<actb_keywords.length;i++){
-        if (actb_bool[i]){
-            counter++;
-            r = a.insertRow(-1);
-            if (first && !actb_tomake){
-                r.style.backgroundColor = actb_hBgColor;
-                first = false;
-                actb_pos = counter;
-            }else if(actb_pre == i){
-                r.style.backgroundColor = actb_hBgColor;
-                first = false;
-                actb_pos = counter;
-            }else{
-                r.style.backgroundColor = actb_bgColor;
-                r.style.color = actb_bgColor;
-            }
-            r.id = 'tat_tr'+(j);
-            c = r.insertCell(-1);
-            c.style.color = actb_textColor;
-            counter = 0;
-            first = true;
-            if (first && !actb_tomake){
-                c.style.color = actb_htextColor;
-                first = false;
-                actb_pos = counter;
-            }else if(actb_pre == i){
-                c.style.color = actb_htextColor;
-                first = false;
-                actb_pos = counter;
-            }else{
-                c.style.color = actb_textColor;
-            }
-            c.style.fontFamily = actb_fFamily;
-            a.style.zIndex = 5;
-            c.style.fontSize = actb_fSize;
-            c.innerHTML = actb_parse(actb_keywords[i]);
-            c.id = 'tat_td'+(j);
-            height = height + c.offsetHeight;
-            width = c.offsetWidth;
-            j++;
-        }
-        if (j - 1 == actb_lim && j < actb_total){
-            r = a.insertRow(-1);
-            r.style.backgroundColor = actb_bgColor;
-            c = r.insertCell(-1);
-            c.style.color = actb_textColor;
-            a.style.zIndex = 5;
-            c.style.fontFamily = 'arial narrow';
-            c.style.fontSize = actb_fSize;
-            c.align='center';
-            c.innerHTML = '\\/';
-            break;
-        }
-    }
-    actb_rangeu = 1;
-    actb_ranged = j-1;
-    actb_display = true;
-    if (actb_pos <= 0) actb_pos = 1;
-    if(navigator.appName == "Microsoft Internet Explorer") {
-        frame.width=width;
-        frame.height=height + 5;
-    }
-}
-function curTop(){
-    actb_toreturn = 0;
-    obj = actb_curr;
-    while(obj){
-        actb_toreturn += obj.offsetTop;
-        obj = obj.offsetParent;
-    }
-    return actb_toreturn;
-}
-function curLeft(){
-    actb_toreturn = 0;
-    obj = actb_curr;
-    while(obj){
-        actb_toreturn += obj.offsetLeft;
-        obj = obj.offsetParent;
-    }
-    return actb_toreturn;
-}
-function actb_remake() {
-    document.body.removeChild(document.getElementById('tat_table'));
-    if(navigator.appName == "Microsoft Internet Explorer") {
-        document.body.removeChild(document.getElementById('tat_frame'));
-        frame = document.createElement('iframe');
-        frame.cellSpacing='2px';
-        frame.cellPadding='3px';
-        frame.style.position='absolute';
-        frame.style.zIndex = 5;
-        frame.style.top = eval(curTop() + actb_curr.offsetHeight) + "px";
-        frame.style.left = curLeft() + "px";
-        frame.style.backgroundColor=actb_bgColor;
-        frame.id = 'tat_frame';
-    }
-    a = document.createElement('table');
-    a.cellSpacing='2px';
-    a.cellPadding='3px';
-    a.style.position='absolute';
-    a.style.zIndex = 5;
-    a.style.top = eval(curTop() + actb_curr.offsetHeight) + "px";
-    a.style.left = curLeft() + "px";
-    a.style.backgroundColor=actb_bgColor;
-    a.id = 'tat_table';
-    if(navigator.appName == "Microsoft Internet Explorer")
-        document.body.appendChild(frame);
-    document.body.appendChild(a);
-    var width = 0;
-    var height = 0;
-    var i;
-    var first = true;
-    var j = 1;
-    if (actb_rangeu > 1){
-        r = a.insertRow(-1);
-        r.style.backgroundColor = actb_bgColor;
-        c = r.insertCell(-1);
-        c.style.color = actb_textColor;
-        c.style.fontFamily = 'arial narrow';
-        a.style.zIndex = 5;
-        c.style.fontSize = actb_fSize;
-        c.align='center';
-        c.innerHTML = '/\\';
-    }
-    for (i=0;i<actb_keywords.length;i++){
-        if (actb_bool[i]){
-            if (j >= actb_rangeu && j <= actb_ranged){
-                r = a.insertRow(-1);
-                r.style.backgroundColor = actb_bgColor;
-                r.id = 'tat_tr'+(j);
-                c = r.insertCell(-1);
-                c.style.color = actb_textColor;
-                c.style.fontFamily = actb_fFamily;
-                a.style.zIndex = 5;
-                c.style.fontSize = actb_fSize;
-                c.innerHTML = actb_parse(actb_keywords[i]);
-                c.id = 'tat_td'+(j);
-                j++;
-            }else{
-                j++;
-            }
-        }
-        if (j > actb_ranged) break;
-    }
-    if (j-1 < actb_total){
-        r = a.insertRow(-1);
-        r.style.backgroundColor = actb_bgColor;
-        c = r.insertCell(-1);
-        c.style.color = actb_textColor;
-        c.style.fontFamily = 'arial narrow';
-        c.style.fontSize = actb_fSize;
-        c.align='center';
-        c.innerHTML = '\\/';
-        height = height + c.height;
-        width = c.width;
-    }
-    if(navigator.appName == "Microsoft Internet Explorer") {
-        frame.width=width;
-        frame.height=height;
-    }
-}
-function actb_goup(){
-    if (!actb_display) return;
-    if (actb_pos == 1) return;
-    document.getElementById('tat_tr'+actb_pos).style.backgroundColor = actb_bgColor;
-    document.getElementById('tat_td'+actb_pos).style.color = actb_textColor;
-    actb_pos--;
-    if (actb_pos < actb_rangeu) actb_moveup();
-    document.getElementById('tat_tr'+actb_pos).style.backgroundColor = actb_hBgColor;
-    document.getElementById('tat_td'+actb_pos).style.color = actb_htextColor;
-    if (actb_toid) clearTimeout(actb_toid);
-    if (actb_timeOut > 0) actb_toid = setTimeout("actb_removedisp()",actb_timeOut);
-}
-function actb_godown(){
-    if (!actb_display) return;
-    if (actb_pos == actb_total) return;
-    document.getElementById('tat_tr'+actb_pos).style.backgroundColor = actb_bgColor;
-    document.getElementById('tat_td'+actb_pos).style.color = actb_textColor;
-    actb_pos++;
-    if (actb_pos > actb_ranged) actb_movedown();
-    document.getElementById('tat_tr'+actb_pos).style.backgroundColor = actb_hBgColor;
-    document.getElementById('tat_td'+actb_pos).style.color= actb_htextColor;
-    if (actb_toid) clearTimeout(actb_toid);
-    if (actb_timeOut > 0) actb_toid = setTimeout("actb_removedisp()",actb_timeOut);
-}
-function actb_movedown(){
-    actb_rangeu++;
-    actb_ranged++;
-    actb_remake();
-}
-function actb_moveup(){
-    actb_rangeu--;
-    actb_ranged--;
-    actb_remake();
-}
-function actb_penter(){
-    if (!actb_display) return;
-    actb_display = 0;
-    var word = '';
-    var c = 0;
-    for (var i=0;i<=actb_keywords.length;i++){
-        if (actb_bool[i]) c++;
-        if (c == actb_pos){
-            word = actb_keywords[i];
-            break;
-        }
-    }
-    a = word;//actb_keywords[actb_pos-1];//document.getElementById('tat_td'+actb_pos).;
-    actb_curr.value = a;
-    actb_removedisp();
-}
-function actb_removedisp(){
-    actb_display = 0;
-    if(navigator.appName == "Microsoft Internet Explorer")
-        if (document.getElementById('tat_frame')) document.body.removeChild(document.getElementById('tat_frame'));
-    if (document.getElementById('tat_table')) document.body.removeChild(document.getElementById('tat_table'));
-    if (actb_toid) clearTimeout(actb_toid);
-}
-function actb_checkkey(evt, sndr){
-    a = evt.keyCode;
-    if (a == 38){ // up key
-        actb_goup();
-    }else if(a == 40){ // down key
-        actb_godown();
-    }else if(a == 13){
-        actb_penter();
-    }
-}
-function actb_tocomplete(sndr,evt,arr){
-    if (arr) actb_keywords = arr;
-    if (evt.keyCode == 38 || evt.keyCode == 40 || evt.keyCode == 13) return;
-    var i;
-    if (actb_display){
-        var word = 0;
-        var c = 0;
-        for (i=0;i<=actb_keywords.length;i++){
-            if (actb_bool[i]) c++;
-            if (c == actb_pos){
-                word = i;
-                break;
-            }
-        }
-        actb_pre = word;//actb_pos;
-    }else{ actb_pre = -1; }
-
-    if (!sndr) sndr = evt.srcElement;
-    actb_curr = sndr;
-
-    if (sndr.value == ''){
-        actb_removedisp();
-        return;
-    }
-    var t = sndr.value;
-    var re = "";
-    if (actb_firstText){
-        re = new RegExp("^" + t, "i");
-    }else{
-        re = new RegExp(t, "i");
-    }
-
-    actb_total = 0;
-    actb_tomake = false;
-    for (i=0;i<actb_keywords.length;i++){
-        actb_bool[i] = false;
-        if (re.test(actb_keywords[i])){
-            actb_total++;
-            actb_bool[i] = true;
-            if (actb_pre == i) actb_tomake = true;
-        }
-    }
-    if (actb_toid) clearTimeout(actb_toid);
-    if (actb_timeOut > 0) actb_toid = setTimeout("actb_removedisp()",actb_timeOut);
-    actb_generate(actb_bool);
-}
diff --git a/usr/local/www/dom-drag.js b/usr/local/www/dom-drag.js
deleted file mode 100755
index 81273f83dd..0000000000
--- a/usr/local/www/dom-drag.js
+++ /dev/null
@@ -1,187 +0,0 @@
-/**************************************************
- * dom-drag.js
- * 09.25.2001
- * www.youngpup.net
- **************************************************
- * 10.28.2001 - fixed minor bug where events
- * sometimes fired off the handle, not the root.
- **************************************************
- * 05.30.2005 - added a workaround for firefox
- * activating links when finished dragging.
- * mmosier@astrolabe.com
- **************************************************/
-/*
-    The DragList drag and drop ordered lists implementation is available under the terms of the new BSD license.
-   
-   Copyright (c) 2005, DTLink, LLC
-   All rights reserved.
-                                                                                  
-   Redistribution  and  use  in  source  and binary forms, with or
-   without modification, are permitted provided that the following
-   conditions are met:
-                                                                                  
-   *   Redistributions  of  source  code  must  retain  the  above
-   copyright  notice,  this  list  of conditions and the following
-   disclaimer.
-                                                                                  
-   *  Redistributions  in  binary  form  must  reproduce the above
-   copyright  notice,  this  list  of conditions and the following
-   disclaimer in the documentation and/or other materials provided
-   with the distribution.
-    
-   *  Neither  the  name  of  DTLink,  LLC  nor  the  names of its
-   contributors may be used to endorse or promote products derived
-   from this software without specific prior written permission.
-    
-   THIS   SOFTWARE  IS  PROVIDED  BY  THE  COPYRIGHT  HOLDERS  AND
-   CONTRIBUTORS  "AS  IS"  AND  ANY EXPRESS OR IMPLIED WARRANTIES,
-   INCLUDING,  BUT  NOT  LIMITED  TO,  THE  IMPLIED  WARRANTIES OF
-   MERCHANTABILITY  AND  FITNESS  FOR  A  PARTICULAR  PURPOSE  ARE
-   DISCLAIMED.   IN   NO   EVENT  SHALL  THE  COPYRIGHT  OWNER  OR
-   CONTRIBUTORS  BE  LIABLE  FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-   SPECIAL,  EXEMPLARY,  OR  CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-   NOT  LIMITED  TO,  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS  OF  USE,  DATA,  OR  PROFITS;  OR  BUSINESS INTERRUPTION)
-   HOWEVER  CAUSED  AND  ON  ANY  THEORY  OF LIABILITY, WHETHER IN
-   CONTRACT,  STRICT  LIABILITY,  OR TORT (INCLUDING NEGLIGENCE OR
-   OTHERWISE)  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-var Drag = {
-
-	obj : null,
-
-	init : function(o, oRoot, minX, maxX, minY, maxY, bSwapHorzRef, bSwapVertRef, fXMapper, fYMapper)
-	{
-		o.onmousedown	= Drag.start;
-
-		o.hmode			= bSwapHorzRef ? false : true ;
-		o.vmode			= bSwapVertRef ? false : true ;
-
-		o.root = oRoot && oRoot != null ? oRoot : o ;
-
-		if (o.hmode  && isNaN(parseInt(o.root.style.left  ))) o.root.style.left   = "0px";
-		if (o.vmode  && isNaN(parseInt(o.root.style.top   ))) o.root.style.top    = "0px";
-		if (!o.hmode && isNaN(parseInt(o.root.style.right ))) o.root.style.right  = "0px";
-		if (!o.vmode && isNaN(parseInt(o.root.style.bottom))) o.root.style.bottom = "0px";
-
-		o.minX	= typeof minX != 'undefined' ? minX : null;
-		o.minY	= typeof minY != 'undefined' ? minY : null;
-		o.maxX	= typeof maxX != 'undefined' ? maxX : null;
-		o.maxY	= typeof maxY != 'undefined' ? maxY : null;
-
-		o.xMapper = fXMapper ? fXMapper : null;
-		o.yMapper = fYMapper ? fYMapper : null;
-
-		o.root.onDragStart	= new Function();
-		o.root.onDragEnd	= new Function();
-		o.root.onDrag		= new Function();
-	},
-
-	start : function(e)
-	{
-		var o = Drag.obj = this;
-		e = Drag.fixE(e);
-		var y = parseInt(o.vmode ? o.root.style.top  : o.root.style.bottom);
-		var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right );
-		o.root.onDragStart(x, y);
-
-		o.startX		= x;
-		o.startY		= y;
-		o.lastMouseX	= e.clientX;
-		o.lastMouseY	= e.clientY;
-
-		if (o.hmode) {
-			if (o.minX != null)	o.minMouseX	= e.clientX - x + o.minX;
-			if (o.maxX != null)	o.maxMouseX	= o.minMouseX + o.maxX - o.minX;
-		} else {
-			if (o.minX != null) o.maxMouseX = -o.minX + e.clientX + x;
-			if (o.maxX != null) o.minMouseX = -o.maxX + e.clientX + x;
-		}
-
-		if (o.vmode) {
-			if (o.minY != null)	o.minMouseY	= e.clientY - y + o.minY;
-			if (o.maxY != null)	o.maxMouseY	= o.minMouseY + o.maxY - o.minY;
-		} else {
-			if (o.minY != null) o.maxMouseY = -o.minY + e.clientY + y;
-			if (o.maxY != null) o.minMouseY = -o.maxY + e.clientY + y;
-		}
-
-		document.onmousemove	= Drag.drag;
-		document.onmouseup		= Drag.end;
-
-		if (o.linkDisabled) {
-			var hrefs = o.root.getElementsByTagName("a");
-			for (var i = 0; i < hrefs.length; i++) {
-				hrefs[i].onclick = hrefs[i].prevOnclick;
-				hrefs[i].prevOnclick = null;
-			}
-			o.linkDisabled = false;
-		}
-
-		return false;
-	},
-
-	drag : function(e)
-	{
-		e = Drag.fixE(e);
-		var o = Drag.obj;
-
-		var ey	= e.clientY;
-		var ex	= e.clientX;
-		var y = parseInt(o.vmode ? o.root.style.top  : o.root.style.bottom);
-		var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right );
-		var nx, ny;
-
-		if (o.minX != null) ex = o.hmode ? Math.max(ex, o.minMouseX) : Math.min(ex, o.maxMouseX);
-		if (o.maxX != null) ex = o.hmode ? Math.min(ex, o.maxMouseX) : Math.max(ex, o.minMouseX);
-		if (o.minY != null) ey = o.vmode ? Math.max(ey, o.minMouseY) : Math.min(ey, o.maxMouseY);
-		if (o.maxY != null) ey = o.vmode ? Math.min(ey, o.maxMouseY) : Math.max(ey, o.minMouseY);
-
-		nx = x + ((ex - o.lastMouseX) * (o.hmode ? 1 : -1));
-		ny = y + ((ey - o.lastMouseY) * (o.vmode ? 1 : -1));
-
-		if (o.xMapper)      nx = o.xMapper(y);
-		else if (o.yMapper) ny = o.yMapper(x);
-
-		Drag.obj.root.style[o.hmode ? "left" : "right"] = nx + "px";
-		Drag.obj.root.style[o.vmode ? "top" : "bottom"] = ny + "px";
-		Drag.obj.lastMouseX	= ex;
-		Drag.obj.lastMouseY	= ey;
-
-		var threshold = 4;
-		if (!o.linkDisabled) {
-			if (Math.abs(nx - o.startX) > threshold || Math.abs(ny - o.startY) > threshold) {
-				var hrefs = o.root.getElementsByTagName("a");
-				for (var i = 0; i < hrefs.length; i++) {
-					hrefs[i].prevOnclick = hrefs[i].onclick;
-					hrefs[i].onclick = function() { return false; };
-				}
-				o.linkDisabled = true;
-			}
-		}
-
-		Drag.obj.root.onDrag(nx, ny, Drag.obj.root);
-		return false;
-	},
-
-	end : function()
-	{
-		document.onmousemove = null;
-		document.onmouseup   = null;
-		Drag.obj.root.onDragEnd(	
-		  parseInt(Drag.obj.root.style[Drag.obj.hmode ? "left" : "right"]), 
-			parseInt(Drag.obj.root.style[Drag.obj.vmode ? "top" : "bottom"]),
-			Drag.obj.root);
-		Drag.obj = null;
-	},
-
-	fixE : function(e)
-	{
-		if (typeof e == 'undefined') e = window.event;
-		if (typeof e.layerX == 'undefined') e.layerX = e.offsetX;
-		if (typeof e.layerY == 'undefined') e.layerY = e.offsetY;
-		return e;
-	}
-};
diff --git a/usr/local/www/draglist.js b/usr/local/www/draglist.js
deleted file mode 100755
index bb62b7aa3a..0000000000
--- a/usr/local/www/draglist.js
+++ /dev/null
@@ -1,331 +0,0 @@
-// ----------------------------------------------------------------------------
-// (c) Copyright, DTLink, LLC 1997-2005
-//     http://www.dtlink.com
-//
-// DragList - Drag and Drop Ordered Lists
-//
-// Javascript Support file for formVista <draglist> fvml tag.
-//
-// For more information please see:
-//
-//    http://www.formvista.com/otherprojects/draglist.html
-//
-// For questions or comments please contact us at:
-//
-//     http://www.formvista.com/contact.html
-//
-// LICENSE: This file is governed by the new BSD license. For more information
-/*
-    The DragList drag and drop ordered lists implementation is available under the terms of the new BSD license.
-   
-   Copyright (c) 2005, DTLink, LLC
-   All rights reserved.
-                                                                                  
-   Redistribution  and  use  in  source  and binary forms, with or
-   without modification, are permitted provided that the following
-   conditions are met:
-                                                                                  
-   *   Redistributions  of  source  code  must  retain  the  above
-   copyright  notice,  this  list  of conditions and the following
-   disclaimer.
-                                                                                  
-   *  Redistributions  in  binary  form  must  reproduce the above
-   copyright  notice,  this  list  of conditions and the following
-   disclaimer in the documentation and/or other materials provided
-   with the distribution.
-    
-   *  Neither  the  name  of  DTLink,  LLC  nor  the  names of its
-   contributors may be used to endorse or promote products derived
-   from this software without specific prior written permission.
-    
-   THIS   SOFTWARE  IS  PROVIDED  BY  THE  COPYRIGHT  HOLDERS  AND
-   CONTRIBUTORS  "AS  IS"  AND  ANY EXPRESS OR IMPLIED WARRANTIES,
-   INCLUDING,  BUT  NOT  LIMITED  TO,  THE  IMPLIED  WARRANTIES OF
-   MERCHANTABILITY  AND  FITNESS  FOR  A  PARTICULAR  PURPOSE  ARE
-   DISCLAIMED.   IN   NO   EVENT  SHALL  THE  COPYRIGHT  OWNER  OR
-   CONTRIBUTORS  BE  LIABLE  FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-   SPECIAL,  EXEMPLARY,  OR  CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-   NOT  LIMITED  TO,  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS  OF  USE,  DATA,  OR  PROFITS;  OR  BUSINESS INTERRUPTION)
-   HOWEVER  CAUSED  AND  ON  ANY  THEORY  OF LIABILITY, WHETHER IN
-   CONTRACT,  STRICT  LIABILITY,  OR TORT (INCLUDING NEGLIGENCE OR
-   OTHERWISE)  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-//
-// REVISION HISTORY:
-//
-// 2004-11-12 YmL:
-//	.	initial revision.
-//
-// 2005-05-28 YmL:
-//	.	pulled out of formVista, relicensed and packaged as a standalone implementation.
-//
-// 2005-06-02 mtmosier:
-//	.	added horizontal dragging support.
-//
-// ------------------------
-
-/**
-* constructor for dragList class
-*/
-
-function fv_dragList( name )
-	{
-
-	// name of this dragList. Must match the id of the root DIV tag.
-
-	this.dragListRootId = name;
-
-	// array of item offsets
-
-	this.offsetsX = new Array();
-	this.offsetsY = new Array();
-
-	}
-
-// ----------------------------------------------
-
-/**
-* setup the draglist prior to use
-*
-* @param string orientation defaults to vert. if set to "horz" renders horizontally.
-* @param string itemTagName. if null defaults to "div". Can be "span".
-*/
-
-fv_dragList.prototype.setup = function( orientation, itemTagName )
-	{
-
-	var horizontal;
-
-	if ( orientation == "horz" )
-		horizontal = true;
-	else
-		horizontal = false;
-
-	this.listRoot = document.getElementById( this.dragListRootId );
-	this.listItems = this.getListItems( itemTagName );
-
-	for (var i = 0; i < this.listItems.length; i++) 
-		{
-
-		if ( this.listItems[i] == undefined )
-			continue;
-
-		if ( horizontal )
-			{
-			Drag.init(this.listItems[i], null, null, null, 0, 0);
-			}
-		else
-			{
-			Drag.init(this.listItems[i], null, 0, 0, null, null);
-			}
-
-		// ---------------------------------------------------
-		// on drag method
-
-		this.listItems[i].onDrag = function( x, y, thisElem ) 
-			{
-
-			x = thisElem.offsetLeft;
-			y = thisElem.offsetTop;
-
-			// this is a callback from the dom-drag code. From within this
-			// function "this" does not refer to the fv_draglist function.
-
-			draglist = getDragList( thisElem );
-
-			draglist.recalcOffsets( itemTagName );
-
-			var pos = draglist.getCurrentOffset( thisElem, itemTagName );
-
-			//var listItems = this.getListItems( itemTagName );
-
-			// if bottom edge is below top of lower item.
-
-			var testMoveUp;
-			var testMoveDown;
-			if ( horizontal )
-				{
-				testMoveUp = (x + draglist.getDivWidth(thisElem) > draglist.offsetsX[pos + 1] + draglist.getDivWidth( draglist.listItems[pos + 1] ));
-				testMoveDown = x < draglist.offsetsX[pos - 1];
-				}
-			else
-				{
-				testMoveUp = (y + draglist.getDivHeight(thisElem) > draglist.offsetsY[pos + 1] + draglist.getDivHeight( draglist.listItems[pos + 1] ));
-				testMoveDown = y < draglist.offsetsY[pos - 1];
-				}
-
-			if (( pos != draglist.listItems.length - 1) && testMoveUp )
-				{ 
-				draglist.listRoot.removeChild(thisElem);
-
-				if ( pos + 1 == draglist.listItems.length )
-					{
-					draglist.listRoot.appendChild( thisElem );
-					}
-				else
-					{
-					draglist.listRoot.insertBefore(thisElem, draglist.listItems[pos+1]);
-					}
-
-				thisElem.style["top"] = "0px";
-				thisElem.style["left"] = "0px";
-				}
-			else if ( pos != 0 && testMoveDown ) 
-				{ 
-				draglist.listRoot.removeChild(thisElem);
-				draglist.listRoot.insertBefore(thisElem, draglist.listItems[pos-1]);
-				thisElem.style["top"] = "0px";
-				thisElem.style["left"] = "0px";
-				}
-
-			};
-
-		this.listItems[i].onDragEnd = function(x,y,thisElem) 
-			{
-			thisElem.style["top"] = "0px";
-			thisElem.style["left"] = "0px";
-			};
-
-		}	// end of for loop.
-
-	this.recalcOffsets( itemTagName );
-
-	};	// end of setup.
-
-// ----------------------------------------------
-
-
-/**
-* update the order value fields and submit the form.
-*/
-
-fv_dragList.prototype.do_submit = function( formName, dragListRootId )
-	{
-
-	var listOrderItems = this.listRoot.getElementsByTagName("input");
-
-	for (var i = 0; i < listOrderItems.length; i++) 
-		{
-		listOrderItems[i].value = i;
-		}
-
-	expr = "document." + formName + ".submit()";
-
-	eval( expr );
-	};
-
-// ----------------------------------------------
-// "Private" methods.
-// ----------------------------------------------
-
-fv_dragList.prototype.recalcOffsets = function( itemTagName ) 
-	{
-	var listItems = this.getListItems( itemTagName );
-
-	for (var i = 0; i < listItems.length; i++) 
-		{
-		this.offsetsX[i] = listItems[i].offsetLeft;
-		this.offsetsY[i] = listItems[i].offsetTop;
-		}
-	};
-
-fv_dragList.prototype.getCurrentOffset = function(elem, itemTagName) 
-	{ 
-	var listItems = this.getListItems( itemTagName );
-
-	for (var i = 0; i < listItems.length; i++) 
-		{
-		if (listItems[i] == elem) 
-			{ 
-			return i;
-			}
-		}
-	};
-
-fv_dragList.prototype.getDivWidth = function(elem) 								  
-	{
-
-	if (( elem == undefined) || ( elem.offsetWidth == undefined ))
-		return( 0 );
-
-	value = elem.offsetWidth;
-	if (isNaN(value))
-		{
-		value = 0;
-		}
-
-	return( value );
-	};
-
-fv_dragList.prototype.getDivHeight = function(elem) 
-	{
-
-	if (( elem == undefined) || ( elem.offsetHeight == undefined ))
-		return( 0 );
-
-	value = elem.offsetHeight;
-	if (isNaN(value))
-		{
-		value = 25;
-		}
-
-	return( value );
-	};
-
-/**
-* return list of draggable items
-*/
-
-fv_dragList.prototype.getListItems = function( itemTagName )
-	{
-	if ( itemTagName == undefined )
-		{
-		itemTagName = "div";
-		}
-
-	var listItems = this.listRoot.getElementsByTagName( itemTagName );
-
-	return( listItems );
-	};
-
-// end of draglist class definition.
-
-// -------------------------------------
-
-/**
-* add a new dragList to the list of draglists on this page
-*
-* This implementatoin supports multiple managed draglists on
-* a single page. The index is contained in a global dragListIndex
-* array that must be declared in the page.
-*/
-
-function addDragList( draglist )
-	{
-	dragListIndex[ draglist.dragListRootId ] = draglist;
-	}
-
-// -------------------------------------------------------
-
-/**
-* given a draggable div element, return the draglist it belongs to
-*
-* @see fv_draglist.prototype.setup
-* @todo this should probably be a method inside the draglist class.
-*/
-
-function getDragList( elem )
-	{
-
-	// given a list item return the drag list it belongs to.
-
-	var draglistContainer = elem.parentNode;
-
-	var draglist = dragListIndex[ draglistContainer.id ];
-
-	return( draglist );
-	}
-
-// END
diff --git a/usr/local/www/dtree.js b/usr/local/www/dtree.js
deleted file mode 100755
index e82f0bf401..0000000000
--- a/usr/local/www/dtree.js
+++ /dev/null
@@ -1,767 +0,0 @@
-function navigate(url) {
-	location.href=url;
-}
-
-// getElementByID with browser check!!
-
-function getElById(idVal) {
-  if (document.getElementById != null)
-    return document.getElementById(idVal);
-  if (document.all != null)
-    return document.all[idVal];
-  
-  alert("Problem getting element by id");
-  return null;
-}
-
-
-// Node object
-
-function Node(id, pid, name, url, title, target, icon, iconOpen, open , checkable ,checked, add, del) {
-
-	this.id = id;
-
-	this.pid = pid;
-
-	this.name = name;
-
-	this.url = url;
-
-	this.title = title;
-
-	this.target = target;
-
-	this.icon = icon;
-
-	this.iconOpen = iconOpen;
-
-	this._io = open || false;
-	
-	this.checkable = checkable || false;
-	
-	this.checked = checked || false;
-	
-	this.add = add || false;
-	
-	this.del = del || false;
-
-	this._is = false;
-
-	this._ls = false;
-
-	this._hc = false;
-
-	this._ai = 0;
-
-	this._p;
-
-}
-
-// Tree object
-
-function dTree(objName) {
-
-	this.config = {
-
-		target				: null,
-
-		folderLinks			: true,
-
-		useSelection		: true,
-
-		useCookies			: true,
-
-		useLines			: true,
-
-		useIcons			: true,
-
-		useStatusText		: false,
-
-		closeSameLevel		: false,
-
-		inOrder				: false
-
-	};
-
-	this.icon = {
-
-		root				: 'tree-images/zone.gif',
-
-		folder				: 'tree-images/folder.gif',
-
-		folderOpen			: 'tree-images/folderopen.gif',
-
-		node				: 'tree-images/page.gif',
-
-		empty				: 'tree-images/empty.gif',
-
-		line				: 'tree-images/line.gif',
-
-		join				: 'tree-images/join.gif',
-
-		joinBottom			: 'tree-images/joinbottom.gif',
-
-		plus				: 'tree-images/plus_updown.gif',
-
-		plusBottom			: 'tree-images/plus_up.gif',
-
-		minus				: 'tree-images/minus_.gif',
-
-		minusBottom			: 'tree-images/minus_up.gif',
-
-		nlPlus				: 'tree-images/plus_.gif',
-
-		nlMinus				: 'tree-images/minus_.gif'
-
-	};
-
-	this.obj = objName;
-
-	this.aNodes = [];
-
-	this.aIndent = [];
-
-	this.root = new Node(-1);
-
-	this.selectedNode = null;
-
-	this.selectedFound = false;
-
-	this.completed = false;
-
-}
-
-
-
-// Adds a new node to the node array
-
-dTree.prototype.add = function(id, pid, name, url, title, target, icon, iconOpen, open, checkable, checked, add, del) {
-
-	this.aNodes[this.aNodes.length] = new Node(id, pid, name, url, title, target, icon, iconOpen, open, checkable, checked, add, del);
-
-};
-
-
-
-// Open/close all nodes
-
-dTree.prototype.openAll = function() {
-
-	this.oAll(true);
-
-};
-
-dTree.prototype.closeAll = function() {
-
-	this.oAll(false);
-
-};
-
-
-
-// Outputs the tree to the page
-
-dTree.prototype.toString = function() {
-
-	var str = '<div class="treeview">\n';
-
-	if (document.getElementById) {
-
-		if (this.config.useCookies) this.selectedNode = this.getSelected();
-
-		str += this.addNode(this.root);
-
-	} else str += 'Browser not supported.';
-
-	str += '</div>';
-
-	if (!this.selectedFound) this.selectedNode = null;
-
-	this.completed = true;
-
-	return str;
-
-};
-
-
-
-// Creates the tree structure
-
-dTree.prototype.addNode = function(pNode) {
-
-	var str = '';
-
-	var n=0;
-
-	if (this.config.inOrder) n = pNode._ai;
-
-	for (n; n<this.aNodes.length; n++) {
-
-		if (this.aNodes[n].pid == pNode.id) {
-
-			var cn = this.aNodes[n];
-
-			cn._p = pNode;
-
-			cn._ai = n;
-
-			this.setCS(cn);
-
-			if (!cn.target && this.config.target) cn.target = this.config.target;
-
-			if (cn._hc && !cn._io && this.config.useCookies) cn._io = this.isOpen(cn.id);
-
-			if (!this.config.folderLinks && cn._hc) cn.url = null;
-
-			if (this.config.useSelection && cn.id == this.selectedNode && !this.selectedFound) {
-
-					cn._is = true;
-
-					this.selectedNode = n;
-
-					this.selectedFound = true;
-
-			}
-
-			str += this.node(cn, n);
-
-			if (cn._ls) break;
-
-		}
-
-	}
-
-	return str;
-
-};
-
-
-// Creates the node icon, url and text
-
-dTree.prototype.node = function(node, nodeId) {
-
-	var str = '<div class="node" >' + this.indent(node, nodeId);
-
-	if (this.config.useIcons) {
-
-		if (!node.icon) node.icon = (this.root.id == node.pid) ? this.icon.root : ((node._hc) ? this.icon.folder : this.icon.node);
-
-		if (!node.iconOpen) node.iconOpen = (node._hc) ? this.icon.folderOpen : this.icon.node;
-
-		if (this.root.id == node.pid) {
-
-			node.icon = this.icon.root;
-
-			node.iconOpen = this.icon.root;
-
-		}
-
-		//class="img"  border="10" vspace="18" align="bottom" style="border:0px; margin:0; padding:0; FILTER: progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=50); -moz-opacity:0.5" 
-		str += '<img  style="border:0; margin:0; padding:0; height:16px; vertical-align:top; overflow:hidden;"  id="i' + this.obj + nodeId + '" src="' + ((node._io) ? node.iconOpen : node.icon) + '" alt="" />';
-		if (node.checkable) {
-			str += '<input style="border:0; margin:0; padding:0; height:16px; vertical-align:top; overflow:hidden; FILTER: progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=50); " type="checkbox" id="c' + this.obj + node.id + '" onclick="javascript : ' + this.obj + '.c(' + node.id + ');"';
-			if (node.checked) str += ' checked >'; else str += ' >';
-		}//else str+='';
-
-	}
-
-	if (node.url) {
-
-		str += '<a id="s' + this.obj + nodeId + '" class="' + ((this.config.useSelection) ? ((node._is ? 'nodeSel' : 'node')) : 'node') + '" href="javascript:navigate(\'' + node.url + '\')"';
-
-		if (node.title) str += ' title="' + node.title + '"';
-
-		//if (node.target) str += ' target="' + node.target + ';"';
-
-		if (this.config.useStatusText) str += ' onmouseover="window.status=\'' + node.name + '\';return true;" onmouseout="window.status=\'\';return true;" ';
-
-		if (this.config.useSelection && ((node._hc && this.config.folderLinks) || !node._hc))
-
-			str += ' onclick="javascript: ' + this.obj + '.s(' + nodeId + ');"';
-
-		str += '>';
-
-	}
-
-	else if ((!this.config.folderLinks || !node.url) && node._hc && node.pid != this.root.id)
-
-		str += '<a style="border:0; margin:0; padding:0; text-size: smaller; vertical-align: top; overflow:hidden;"  href="javascript: ' + this.obj + '.o(' + nodeId + ');" class="node">';
-
-	str += '  '+node.name;
-
-	if (node.url || ((!this.config.folderLinks || !node.url) && node._hc)) str += '</a>';
-	
-	if (node.add && node.url) {
-		str += '   -- <a href="' + node.url + '&qaction=addsub"/> <img  style="border:0; margin:0; padding:0;  width: 16px; height:16px; vertical-align: top; overflow:hidden;"  id="i' + this.obj + nodeId + '" src="images/plus.gif" alt="" /></a>';
-	}
-	if (node.del && node.url) {
-		str += '    <a href="' + node.url + '&qaction=delete"/>  <img  style="border:0; margin:0; padding:0; width: 11px; height:11px; vertical-align: top; overflow:hidden;"  id="i' + this.obj + nodeId + '" src="images/block.gif" alt="" /></a>';
-	}
-
-	if (node._hc) {
-
-		str += '<div id="d' + this.obj + nodeId + '" class="clip" style="display:' + ((this.root.id == node.pid || node._io) ? 'block' : 'none') + ';">';
-
-		str += this.addNode(node);
-
-		str += '</div>';
-
-	}
-	
-	str += '</div>';
-
-	this.aIndent.pop();
-
-	return str;
-
-};
-
-
-// Adds the empty and line icons
-
-dTree.prototype.indent = function(node, nodeId) {
-
-	var str = '';
-
-	if (this.root.id != node.pid) {
-
-		for (var n=0; n<this.aIndent.length; n++)
-
-			str += '<img  style="verical-align: top;" src="' + ( (this.aIndent[n] == 1 && this.config.useLines) ? this.icon.line : this.icon.empty ) + '" alt="" />';
-
-		(node._ls) ? this.aIndent.push(0) : this.aIndent.push(1);
-
-		if (node._hc) {
-
-			str += '<a href="javascript: ' + this.obj + '.o(' + nodeId + ');"><img id="j' + this.obj + nodeId + '" src="';
-
-			if (!this.config.useLines) str += (node._io) ? this.icon.nlMinus : this.icon.nlPlus;
-
-			else str += ( (node._io) ? ((node._ls && this.config.useLines) ? this.icon.minusBottom : this.icon.minus) : ((node._ls && this.config.useLines) ? this.icon.plusBottom : this.icon.plus ) );
-
-			str += '" alt="" /></a>';
-
-		} else str += '<img src="' + ( (this.config.useLines) ? ((node._ls) ? this.icon.joinBottom : this.icon.join ) : this.icon.empty) + '" alt="" />';
-
-	}
-
-	return str;
-
-};
-
-
-
-// Checks if a node has any children and if it is the last sibling
-
-dTree.prototype.setCS = function(node) {
-
-	var lastId;
-
-	for (var n=0; n<this.aNodes.length; n++) {
-
-		if (this.aNodes[n].pid == node.id) node._hc = true;
-
-		if (this.aNodes[n].pid == node.pid) lastId = this.aNodes[n].id;
-
-	}
-
-	if (lastId==node.id) node._ls = true;
-
-};
-
-
-
-// Returns the selected node
-
-dTree.prototype.getSelected = function() {
-
-	var sn = this.getCookie('cs' + this.obj);
-
-	return (sn) ? sn : null;
-
-};
-
-
-
-// Highlights the selected node
-
-dTree.prototype.s = function(id) {
-
-	if (!this.config.useSelection) return;
-
-	var cn = this.aNodes[id];
-
-	if (cn._hc && !this.config.folderLinks) return;
-
-	if (this.selectedNode != id) {
-
-		if (this.selectedNode || this.selectedNode==0) {
-
-			eOld = document.getElementById("s" + this.obj + this.selectedNode);
-
-			eOld.className = "node";
-
-		}
-
-		eNew = document.getElementById("s" + this.obj + id);
-
-		eNew.className = "nodeSel";
-
-		this.selectedNode = id;
-
-		if (this.config.useCookies) this.setCookie('cs' + this.obj, cn.id);
-
-	}
-
-};
-
-// Checks all parents
-
-dTree.prototype.c = function(id) {
-
-	//alert('callid='+id);
-	
-	var n=0;
-	
-	var parent;
-	
-	parent = document.getElementById("c" + this.obj + id);
-	
-	//if (parent.checked==true) parent.checked=false; else parent.checked=true;
-	
-	var what = parent.checked;
-
-	for (n; n<this.aNodes.length; n++) {
-
-		if (this.aNodes[n].pid == id) {
-
-			var cn = this.aNodes[n];
-			
-			element = document.getElementById("c" + this.obj + cn.id);
-			
-			element.checked = what;
-			
-			cn.checked = what;
-			
-			//alert(cn.pid+'(child)==(parent)'+id+'->'+cn.id+'='+what+','+this.aNodes.length );
-			
-			this.c(cn.id);
-
-		}
-
-	}
-
-};
-	
-	
-dTree.prototype.generate_checkedlist = function(id) {
-	
-	var retStr='';
-	
-	var n=0;
-	
-	var parent = document.getElementById("c" + this.obj + id);
-
-	for (n; n<this.aNodes.length; n++) {
-
-		if (this.aNodes[n].pid == id) {
-
-			var cn = this.aNodes[n];
-			
-			var element = document.getElementById("c" + this.obj + cn.id);
-			
-			//alert(cn.name + ' = ' +element.checked);
-			
-			if (element.checked) {
-				
-				if (retStr == '') 
-					{retStr = cn.name; }// this.generate_checkedlist(cn.id); 
-				else
-					retStr += ',' + cn.name;//this.generate_checkedlist(cn.id);
-			}
-			//alert(cn.pid+'(child)==(parent)'+id+'->'+cn.id+'='+what+','+this.aNodes.length );
-			
-		}
-
-	}
-	
-	return retStr;
-};
-
-// Toggle Open or close
-
-dTree.prototype.o = function(id) {
-
-	var cn = this.aNodes[id];
-
-	this.nodeStatus(!cn._io, id, cn._ls);
-
-	cn._io = !cn._io;
-
-	if (this.config.closeSameLevel) this.closeLevel(cn);
-
-	if (this.config.useCookies) this.updateCookie();
-
-};
-
-
-
-// Open or close all nodes
-
-dTree.prototype.oAll = function(status) {
-
-	for (var n=0; n<this.aNodes.length; n++) {
-
-		if (this.aNodes[n]._hc && this.aNodes[n].pid != this.root.id) {
-
-			this.nodeStatus(status, n, this.aNodes[n]._ls);
-
-			this.aNodes[n]._io = status;
-
-		}
-
-	}
-
-	if (this.config.useCookies) this.updateCookie();
-
-};
-
-
-
-// Opens the tree to a specific node
-
-dTree.prototype.openTo = function(nId, bSelect, bFirst) {
-
-	if (!bFirst) {
-
-		for (var n=0; n<this.aNodes.length; n++) {
-
-			if (this.aNodes[n].id == nId) {
-
-				nId=n;
-
-				break;
-
-			}
-
-		}
-
-	}
-
-	var cn=this.aNodes[nId];
-
-	if (cn.pid==this.root.id || !cn._p) return;
-
-	cn._io = true;
-
-	cn._is = bSelect;
-
-	if (this.completed && cn._hc) this.nodeStatus(true, cn._ai, cn._ls);
-
-	if (this.completed && bSelect) this.s(cn._ai);
-
-	else if (bSelect) this._sn=cn._ai;
-
-	this.openTo(cn._p._ai, false, true);
-
-};
-
-
-
-// Closes all nodes on the same level as certain node
-
-dTree.prototype.closeLevel = function(node) {
-
-	for (var n=0; n<this.aNodes.length; n++) {
-
-		if (this.aNodes[n].pid == node.pid && this.aNodes[n].id != node.id && this.aNodes[n]._hc) {
-
-			this.nodeStatus(false, n, this.aNodes[n]._ls);
-
-			this.aNodes[n]._io = false;
-
-			this.closeAllChildren(this.aNodes[n]);
-
-		}
-
-	}
-
-};
-
-
-
-// Closes all children of a node
-
-dTree.prototype.closeAllChildren = function(node) {
-
-	for (var n=0; n<this.aNodes.length; n++) {
-
-		if (this.aNodes[n].pid == node.id && this.aNodes[n]._hc) {
-
-			if (this.aNodes[n]._io) this.nodeStatus(false, n, this.aNodes[n]._ls);
-
-			this.aNodes[n]._io = false;
-
-			this.closeAllChildren(this.aNodes[n]);		
-
-		}
-
-	}
-
-};
-
-
-
-// Change the status of a node(open or closed)
-
-dTree.prototype.nodeStatus = function(status, id, bottom) {
-
-	eDiv	= document.getElementById('d' + this.obj + id);
-
-	eJoin	= document.getElementById('j' + this.obj + id);
-
-	if (this.config.useIcons) {
-
-		eIcon	= document.getElementById('i' + this.obj + id);
-
-		eIcon.src = (status) ? this.aNodes[id].iconOpen : this.aNodes[id].icon;
-
-	}
-
-	eJoin.src = (this.config.useLines)?
-
-	((status)?((bottom)?this.icon.minusBottom:this.icon.minus):((bottom)?this.icon.plusBottom:this.icon.plus)):
-
-	((status)?this.icon.nlMinus:this.icon.nlPlus);
-
-	eDiv.style.display = (status) ? 'block': 'none';
-
-};
-
-
-
-
-
-// [Cookie] Clears a cookie
-
-dTree.prototype.clearCookie = function() {
-
-	var now = new Date();
-
-	var yesterday = new Date(now.getTime() - 1000 * 60 * 60 * 24);
-
-	this.setCookie('co'+this.obj, 'cookieValue', yesterday);
-
-	this.setCookie('cs'+this.obj, 'cookieValue', yesterday);
-
-};
-
-
-
-// [Cookie] Sets value in a cookie
-
-dTree.prototype.setCookie = function(cookieName, cookieValue, expires, path, domain, secure) {
-	document.cookie =
-		escape(cookieName) + '=' + escape(cookieValue) +
-		(expires ? '; expires=' + expires.toGMTString() : '') +
-		(path ? '; path=' + path : '') +
-		(domain ? '; domain=' + domain : '') +
-		(secure ? '; secure' : '');
-};
-
-
-
-// [Cookie] Gets a value from a cookie
-
-dTree.prototype.getCookie = function(cookieName) {
-
-	var cookieValue = '';
-
-	var posName = document.cookie.indexOf(escape(cookieName) + '=');
-
-	if (posName != -1) {
-
-		var posValue = posName + (escape(cookieName) + '=').length;
-
-		var endPos = document.cookie.indexOf(';', posValue);
-
-		if (endPos != -1) cookieValue = unescape(document.cookie.substring(posValue, endPos));
-
-		else cookieValue = unescape(document.cookie.substring(posValue));
-
-	}
-
-	return (cookieValue);
-
-};
-
-
-
-// [Cookie] Returns ids of open nodes as a string
-
-dTree.prototype.updateCookie = function() {
-
-	var str = '';
-
-	for (var n=0; n<this.aNodes.length; n++) {
-
-		if (this.aNodes[n]._io && this.aNodes[n].pid != this.root.id) {
-
-			if (str) str += '.';
-
-			str += this.aNodes[n].id;
-
-		}
-
-	}
-
-	this.setCookie('co' + this.obj, str);
-
-};
-
-
-
-// [Cookie] Checks if a node id is in a cookie
-
-dTree.prototype.isOpen = function(id) {
-
-	var aOpen = this.getCookie('co' + this.obj).split('.');
-
-	for (var n=0; n<aOpen.length; n++) {
-		if (aOpen[n] == id) return true;
-	}
-
-	return false;
-};
-
-
-
-// If Push and pop is not implemented by the browser
-
-if (!Array.prototype.push) {
-
-	Array.prototype.push = function array_push() {
-
-		for(var i=0;i<arguments.length;i++)
-
-			this[this.length]=arguments[i];
-
-		return this.length;
-
-	};
-
-}
-
-if (!Array.prototype.pop) {
-
-	Array.prototype.pop = function array_pop() {
-
-		lastElement = this[this.length-1];
-
-		this.length = Math.max(this.length-1,0);
-
-		return lastElement;
-
-	};
-
-}
diff --git a/usr/local/www/fbegin.inc b/usr/local/www/fbegin.inc
index eaebc36632..ecf24ba177 100755
--- a/usr/local/www/fbegin.inc
+++ b/usr/local/www/fbegin.inc
@@ -97,7 +97,7 @@ if ($_REQUEST['noticeaction'] == 'acknowledge') {
 						<script type="text/javascript">
 							var content='<div id="marquee-text"><?= $notice_msgs; ?></div>'
 						</script>
-						<script type="text/javascript" src="/ticker.js"></script>
+						<script type="text/javascript" src="/javascript/ticker.js"></script>
 					</div>
 <?
 				} else {
diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php
index a31fafdb5d..c1512e8378 100755
--- a/usr/local/www/firewall_aliases_edit.php
+++ b/usr/local/www/firewall_aliases_edit.php
@@ -372,7 +372,7 @@ EOD;
 	echo $jscriptstr;
 ?>
 
-<script type="text/javascript" src="row_helper.js">
+<script type="text/javascript" src="/javascript/row_helper.js">
 </script>
 
 <input type='hidden' name='address_type' value='textbox' />
diff --git a/usr/local/www/firewall_nat.php b/usr/local/www/firewall_nat.php
index 026b731b76..a11fd8eb5f 100755
--- a/usr/local/www/firewall_nat.php
+++ b/usr/local/www/firewall_nat.php
@@ -152,8 +152,7 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
 <body link="#000000" vlink="#000000" alink="#000000">
 <?php include("fbegin.inc"); ?>
 <form action="firewall_nat.php" method="post" name="iform">
-<script type="text/javascript" language="javascript" src="row_toggle.js">
-</script>
+<script type="text/javascript" language="javascript" src="/javascript/row_toggle.js"></script>
 <?php if (file_exists($d_natconfdirty_path)): ?><p>
 <?php
 	if($savemsg)
diff --git a/usr/local/www/firewall_nat_out.php b/usr/local/www/firewall_nat_out.php
index ca1c483809..d9886e2c13 100755
--- a/usr/local/www/firewall_nat_out.php
+++ b/usr/local/www/firewall_nat_out.php
@@ -185,7 +185,7 @@ include("head.inc");
 <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
 <?php include("fbegin.inc"); ?>
 <form action="firewall_nat_out.php" method="post" name="iform">
-<script type="text/javascript" language="javascript" src="row_toggle.js">
+<script type="text/javascript" language="javascript" src="/javascript/row_toggle.js">
 </script>
 <?php if ($savemsg) print_info_box($savemsg); ?>
 <?php if (file_exists($d_natconfdirty_path)): ?><p>
diff --git a/usr/local/www/firewall_rules.php b/usr/local/www/firewall_rules.php
index f115d2f204..9dca1901a8 100755
--- a/usr/local/www/firewall_rules.php
+++ b/usr/local/www/firewall_rules.php
@@ -194,7 +194,7 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
 <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
 <?php include("fbegin.inc"); ?>
 <form action="firewall_rules.php" method="post">
-<script type="text/javascript" language="javascript" src="row_toggle.js">
+<script type="text/javascript" language="javascript" src="/javascript/row_toggle.js">
 </script>
 <?php if ($savemsg) print_info_box($savemsg); ?>
 <?php if (file_exists($d_filterconfdirty_path)): ?><p>
diff --git a/usr/local/www/head.inc b/usr/local/www/head.inc
index 44807c1513..47fcd1979b 100755
--- a/usr/local/www/head.inc
+++ b/usr/local/www/head.inc
@@ -28,33 +28,33 @@ $pagetitle = gentitle( $pgtitle );
 	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
         <?php if (strpos($_SERVER["SCRIPT_FILENAME"], "wizard.php") !== false &&
                   file_exists("{$g['www_path']}/themes/{$g['theme']}/wizard.css")): ?>
-					<?php outputCSSFileInline("themes/{$g['theme']}/wizard.css"); ?>
+					<?php outputCSSFileInline("{$g['www_path']}/themes/{$g['theme']}/wizard.css"); ?>
         <?php else: ?>
         	<link rel="stylesheet" href="/themes/<?php echo $g['theme']; ?>/all.css" media="all" />
         <?php endif; ?>
 		<?php 
-			if(file_exists("niftycssCode.css")) 
-				outputCSSFileInline("niftycssCode.css"); 
-			if(file_exists("niftycssprintCode.css")) 
-				outputCSSPrintFileInline("niftycssprintCode.css");
-			if(file_exists("niftyjsCode.js")) 
-				outputJavaScriptFileInline("niftyjsCode.js"); 
+			if(file_exists("{$g['www_path']}/niftycssCode.css")) 
+				outputCSSFileInline("{$g['www_path']}/niftycssCode.css"); 
+			if(file_exists("{$g['www_path']}/niftycssprintCode.css")) 
+				outputCSSPrintFileInline("{$g['www_path']}/niftycssprintCode.css");
+			if(file_exists("{$g['www_path']}/javascript/niftyjsCode.js")) 
+				outputJavaScriptFileInline("{$g['www_path']}/javascript/niftyjsCode.js"); 
 		?>
 		<script type="text/javascript">
 			var theme = "<?php echo $g['theme']; ?>";
 		</script>
-		<?php outputJavaScriptFileInline("themes/{$g['theme']}/loader.js"); ?>
+		<?php outputJavaScriptFileInline("{$g['www_path']}/themes/{$g['theme']}/loader.js"); ?>
 <?php
 		if($_GET['enablefirebuglite']) {
-			outputJavaScriptFileInline("javascript/pi.js");
-			outputJavaScriptFileInline("javascript/firebug-lite.js");
+			outputJavaScriptFileInline("{$g['www_path']}/javascript/pi.js");
+			outputJavaScriptFileInline("{$g['www_path']}/javascript/firebug-lite.js");
 		}
-		outputJavaScriptFileInline("javascript/scriptaculous/prototype.js");
-		outputJavaScriptFileInline("javascript/scriptaculous/scriptaculous.js");
-		outputJavaScriptFileInline("javascript/scriptaculous/effects.js");
-		outputJavaScriptFileInline("javascript/scriptaculous/dragdrop.js");
-		if(file_exists("javascript/global.js"))
-			outputJavaScriptFileInline("javascript/global.js");
+		outputJavaScriptFileInline("{$g['www_path']}/javascript/scriptaculous/prototype.js");
+		outputJavaScriptFileInline("{$g['www_path']}/javascript/scriptaculous/scriptaculous.js");
+		outputJavaScriptFileInline("{$g['www_path']}/javascript/scriptaculous/effects.js");
+		outputJavaScriptFileInline("{$g['www_path']}/javascript/scriptaculous/dragdrop.js");
+		if(file_exists("{$g['www_path']}/javascript/global.js"))
+			outputJavaScriptFileInline("{$g['www_path']}/javascript/global.js");
 
 	/*
 	 *	Find all javascript files that need to be included
@@ -63,13 +63,13 @@ $pagetitle = gentitle( $pgtitle );
 	 */
 
 	$dir  = trim(basename($_SERVER["SCRIPT_FILENAME"]), '.php');
-	$path = "/usr/local/www/javascript/" . $dir . "/";
+	$path = "{$g['www_path']}/javascript/" . $dir . "/";
 	if (is_dir($path)) {
 		if ($dh = opendir($path)) {
 			while (($file = readdir($dh)) !== false) {
 		   		if (is_dir($file)) continue;
 				//echo "\t".'<script type="text/javascript" src="/javascript/'.$dir.'/'.$file.'"></script>'."\n";
-				outputJavaScriptFileInline("javascript/{$dir}/{$file}"); 
+				outputJavaScriptFileInline("{$g['www_path']}/javascript/{$dir}/{$file}"); 
 			}
 			closedir($dh);
 		}
diff --git a/usr/local/www/ip_helper.js b/usr/local/www/ip_helper.js
deleted file mode 100755
index 8473cb2a31..0000000000
--- a/usr/local/www/ip_helper.js
+++ /dev/null
@@ -1,37 +0,0 @@
-function gen_bits_lan(ipaddr) {
-    if (ipaddr.search(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) != -1) {
-        var adr = ipaddr.split(/\./);
-        if (adr[0] > 255 || adr[1] > 255 || adr[2] > 255 || adr[3] > 255)
-            return "";
-        if (adr[0] == 0 && adr[1] == 0 && adr[2] == 0 && adr[3] == 0)
-            return "";
-
-                if (adr[0] <= 127)
-                        return "8";
-                else if (adr[0] <= 191)
-                        return "16";
-                else
-                        return "24";
-    }
-    else
-        return "";
-}
-
-function gen_bits_opt(ipaddr) {
-    if (ipaddr.search(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) != -1) {
-        var adr = ipaddr.split(/\./);
-        if (adr[0] > 255 || adr[1] > 255 || adr[2] > 255 || adr[3] > 255)
-            return 0;
-        if (adr[0] == 0 && adr[1] == 0 && adr[2] == 0 && adr[3] == 0)
-            return 0;
-
-                if (adr[0] <= 127)
-                        return 23;
-                else if (adr[0] <= 191)
-                        return 15;
-                else
-                        return 7;
-    }
-    else
-        return 0;
-}
\ No newline at end of file
diff --git a/usr/local/www/javascript/load_balancer_pool_edit/pool.js b/usr/local/www/javascript/load_balancer_pool_edit/pool.js
new file mode 100755
index 0000000000..ab6303da2b
--- /dev/null
+++ b/usr/local/www/javascript/load_balancer_pool_edit/pool.js
@@ -0,0 +1,153 @@
+/*
+        pool.js
+        part of pfSense (http://www.pfsense.com/)
+
+        Copyright (C) 2005-2008 Bill Marquette <bill.marquette@gmail.com>.
+        All rights reserved.
+
+        Redistribution and use in source and binary forms, with or without
+        modification, are permitted provided that the following conditions are met:
+
+        1. Redistributions of source code must retain the above copyright notice,
+           this list of conditions and the following disclaimer.
+
+        2. Redistributions in binary form must reproduce the above copyright
+           notice, this list of conditions and the following disclaimer in the
+           documentation and/or other materials provided with the distribution.
+
+        THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+        INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+        AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+        AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+        OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+        SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+        INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+        CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+        ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+        POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/* Add server to virtual server pool
+ * operates on whatever form is passed to it
+ */
+function AddServerToPool(form) {
+	var ServerPort = form.ipaddr.value;
+	form['servers[]'].options[form['servers[]'].options.length] = new Option(ServerPort,ServerPort);
+}
+
+
+function AllServers(id, selectAll) {
+   var opts = document.getElementById(id).getElementsByTagName('option');
+   for (i = 0; i < opts.length; i++)
+   {
+       opts[i].selected = selectAll;
+   }
+}
+
+
+function RemoveServerFromPool(form, field)
+{
+	var theSel = form[field];
+	var selIndex = theSel.selectedIndex;
+	if (selIndex != -1) {
+		for(i=theSel.length-1; i>=0; i--)
+		{
+			if(theSel.options[i].selected)
+			{
+				theSel.options[i] = null;
+			}
+		}
+		if (theSel.length > 0) {
+			theSel.selectedIndex = selIndex == 0 ? 0 : selIndex - 1;
+		}
+	}
+}
+
+function addOption(theSel, theText, theValue)
+{
+	var newOpt = new Option(theText, theValue);
+	var selLength = theSel.length;
+	theSel.options[selLength] = newOpt;
+}
+
+function deleteOption(theSel, theIndex)
+{ 
+	var selLength = theSel.length;
+	if(selLength>0)
+	{
+		theSel.options[theIndex] = null;
+	}
+}
+
+function moveOptions(theSelFrom, theSelTo)
+{
+	var selLength = theSelFrom.length;
+	var selectedText = new Array();
+	var selectedValues = new Array();
+	var selectedCount = 0;
+
+	var i;
+
+	// Find the selected Options in reverse order
+	// and delete them from the 'from' Select.
+	for(i=selLength-1; i>=0; i--)
+	{
+		if(theSelFrom.options[i].selected)
+		{
+			selectedText[selectedCount] = theSelFrom.options[i].text;
+			selectedValues[selectedCount] = theSelFrom.options[i].value;
+			deleteOption(theSelFrom, i);
+			selectedCount++;
+		}
+	}
+
+	// Add the selected text/values in reverse order.
+	// This will add the Options to the 'to' Select
+	// in the same order as they were in the 'from' Select.
+	for(i=selectedCount-1; i>=0; i--)
+	{
+		addOption(theSelTo, selectedText[i], selectedValues[i]);
+	}
+}
+
+// functions up() and down() modified from http://www.babailiica.com/js/sorter/
+
+function up(obj) {
+	var sel = new Array();
+	for (var i=0; i<obj.length; i++) {
+		if (obj[i].selected == true) {
+			sel[sel.length] = i;
+		}
+	}
+	for (i in sel) {
+		if (sel[i] != 0 && !obj[sel[i]-1].selected) {
+			var tmp = new Array(obj[sel[i]-1].text, obj[sel[i]-1].value);
+			obj[sel[i]-1].text = obj[sel[i]].text;
+			obj[sel[i]-1].value = obj[sel[i]].value;
+			obj[sel[i]].text = tmp[0];
+			obj[sel[i]].value = tmp[1];
+			obj[sel[i]-1].selected = true;
+			obj[sel[i]].selected = false;
+		}
+	}
+}
+
+function down(obj) {
+	var sel = new Array();
+	for (var i=obj.length-1; i>-1; i--) {
+		if (obj[i].selected == true) {
+			sel[sel.length] = i;
+		}
+	}
+	for (i in sel) {
+		if (sel[i] != obj.length-1 && !obj[sel[i]+1].selected) {
+			var tmp = new Array(obj[sel[i]+1].text, obj[sel[i]+1].value);
+			obj[sel[i]+1].text = obj[sel[i]].text;
+			obj[sel[i]+1].value = obj[sel[i]].value;
+			obj[sel[i]].text = tmp[0];
+			obj[sel[i]].value = tmp[1];
+			obj[sel[i]+1].selected = true;
+			obj[sel[i]].selected = false;
+		}
+	}
+}
diff --git a/usr/local/www/javascript/load_balancer_relay_protocol_edit/load_balancer_relay_protocol_edit.js b/usr/local/www/javascript/load_balancer_relay_protocol_edit/load_balancer_relay_protocol_edit.js
new file mode 100644
index 0000000000..fcf67ce4ce
--- /dev/null
+++ b/usr/local/www/javascript/load_balancer_relay_protocol_edit/load_balancer_relay_protocol_edit.js
@@ -0,0 +1,56 @@
+/*
+        pool.js
+        part of pfSense (http://www.pfsense.com/)
+
+        Copyright (C) 2005-2008 Bill Marquette <bill.marquette@gmail.com>.
+        All rights reserved.
+
+        Redistribution and use in source and binary forms, with or without
+        modification, are permitted provided that the following conditions are met:
+
+        1. Redistributions of source code must retain the above copyright notice,
+           this list of conditions and the following disclaimer.
+
+        2. Redistributions in binary form must reproduce the above copyright
+           notice, this list of conditions and the following disclaimer in the
+           documentation and/or other materials provided with the distribution.
+
+        THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+        INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+        AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+        AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+        OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+        SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+        INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+        CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+        ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+        POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*
+ * This code makes use of prototype shortcuts and will not work
+ * without prototype being loaded prior to it.
+ */
+
+function copyOption(theSrc, theDst)
+{
+  var selOption = theSrc[theSrc.selectedIndex];
+	theDst.options[theDst.length] = new Option(selOption.text, selOption.value);
+}
+
+function deleteOption(theSel)
+{ 
+  var theIndex = theSel.selectedIndex;
+	var selLength = theSel.length;
+	if(selLength>0)
+	{
+		theSel.options[theIndex] = null;
+	}
+}
+
+function AllOptions(el, selectAll) {
+   el.select('option').each(function(opt) {
+      opt.selected = selectAll;
+   });
+}
+
diff --git a/usr/local/www/javascript/niftyjsCode.js b/usr/local/www/javascript/niftyjsCode.js
new file mode 100755
index 0000000000..8093a4824a
--- /dev/null
+++ b/usr/local/www/javascript/niftyjsCode.js
@@ -0,0 +1,174 @@
+function NiftyCheck(){
+if(!document.getElementById || !document.createElement)
+    return(false);
+isXHTML=/html\:/.test(document.getElementsByTagName('body')[0].nodeName);
+if(Array.prototype.push==null){Array.prototype.push=function(){
+      this[this.length]=arguments[0]; return(this.length);}}
+return(true);
+}
+
+function Rounded(selector,wich,bk,color,opt){
+var i,prefixt,prefixb,cn="r",ecolor="",edges=false,eclass="",b=false,t=false;
+
+if(color=="transparent"){
+    cn=cn+"x";
+    ecolor=bk;
+    bk="transparent";
+    }
+else if(opt && opt.indexOf("border")>=0){
+    var optar=opt.split(" ");
+    for(i=0;i<optar.length;i++)
+        if(optar[i].indexOf("#")>=0) ecolor=optar[i];
+    if(ecolor=="") ecolor="#666";
+    cn+="e";
+    edges=true;
+    }
+else if(opt && opt.indexOf("smooth")>=0){
+    cn+="a";
+    ecolor=Mix(bk,color);
+    }
+if(opt && opt.indexOf("small")>=0) cn+="s";
+prefixt=cn;
+prefixb=cn;
+if(wich.indexOf("all")>=0){t=true;b=true}
+else if(wich.indexOf("top")>=0) t="true";
+else if(wich.indexOf("tl")>=0){
+    t="true";
+    if(wich.indexOf("tr")<0) prefixt+="l";
+    }
+else if(wich.indexOf("tr")>=0){
+    t="true";
+    prefixt+="r";
+    }
+if(wich.indexOf("bottom")>=0) b=true;
+else if(wich.indexOf("bl")>=0){
+    b="true";
+    if(wich.indexOf("br")<0) prefixb+="l";
+    }
+else if(wich.indexOf("br")>=0){
+    b="true";
+    prefixb+="r";
+    }
+var v=getElementsBySelector(selector);
+var l=v.length;
+for(i=0;i<l;i++){
+    if(edges) AddBorder(v[i],ecolor);
+    if(t) AddTop(v[i],bk,color,ecolor,prefixt);
+    if(b) AddBottom(v[i],bk,color,ecolor,prefixb);
+    }
+}
+
+function AddBorder(el,bc){
+var i;
+if(!el.passed){
+    if(el.childNodes.length==1 && el.childNodes[0].nodeType==3){
+        var t=el.firstChild.nodeValue;
+        el.removeChild(el.lastChild);
+        var d=CreateEl("span");
+        d.style.display="block";
+        d.appendChild(document.createTextNode(t));
+        el.appendChild(d);
+        }
+    for(i=0;i<el.childNodes.length;i++){
+        if(el.childNodes[i].nodeType==1){
+            el.childNodes[i].style.borderLeft="1px solid "+bc;
+            el.childNodes[i].style.borderRight="1px solid "+bc;
+            }
+        }
+    }
+el.passed=true;
+}
+    
+function AddTop(el,bk,color,bc,cn){
+var i,lim=4,d=CreateEl("b");
+
+if(cn.indexOf("s")>=0) lim=2;
+if(bc) d.className="artop";
+else d.className="rtop";
+d.style.backgroundColor=bk;
+for(i=1;i<=lim;i++){
+    var x=CreateEl("b");
+    x.className=cn + i;
+    x.style.backgroundColor=color;
+    if(bc) x.style.borderColor=bc;
+    d.appendChild(x);
+    }
+el.style.paddingTop=0;
+el.insertBefore(d,el.firstChild);
+}
+
+function AddBottom(el,bk,color,bc,cn){
+var i,lim=4,d=CreateEl("b");
+
+if(cn.indexOf("s")>=0) lim=2;
+if(bc) d.className="artop";
+else d.className="rtop";
+d.style.backgroundColor=bk;
+for(i=lim;i>0;i--){
+    var x=CreateEl("b");
+    x.className=cn + i;
+    x.style.backgroundColor=color;
+    if(bc) x.style.borderColor=bc;
+    d.appendChild(x);
+    }
+el.style.paddingBottom=0;
+el.appendChild(d);
+}
+
+function CreateEl(x){
+if(isXHTML) return(document.createElementNS('http://www.w3.org/1999/xhtml',x));
+else return(document.createElement(x));
+}
+
+function getElementsBySelector(selector){
+var i,selid="",selclass="",tag=selector,f,s=[],objlist=[];
+
+if(selector.indexOf(" ")>0){  //descendant selector like "tag#id tag"
+    s=selector.split(" ");
+    var fs=s[0].split("#");
+    if(fs.length==1) return(objlist);
+    f=document.getElementById(fs[1]);
+    if(f) return(f.getElementsByTagName(s[1]));
+    return(objlist);
+    }
+if(selector.indexOf("#")>0){ //id selector like "tag#id"
+    s=selector.split("#");
+    tag=s[0];
+    selid=s[1];
+    }
+if(selid!=""){
+    f=document.getElementById(selid);
+    if(f) objlist.push(f);
+    return(objlist);
+    }
+if(selector.indexOf(".")>0){  //class selector like "tag.class"
+    s=selector.split(".");
+    tag=s[0];
+    selclass=s[1];
+    }
+var v=document.getElementsByTagName(tag);  // tag selector like "tag"
+if(selclass=="")
+    return(v);
+for(i=0;i<v.length;i++){
+    if(v[i].className.indexOf(selclass)>=0){
+        objlist.push(v[i]);
+        }
+    }
+return(objlist);
+}
+
+function Mix(c1,c2){
+var i,step1,step2,x,y,r=new Array(3);
+if(c1.length==4)step1=1;
+else step1=2;
+if(c2.length==4) step2=1;
+else step2=2;
+for(i=0;i<3;i++){
+    x=parseInt(c1.substr(1+step1*i,step1),16);
+    if(step1==1) x=16*x+x;
+    y=parseInt(c2.substr(1+step2*i,step2),16);
+    if(step2==1) y=16*y+y;
+    r[i]=Math.floor((x*50+y*50)/100);
+    }
+return("#"+r[0].toString(16)+r[1].toString(16)+r[2].toString(16));
+}
\ No newline at end of file
diff --git a/usr/local/www/javascript/row_helper.js b/usr/local/www/javascript/row_helper.js
new file mode 100755
index 0000000000..15d23f1d15
--- /dev/null
+++ b/usr/local/www/javascript/row_helper.js
@@ -0,0 +1,69 @@
+// Global Variables
+var rowname = new Array(4999);
+var rowtype = new Array(4999);
+var newrow  = new Array(4999);
+var rowsize = new Array(4999);
+
+for (i = 0; i < 4999; i++) {
+	rowname[i] = '';
+	rowtype[i] = '';
+	newrow[i] = '';
+	rowsize[i] = '30';
+}
+
+var field_counter_js = 0;
+var loaded = 0;
+var is_streaming_progress_bar = 0;
+var temp_streaming_text = "";
+
+var addRowTo = (function() {
+    return (function (tableId) {
+	var d, tbody, tr, td, bgc, i, ii, j;
+	d = document;
+	tbody = d.getElementById(tableId).getElementsByTagName("tbody").item(0);
+	tr = d.createElement("tr");
+	for (i = 0; i < field_counter_js; i++) {
+		td = d.createElement("td");
+		if(rowtype[i] == 'textbox') {
+			td.innerHTML="<INPUT type='hidden' value='" + totalrows +"' name='" + rowname[i] + "_row-" + totalrows + "'></input><input size='" + rowsize[i] + "' class='formfld unknown' name='" + rowname[i] + totalrows + "'></input> ";
+		} else if(rowtype[i] == 'select') {
+			td.innerHTML="<INPUT type='hidden' value='" + totalrows +"' name='" + rowname[i] + "_row-" + totalrows + "'></input><select size='1' name='" + rowname[i] + totalrows + "'><option value=\"32\" selected>32</option><option value=\"31\" >31</option><option value=\"30\" >30</option><option value=\"29\" >29</option><option value=\"28\" >28</option><option value=\"27\" >27</option><option value=\"26\" >26</option><option value=\"25\" >25</option><option value=\"24\" >24</option><option value=\"23\" >23</option><option value=\"22\" >22</option><option value=\"21\" >21</option><option value=\"20\" >20</option><option value=\"19\" >19</option><option value=\"18\" >18</option><option value=\"17\" >17</option><option value=\"16\" >16</option><option value=\"15\" >15</option><option value=\"14\" >14</option><option value=\"13\" >13</option><option value=\"12\" >12</option><option value=\"11\" >11</option><option value=\"10\" >10</option><option value=\"9\" >9</option><option value=\"8\" >8</option><option value=\"7\" >7</option><option value=\"6\" >6</option><option value=\"5\" >5</option><option value=\"4\" >4</option><option value=\"3\" >3</option><option value=\"2\" >2</option><option value=\"1\" >1</option></select> ";
+		} else {
+			td.innerHTML="<INPUT type='hidden' value='" + totalrows +"' name='" + rowname[i] + "_row-" + totalrows + "'></input><input type='checkbox' name='" + rowname[i] + totalrows + "'></input> ";
+		}
+		tr.appendChild(td);
+	}
+	td = d.createElement("td");
+	td.rowSpan = "1";
+
+	td.innerHTML = '<input type="image" src="/themes/' + theme + '/images/icons/icon_x.gif" onclick="removeRow(this); return false;" value="Delete">';
+	tr.appendChild(td);
+	tbody.appendChild(tr);
+	totalrows++;
+    });
+})();
+
+function removeRow(el) {
+    var cel;
+    while (el && el.nodeName.toLowerCase() != "tr")
+	    el = el.parentNode;
+
+    if (el && el.parentNode) {
+	cel = el.getElementsByTagName("td").item(0);
+	el.parentNode.removeChild(el);
+    }
+}
+
+function find_unique_field_name(field_name) {
+	// loop through field_name and strip off -NUMBER
+	var last_found_dash = 0;
+	for (var i = 0; i < field_name.length; i++) {
+		// is this a dash, if so, update
+		//    last_found_dash
+		if (field_name.substr(i,1) == "-" )
+			last_found_dash = i;
+	}
+	if (last_found_dash < 1)
+		return field_name;
+	return(field_name.substr(0,last_found_dash));
+}
diff --git a/usr/local/www/javascript/row_helper_dynamic.js b/usr/local/www/javascript/row_helper_dynamic.js
new file mode 100755
index 0000000000..47c51407b6
--- /dev/null
+++ b/usr/local/www/javascript/row_helper_dynamic.js
@@ -0,0 +1,72 @@
+// Global Variables
+var rowname = new Array(99);
+var rowtype = new Array(99);
+var newrow  = new Array(99);
+var rowsize  = new Array(99);
+
+for (i = 0; i < 99; i++) {
+	rowname[i] = '';
+	rowtype[i] = '';
+	 newrow[i] = '';
+	 rowsize[i] = '25';
+}
+
+var field_counter_js = 0;
+var loaded = 0;
+var is_streaming_progress_bar = 0;
+var temp_streaming_text = "";
+
+var addRowTo = (function() {
+    return (function (tableId) {
+	var d, tbody, tr, td, bgc, i, ii, j;
+	d = document;
+	tbody = d.getElementById(tableId).getElementsByTagName("tbody").item(0);
+	tr = d.createElement("tr");
+	totalrows++;
+	for (i = 0; i < field_counter_js; i++) {
+		td = d.createElement("td");
+		if(rowtype[i] == 'textbox') {
+			td.innerHTML="<INPUT type='hidden' value='" + totalrows +"' name='" + rowname[i] + "_row-" + totalrows + "'></input><input size='" + rowsize[i] + "' name='" + rowname[i] + totalrows + "' id='" + rowname[i] + totalrows + "'></input> ";
+		} else if(rowtype[i] == 'select') {
+			td.innerHTML="<INPUT type='hidden' value='" + totalrows +"' name='" + rowname[i] + "_row-" + totalrows + "'></input><select name='" + rowname[i] + totalrows + "' id='" + rowname[i] + totalrows + "'>" + newrow[i] + "</select> ";
+		} else if(rowtype[i] == 'checkbox') {
+			td.innerHTML="<INPUT type='hidden' value='" + totalrows +"' name='" + rowname[i] + "_row-" + totalrows + "'></input><input type='checkbox'name='" + rowname[i] + totalrows + "' id='" + rowname[i] + totalrows + "'></input> ";
+		} else if(rowtype[i] == 'input') {
+			td.innerHTML="<INPUT type='hidden' value='" + totalrows +"' name='" + rowname[i] + "_row-" + totalrows + "'></input><input class='formfld unknown' size='" + rowsize[i] + "' name='" + rowname[i] + totalrows + "' id='" + rowname[i] + totalrows + "'></input> ";
+		} else if(rowtype[i] == 'password') {
+			td.innerHTML="<INPUT type='hidden' value='" + totalrows +"' name='" + rowname[i] + "_row-" + totalrows + "'></input><input class='formfld pwd' type='password' name='" + rowname[i] + totalrows + "' id='" + rowname[i] + totalrows + "'></input> ";
+		}
+		tr.appendChild(td);
+	}
+	td = d.createElement("td");
+	td.rowSpan = "1";
+	td.innerHTML = '<input type="image" src="/themes/' + theme + '/images/icons/icon_x.gif" onclick="removeRow(this); return false;" value="Delete">';
+	tr.appendChild(td);
+	tbody.appendChild(tr);
+    });
+})();
+
+function removeRow(el) {
+    var cel;
+    while (el && el.nodeName.toLowerCase() != "tr")
+	    el = el.parentNode;
+
+    if (el && el.parentNode) {
+	cel = el.getElementsByTagName("td").item(0);
+	el.parentNode.removeChild(el);
+    }
+}
+
+function find_unique_field_name(field_name) {
+	// loop through field_name and strip off -NUMBER
+	var last_found_dash = 0;
+	for (var i = 0; i < field_name.length; i++) {
+		// is this a dash, if so, update
+		//    last_found_dash
+		if (field_name.substr(i,1) == "-" )
+			last_found_dash = i;
+	}
+	if (last_found_dash < 1)
+		return field_name;
+	return(field_name.substr(0,last_found_dash));
+}
diff --git a/usr/local/www/javascript/row_toggle.js b/usr/local/www/javascript/row_toggle.js
new file mode 100755
index 0000000000..6a1f5f8607
--- /dev/null
+++ b/usr/local/www/javascript/row_toggle.js
@@ -0,0 +1,55 @@
+function fr_toggle(id) {
+	var checkbox = document.getElementById('frc' + id);
+	checkbox.checked = !checkbox.checked;
+	fr_bgcolor(id);
+}
+function fr_bgcolor(id) {
+	var row = document.getElementById('fr' + id);
+	var checkbox = document.getElementById('frc' + id);
+	var cells = row.getElementsByTagName('td');
+	var cellcnt = cells.length;
+
+	for (i = 0; i < cellcnt; i++) {
+		// Check for cells with frd id only
+		if (cells[i].id == "frd" + id)
+			cells[i].style.backgroundColor = checkbox.checked ? "#FFFFBB" : "#FFFFFF";
+	}
+	//cells[7].style.backgroundColor = checkbox.checked ? "#FFFFBB" : "#990000";
+}
+function fr_insline(id, on) {
+	var row = document.getElementById('fr' + id);
+  var prevrow;
+	if (id != 0) {
+		prevrow = document.getElementById('fr' + (id-1));
+	} else {
+		prevrow = document.getElementById('frheader');
+	}
+
+	var cells = row.getElementsByTagName("td"); 
+	var prevcells = prevrow.getElementsByTagName("td");
+	
+	for (i = 0; i <= prevcells.length - 1; i++) {
+		if (prevcells[i].id == 'frd' + (id-1)) {
+			if (on) {
+				prevcells[i].style.borderBottom = "3px solid #990000";
+				prevcells[i].style.paddingBottom = ((id != 0) ? 2 : 3) + "px";
+			} else {
+				prevcells[i].style.borderBottom = "1px solid #999999";
+				prevcells[i].style.borderBottomWidth = "1px";
+				prevcells[i].style.paddingBottom = ((id != 0) ? 4 : 5) + "px";
+			}
+		}
+	}
+
+	for (i = 0; i <= cells.length - 1; i++) {
+		if (cells[i].id == 'frd' + (id)) {
+			if (on) {
+				cells[i].style.borderTop = "2px solid #990000";
+				cells[i].style.paddingTop = "2px";
+			} else {
+				cells[i].style.borderTopWidth = 0;
+				cells[i].style.paddingTop = "4px";
+			}
+		}
+	}
+}
diff --git a/usr/local/www/javascript/ticker.js b/usr/local/www/javascript/ticker.js
new file mode 100755
index 0000000000..77d3c635e0
--- /dev/null
+++ b/usr/local/www/javascript/ticker.js
@@ -0,0 +1,50 @@
+<!--
+
+var width="310px";
+
+var speed=2;
+var pauseit=1;
+
+var divonclick=speed=(document.all)? speed : Math.max(1, speed-1);
+var copyspeed=speed;
+var pausespeed=(pauseit==0)? copyspeed: 0;
+var iedom=document.all||document.getElementById;
+
+if (iedom)
+	document.write('<span id="marquee-container">'+content+'</span>');
+
+var actualwidth='';
+var scroller;
+
+if (window.addEventListener)
+	window.addEventListener("load", populatescroller, false);
+else if (window.attachEvent)
+	window.attachEvent("onload", populatescroller);
+else if (document.all || document.getElementById)
+	window.onload=populatescroller;
+
+function populatescroller(){
+	scroller=document.getElementById? document.getElementById("scroller") : document.all.scroller;
+	scroller.style.left=parseInt(width)+8+"px";
+	scroller.innerHTML=content;
+	document.getElementById("marquee-text");
+	actualwidth=document.all? document.getElementById("marquee-text").offsetWidth : document.getElementById("marquee-text").offsetWidth;
+	lefttime=setInterval("scrollmarquee()",20);
+}
+
+function scrollmarquee(){
+	if (parseInt(scroller.style.left)>(actualwidth*(-1)+8))
+		scroller.style.left=parseInt(scroller.style.left)-copyspeed+"px";
+	else
+		scroller.style.left=parseInt(width)+8+"px";
+}
+
+if (iedom){
+	document.write('<table id="marquee"><td>');
+	document.write('<div id="container" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=speed">');
+	document.write('<div id="scroller"></div>');
+	document.write('</div>');
+	document.write('</td></table>');
+}
+
+//-->
\ No newline at end of file
diff --git a/usr/local/www/load_balancer_pool_edit.php b/usr/local/www/load_balancer_pool_edit.php
index 058abe401f..4bf71f8dc5 100755
--- a/usr/local/www/load_balancer_pool_edit.php
+++ b/usr/local/www/load_balancer_pool_edit.php
@@ -141,8 +141,6 @@ include("head.inc");
 ?>
 
 <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-<script type="text/javascript" language="javascript" src="pool.js"></script>
-
 <script language="javascript">
 function clearcombo(){
   for (var i=document.iform.serversSelect.options.length-1; i>=0; i--){
diff --git a/usr/local/www/load_balancer_relay_protocol_edit.js b/usr/local/www/load_balancer_relay_protocol_edit.js
deleted file mode 100644
index fcf67ce4ce..0000000000
--- a/usr/local/www/load_balancer_relay_protocol_edit.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-        pool.js
-        part of pfSense (http://www.pfsense.com/)
-
-        Copyright (C) 2005-2008 Bill Marquette <bill.marquette@gmail.com>.
-        All rights reserved.
-
-        Redistribution and use in source and binary forms, with or without
-        modification, are permitted provided that the following conditions are met:
-
-        1. Redistributions of source code must retain the above copyright notice,
-           this list of conditions and the following disclaimer.
-
-        2. Redistributions in binary form must reproduce the above copyright
-           notice, this list of conditions and the following disclaimer in the
-           documentation and/or other materials provided with the distribution.
-
-        THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-        INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
-        AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-        AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
-        OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-        SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-        INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-        CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-        ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-        POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*
- * This code makes use of prototype shortcuts and will not work
- * without prototype being loaded prior to it.
- */
-
-function copyOption(theSrc, theDst)
-{
-  var selOption = theSrc[theSrc.selectedIndex];
-	theDst.options[theDst.length] = new Option(selOption.text, selOption.value);
-}
-
-function deleteOption(theSel)
-{ 
-  var theIndex = theSel.selectedIndex;
-	var selLength = theSel.length;
-	if(selLength>0)
-	{
-		theSel.options[theIndex] = null;
-	}
-}
-
-function AllOptions(el, selectAll) {
-   el.select('option').each(function(opt) {
-      opt.selected = selectAll;
-   });
-}
-
diff --git a/usr/local/www/load_balancer_relay_protocol_edit.php b/usr/local/www/load_balancer_relay_protocol_edit.php
index dd5d456ade..dcdb9b92c3 100755
--- a/usr/local/www/load_balancer_relay_protocol_edit.php
+++ b/usr/local/www/load_balancer_relay_protocol_edit.php
@@ -134,10 +134,6 @@ include("head.inc");
 $types = array("http" => "HTTP", "tcp" => "TCP", "dns" => "DNS");
 ?>
 <body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-<script type="text/javascript" language="javascript" src="load_balancer_relay_protocol_edit.js"></script>
-
-
-
 <script language="javascript">
 function updateType(t){
 	switch(t) {
diff --git a/usr/local/www/niftyjsCode.js b/usr/local/www/niftyjsCode.js
deleted file mode 100755
index 8093a4824a..0000000000
--- a/usr/local/www/niftyjsCode.js
+++ /dev/null
@@ -1,174 +0,0 @@
-function NiftyCheck(){
-if(!document.getElementById || !document.createElement)
-    return(false);
-isXHTML=/html\:/.test(document.getElementsByTagName('body')[0].nodeName);
-if(Array.prototype.push==null){Array.prototype.push=function(){
-      this[this.length]=arguments[0]; return(this.length);}}
-return(true);
-}
-
-function Rounded(selector,wich,bk,color,opt){
-var i,prefixt,prefixb,cn="r",ecolor="",edges=false,eclass="",b=false,t=false;
-
-if(color=="transparent"){
-    cn=cn+"x";
-    ecolor=bk;
-    bk="transparent";
-    }
-else if(opt && opt.indexOf("border")>=0){
-    var optar=opt.split(" ");
-    for(i=0;i<optar.length;i++)
-        if(optar[i].indexOf("#")>=0) ecolor=optar[i];
-    if(ecolor=="") ecolor="#666";
-    cn+="e";
-    edges=true;
-    }
-else if(opt && opt.indexOf("smooth")>=0){
-    cn+="a";
-    ecolor=Mix(bk,color);
-    }
-if(opt && opt.indexOf("small")>=0) cn+="s";
-prefixt=cn;
-prefixb=cn;
-if(wich.indexOf("all")>=0){t=true;b=true}
-else if(wich.indexOf("top")>=0) t="true";
-else if(wich.indexOf("tl")>=0){
-    t="true";
-    if(wich.indexOf("tr")<0) prefixt+="l";
-    }
-else if(wich.indexOf("tr")>=0){
-    t="true";
-    prefixt+="r";
-    }
-if(wich.indexOf("bottom")>=0) b=true;
-else if(wich.indexOf("bl")>=0){
-    b="true";
-    if(wich.indexOf("br")<0) prefixb+="l";
-    }
-else if(wich.indexOf("br")>=0){
-    b="true";
-    prefixb+="r";
-    }
-var v=getElementsBySelector(selector);
-var l=v.length;
-for(i=0;i<l;i++){
-    if(edges) AddBorder(v[i],ecolor);
-    if(t) AddTop(v[i],bk,color,ecolor,prefixt);
-    if(b) AddBottom(v[i],bk,color,ecolor,prefixb);
-    }
-}
-
-function AddBorder(el,bc){
-var i;
-if(!el.passed){
-    if(el.childNodes.length==1 && el.childNodes[0].nodeType==3){
-        var t=el.firstChild.nodeValue;
-        el.removeChild(el.lastChild);
-        var d=CreateEl("span");
-        d.style.display="block";
-        d.appendChild(document.createTextNode(t));
-        el.appendChild(d);
-        }
-    for(i=0;i<el.childNodes.length;i++){
-        if(el.childNodes[i].nodeType==1){
-            el.childNodes[i].style.borderLeft="1px solid "+bc;
-            el.childNodes[i].style.borderRight="1px solid "+bc;
-            }
-        }
-    }
-el.passed=true;
-}
-    
-function AddTop(el,bk,color,bc,cn){
-var i,lim=4,d=CreateEl("b");
-
-if(cn.indexOf("s")>=0) lim=2;
-if(bc) d.className="artop";
-else d.className="rtop";
-d.style.backgroundColor=bk;
-for(i=1;i<=lim;i++){
-    var x=CreateEl("b");
-    x.className=cn + i;
-    x.style.backgroundColor=color;
-    if(bc) x.style.borderColor=bc;
-    d.appendChild(x);
-    }
-el.style.paddingTop=0;
-el.insertBefore(d,el.firstChild);
-}
-
-function AddBottom(el,bk,color,bc,cn){
-var i,lim=4,d=CreateEl("b");
-
-if(cn.indexOf("s")>=0) lim=2;
-if(bc) d.className="artop";
-else d.className="rtop";
-d.style.backgroundColor=bk;
-for(i=lim;i>0;i--){
-    var x=CreateEl("b");
-    x.className=cn + i;
-    x.style.backgroundColor=color;
-    if(bc) x.style.borderColor=bc;
-    d.appendChild(x);
-    }
-el.style.paddingBottom=0;
-el.appendChild(d);
-}
-
-function CreateEl(x){
-if(isXHTML) return(document.createElementNS('http://www.w3.org/1999/xhtml',x));
-else return(document.createElement(x));
-}
-
-function getElementsBySelector(selector){
-var i,selid="",selclass="",tag=selector,f,s=[],objlist=[];
-
-if(selector.indexOf(" ")>0){  //descendant selector like "tag#id tag"
-    s=selector.split(" ");
-    var fs=s[0].split("#");
-    if(fs.length==1) return(objlist);
-    f=document.getElementById(fs[1]);
-    if(f) return(f.getElementsByTagName(s[1]));
-    return(objlist);
-    }
-if(selector.indexOf("#")>0){ //id selector like "tag#id"
-    s=selector.split("#");
-    tag=s[0];
-    selid=s[1];
-    }
-if(selid!=""){
-    f=document.getElementById(selid);
-    if(f) objlist.push(f);
-    return(objlist);
-    }
-if(selector.indexOf(".")>0){  //class selector like "tag.class"
-    s=selector.split(".");
-    tag=s[0];
-    selclass=s[1];
-    }
-var v=document.getElementsByTagName(tag);  // tag selector like "tag"
-if(selclass=="")
-    return(v);
-for(i=0;i<v.length;i++){
-    if(v[i].className.indexOf(selclass)>=0){
-        objlist.push(v[i]);
-        }
-    }
-return(objlist);
-}
-
-function Mix(c1,c2){
-var i,step1,step2,x,y,r=new Array(3);
-if(c1.length==4)step1=1;
-else step1=2;
-if(c2.length==4) step2=1;
-else step2=2;
-for(i=0;i<3;i++){
-    x=parseInt(c1.substr(1+step1*i,step1),16);
-    if(step1==1) x=16*x+x;
-    y=parseInt(c2.substr(1+step2*i,step2),16);
-    if(step2==1) y=16*y+y;
-    r[i]=Math.floor((x*50+y*50)/100);
-    }
-return("#"+r[0].toString(16)+r[1].toString(16)+r[2].toString(16));
-}
\ No newline at end of file
diff --git a/usr/local/www/pkg_edit.php b/usr/local/www/pkg_edit.php
index 5cd0e964e0..80051205f8 100755
--- a/usr/local/www/pkg_edit.php
+++ b/usr/local/www/pkg_edit.php
@@ -284,7 +284,7 @@ foreach ($pkg['fields']['field'] as $field) {
 //-->
 </script>
 <?php } ?>
-<script type="text/javascript" language="javascript" src="row_helper_dynamic.js">
+<script type="text/javascript" language="javascript" src="/javascript/row_helper_dynamic.js">
 </script>
 
 <?php include("fbegin.inc"); ?>
diff --git a/usr/local/www/pool.js b/usr/local/www/pool.js
deleted file mode 100755
index ab6303da2b..0000000000
--- a/usr/local/www/pool.js
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
-        pool.js
-        part of pfSense (http://www.pfsense.com/)
-
-        Copyright (C) 2005-2008 Bill Marquette <bill.marquette@gmail.com>.
-        All rights reserved.
-
-        Redistribution and use in source and binary forms, with or without
-        modification, are permitted provided that the following conditions are met:
-
-        1. Redistributions of source code must retain the above copyright notice,
-           this list of conditions and the following disclaimer.
-
-        2. Redistributions in binary form must reproduce the above copyright
-           notice, this list of conditions and the following disclaimer in the
-           documentation and/or other materials provided with the distribution.
-
-        THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-        INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
-        AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-        AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
-        OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-        SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-        INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-        CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-        ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-        POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/* Add server to virtual server pool
- * operates on whatever form is passed to it
- */
-function AddServerToPool(form) {
-	var ServerPort = form.ipaddr.value;
-	form['servers[]'].options[form['servers[]'].options.length] = new Option(ServerPort,ServerPort);
-}
-
-
-function AllServers(id, selectAll) {
-   var opts = document.getElementById(id).getElementsByTagName('option');
-   for (i = 0; i < opts.length; i++)
-   {
-       opts[i].selected = selectAll;
-   }
-}
-
-
-function RemoveServerFromPool(form, field)
-{
-	var theSel = form[field];
-	var selIndex = theSel.selectedIndex;
-	if (selIndex != -1) {
-		for(i=theSel.length-1; i>=0; i--)
-		{
-			if(theSel.options[i].selected)
-			{
-				theSel.options[i] = null;
-			}
-		}
-		if (theSel.length > 0) {
-			theSel.selectedIndex = selIndex == 0 ? 0 : selIndex - 1;
-		}
-	}
-}
-
-function addOption(theSel, theText, theValue)
-{
-	var newOpt = new Option(theText, theValue);
-	var selLength = theSel.length;
-	theSel.options[selLength] = newOpt;
-}
-
-function deleteOption(theSel, theIndex)
-{ 
-	var selLength = theSel.length;
-	if(selLength>0)
-	{
-		theSel.options[theIndex] = null;
-	}
-}
-
-function moveOptions(theSelFrom, theSelTo)
-{
-	var selLength = theSelFrom.length;
-	var selectedText = new Array();
-	var selectedValues = new Array();
-	var selectedCount = 0;
-
-	var i;
-
-	// Find the selected Options in reverse order
-	// and delete them from the 'from' Select.
-	for(i=selLength-1; i>=0; i--)
-	{
-		if(theSelFrom.options[i].selected)
-		{
-			selectedText[selectedCount] = theSelFrom.options[i].text;
-			selectedValues[selectedCount] = theSelFrom.options[i].value;
-			deleteOption(theSelFrom, i);
-			selectedCount++;
-		}
-	}
-
-	// Add the selected text/values in reverse order.
-	// This will add the Options to the 'to' Select
-	// in the same order as they were in the 'from' Select.
-	for(i=selectedCount-1; i>=0; i--)
-	{
-		addOption(theSelTo, selectedText[i], selectedValues[i]);
-	}
-}
-
-// functions up() and down() modified from http://www.babailiica.com/js/sorter/
-
-function up(obj) {
-	var sel = new Array();
-	for (var i=0; i<obj.length; i++) {
-		if (obj[i].selected == true) {
-			sel[sel.length] = i;
-		}
-	}
-	for (i in sel) {
-		if (sel[i] != 0 && !obj[sel[i]-1].selected) {
-			var tmp = new Array(obj[sel[i]-1].text, obj[sel[i]-1].value);
-			obj[sel[i]-1].text = obj[sel[i]].text;
-			obj[sel[i]-1].value = obj[sel[i]].value;
-			obj[sel[i]].text = tmp[0];
-			obj[sel[i]].value = tmp[1];
-			obj[sel[i]-1].selected = true;
-			obj[sel[i]].selected = false;
-		}
-	}
-}
-
-function down(obj) {
-	var sel = new Array();
-	for (var i=obj.length-1; i>-1; i--) {
-		if (obj[i].selected == true) {
-			sel[sel.length] = i;
-		}
-	}
-	for (i in sel) {
-		if (sel[i] != obj.length-1 && !obj[sel[i]+1].selected) {
-			var tmp = new Array(obj[sel[i]+1].text, obj[sel[i]+1].value);
-			obj[sel[i]+1].text = obj[sel[i]].text;
-			obj[sel[i]+1].value = obj[sel[i]].value;
-			obj[sel[i]].text = tmp[0];
-			obj[sel[i]].value = tmp[1];
-			obj[sel[i]+1].selected = true;
-			obj[sel[i]].selected = false;
-		}
-	}
-}
diff --git a/usr/local/www/row_helper.js b/usr/local/www/row_helper.js
deleted file mode 100755
index 15d23f1d15..0000000000
--- a/usr/local/www/row_helper.js
+++ /dev/null
@@ -1,69 +0,0 @@
-// Global Variables
-var rowname = new Array(4999);
-var rowtype = new Array(4999);
-var newrow  = new Array(4999);
-var rowsize = new Array(4999);
-
-for (i = 0; i < 4999; i++) {
-	rowname[i] = '';
-	rowtype[i] = '';
-	newrow[i] = '';
-	rowsize[i] = '30';
-}
-
-var field_counter_js = 0;
-var loaded = 0;
-var is_streaming_progress_bar = 0;
-var temp_streaming_text = "";
-
-var addRowTo = (function() {
-    return (function (tableId) {
-	var d, tbody, tr, td, bgc, i, ii, j;
-	d = document;
-	tbody = d.getElementById(tableId).getElementsByTagName("tbody").item(0);
-	tr = d.createElement("tr");
-	for (i = 0; i < field_counter_js; i++) {
-		td = d.createElement("td");
-		if(rowtype[i] == 'textbox') {
-			td.innerHTML="<INPUT type='hidden' value='" + totalrows +"' name='" + rowname[i] + "_row-" + totalrows + "'></input><input size='" + rowsize[i] + "' class='formfld unknown' name='" + rowname[i] + totalrows + "'></input> ";
-		} else if(rowtype[i] == 'select') {
-			td.innerHTML="<INPUT type='hidden' value='" + totalrows +"' name='" + rowname[i] + "_row-" + totalrows + "'></input><select size='1' name='" + rowname[i] + totalrows + "'><option value=\"32\" selected>32</option><option value=\"31\" >31</option><option value=\"30\" >30</option><option value=\"29\" >29</option><option value=\"28\" >28</option><option value=\"27\" >27</option><option value=\"26\" >26</option><option value=\"25\" >25</option><option value=\"24\" >24</option><option value=\"23\" >23</option><option value=\"22\" >22</option><option value=\"21\" >21</option><option value=\"20\" >20</option><option value=\"19\" >19</option><option value=\"18\" >18</option><option value=\"17\" >17</option><option value=\"16\" >16</option><option value=\"15\" >15</option><option value=\"14\" >14</option><option value=\"13\" >13</option><option value=\"12\" >12</option><option value=\"11\" >11</option><option value=\"10\" >10</option><option value=\"9\" >9</option><option value=\"8\" >8</option><option value=\"7\" >7</option><option value=\"6\" >6</option><option value=\"5\" >5</option><option value=\"4\" >4</option><option value=\"3\" >3</option><option value=\"2\" >2</option><option value=\"1\" >1</option></select> ";
-		} else {
-			td.innerHTML="<INPUT type='hidden' value='" + totalrows +"' name='" + rowname[i] + "_row-" + totalrows + "'></input><input type='checkbox' name='" + rowname[i] + totalrows + "'></input> ";
-		}
-		tr.appendChild(td);
-	}
-	td = d.createElement("td");
-	td.rowSpan = "1";
-
-	td.innerHTML = '<input type="image" src="/themes/' + theme + '/images/icons/icon_x.gif" onclick="removeRow(this); return false;" value="Delete">';
-	tr.appendChild(td);
-	tbody.appendChild(tr);
-	totalrows++;
-    });
-})();
-
-function removeRow(el) {
-    var cel;
-    while (el && el.nodeName.toLowerCase() != "tr")
-	    el = el.parentNode;
-
-    if (el && el.parentNode) {
-	cel = el.getElementsByTagName("td").item(0);
-	el.parentNode.removeChild(el);
-    }
-}
-
-function find_unique_field_name(field_name) {
-	// loop through field_name and strip off -NUMBER
-	var last_found_dash = 0;
-	for (var i = 0; i < field_name.length; i++) {
-		// is this a dash, if so, update
-		//    last_found_dash
-		if (field_name.substr(i,1) == "-" )
-			last_found_dash = i;
-	}
-	if (last_found_dash < 1)
-		return field_name;
-	return(field_name.substr(0,last_found_dash));
-}
diff --git a/usr/local/www/row_helper_dynamic.js b/usr/local/www/row_helper_dynamic.js
deleted file mode 100755
index 47c51407b6..0000000000
--- a/usr/local/www/row_helper_dynamic.js
+++ /dev/null
@@ -1,72 +0,0 @@
-// Global Variables
-var rowname = new Array(99);
-var rowtype = new Array(99);
-var newrow  = new Array(99);
-var rowsize  = new Array(99);
-
-for (i = 0; i < 99; i++) {
-	rowname[i] = '';
-	rowtype[i] = '';
-	 newrow[i] = '';
-	 rowsize[i] = '25';
-}
-
-var field_counter_js = 0;
-var loaded = 0;
-var is_streaming_progress_bar = 0;
-var temp_streaming_text = "";
-
-var addRowTo = (function() {
-    return (function (tableId) {
-	var d, tbody, tr, td, bgc, i, ii, j;
-	d = document;
-	tbody = d.getElementById(tableId).getElementsByTagName("tbody").item(0);
-	tr = d.createElement("tr");
-	totalrows++;
-	for (i = 0; i < field_counter_js; i++) {
-		td = d.createElement("td");
-		if(rowtype[i] == 'textbox') {
-			td.innerHTML="<INPUT type='hidden' value='" + totalrows +"' name='" + rowname[i] + "_row-" + totalrows + "'></input><input size='" + rowsize[i] + "' name='" + rowname[i] + totalrows + "' id='" + rowname[i] + totalrows + "'></input> ";
-		} else if(rowtype[i] == 'select') {
-			td.innerHTML="<INPUT type='hidden' value='" + totalrows +"' name='" + rowname[i] + "_row-" + totalrows + "'></input><select name='" + rowname[i] + totalrows + "' id='" + rowname[i] + totalrows + "'>" + newrow[i] + "</select> ";
-		} else if(rowtype[i] == 'checkbox') {
-			td.innerHTML="<INPUT type='hidden' value='" + totalrows +"' name='" + rowname[i] + "_row-" + totalrows + "'></input><input type='checkbox'name='" + rowname[i] + totalrows + "' id='" + rowname[i] + totalrows + "'></input> ";
-		} else if(rowtype[i] == 'input') {
-			td.innerHTML="<INPUT type='hidden' value='" + totalrows +"' name='" + rowname[i] + "_row-" + totalrows + "'></input><input class='formfld unknown' size='" + rowsize[i] + "' name='" + rowname[i] + totalrows + "' id='" + rowname[i] + totalrows + "'></input> ";
-		} else if(rowtype[i] == 'password') {
-			td.innerHTML="<INPUT type='hidden' value='" + totalrows +"' name='" + rowname[i] + "_row-" + totalrows + "'></input><input class='formfld pwd' type='password' name='" + rowname[i] + totalrows + "' id='" + rowname[i] + totalrows + "'></input> ";
-		}
-		tr.appendChild(td);
-	}
-	td = d.createElement("td");
-	td.rowSpan = "1";
-	td.innerHTML = '<input type="image" src="/themes/' + theme + '/images/icons/icon_x.gif" onclick="removeRow(this); return false;" value="Delete">';
-	tr.appendChild(td);
-	tbody.appendChild(tr);
-    });
-})();
-
-function removeRow(el) {
-    var cel;
-    while (el && el.nodeName.toLowerCase() != "tr")
-	    el = el.parentNode;
-
-    if (el && el.parentNode) {
-	cel = el.getElementsByTagName("td").item(0);
-	el.parentNode.removeChild(el);
-    }
-}
-
-function find_unique_field_name(field_name) {
-	// loop through field_name and strip off -NUMBER
-	var last_found_dash = 0;
-	for (var i = 0; i < field_name.length; i++) {
-		// is this a dash, if so, update
-		//    last_found_dash
-		if (field_name.substr(i,1) == "-" )
-			last_found_dash = i;
-	}
-	if (last_found_dash < 1)
-		return field_name;
-	return(field_name.substr(0,last_found_dash));
-}
diff --git a/usr/local/www/row_toggle.js b/usr/local/www/row_toggle.js
deleted file mode 100755
index 6a1f5f8607..0000000000
--- a/usr/local/www/row_toggle.js
+++ /dev/null
@@ -1,55 +0,0 @@
-function fr_toggle(id) {
-	var checkbox = document.getElementById('frc' + id);
-	checkbox.checked = !checkbox.checked;
-	fr_bgcolor(id);
-}
-function fr_bgcolor(id) {
-	var row = document.getElementById('fr' + id);
-	var checkbox = document.getElementById('frc' + id);
-	var cells = row.getElementsByTagName('td');
-	var cellcnt = cells.length;
-
-	for (i = 0; i < cellcnt; i++) {
-		// Check for cells with frd id only
-		if (cells[i].id == "frd" + id)
-			cells[i].style.backgroundColor = checkbox.checked ? "#FFFFBB" : "#FFFFFF";
-	}
-	//cells[7].style.backgroundColor = checkbox.checked ? "#FFFFBB" : "#990000";
-}
-function fr_insline(id, on) {
-	var row = document.getElementById('fr' + id);
-  var prevrow;
-	if (id != 0) {
-		prevrow = document.getElementById('fr' + (id-1));
-	} else {
-		prevrow = document.getElementById('frheader');
-	}
-
-	var cells = row.getElementsByTagName("td"); 
-	var prevcells = prevrow.getElementsByTagName("td");
-	
-	for (i = 0; i <= prevcells.length - 1; i++) {
-		if (prevcells[i].id == 'frd' + (id-1)) {
-			if (on) {
-				prevcells[i].style.borderBottom = "3px solid #990000";
-				prevcells[i].style.paddingBottom = ((id != 0) ? 2 : 3) + "px";
-			} else {
-				prevcells[i].style.borderBottom = "1px solid #999999";
-				prevcells[i].style.borderBottomWidth = "1px";
-				prevcells[i].style.paddingBottom = ((id != 0) ? 4 : 5) + "px";
-			}
-		}
-	}
-
-	for (i = 0; i <= cells.length - 1; i++) {
-		if (cells[i].id == 'frd' + (id)) {
-			if (on) {
-				cells[i].style.borderTop = "2px solid #990000";
-				cells[i].style.paddingTop = "2px";
-			} else {
-				cells[i].style.borderTopWidth = 0;
-				cells[i].style.paddingTop = "4px";
-			}
-		}
-	}
-}
diff --git a/usr/local/www/services_igmpproxy_edit.php b/usr/local/www/services_igmpproxy_edit.php
index be776ced03..065dca4055 100755
--- a/usr/local/www/services_igmpproxy_edit.php
+++ b/usr/local/www/services_igmpproxy_edit.php
@@ -122,7 +122,7 @@ include("head.inc");
 	include("fbegin.inc");
 ?>
 
-<script type="text/javascript" src="row_helper.js">
+<script type="text/javascript" src="/javascript/row_helper.js">
 </script>
 
 <input type='hidden' name='address_type' value='textbox' class="formfld unknown" />
diff --git a/usr/local/www/ticker.js b/usr/local/www/ticker.js
deleted file mode 100755
index 77d3c635e0..0000000000
--- a/usr/local/www/ticker.js
+++ /dev/null
@@ -1,50 +0,0 @@
-<!--
-
-var width="310px";
-
-var speed=2;
-var pauseit=1;
-
-var divonclick=speed=(document.all)? speed : Math.max(1, speed-1);
-var copyspeed=speed;
-var pausespeed=(pauseit==0)? copyspeed: 0;
-var iedom=document.all||document.getElementById;
-
-if (iedom)
-	document.write('<span id="marquee-container">'+content+'</span>');
-
-var actualwidth='';
-var scroller;
-
-if (window.addEventListener)
-	window.addEventListener("load", populatescroller, false);
-else if (window.attachEvent)
-	window.attachEvent("onload", populatescroller);
-else if (document.all || document.getElementById)
-	window.onload=populatescroller;
-
-function populatescroller(){
-	scroller=document.getElementById? document.getElementById("scroller") : document.all.scroller;
-	scroller.style.left=parseInt(width)+8+"px";
-	scroller.innerHTML=content;
-	document.getElementById("marquee-text");
-	actualwidth=document.all? document.getElementById("marquee-text").offsetWidth : document.getElementById("marquee-text").offsetWidth;
-	lefttime=setInterval("scrollmarquee()",20);
-}
-
-function scrollmarquee(){
-	if (parseInt(scroller.style.left)>(actualwidth*(-1)+8))
-		scroller.style.left=parseInt(scroller.style.left)-copyspeed+"px";
-	else
-		scroller.style.left=parseInt(width)+8+"px";
-}
-
-if (iedom){
-	document.write('<table id="marquee"><td>');
-	document.write('<div id="container" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=speed">');
-	document.write('<div id="scroller"></div>');
-	document.write('</div>');
-	document.write('</td></table>');
-}
-
-//-->
\ No newline at end of file
