var logVar=eval('false');
window.name='main';

function UA(){

	var v = navigator.appVersion.toLowerCase(), u = navigator.userAgent.toLowerCase(), n = navigator.appName;
	this.mac = (v.indexOf("mac")+1);
	this.win = (v.indexOf("win")+1);
	this.nn = (n == "Netscape");
	this.ie = (n == "Microsoft Internet Explorer");
	this.aol = (u.indexOf("aol")+1);
	this.opera = (u.indexOf("opera")+1);
	this.ver = (this.ie) ? parseFloat(v.split('msie ')[1]) : parseFloat(v);
	this.v4 = (parseInt(v) == 4);
	this.os = (this.mac) ? 'mac' : (this.win) ? 'win' : navigator.platform;
	this.name = (this.nn) ? 'nn' : (this.ie) ? 'ie' : n;
	this.codeName = this.name +'_'+ parseInt(this.ver) + '_'+ this.os;

}

var ua = new UA();
var docloaded = false;

function blurLinks() {

	for(var i=0; i < document.links.length; i++) {
	document.links[i].onfocus =  document.links[i].blur;
	}

}

var onloadHandlers = [];
function loadEvents() {

	for(var i=0; i<onloadHandlers.length;i++) {
	eval(onloadHandlers[i]);
	}
	docloaded = true;

}

window.onload = loadEvents;

var onresizeHandlers = [];

function resizeEvents() {

	for(var i=0; i<onresizeHandlers.length;i++) {
	eval(onresizeHandlers[i]);
	}

}

window.onresize = resizeEvents;

function imgCollection(name,glen,slen,path,ext){

	if(!document.images) return;
	this.name = name;
	this.groups = new Array(glen);
	this.filepath = path;
	this.filetype = (ext) ? ext : ".gif";
	for(var i=0;i < glen;i++){
		this.groups[i] = [];
		this.groups[i].states = new Array(slen);
			for(var j=0;j < slen;j++){
			this.groups[i].states[j] = new Image();
			this.groups[i].states[j].src = path+name+ "_"+i+"_"+j+this.filetype;
			}
		}
	}

function getObjByName(name,doc) {

	var o = 0;
	if(!doc) doc = document;
	if(doc[name]) o=doc[name];
	if(document.all && doc.all[name]) o=doc.all[name];
	if(o){
		if(!o.getElementsByTagName) o.getElementsByTagName = getElementsArray;
		return o;
		}
	if(document.layers) {
		for(var i=0;i < doc.layers.length;i++){
			var lyrdoc = doc.layers[i].document;
			if(lyrdoc[name]) return lyrdoc[name];
				if(lyrdoc.layers.length > 0) {
					var o = getObjByName(name,lyrdoc);
					if(o) return o;
					}
				}
			}
		return 0;
	}

if(!document.getElementById) document.getElementById = getObjByName;

function getElementsArray(el) {
	if(document.layers) {
		var doc = (this == document) ? document : this.document;
			switch(el) {
				case 'img' : return doc.images;
				case 'a' : return doc.links;
				case 'div' : return doc.layers;
				case 'form' : return doc.forms;
				default : return 0;
				}
			}
		if(document.all) return this.all.tags(el);
		return 0;
	}

if(!document.getElementsByTagName) document.getElementsByTagName = getElementsArray;
if(document.layers) Layer.prototype.getElementsByTagName = getElementsArray;

function swapImg() {
	if(!document.images) return;
	var args = swapImg.arguments;
	for(var i=0;i < args.length;i+=2) {
		var imgSrc = (args[i + 1].indexOf('[') != -1) ? eval(args[i + 1] + '.src') : args[i + 1];
		if(getObjByName(args[i])) getObjByName(args[i]).src = imgSrc;
		}
	}

function handleResize(init) {
	if(!(document.layers)) return;
	if(init==true) with (navigator) {
		document.pgW=innerWidth;
		document.pgH=innerHeight;
		onresizeHandlers[onresizeHandlers.length] = 'handleResize()';
		}
		else if (innerWidth!=document.pgW || innerHeight!=document.pgH) location.reload();
	}

handleResize(true);

function getWidth(width) {
	var args = getWidth.arguments;
	if(args[1]) {
		if(ua.mac) {
			if(ua.ie && ua.v4) width += 2;
			if(ua.nn) width += 17;
			}
		if(ua.win) {
			width += 16;
			if(ua.aol) width += 20;
		}
	}
	else {
		if(ua.mac) {
		if(ua.ie && ua.v4) width -= 17;
		}
		if(ua.win) {
		if(ua.aol) width += 20;
		}
	}
	return width;
}

function getHeight(height) {

	var args = getHeight.arguments;
	if(args[1]) {
		if(ua.mac) {
			if(ua.ie && ua.v4) height -= 15;
		}
		if(ua.win) {
			if(ua.aol) height += 20;
			}
		}
	else {
		if(ua.mac) {
			if(ua.ie && ua.v4) height -= 15;
			}
		if(ua.win) {
			if(ua.aol) height += 20;
			}
		}
	return height;
}

function remoteOpen() {

	var args = remoteOpen.arguments;
	var n = (args[1]) ? args[1] : 'remote';
	var t = (args[4]) ? args[4] : 0;
	var l = (args[5]) ? args[5] : 0;
	var f = (args[6]) ? args[6] : null;
	var sf = ((typeof args[7]) != 'undefined') ? args[7] : true;
	remote = window.open(args[0],n,'width='+getWidth(args[2])+',height='+getHeight(args[3])+',top='+t+',left='+l+',directories=0,'+f);
	if(args[0].indexOf('http://')+1 && args[0].split('/')[2] != window.location.href.split('/')[2]) return;
	
	if (sf) remote.focus();
}

function scrollOpen() {

	var args = scrollOpen.arguments;
	var n = (args[1]) ? args[1] : 'scrollwin';
	var w = (args[3]) ? args[3] : 0;
	var t = (args[4]) ? args[4] : 0;
	var l = (args[5]) ? args[5] : 0;
	var f = (args[6]) ? args[6] : null;
	var sf = ((typeof args[7]) != 'undefined') ? args[7] : true;
	if (ua.win)
	
	w += 15;
	scrollwin = window.open(args[0],n,'width='+getWidth(args[2],1)+',height='+getHeight(w,1)+',top='+t+',left='+l+',directories=0,scrollbars=1,'+f) ;
	
	if (sf) scrollwin.focus();
}

function msgWin() {

	var args = msgWin.arguments;
	var n = (args[1]) ? args[1] : 'msg';
	var t = (args[4]) ? args[4] : 0;
	var l = (args[5]) ? args[5] : 0;
	var f = (args[6]) ? args[6] : null;
	message = window.open(args[0],n,'width='+getWidth(args[2])+',height='+getHeight(args[3])+',top='+t+',left='+l+',directories=0,'+f);
	
	window.onfocus = Function("winClose(message)");

}

function winFocus() {
	if(ua.ie && ua.mac && ua.ver < 4.5) return false;
	if(window.focus) return true;
	return false;
}

function show(div){
	var o = (document.layers) ? getObjByName(div) : document.getElementById(div);
	if(!o) return;
	if(document.layers) o.visibility = 'show';
	else o.style.visibility = 'visible';
}

function hide(div){
	var o = (document.layers) ? getObjByName(div) : document.getElementById(div);
	if(!o) return;
	if(document.layers) o.visibility = 'hide';
	else o.style.visibility = 'hidden';

}

var request = new Object();
request.getParameter = function(param) {
	var s = window.location.search;
	if(!s) return null;
	if(!(s.indexOf(param+'=')+1)) return null;
	return s.split(param+'=')[1].split('&')[0];
}

function reloadMain(url){
	mainurl = url;
	window.onerror = Function("window.open(mainurl,'main'); return true");
	top.opener.location.href=mainurl;
}

window.offscreenBuffering = true;
var cssp = (document.getElementById || document.layers || document.all);

function csspObj(obj) { 
	var o = (typeof obj == 'string') ? document.getElementById(obj) : eval(obj);
	if(!o) return 0;
	if(o.getProperty) return o; 
	if(document.layers) o.style = o;
	if(!o.getElementsByTagName) o.getElementsByTagName = getElementsArray;
	o.getProperty = CSSP_getProperty;
	o.setProperty = CSSP_setProperty;
	o.resizeTo = (o.resizeTo) ? o.resizeTo : CSSP_resizeTo;
	o.resizeBy = (o.resizeBy) ? o.resizeBy : CSSP_resizeBy;
	o.moveTo = (o.moveTo) ? o.moveTo : CSSP_moveTo;
	o.moveBy = (o.moveBy) ? o.moveBy : CSSP_moveBy;
	o.getClipValue = CSSP_getClipValue;
	o.clipTo = CSSP_clipTo;
	o.clipBy = CSSP_clipBy;
	o.scrollBy = CSSP_scrollBy;
	if(!o.parentNode) o.parentNode = getParent(o);
	return eval(o);
}

function getParent(o) {
	if(o.parentLayer) return o.parentLayer;
	if(o.parentElement) return o.parentElement;
	return 0;
}

function CSSP_resizeTo(w,h) {
	this.style.width = w;
	this.style.height = h;
}

function CSSP_resizeBy(w,h) {
	this.style.width = parseInt(this.style.width) + w;
	this.style.height =  parseInt(this.style.height) + h;
}

function CSSP_moveBy(dx,dy) {
	this.style.left = parseInt(this.style.left) + dx;
	this.style.top =  parseInt(this.style.top) + dy;
}

function CSSP_moveTo(x,y) {
	this.style.left = parseInt(x);
	this.style.top =  parseInt(y);
}

function CSSP_getClipValue(which) {
  if(this.clip) {
  return eval('this.clip.' + which)
  }
  else {
  var clip =  this.style.clip.split('(')[1].split(')')[0].split(' ');
  if(which == 'top') return parseInt(clip[0]);
  if(which == 'right') return parseInt(clip[1]);
  if(which == 'bottom') return parseInt(clip[2]);
  if(which == 'left') return parseInt(clip[3]);
  }
}

function CSSP_clipTo(t,r,b,l) {
	if(this.clip) { this.clip.top = t; this.clip.right = r; this.clip.bottom = b; this.clip.left = l; }
	else this.style.clip = 'rect('+t+' '+r+' '+b+' '+l+')';
}

function CSSP_clipBy(t,r,b,l) {
	var ct = (this.currenStyle) ? parseInt(this.currentStyle.clipTop) : this.getClipValue('top');
	var cr = (this.currenStyle) ? parseInt(this.currentStyle.clipRight) : this.getClipValue('right');
	var cb = (this.currenStyle) ? parseInt(this.currentStyle.clipBottom) : this.getClipValue('bottom');
	var cl = (this.currenStyle) ? parseInt(this.currentStyle.clipLeft) : this.getClipValue('left');  
	this.clipTo((ct + t),(cr + r),(cb + b),(cl + l)); 
}

function CSSP_scrollBy(dx,dy) {
	this.moveBy(-dx,-dy);
	this.clipBy(dy,dx,dy,dx);
}

function CSSP_getProperty(property) {
	if(property == 'top') var top = parseInt(this.style.top);
	if(property == 'left') var left = parseInt(this.style.left);
	if(property == 'width') var width = (this.style.width) ? parseInt(this.style.width)  : parseInt(this.style.clip.width);
	if(property == 'height') var height = (this.style.height) ? parseInt(this.style.height)  : parseInt(this.style.clip.height);
	if(property == 'offsetWidth') var offsetWidth = (this.offsetWidth) ? this.offsetWidth  : parseInt(this.style.clip.width);
	if(property == 'offsetHeight') var offsetHeight = (this.offsetHeight) ?  this.offsetHeight  : parseInt(this.document.height);
	if(property == 'zIndex') var zIndex = this.style.zIndex;
	if(property == 'visibility') var visibility = (this.style.visibility == 'show' || this.style.visibility == 'visible') ? 'visible' : 'hidden'; 
	if(property == 'bgColor') var bgColor = (this.bgColor) ? rgbToHex(this.bgColor) : (this.style.backgroundColor.indexOf('rgb') != -1) ? rgbToHex(this.style.backgroundColor.split('rgb(')[1].split(')')[0]) : this.style.backgroundColor.toUpperCase(); 
	if(property == 'bgImage') var bgImage = (typeof(this.style.background) == 'object') ? this.style.background.src : (this.style.backgroundImage) ? this.style.backgroundImage.split('url(')[1].split(')')[0] : 'undefined';
	return eval(property);
}

function CSSP_setProperty(property,value) {
	if(property == 'bgImage') {
		if(document.layers) return this.style.background.src = value;
		else return this.style.backgroundImage =  'url(' +value+ ')';
	 }

	if(property == 'bgColor') {
		property =  (document.layers) ? 'document.bgColor' : 'backgroundColor';
		if(value == 'transparent' && document.layers) return this.document.bgColor = null;
		value = (value.indexOf('rgb(') != -1) ? rgbToHex(value.split('rgb(')[1].split(')')[0]) : value;
	}

	if(property == 'innerHTML') {
		if(this.innerHTML != null) {
		this.innerHTML = '';
		return this.innerHTML = value;
	}
	else {
		this.document.open();
		this.document.write(value);
		this.document.close();
		return true; 
	} 
}

return eval('this.style.'+property+'= value');
}

function rgbToHex() {
	var hexChar = new Array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F');
	var hexVal = '';
	var rgb = (arguments.length > 1) ? arguments : arguments[0].toString().split(',');

	for(var i=0;i < rgb.length;i++) {
		var decVal = parseInt(rgb[i],10);
		var Hex1 = Math.floor(decVal / 16);
		var Hex2 = Math.floor(decVal - (Hex1 * 16));
			if(Hex1 >= 16) return hexVal = rgbToHex(Hex1) + hexChar[Hex2]; 
			else {
				var h1 = (rgb.length == 1 && Hex1 <= 9) ? (hexChar[0] + hexChar[Hex1]) : hexChar[Hex1];
				hexVal += h1 + hexChar[Hex2]; 
			}
		}
	return '#' + hexVal;
}


SCROLL_obj.counter = 0;

with(document){
open();
write('<style type="text/css">.scrollbar{ z-index:0; visibility:hidden }</style>');
close();
}

function SCROLL_obj(frame) {
	var o = SCROLL_obj;

function init(frame) {
	o.w = o.scrollbarwidth;
	o.doc = (document.layers) ? frame.document : document;
	o.imgstr =  '" alt="" border="0">';
	o.str = '<div id="scrollbar'+o.counter+'" class="scrollbar"><img src="'+o.images[0].src+'" width="'+o.w+'" height="'+o.btnheight+o.imgstr;
	o.str += '\n<div id="barbgA"><img src="images/dot.gif" width=1 height=1></div><div id="barbgB"><img src="images/dot.gif" width=1 height=1></div>';
	o.str += '\n<div id="scrolltab"><img src="'+o.images[1].src+'" width="'+o.w+'" height="1"'+o.imgstr+'<br>';
	o.str += '\n<div id="tabbottom"><img src="'+o.images[2].src+'" width="'+o.w+'" height="1"'+o.imgstr+'</div></div>';
	o.str += '\n<div id="scrolldown"><img src="'+o.images[3].src+'" width="'+o.w+'" height="'+o.btnheight +o.imgstr+'</div></div>';
	with(o.doc) { open(); write(o.str); close(); }
	delete o.doc; delete o.imgstr; delete o.str; delete o.w;
}

init(frame);
onloadHandlers[onloadHandlers.length] = 'SCROLL_obj.foo()';

function iefix() {
	var o = SCROLL_obj;
	document.body.scroll = (document.body.clientHeight > o.frameHeight + o.frame.getProperty('top')) ? 'no' : 'yes';
}

function clearTimers() {
	clearTimeout(this.scrollTimer);
	this.scrollTimer = null;
	clearTimeout(this.bgTimer);
	clearInterval(this.tabTimer);
	this.bgTimer = this.tabTimer = null;
	if(document.layers) this.doc.setProperty('visibility','hidden');
	if(document.layers) setTimeout("SCROLL_obj.activeframe.doc.setProperty('visibility','visible');",20);
}


o.foo = function() {
	this.scrollbar = new csspObj('scrollbar'+o.counter);
	this.frame = new csspObj(this.scrollbar.parentNode.id);
	if(document.layers) this.frame.resizeTo(o.framewidth,this.frame.clip.height);
	this.doc = new csspObj(this.frame.getElementsByTagName('div')[0]);
	this.btnup = this.scrollbar.getElementsByTagName('img')[0];
	var obj = csspObj('scrolldown');
	this.btndown = obj.getElementsByTagName('img')[0];
	this.scrolltab = new csspObj('scrolltab');
	this.elBG = new csspObj('barbgA');
	this.elBGcol = new csspObj('barbgB');
	var num = o.scrollbarheight-(o.btnheight*2);
	this.scrollbar.moveTo(o.scrollbarleft,o.scrollbartop);
	this.scrollbar.resizeTo(o.scrollbarwidth,o.scrollbarheight);
	this.scrollbar.clipTo(0,o.scrollbarwidth,o.scrollbarheight,0);
	this.scrollbar.setProperty('zIndex',10);
	this.scrolltab.moveTo(0,o.btnheight);
	this.scrolltab.style.top = o.btnheight;
	this.elBG.moveTo(0,o.btnheight);
	this.elBGcol.moveTo(0,o.btnheight);
	this.elBG.resizeTo(o.scrollbarwidth,num);
	this.elBGcol.resizeTo(o.scrollbarwidth,num);
	obj.moveTo(0,num+o.btnheight);
	this.elBGcol.setProperty('zIndex',10);
	this.elBG.setProperty('zIndex',11);
	this.scrolltab.setProperty('zIndex',12);
	this.elBGcol.setProperty('bgImage',o.images[8].src);
	this.elBG.setProperty('bgImage',o.images[7].src);
	this.scrolltab.setProperty('bgImage',o.images[6].src);
	this.doc.style.top = 0;
	if(this.doc.origTop) this.doc.style.top = this.doc.origTop;
	this.doc.origTop = this.doc.getProperty('top');
	var docHeight = this.doc.getProperty('offsetHeight');
	var frameHeight = this.frame.getProperty('height');
	o.counter++;

if(docHeight <= frameHeight){
	this.scrollbar.setProperty('visibility','hidden');
	return;
}

if(ua.codeName == 'ie_4_win' || ua.codeName == 'ie_5_mac') {
	this.frameHeight = frameHeight;
	iefix();
	o.iefix = iefix;
	onresizeHandlers[onresizeHandlers.length] = 'SCROLL_obj.iefix()';
}

	this.btnHeight = parseInt(this.btnup.height);
	this.scrollEnd = o.scrollbarheight - this.btnHeight;
	this.btnup.direction = 'up';
	this.btndown.direction = 'down';
	this.btnup.b = this.btnup.src.split('0.gif').join('1.gif');
	this.btndown.b = this.btndown.src.split('0.gif').join('1.gif');
	
	var tabBottom = new csspObj('tabbottom');
	var scrollHeight = (document.layers) ? this.scrollbar.clip.height : o.scrollbarheight;
	var scrollBgHeight = scrollHeight - (this.btnHeight*2);
	
	var tabHeight = (o.dynTabHeight) ? Math.max((frameHeight*scrollBgHeight)/docHeight,o.tabminheight) : o.tabminheight;

	this.scrolltab.style.height = tabHeight;
	this.scrolltab.clipTo(0,o.scrollbarwidth,tabHeight,0);
	this.scrolltab.diffY = this.scrollbar.getProperty('top') + this.frame.getProperty('top');
	this.scrolltab.getY = function() { var o = SCROLL_obj.activeframe; if(o.scrolltab.pageY) return o.scrolltab.pageY;  return this.getProperty('top') + this.diffY }

	tabBottom.style.top = tabHeight - tabBottom.getProperty('offsetHeight');

	this.tabMaxTop = (scrollBgHeight + this.btnHeight) - tabHeight;
	this.docToTravel = docHeight - frameHeight;
	this.scrToTravel = scrollBgHeight - tabHeight;
	this.scrPixels = this.scrToTravel/this.docToTravel;
	this.docPixels = this.docToTravel/this.scrToTravel;

	var frameleft = this.frame.getProperty('left');
	var framewidth = this.frame.getProperty('width');
	this.repeatInt = 40;
	this.origInt = 350;
	this.docIncr = 10;
	this.pageIncr = scrollHeight;
	this.scrollTimer = null;
	this.bgTimer = null;
	this.tabTimer = null;
	this.clearTimers = clearTimers;
	o.activeframe = this;

if(document.layers){
	this.scrolltab.captureEvents(Event.MOUSEDOWN);
	this.elBG.captureEvents(Event.MOUSEDOWN);
}

	this.elBG.onmousedown = SCROLL_bgClicked;
	this.scrolltab.onmousedown = SCROLL_tabDown;
	this.btnup.onmousedown = this.btndown.onmousedown = SCROLL_btnDown;
	this.scrollbar.setProperty('visibility','visible');
}
}

function SCROLL_btnDown(e){
	this.origSrc = this.src;
	this.src = this.b;
	this.onmouseout = SCROLL_btnOut;
	this.ondragstart = this.onmouseup = window.onmouseup = SCROLL_btnUp;
	SCROLL_obj.activebtn = this;

	if(document.layers) captureEvents(Event.MOUSEUP);
		SCROLL_btnMove(this.direction);
		return false;
}


function SCROLL_btnMove(dir) {
	var o = SCROLL_obj.activeframe;
		if((dir == 'down' && -o.doc.getProperty('top')==o.docToTravel) || (!dir == 'up' && o.doc.getProperty('top')==0)) {o.clearTimers();return}
		o.doc.style.top = (dir == 'down') ? Math.max(o.doc.getProperty('top')-o.docIncr,o.doc.origTop-o.docToTravel) : Math.min(o.doc.getProperty('top')+o.docIncr,o.doc.origTop);
		o.scrolltab.style.top = Math.min(Math.max(o.btnHeight - (o.scrPixels*o.doc.getProperty('top')),o.btnHeight),o.tabMaxTop);
		o.scrollTimer = setTimeout("SCROLL_btnMove(SCROLL_obj.activebtn.direction)",o.repeatInt);
}


function SCROLL_btnOut(){
	SCROLL_obj.activeframe.clearTimers();
	this.src = this.origSrc;
	this.onmouseover = this.onmousedown;
}

function SCROLL_btnUp(){
	var o = SCROLL_obj.activeframe;
	var b = SCROLL_obj.activebtn;
		if(ua.ie && ua.mac) {
			o.doc.style.display = 'none';
			o.doc.style.display = 'block';
		}

		b.src = b.origSrc;
		o.clearTimers();
		b.onmouseout = b.onmouseover = null;
		if(document.layers) releaseEvents(Event.MOUSEUP);
	return false;
}


function SCROLL_tabDown(e) {
	var o = SCROLL_obj.activeframe;
	var y = (window.event) ? event.y : e.pageY;
	var x = (window.event) ? event.x : e.pageX;
	o.minX = x - 50;
	o.maxX = x + 50;
	o.curY = y;

		if(document.layers) document.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP);
			o.frame.onselectstart = function(){return false};
			document.onmousemove = SCROLL_tabMove;
			document.onmouseup = SCROLL_tabUp;
			return false;
}


function SCROLL_tabMove(e) {
	var o = SCROLL_obj.activeframe;
	var y = (window.event) ? event.y : e.pageY;
	var x = (window.event) ? event.x : e.pageX;
		if(x < o.minX || x > o.maxX) return document.onmouseup();
			var posY = Math.min(Math.max(o.scrolltab.getProperty('top')+(y - o.curY),o.btnHeight),o.tabMaxTop);
			o.scrolltab.style.top = posY;
			SCROLL_docAlign();
			o.curY = y;
			return false;
}


function SCROLL_tabUp() {
	var o = SCROLL_obj.activeframe;
		if(ua.ie && ua.mac){
			o.doc.style.display = 'none';
			o.doc.style.display = 'block';
}

		if(document.layers) {
			releaseEvents(Event.MOUSEMOVE|Event.MOUSEUP);
			o.doc.setProperty('visibility','hidden');
			setTimeout("SCROLL_obj.activeframe.doc.setProperty('visibility','visible');",5);
}

document.onmouseup = document.onmousemove = o.frame.onselectstart = null;
}


function SCROLL_docAlign(){
	var o = SCROLL_obj.activeframe;
		if(document.selection) document.selection.empty();
			var tabDiff = o.scrolltab.getProperty('top') - o.btnHeight;
			o.doc.style.top = o.doc.origTop - (tabDiff*o.docPixels);
}


function SCROLL_bgClicked(e){
	var o = SCROLL_obj.activeframe;
	var y = (window.event) ? event.y : e.pageY;
	dir = (y < o.scrolltab.getY()) ? -1 : 1;
	o.y = y;
		if(document.layers) document.captureEvents(Event.MOUSEUP);
			document.onmouseup = SCROLL_bgUp;
			SCROLL_bgMoveWhenClicked();
			o.bgTimer = setTimeout("SCROLL_obj.activeframe.tabTimer = setInterval('SCROLL_bgMoveWhenClicked()', SCROLL_obj.activeframe.repeatInt)",o.origInt);
			return false;
}

function SCROLL_bgMoveWhenClicked(e){
	var o = SCROLL_obj.activeframe;
	if(o.y > o.scrolltab.getY() && o.y <= o.scrolltab.getY()+o.scrolltab.getProperty('height')) {SCROLL_bgUp();return}
	if (dir == 1)
	if (o.y <= o.scrolltab.getY()) {SCROLL_bgUp();return}
	if (dir == -1)
	if (o.y >= o.scrolltab.getY()) {SCROLL_bgUp();return}

			o.doc.style.top = (dir == 1) ?  Math.max(o.doc.getProperty('top')-o.pageIncr,o.doc.origTop-o.docToTravel) : Math.min(o.doc.getProperty('top')+ o.pageIncr,o.doc.origTop);
			o.scrolltab.style.top = Math.min(Math.max(o.btnHeight - (o.scrPixels*o.doc.getProperty('top')),o.btnHeight),o.tabMaxTop);
}


function SCROLL_bgUp(){
	var o = SCROLL_obj.activeframe;
	o.clearTimers();
		if(document.layers) document.releaseEvents(Event.MOUSEUP);
			o.elBG.setProperty('zIndex',1);
			o.elBGcol.setProperty('zIndex',0);
			return false;
}




var o = SCROLL_obj;
o.dynTabHeight = false;
o.tabminheight = 30;
o.scrollbartop = 5;
o.scrollbarleft = 285;
o.framewidth = 500;
o.scrollbarwidth =  15;
o.scrollbarheight = 185;
o.btnheight = 16;

o.imgpath = 'images/scroll/';
o.imagenames = ['btnup0','tabtop','tabbottom','btndown0','btnup1','btndown1','tabtile','barbg0','barbg1'];
o.images = [];

for(var i in o.imagenames) {
	o.images[i] = new Image();
	o.images[i].src = o.imgpath + o.imagenames[i] + ".gif";
}

var o = null;
function mover(){
document.all.contenttext.style.pixelTop = -90;
var o = SCROLL_obj.activeframe;
o.scrolltab.style.top = Math.min(Math.max(o.btnHeight - (o.scrPixels*o.doc.getProperty('top')),o.btnHeight),o.tabMaxTop);
}
