function getObj(name) {
	if (document.getElementById) {
		return document.getElementById(name);
	} else if (document.all) {
		return document.all[name];
	} else if (document.layers) {
		return document.layers[name];
	} else {
		return false;
	}
}

/* ######################### */
function TextScroll(scrollname, div_name, up_name, down_name) {
    this.div_name = div_name;
    this.name = scrollname;
    this.scrollCursor = 0;
    this.speed = 8;
    this.timeoutID = 0;
    this.div_obj = null;
    this.up_name = up_name;
    this.dn_name = down_name;

{
            div_obj = getObj(this.div_name);
            if (div_obj) {
                this.div_obj = div_obj;
                this.div_obj.style.overflow = 'hidden';
            }
            div_up_obj = getObj(this.up_name);
            div_dn_obj = getObj(this.dn_name);
            if (div_up_obj && div_dn_obj) {
                /*
				div_up_obj.setAttribute("onmouseover", scrollname + ".scrollUp();")
                div_up_obj.setAttribute("onmouseout", scrollname + ".stopScroll();")
				div_dn_obj.setAttribute("onmouseover", scrollname + ".scrollDown();")
                div_dn_obj.setAttribute("onmouseout", scrollname + ".stopScroll();")
				*/	
				
				div_up_obj.onmouseover = function() { eval(scrollname + ".scrollUp();") };
				div_up_obj.onmouseout = function() { eval(scrollname + ".stopScroll();") };				
				div_dn_obj.onmouseover = function() { eval(scrollname + ".scrollDown();") };
				div_dn_obj.onmouseout = function() { eval(scrollname + ".stopScroll();") };
				
            }
    }

	this.stopScroll = function() {
        clearTimeout(this.timeoutID);
    }

	this.scrollUp = function() {
        if (this.div_obj) {
            this.scrollCursor = (this.scrollCursor - this.speed) < 0 ? 0 : this.scrollCursor - this.speed;
            this.div_obj.scrollTop = this.scrollCursor;
            this.timeoutID = setTimeout(this.name + ".scrollUp()", 60);
        }
    }

	this.scrollDown = function() {
        if (this.div_obj) {
            this.scrollCursor += this.speed;
            this.div_obj.scrollTop = this.scrollCursor;
            this.timeoutID = setTimeout(this.name + ".scrollDown()", 60);
        }
    }

	this.resetScroll = function() {
        if (this.div_obj) {
            this.div_obj.scrollTop = 0;
            this.scrollCursor = 0;
        }
    }
}

/* ******************* */

function swfobj (src,w,h,flashvars) {
  AC_FL_RunContent('codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0',
									 'width', w,
									 'height', h,
									 'src', src,
									 'quality', 'high',
									 'menu', 'false',
									 'pluginspage','http://www.macromedia.com/go/getflashplayer',
									 'movie',src,
									 'flashvars',flashvars ,
									 'style','z-index:397'
									 );
} 

/* ******************* */

function oPW (wname, path, w, h) {
	wleft = (screen.width - w)/2
	wtop = (screen.height - h)/2;
	var wnd_PW = window.open(path, wname, 'toolbar=0, status=0, menubar=0, width='+w+', height='+h+', left='+wleft+', top='+wtop+', resizable=1, scrollbars=1');
	wnd_PW.focus();
	return false;
} 

function oQT (path) {
	w=720;
	h=550;
	left = (screen.width - w)/2;
	top = (screen.height - h)/2;
	
	params="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width="+w+",height="+h+",left="+left+", top="+top;	
	var wnd_QT = window.open(path,'wndQT',params);
	return false;
}

