scrollContent = '<link rel="stylesheet" type="text/css" href="css/custom_scroll.css" media="all" />'
	
	+ '<div id="scrollHolder" style="position:relative; left:432px; top:-386px;" >'

	+ '<div id="sc_upbut" class="butOut" style="position:absolute; top:10px; width:16px; height:16px;">'
	+ '<a href="javascript:void(0);" >'
	+ '<img src="images/scroll_up.png" style="border:0px;" onMouseOver="this.className=\'butOver\'; resetScrollbar();" onMouseOut="this.className=\'butOut\'" '
	+ 'onMouseDown="this.className=\'butDown\'; scrollDir(\'up\');" onMouseUp="this.className=\'butOver\'; stopScroll();"'
	+ ' />'
	+ '</a>'
	+ '</div>'
	
	+ '<div id="sc_base" style="position:absolute; top:28px; width:16px; height:330px; background:#D0DCDF; font-size:0px;">'
	+ '</div>'
	
	+ '<div id="sc_grab" class="scrollOut" style="position:absolute; top:28px; width:16px; height:100px; background-image:url(images/scroll_grab.png); background-repeat:no-repeat; background-position:center;">'
	+ '<a href="javascript:void(0);">'
	+ '<img src="images/trani.png" style="width:100%; height:100%; border:0px;"  onMouseOver="this.className=\'scrollOver\'; resetScrollbar();" onMouseOut="this.className=\'scrollOut\'" '
	+ 'onMouseDown="this.className=\'scrollDown\';" onMouseUp="this.className=\'scrollOver\';" '
	+ ' />'
	+ '</a>'
	+ '</div>'
	
	+ '<div id="sc_upbut" class="butOut" style="position:absolute; top:360px; width:16px; height:16px;">'
	+ '<a href="javascript:void(0);" onMouseDown="scrollDir(\'down\')" >'
	+ '<img src="images/scroll_down.png" style="border:0px;" onMouseOver="this.className=\'butOver\'; resetScrollbar();" onMouseOut="this.className=\'butOut\'" '
	+ 'onMouseDown="this.className=\'butDown\'; scrollDir(\'down\');" onMouseUp="this.className=\'butOver\'; stopScroll();"'
	+ ' />'
	+ '</a>'
	+ '</div>'
	
	+ '</div>';


barSpace = 330;
contSpace = 366;
l = 0;
t = 28;

function initScrollbar(){

	document.write(scrollContent)

	sx = document.getElementById("scrollcontainer");
	c = document.getElementById("scroll");
	sc = document.getElementById("sc_grab");
	
	sx.style.overflow = "hidden";
	sx.style.width = "420px";

	c.style.position = "relative";
	
	contHeight = c.offsetHeight;
	
	if(contHeight <= contSpace){
		sc.style.visibility = "hidden";
		return;
	}else{
		yPos = t;
		ratio = contSpace/contHeight;

		barHeight = Math.round(ratio*barSpace);
		speed = (barSpace-barHeight)/20;
		dif = (contHeight-2-contSpace)/(barSpace-barHeight);
		scrollTime = 0;

		sc.style.height = barHeight + "px";
		
		b = (t+barSpace)-barHeight;
		Drag.init(sc, null, l, l, t, b);
		return;
	};	
};

function resetScrollbar(){
	ratio = contSpace/contHeight;

	barHeight = Math.round(ratio*barSpace);
	speed = (barSpace-barHeight)/20;
	dif = (contHeight-2-contSpace)/(barSpace-barHeight);
	scrollTime = 0

	sc.style.height = barHeight + "px";
	
	b = (t+barSpace)-barHeight;
	Drag.init(sc, null, l, l, t, b);
}

function scrollDir(dir){
	if(dir != null) eh = dir;
	if(eh == "up"){
		yPos -= speed;	
	}else if(eh == "down"){
		yPos += speed;
	};
	if(yPos > b){
		yPos = b;
	}else if(yPos < t){
		yPos = t;
	};
	//document.forms[0].username.value = Math.round(yPos) 
	sc.style.top = yPos + "px";
	setContent(yPos);
	window.clearTimeout(scrollTime);
	scrollTime = window.setTimeout("scrollDir()",20);
};

function setContent(w){
	c.style.top = -Number((w-t)*dif) + "px";
	yPos = w;
}

function stopScroll(){
	window.clearTimeout(scrollTime);
	scrollTime = 0;
};

//initScrollbar();