// scrolltext2 by rod morelos (viewsrc@hotmail.com) www.gosume.com/viewsrc
// keep these two lines and you're free to use this code

// variables to set:

var scrollables = 5; // number of scrollable content
var active = 4; // set default page/layer visible onload

// variables not to set:

var contenty = 0; // content y



// load layer
function swapto(num)
{
	if (num != active)
	{
		ocontent[active].visibility(0);
		active = num;
		ocontent[active].moveto(0, 0);
		ocontent[active].visibility(1);
	}
}



// initialise function
function init()
{
	ocontainer2 = new dhtmlobject('container2');
	ocontent = new Array();
	if (bw.ie6) addevent(ocontainer2.el, 'mousewheel', new Function('wheelscroll(); return false;'), true);
	for (var i = 1; i <= scrollables; i++)
	{
		ocontent[i] = new dhtmlobject('content' + i);
	}
	ocontent[active].moveto(0, 0);
	ocontent[active].visibility(1);
}

// initiate script on page load
onload = init;


