/* ================================================================ 
This copyright notice must be untouched at all times.

The original version of this script and the associated (x)html
is available at http://www.stunicholls.com/left_nav/more_and_more.html
Copyright (c) 2005-2007 Stu Nicholls. All rights reserved.
This script and the associated (x)html may be modified in any 
way to fit your requirements.
=================================================================== */


onload = function() {
	var e, i = 0;
	while (e = document.getElementById('left_nav').getElementsByTagName ('B') [i++]) {
		if (e.className == 'switch') {
		e.onclick = function () {
			var getEls = document.getElementById('left_nav').getElementsByTagName('DIV');
				for (var z=0; z<getEls.length; z++) {
				if (getEls[z].className == 'hide') {
				w=getEls[z].previousSibling;
				while (w.nodeType!=1) {
					w=w.previousSibling;
					}
				w.className=w.className.replace('switch over', 'switch');
				}
				if (getEls[z].className == 'show') {
				getEls[z].className=getEls[z].className.replace('show', 'hide');
				w=getEls[z].previousSibling;
				while (w.nodeType!=1) {
					w=w.previousSibling;
					}
				w.className=w.className.replace('switch off', 'switch over');
				}
			}
			this.className = this.className == 'switch' ? 'switch off' : 'switch';
			x=this.nextSibling;
			while (x.nodeType!=1) {
				x=x.nextSibling;
				}
			x.className = this.className == 'switch off' ? 'show' : 'hide';
			}
		}
	}
}

function vcode()
    {window.open("vcode.cfm","Menu",'resizable=1,width=500,height=300,scroll=0')}


var quoteContainer = null,
    lastLink = null,
    lastStop = null,
	testStops = [],
	scrollIndex = 0,
	scrollMax = 13;


/*
window.onload = function() {



    quoteContainer = $('quotearea');



    quoteContainer.links = $ES('li','reason-menu');

    lastLink = $(quoteContainer.links[0]);



    quoteContainer.content = $ES('div','quotearea');

    lastStop = $(quoteContainer.content[0]);



    lastStop.className = 'show';



    for (var i = 0; i < 5; i++) {

        var quotearea = $(quoteContainer.content[i]);

        quotearea.outfx = quotearea.effects({duration: 1000, transition:

Fx.Transitions.Expo.easeOut});

        quotearea.infx = quotearea.effects({duration: 500, transition:

Fx.Transitions.Expo.easeIn});



        if (0 < i) {

            quotearea.outfx.start({

                'opacity': 0

            });

        }



        $(quoteContainer.links[i]).addEvent('click', function() {

			if (lastLink == this) {return;}

            lastLink.className = '';

            this.className = 'current';



            var lquotearea = quoteContainer.content[lastLink.id.replace('l','')],

                nquotearea = quoteContainer.content[this.id.replace('l','')];



            lastLink = this;



            lquotearea.outfx.start({

                'opacity': 0

            }).chain(function() {

                nquotearea.className = 'show';

                lquotearea.className = '';

                // executes immediately after completion of above effect

                nquotearea.infx.start({

                    'opacity': 1

                });

            });



        });



    }

};
*/
