document.getElementsByClassName = function(cl) {
	var retnode = [];
	var myclass = new RegExp('\\b'+cl+'\\b');
	var elem = this.getElementsByTagName('*');
	for (var i = 0; i < elem.length; i++) {
		var classes = elem[i].className;
		if (myclass.test(classes)) {
			retnode.push(elem[i]);
		}
	}
	return retnode;
}; 

var process = new Object();
var statbox = new Array();
var thisdiv;

function initMover(outerdiv) {
	var string1, string2;
	
	if (document.all) {
		string1 = "document.all['";
		string2 = "']";
	} else if (document.getElementById) {
		string1 = "document.getElementById('";
		string2 = "')";
	}

	thisdiv = eval(string1 + outerdiv + string2);
	thisdiv.style.position = "relative";
	thisdiv.style.top = 0 + 'px';
	thisdiv.style.left = 0 + 'px';
	// thisdiv.style.height = calculated at the bottom of this function
	thisdiv.innerHTML = boxhtml;

	statbox = document.getElementsByClassName('statbox');
	var boxheight = statbox[0].offsetHeight;
	var boxwidth = 271; //statbox[0].offsetWidth;
	var boxmargin = 0; // was 20 -LR
	var boxspace = 6;

	var titlebox = new Array();
	titlebox = document.getElementsByClassName('titlebox');
	for (var i = 0; i < titlebox.length; i++) {
		titlebox[i].style.position = 'absolute';
		titlebox[i].style.top = 0 + 'px';
		titlebox[i].style.left = 0 + 'px';
		titlebox[i].style.height = 120 + 'px';
	}

	var movebox = new Array();
	movebox = document.getElementsByClassName('movebox');
	var boxhandle = new Array();
	boxhandle = document.getElementsByClassName('boxhandle');

	var container1 = eval(string1 + "container1" + string2);
	container1.style.position = 'absolute';
	container1.style.top = titlebox[0].offsetHeight + 'px';
	container1.style.left = 0 + 'px';
	container1.style.visibility = 'visible';
	container1.style.textAlign = 'center';
	container1.style.width = (boxwidth + (boxmargin * 2)) + 'px';
	container1.style.height = (((statbox.length / 2) * (boxheight + boxspace)) + (boxmargin * 2)) + 'px';
	var container2 = eval(string1 + "container2" + string2);
	container2.style.position = 'absolute';
	container2.style.top = titlebox[0].offsetHeight + 'px';
	container2.style.left = 0 + 'px';
	container2.style.visibility = 'hidden';
	container2.style.textAlign = 'center';
	container2.style.width = (boxwidth + (boxmargin * 2)) + 'px';
	container2.style.height = (((statbox.length / 2) * (boxheight + boxspace)) + (boxmargin * 2)) + 'px';

	process.goforward = eval(string1 + "goforward" + string2);
	process.goback = eval(string1 + "goback" + string2);
	process.goforward.onclick = goForward;
	process.goforward.parent = process;
	process.goforward.style.visibility = 'visible';
	process.goback.onclick = goBack;
	process.goback.parent = process;
	process.goback.style.visibility = 'hidden';
	process.state = 1;
	process.container1 = container1;
	process.container2 = container2;
	process.container1.moveit = moveContainer;
	process.container2.moveit = moveContainer;
	process.titlebox1 = titlebox[0];
	process.titlebox2 = titlebox[1];
	process.titlebox3 = titlebox[2];

	container = container1;
	for (var i = 0, j = 0; i < movebox.length; i++, j++) {
		if (i == (movebox.length / 2)) {
			container = container2;
			j = 0;
		}

		movebox[i].style.position = 'absolute';
		movebox[i].style.left = boxmargin + 'px';
		movebox[i].style.top = (((boxheight + boxspace) * j) + boxmargin) + 'px';
		statbox[i].style.position = 'absolute';
		statbox[i].style.left = boxmargin + 'px';
		statbox[i].style.top = (((boxheight + boxspace) * j) + boxmargin) + 'px';
		boxhandle[i].style.cursor = 'move';

		statbox[i].container = container;

		Move.init(boxhandle[i], movebox[i], container);
	}

	buttonsdiv = eval(string1 + "buttons" + string2);
	buttonsdiv.style.position = 'absolute';
	buttonsdiv.style.top = (titlebox[0].offsetHeight + container1.offsetHeight + 10) + 'px';
	buttonsdiv.style.left = 0 + 'px'; // was 17 -LR

	finaltextdiv = eval(string1 + "finaltext" + string2);
	finaltextdiv.style.position = 'absolute';
	finaltextdiv.style.top = (titlebox[0].offsetHeight + container1.offsetHeight + buttonsdiv.offsetHeight + 30) + 'px';
	process.finaltext = finaltextdiv;
	process.finaltext.style.visibility = 'hidden';

	thisdiv.style.height = (titlebox[0].offsetHeight + container1.offsetHeight + buttonsdiv.offsetHeight + finaltextdiv.offsetHeight + 30) + 'px';
}

var moveint = 30;
var movedist = 40;

function moveContainer (right) {
	var templeft = this.offsetLeft;
	if (right) {
		if (templeft > this.saveleft) {
			clearInterval(this.intervalID);
			process.finaltext.style.visibility = 'visible';
		} else {
			this.style.left = (templeft + movedist) + 'px';
		}
	} else {
		if (templeft < this.saveleft + movedist) {
			clearInterval(this.intervalID);
			this.style.left = this.saveleft + 'px';
		} else {
			this.style.left = (templeft - movedist) + 'px';
		}
	}
}

function goForward () {
	obj = this.parent;

	if (obj.state == 1) {
		obj.state = 2;
		obj.container1.style.visibility = "hidden";
		obj.container2.style.visibility = "visible";
		obj.titlebox1.style.visibility = "hidden";
		obj.titlebox2.style.visibility = "visible";
		obj.titlebox3.style.visibility = "hidden";
		obj.goforward.style.visibility = 'visible';
		obj.goback.style.visibility = 'visible';
		obj.finaltext.style.visibility = 'hidden';
	} else if (obj.state == 2) {
		obj.state = 3;
		obj.container1.style.visibility = "visible";
		obj.container2.style.visibility = "visible";
		clearInterval(obj.container2.intervalID);
		obj.container2.saveleft = obj.container2.offsetWidth + obj.container2.offsetLeft;
		obj.container2.intervalID = setInterval('process.container2.moveit(1)', moveint);
		obj.titlebox1.style.visibility = "hidden";
		obj.titlebox2.style.visibility = "hidden";
		obj.titlebox3.style.visibility = "visible";
		obj.goforward.style.visibility = 'hidden';
		obj.goback.style.visibility = 'visible';
	}
}

function goBack () {
	obj = this.parent;
	if (obj.state == 1) {
		// do nothing
	} else if (obj.state == 2) {
			obj.state = 1;
			obj.container1.style.visibility = "visible";
			obj.container2.style.visibility = "hidden";
			obj.titlebox1.style.visibility = "visible";
			obj.titlebox2.style.visibility = "hidden";
			obj.titlebox3.style.visibility = "hidden";
			obj.goforward.style.visibility = 'visible';
			obj.goback.style.visibility = 'hidden';
			obj.finaltext.style.visibility = 'hidden';
	} else if (obj.state == 3) {
			obj.state = 2;
			obj.container1.style.visibility = "hidden";
			obj.container2.style.visibility = "visible";
			clearInterval(obj.container2.intervalID);
			obj.container2.saveleft = obj.container1.offsetLeft;
			obj.container2.intervalID = setInterval('process.container2.moveit(0)', moveint);
			obj.titlebox1.style.visibility = "hidden";
			obj.titlebox2.style.visibility = "visible";
			obj.titlebox3.style.visibility = "hidden";
			obj.goforward.style.visibility = 'visible';
			obj.goback.style.visibility = 'visible';
			obj.finaltext.style.visibility = 'hidden';
	}
}

function nearestBox(obj) {
	obj.nearest.distance = 1000;
	for (var i = 0; i < statbox.length; i++) {
		var xoff = Math.abs(statbox[i].offsetTop - parseInt(obj.box.style.top));
		var yoff = Math.abs(statbox[i].offsetLeft - parseInt(obj.box.style.left));
		var dist = Math.sqrt(Math.pow(xoff, 2) + Math.pow(yoff, 2));
		if ((dist < obj.nearest.distance) && (obj.container == statbox[i].container)) {
			obj.nearest.distance = dist;
			obj.nearest.statleft = statbox[i].offsetLeft;
			obj.nearest.stattop = statbox[i].offsetTop;
			obj.nearest.statbox = i;
		}
	}
}

var slideint = 40;
var slidedist = 10;

function moveIt(dest) {
	clearInterval(this.intervalID);
	this.box.style.left = statbox[dest].offsetLeft + "px";
	var temptop = parseInt(this.box.style.top);
	this.desttop = statbox[dest].offsetTop;
	if (this.desttop < temptop) {
		var down = 0;
	} else {
		var down = 1;
	}
	this.intervalID = setInterval('statbox[' + dest + '].movebox.slideit(' + down + ')', slideint);
	this.nearest.statbox = dest;
	statbox[dest].movebox = this;
}

function slideIt(down) {
	var temptop = parseInt(this.box.style.top);
	if (Math.abs(temptop - this.desttop) < slidedist) {
		clearInterval(this.intervalID);
		this.box.style.top = this.desttop + "px";
	} else {
		if (down) {
			this.box.style.top = temptop + slidedist + "px";
		} else {
			this.box.style.top = temptop - slidedist + "px";
		}
	}
}

var elevation = 1;

var Move = {

	object : null,

	init : function(obj, movebox, container)
	{
		obj.onmousedown = Move.start;

		obj.box = movebox;
		obj.container = container;

		obj.box.style.left = obj.box.offsetLeft + "px";
		obj.box.style.top = obj.box.offsetTop + "px";

		obj.xmin = 0;
		obj.ymin = 0;
		obj.xmax = obj.container.offsetWidth - obj.box.offsetWidth;
		obj.ymax = obj.container.offsetHeight - obj.box.offsetHeight;

		obj.nearest = new Object();
		nearestBox(obj);
		statbox[obj.nearest.statbox].movebox = obj;
		obj.moveit = moveIt;
		obj.slideit = slideIt;
	},

	start : function(event)
	{
		var obj = Move.object = this;
		event = Move.fixIE(event);
		var y = parseInt(obj.box.style.top);
		var x = parseInt(obj.box.style.left);
		
		obj.box.style.opacity = .75;
		obj.box.style.filter = "alpha(opacity=75)";
		obj.box.style.zIndex = elevation++;

		obj.lastMouseX	= event.clientX;
		obj.lastMouseY	= event.clientY;

		obj.minMouseX	= event.clientX - x + obj.xmin;
		obj.maxMouseX	= obj.minMouseX + obj.xmax - obj.xmin;

		obj.minMouseY	= event.clientY - y + obj.ymin;
		obj.maxMouseY	= obj.minMouseY + obj.ymax - obj.ymin;

		document.onmousemove = Move.move;
		document.onmouseup = Move.end;

		return false;
	},

	move : function(event)
	{
		event = Move.fixIE(event);
		var obj = Move.object;
		
		var eventy	= event.clientY;
		var eventx	= event.clientX;
		var y = parseInt(obj.box.style.top);
		var x = parseInt(obj.box.style.left);
		var newx, newy;

		eventx = Math.max(eventx, obj.minMouseX);
		eventx = Math.min(eventx, obj.maxMouseX);
		eventy = Math.max(eventy, obj.minMouseY);
		eventy = Math.min(eventy, obj.maxMouseY);

		newx = x + (eventx - obj.lastMouseX);
		newy = y + (eventy - obj.lastMouseY);

		obj.box.style.left = newx + "px";
		obj.box.style.top = newy + "px";
		obj.lastMouseX = eventx;
		obj.lastMouseY = eventy;

		var savebox = obj.nearest.statbox;
		nearestBox(obj);
		if (savebox != obj.nearest.statbox) {
			statbox[obj.nearest.statbox].movebox.moveit(savebox);
			statbox[obj.nearest.statbox].movebox = obj;
		}

		return false;
	},

	end : function()
	{
		var obj = Move.object;

		nearestBox(obj);
		obj.box.style.left = obj.nearest.statleft + "px";
		obj.box.style.top = obj.nearest.stattop + "px";
		statbox[obj.nearest.statbox].movebox = obj;

		obj.box.style.opacity = 1;
		obj.box.style.filter = "alpha(opacity=100)";
		
		document.onmousemove = null;
		document.onmouseup = null;
		Move.object = null;
	},

	fixIE : function(event)
	{
		if (typeof event == 'undefined') 
			event = window.event;
		if (typeof event.layerX == 'undefined') 
			event.layerX = event.offsetX;
		if (typeof event.layerY == 'undefined') 
			event.layerY = event.offsetY;
		return event;
	}
};

var boxhtml = "		\
	<div class='titlebox' id='titlebox1' style='visibility:visible;'>	\
		<div style='float:left; padding:0;'><h1 style='margin:26px 6px 0 0; padding:0;'>Step one: What is most important to me?</h1></div><div style='float:left, margin:0; padding:0;'><img src='../images/gr_brackets.gif' width='41' height='70' border='0' alt='' /></div><div style='clear:both;'></div>		\
		<h4>Rank the following areas of your life in terms of what is most important to you at this time.</h4>		\
		<h4>Use your mouse to rearrange the boxes below from most important at the top to least important at the bottom.</h4>		\
	</div>		\
	<div class='titlebox' id='titlebox2' style='visibility:hidden;'>	\
		<div style='float:left; padding:0;'><h1 style='margin:26px 6px 0 0; padding:0;'>Step two: My time, energy and resources.</h1></div><div style='float:left'><img src='../images/gr_brackets.gif' width='41' height='70' border='0' alt='' /></div><div style='clear:both;'></div>		\
		<h4>Rank the following areas of your life in terms of where you recently have been spending your time, energy and resources.</h4>		\
		<h4>Use your mouse to rearrange the boxes below from most important at the top to least important at the bottom.</h4>		\
	</div>		\
	<div class='titlebox' id='titlebox3' style='visibility:hidden;'>	\
		<div style='float:left; padding:0;'><h1 style='margin:26px 6px 0 0; padding:0';>Step three: My results.</h1></div><div style='float:left'><img src='../images/gr_brackets.gif' width='41' height='70' border='0' alt='' /></div><div style='clear:both;'></div>		\
		<h4>How do you compare? Does this comparison surprise you?</h4>		\
		<div class='titleimg'><img style='position:absolute; top:116px; left:0px;' src='../images/title_want272x52.jpg' width='272' height='52' border='0' alt='' /></div>		\
		<div class='titleimg'><img style='position:absolute; top:116px; left:280px;' src='../images/title_actual272x52.jpg' width='272' height='52' border='0' alt='' /></div>	\
	</div>		\
	<div class='container' id='container1' style='margin:60px 0 0 0;'>		\
		<div class='titlebox' style='visibility:hidden;'><img src='../images/title_want272x52.jpg' width='272' height='52' border='0' alt='' /></div>	\
		<div class='statbox' id='statbox1a'><img src='../images/outline271x30.jpg' width='271' height='30' border='0' alt='' /></div>		\
		<div class='statbox' id='statbox1b'><img src='../images/outline271x30.jpg' width='271' height='30' border='0' alt='' /></div>		\
		<div class='statbox' id='statbox1c'><img src='../images/outline271x30.jpg' width='271' height='30' border='0' alt='' /></div>		\
		<div class='statbox' id='statbox1d'><img src='../images/outline271x30.jpg' width='271' height='30' border='0' alt='' /></div>		\
		<div class='statbox' id='statbox1e'><img src='../images/outline271x30.jpg' width='271' height='30' border='0' alt='' /></div>		\
		<div class='statbox' id='statbox1f'><img src='../images/outline271x30.jpg' width='271' height='30' border='0' alt='' /></div>		\
		<div class='statbox' id='statbox1g'><img src='../images/outline271x30.jpg' width='271' height='30' border='0' alt='' /></div>		\
		<div class='movebox' id='movebox1a'>		\
			<div class='boxhandle' id='boxhandle1a'><img src='../images/career271x30.jpg' width='271' height='30' border='0' alt='' /></div>		\
		</div>		\
		<div class='movebox' id='movebox1b'>		\
			<div class='boxhandle' id='boxhandle1b'><img src='../images/finances271x30.jpg' width='271' height='30' border='0' alt='' /></div>		\
		</div>		\
		<div class='movebox' id='movebox1c'>		\
			<div class='boxhandle' id='boxhandle1c'><img src='../images/fun271x30.jpg' width='271' height='30' border='0' alt='' /></div>		\
		</div>		\
		<div class='movebox' id='movebox1d'>		\
			<div class='boxhandle' id='boxhandle1d'><img src='../images/health271x30.jpg' width='271' height='30' border='0' alt='' /></div>		\
		</div>		\
		<div class='movebox' id='movebox1e'>		\
			<div class='boxhandle' id='boxhandle1e'><img src='../images/family271x30.jpg' width='271' height='30' border='0' alt='' /></div>		\
		</div>		\
		<div class='movebox' id='movebox1f'>		\
			<div class='boxhandle' id='boxhandle1f'><img src='../images/community271x30.jpg' width='271' height='30' border='0' alt='' /></div>		\
		</div>		\
		<div class='movebox' id='movebox1g'>		\
			<div class='boxhandle' id='boxhandle1g'><img src='../images/development271x30.jpg' width='271' height='30' border='0' alt='' /></div>		\
		</div>		\
	</div>		\
	<div class='container' id='container2' style='margin:60px 0 0 0;'>		\
		<div class='statbox' id='statbox2a'><img src='../images/outline271x30.jpg' width='271' height='30' border='0' alt='' /></div>		\
		<div class='statbox' id='statbox2b'><img src='../images/outline271x30.jpg' width='271' height='30' border='0' alt='' /></div>		\
		<div class='statbox' id='statbox2c'><img src='../images/outline271x30.jpg' width='271' height='30' border='0' alt='' /></div>		\
		<div class='statbox' id='statbox2d'><img src='../images/outline271x30.jpg' width='271' height='30' border='0' alt='' /></div>		\
		<div class='statbox' id='statbox2e'><img src='../images/outline271x30.jpg' width='271' height='30' border='0' alt='' /></div>		\
		<div class='statbox' id='statbox2f'><img src='../images/outline271x30.jpg' width='271' height='30' border='0' alt='' /></div>		\
		<div class='statbox' id='statbox2g'><img src='../images/outline271x30.jpg' width='271' height='30' border='0' alt='' /></div>		\
		<div class='movebox' id='movebox2a'>		\
			<div class='boxhandle' id='boxhandle2a'><img src='../images/career271x30.jpg' width='271' height='30' border='0' alt='' /></div>		\
		</div>		\
		<div class='movebox' id='movebox2b'>		\
			<div class='boxhandle' id='boxhandle2b'><img src='../images/finances271x30.jpg' width='271' height='30' border='0' alt='' /></div>		\
		</div>		\
		<div class='movebox' id='movebox2c'>		\
			<div class='boxhandle' id='boxhandle2c'><img src='../images/fun271x30.jpg' width='271' height='30' border='0' alt='' /></div>		\
		</div>		\
		<div class='movebox' id='movebox2d'>		\
			<div class='boxhandle' id='boxhandle2d'><img src='../images/health271x30.jpg' width='271' height='30' border='0' alt='' /></div>		\
		</div>		\
		<div class='movebox' id='movebox2e'>		\
			<div class='boxhandle' id='boxhandle2e'><img src='../images/family271x30.jpg' width='271' height='30' border='0' alt='' /></div>		\
		</div>		\
		<div class='movebox' id='movebox2f'>		\
			<div class='boxhandle' id='boxhandle2f'><img src='../images/community271x30.jpg' width='271' height='30' border='0' alt='' /></div>		\
		</div>		\
		<div class='movebox' id='movebox2g'>		\
			<div class='boxhandle' id='boxhandle2g'><img src='../images/development271x30.jpg' width='271' height='30' border='0' alt='' /></div>		\
		</div>		\
	</div>		\
	<div id='buttons' style='margin:60px 0 24px 0; padding:0;'>		\
		<table>		\
			<tr>		\
				<td><div class='gobutton' id='goforward' style='cursor:pointer;'><img src='../images/continue122x19.jpg' width='122' height='19' border='0' alt='' /></div></td>		\
				<td><div class='gobutton' id='goback' style='cursor:pointer;'><img style='margin-left:21px;' src='../images/back122x19.jpg' width='122' height='19' border='0' alt='' /></div></td>		\
			</tr>		\
		</table>		\
	</div>		\
	<div id='finaltext' style='width:630px; margin:60px 0 24px 0; padding:0;'>	\
		<p>		\
			Congratulations, you have taken the first step in improving your results!		\
		</p>	\
		<p>		\
			Often what I say is really most important to me is not where I spend most of my time, energy and focus. Yet, it is the areas I focus on with great intent where I tend to get the best results.		\
		</p>	\
		<p>		\
			We believe creating a rich, full life is about knowing what is most important to us and putting our energy in that direction. In The Pursuit of Excellence you will make some context shifts such that better results naturally occur&mdash;especially in the areas of your life that are most important to you. Learn how you can get more of what you really want in your life through the <a href='https://www.contextinternational.com/programs/page.php?id_prg=2'>Pursuit of Excellence</a>.		\
		</p>	\
	</div>";
	