
<!--
var clipTop = 0;
var clipWidth = 470;
var clipBottom = 272;
var topper = 5;
var lyrheight = 0;
var time,amount,theTime,theHeight,DHTML, mousewheel;

function init()
{
	DHTML = (document.getElementById || document.all || document.layers)
	if (!DHTML) return;
	var x = new getObj('maincontent');
	if (document.layers)
	{
		lyrheight = x.style.clip.bottom;
		lyrheight += 20;
		x.style.clip.top = clipTop;
		x.style.clip.left = 0;
		x.style.clip.right = clipWidth;
		x.style.clip.bottom = clipBottom;
	}
	else if (document.getElementById || document.all)
	{
		lyrheight = x.obj.offsetHeight;
		var clipstring = 'rect('+clipTop+'px,'+clipWidth+'px,'+clipBottom+'px,0)';
		x.style.clip = clipstring;
	}
	vis("visible");
}

function scrollayer(layername,amt,tim,mw)
{
	if (!DHTML) return;
	thelayer = new getObj(layername);
	if (!thelayer) return;
	amount = amt;
	theTime = tim;
	mousewheel = mw;
	realscroll();
	
}

function stopScroll()
{
	if (time) clearTimeout(time);
}

function realscroll()
{
	if (!DHTML) return;
	clipTop += amount;
	clipBottom += amount;
	topper -= amount;
	if (clipTop < 0 || clipBottom > lyrheight)
	{
		clipTop -= amount;
		clipBottom -= amount;
		topper += amount;
		return;
	}
	if (document.getElementById || document.all)
	{
		clipstring = 'rect('+clipTop+'px,'+clipWidth+'px,'+clipBottom+'px,0)'
		thelayer.style.clip = clipstring;
		thelayer.style.top = topper + 'px';
	}
	else if (document.layers)
	{
		thelayer.style.clip.top = clipTop;
		thelayer.style.clip.bottom = clipBottom;
		thelayer.style.top = topper;
	}
	if (mousewheel > 0) {
		stopScroll();
	}
	else {
		time = setTimeout('realscroll()',theTime);
	}
}

function vis(val)
{
	if (!DHTML) return;
	var f = new getObj('maincontent');
	f.style.visibility = val;
}

function getObj(name)
{
  if (document.getElementById)
  {
    this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
    this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
   	this.obj = document.layers[name];
   	this.style = document.layers[name];
  }
}

/**Mouse Wheel code added by JDR on 08-12-2007 
 * This is high-level function; REPLACE IT WITH YOUR CODE.
 * It must react to delta being more/less than zero.
 */
function handle(delta) {
	if (delta < 0)
		scrollayer('maincontent',30,100,1);
	else
		scrollayer('maincontent',-30,100,1);
}

function wheel(event){
	var delta = 0;
	if (!event) event = window.event;
	if (event.wheelDelta) {
		delta = event.wheelDelta/120; 
		if (window.opera) delta = -delta;
	} else if (event.detail) {
		delta = -event.detail/3;
	}
	if (delta)
		handle(delta);
        if (event.preventDefault)
                event.preventDefault();
        event.returnValue = false;
}

/* Initialization code. */
if (window.addEventListener)
	window.addEventListener('DOMMouseScroll', wheel, false);
window.onmousewheel = document.onmousewheel = wheel;

/* end of mouse wheel code */

// -->
