<!-- 

// SET VARIABLES
var scrollBarColor = '#ffffff';
var scrollBarWidth = 16;
var scrollBarSliderHeight = 20;
var scrollBarUpHeight = 15;
var scrollBardownHeight = 15;

// DETERMINE USER BROWSER
var NS4 = false;
var IE4 = false;
var NS6 = false;

if (document.all) IE4=true;
else if (document.layers) NS4 = true;
else if (document.getElementById) NS6 = true;

// Layer Functions
function equalize(layer) {
	if(layer==null) return;
	if (IE4 || NS6){
		layer.getLeft = layer.style.pixelLeft;
		layer.getTop = layer.style.pixelTop;
		layer.getHeight = layer.scrollHeight;
	}
	if (NS4){
		layer.getLeft = layer.left;
		layer.getTop = layer.top;
		layer.getHeight = layer.document.height;
		layer.style = layer;
	}
}

function getLayer(spec,base) {
	if (IE4) return document.all[spec];
	if (NS6) return document.getElementById(spec);
	var q=0;
	var temp=null;
	if (base==null) base=document;
	if (base.layers[spec]!=null) return base.layers[spec];
	for (q=0; q<base.layers.length; q++) {
		if(base.layers[q].document.layers.length>0) {
			temp = getLayer(spec,base.layers[q].document); if (temp != null) return temp;
		}
	}
	return null;
}

function setClip(who,l,t,r,b) {
	var layer = getLayer(who);
	if (layer==null) { return;}
	if (IE4 || NS6) { layer.style.clip='rect('+t+' '+r+' '+b+' '+l+')'; }
	if (NS4) { layer.clip.left=l; layer.clip.top=t; layer.clip.right=r; layer.clip.bottom=b; }
}

function getEQLayer(spec) {
	if (IE4) {return document.all[spec].style;}
	if (NS6) {return document.getElementById(spec).style;}
	if (NS4) {return getLayer(spec);}
}

function layerTag(theName,z,vis,l,t,w,h,extra) {
	var stuff;
	if (h==null) h=0; 
	if (w==null) w='100%'; 
	if (w==0) w=1;  
	if (t==null) t=0; 
	if (l==null) l=0;
	if (vis==null) vis=hidden;
	if (z==null) z=10;
	if (extra==null) extra='';
	if (IE4 || NS6) { var px = (isNaN(w))? '':'px'; }
	if (IE4 || NS6) stuff = '<DIV ID="'+theName+'" STYLE="position:absolute; overflow:none; left:'+l+'px; top:'+t+'px; width:'+w+px+'; height:'+h+'px; visibility:'+vis+'; z-index:'+z+'" '+extra+'>';
	if (NS4) stuff = '<LAYER NAME="'+theName+'" left="'+l+'" top="'+t+'" width="'+w+'" height="'+h+'" visibility="'+vis+'" z-index="'+z+'" '+extra+'>';
	return (stuff);
}

function ilayerTag(theName,z,vis,l,t,w,h,extra,clip) {
	var stuff;
	if (h==null) h=0; 
	if (w==null) w='100%'; 
	if (w==0) w=1;  
	if (t==null) t=0; 
	if (l==null) l=0; 
	if (vis==null) vis=hidden; 
	if (z==null) z=10;
	if (IE4 || NS6) { var px = (isNaN(w))? '':'px'; }
	if (IE4 || NS6) stuff = '<DIV ID="'+theName+'" STYLE="position:relative; overflow:none; left:'+l+'px; top:'+t+'px; width:'+w+px+'; height: auto; visibility:'+vis+'; z-index:'+z+'">';
	if (NS4) stuff = '<ILAYER NAME="'+theName+'" left="'+l+'" top="'+t+'" width="'+w+'" height="'+h+'" visibility="'+vis+'" z-index="'+z+'">';
	return (stuff);
}

var endTag =  (IE4 || NS6)? '</DIV>':'</LAYER>';
var endITag =  (IE4)? '</DIV>':'</ILAYER>';

function newLayer(theName,content,z,vis,l,t,w,h,extra) {
	return (layerTag(theName,z,vis,l,t,w,h,extra) + content + endTag);
}

function newILayer(theName,content,z,vis,l,t,w,h,extra) {
	return (ilayerTag(theName,z,vis,l,t,w,h,extra) + content + endITag);
}

function newFloater(theName,content,z,vis,l,t,w,h) {
	var iw=(w==null)? 1:w;
	var ih=(h==null)? 1:h;
	if (IE4 || NS6) return (newILayer(theName,content,z,vis,l,t,w,h));
	var stuff='<A HREF="javascript: // Drag Me">' + content + '</A>';
	if (NS4) return (ilayerTag(theName+'A',z,vis,l,t,w,h) + '<IMG SRC="/pix/spacer.gif" WIDTH="'+iw+'" HEIGHT="'+ih+'"><BR>'+ newLayer(theName,stuff,1,vis,l,t,w,h) + endITag);
	return (content);
}

// EQUALIZE VARIABLES
var hidden = (IE4 || NS6) ? 'hidden':'hide';
var visible = (IE4 || NS6) ? 'visible':'show';
if (NS4)  document.captureEvents(Event.MOUSEMOVE | Event.MOUSEUP);

// Current object being scrolled
var currentScroll = ''; 
var scrollTimer = setTimeout('null',100);

// TURN SCROLLBAR ON/OFF
function checkScroll() { 
	var b = this.bottom;
	this.findBottom();
	if (this.bottom!=b) {
		this.scrollBar.style.visibility= ((this.bottom==0)? hidden:visible);
		if (this.bottom==0) this.contents.style.top=0;
		if (parseInt(this.contents.style.top)<this.bottom) this.contents.style.top=this.bottom;
		this.syncScroll();
	}
	clearTimeout(scrollTimer); scrollTimer = setTimeout(this.name+'.checkScroll()',1000);
}

// FIND BOTTOM OF CURRENT SCROLL OBJECT
function findBottom(){
	if (IE4) this.bottom = (this.height-this.tb-this.bb)-this.contents.scrollHeight;
	if (NS4) this.bottom = (this.height-this.tb-this.bb)-this.contents.document.height;
	if (NS6) {
		this.contents.style.height = 'auto';
		this.bottom = (this.height-this.tb-this.bb)-this.contents.offsetHeight;
	}
	if (this.bottom>0) this.bottom = 0;
}

//******* Scrolling Functions ********//

var inSlide = 0;
var inScroll = 0;
var offset = 0;

// SCROLL UP ARROW
function scrollUp() {
	if (!this.ready) return;
	currentScroll=this;
	this.findBottom();
	inScroll=1;
	document.onmouseup=scrollStop;
	scrollIt(this.speed);
}

// SCROLL DOWN ARROW
function scrollDn() {
	if (!this.ready) return;
	currentScroll=this;
	this.findBottom();
	inScroll=1;
	document.onmouseup=scrollStop;
	scrollIt(-this.speed);
}

function scrollIt(s) {
	if (!inScroll) return;
	var c = currentScroll;
	var y = parseInt(c.contents.style.top)+s;
	if (y>0) y=0;
	if (y<c.bottom) y=c.bottom;
	c.contents.style.top= y; c.syncScroll();
	setTimeout('scrollIt('+s+')',20);
}

// STARTS DRAGGING OF SCROLL ISLAND
function slideStart(e) {
	var c = currentScroll = this.box; if (!c.ready) return;
	c.findBottom();
	if (NS4){
		offset = e.pageY-(c.slider.pageY-c.scrollBar.pageY);
	}
	if (IE4) {
		offset = event.clientY + document.body.scrollTop - this.style.pixelTop;
	}
	if (NS6){
		offset = e.pageY - ((parseInt(c.slider.style.top) + parseInt(c.scrollBar.style.top)) - parseInt(c.scrollBar.style.top));
	}
	//alert(offset);
	inSlide = 1;
	document.onmousemove = slideUpdate;
	document.onmouseup = scrollStop;
}

// STOP SCROLLING
function scrollStop() {
	inSlide = 0;
	inScroll=0;
	document.onmousemove=null;
	document.onmouseup=null;
}

// MOVES SLIDER WITH CONTENTS
function slideUpdate(e) {
	if (!inSlide) return false;
	var y = 0;
	var c = currentScroll;
	if (NS4 || NS6) { y = e.pageY - offset;}
	if (IE4) { y = event.clientY + document.body.scrollTop - offset;}
	if (y<c.sb.uh) y=c.sb.uh;
	if (y>(c.height-c.sb.dh-c.sb.ih)) { y= c.height-c.sb.dh-c.sb.ih; }
	c.slider.style.top = y;
	c.syncText();
	return false;
}

// SYNC TEXT TO SLIDER
function syncText() {
	if ((this.height-this.sb.uh-this.sb.dh-this.sb.ih)<=0){
		return;
	}
	this.contents.style.top =  Math.round(this.bottom*((parseInt(this.slider.style.top)-this.sb.uh)/(this.height-this.sb.uh-this.sb.dh-this.sb.ih)));
}

// SYNC SLIDER TO TEXT
function syncScroll() {
	if (this.bottom==0) return;
	this.slider.style.top= Math.round((this.height-this.sb.uh-this.sb.dh-this.sb.ih)*((parseInt(this.contents.style.top))/this.bottom))+this.sb.uh;
}


//******* Scroll Object Functions ********//

function scrollBarObject(color,w,uh,dn,ih) {
	this.color = color;
	this.w = w;
	this.uh = uh;
	this.dh = dn;
	this.ih = ih;
}

function scrollObject(theName,x,y,w,h,z) {	
	this.name = theName;	// name of scrolling object
	this.left = x; 			// pixels from left (viewable area)
	this.top = y;			// pixels from top (viewable area)
	this.width = w;			// pixels wide (viewable area)
	this.height = h;		// pixels tall (viewable area)
	this.z = z;				// z-index
	this.lb = 0;			// left border
	this.rb = 0;			// right border
	this.tb = 0;			// top border
	this.bb = 0;			// bottom border
	this.bottom = 0;
	this.speed = 15;
	this.sb = new scrollBarObject(scrollBarColor,scrollBarWidth,scrollBarUpHeight,scrollBardownHeight,scrollBarSliderHeight);
	this.checkScroll = checkScroll;
	this.syncText = syncText;
	this.syncScroll = syncScroll;
	this.swapTo = swapTo;
	this.up = scrollUp;
	this.dn = scrollDn;
	this.scrollIt = scrollIt;
	this.findBottom = findBottom;
	this.setPadding = setPadding;
	this.beginMain = beginMain;
	this.initMain = initMain;
	this.createScrollBar = createScrollBar;
	this.initScrollBar = initScrollBar;
	this.equalize = scrollEqualize;
	this.init = initScroll;
	this.ready = false;
}

 /* sets content area padding | (left,top,right,bottom) */
function setPadding(l,t,r,b) {
	this.lb=l;
	this.tb=t;
	this.rb=r;
	this.bb=b;
}

/* create a clipped layer which houses the content layers to be scrolled */   /* FYI: Need To change values here to match your scrollbar graphics*/
function beginMain() {
	var l,t,w,h;
	l= this.left+this.lb;
	t= this.top+this.tb;
	w = this.width-this.lb-this.rb-this.sb.w;
	h = this.height-this.tb-this.bb;
	this.contentWidth = w;
	if (IE4 || NS6) var stuff = '<DIV ID="'+ this.name +'Main" STYLE="position:absolute; overflow:hidden; clip:rect(0,'+w+','+h+',0); left:'+ l +'px; top:'+ t +'px; width:'+ w +'px; height:'+ h +'px; visibility:visible; z-index:'+this.z+'">';
	if (NS4) var stuff = '<LAYER name="'+ this.name +'Main" left='+ l +' top='+ t +' width='+ w +' height='+ h +' clip="'+ w +','+ h +'" visibility=visible z-index='+this.z+'>';
	return(stuff);
}

function initMain() {
	this.main = getLayer(this.name+'Main');
}

// SCROLLBAR
function createScrollBar() {
	
	var stuff = layerTag(this.name +'Scroll',this.z,hidden,(this.left+this.width-this.sb.w),this.top,this.sb.w,this.height);
	
	stuff += '<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" WIDTH="'+this.sb.w+'"background="images/bg_slider.gif">';
	
	stuff += '<TR><TD HEIGHT="'+this.sb.uh+'" valign="top" background="no"><A '; if (NS4) {stuff += 'HREF="javascript://" ';} else {stuff += 'STYLE="cursor:hand" ';} stuff += 'ONMOUSEDOWN="'+ this.name +'.up(); return(false);" ONMOUSEUP="scrollStop();" ONMOUSEOUT="scrollStop();"><IMG SRC="images/arrow_up.jpg" BORDER="0" WIDTH="17" HEIGHT="15"></A></TD></TR>';
	
	stuff += '<TR><TD HEIGHT="'+(this.height-this.sb.uh-this.sb.dh)+'"></TD></TR>';
	
	stuff += '<TR><TD HEIGHT="'+this.sb.dh+'" valign="bottom" background="no"><A '; if (NS4) {stuff += 'HREF="javascript://" ';} else {stuff += 'STYLE="cursor:hand" ';} stuff += 'ONMOUSEDOWN="'+ this.name +'.dn(); return(false);" ONMOUSEUP="scrollStop();" ONMOUSEOUT="scrollStop();"><IMG SRC="images/arrow_down.jpg" BORDER="0" WIDTH="17" HEIGHT="15"></A></TD></TR></TABLE>';
	
	stuff += newLayer(this.name +'Slider','<IMG SRC="images/slider.gif" WIDTH="'+this.sb.w+'" HEIGHT="'+this.sb.ih+'">',1,'inherit',0,this.sb.uh,this.sb.w,this.sb.ih);
	
	stuff += endTag;
	return(stuff);
}

function initScrollBar() {
	this.scrollBar = getLayer(this.name+'Scroll');
	this.slider = getLayer(this.name+'Slider');
	this.slider.box=this;

	if (NS4) this.slider.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP);

	this.slider.onmousedown = slideStart;
	this.slider.onmouseup = scrollStop;
}


function initScroll(who) {
	this.equalize();
	this.ready=true;
	this.swapTo(who);
}

// SWAP CONTENT
function swapTo(who) {
	if (!this.ready) return;
	if (this.contents) { /*this.contents.style.top=0;*/ this.contents.style.visibility=hidden; }
	this.contents = getLayer(who);
	this.contents.style.visibility=visible;
	this.checkScroll(); }

// NETSCAPE EQUALIZATION FOR .STYLE LAYER
function scrollEqualize() {
	if (!NS4) return;
	for (j=0; j<this.main.document.layers.length; j++) {
		this.main.document.layers[j].style = this.main.document.layers[j];
	}
	this.scrollBar.style = this.scrollBar;
	this.slider.style = this.slider;
}