function UpMarquee(){
	this.marquee = null;
	this.speed = 10;
	this.waitTime = 1500;
	this.init = function(o_div){
		if( o_div.childNodes.length<4 ){
			return;
		}
		this.marquee = o_div;
		o_div.co = this;
		o_div.stop = false;
		o_div.wait = false;
		o_div.onmouseover = function(){this.stop = true;}
		o_div.onmouseout = function(){this.stop = false;}
		o_subDivLayer = document.createElement("div");
		o_subDivLayer.style.position = "relative";
		o_subDivLayer.style.top = o_div.clientHeight;
		o_subDivLayer.innerHTML = o_div.innerHTML;
		o_div.innerHTML = "";
		o_div.appendChild(o_subDivLayer);
		o_div.first = true;
		o_div.scroll = function(){
			if(!this.stop){
				var o_layer = o_subDivLayer;
				var o_firstChild;
				for(var i=0;i<o_layer.childNodes.length;i++){
					if( o_layer.childNodes.item(i).nodeType==1 ){
						o_firstChild = o_layer.childNodes.item(i);
						break;
					}
				}
				if( typeof(o_layer.myOffsetTop)=="undefined" ){
					o_layer.myOffsetTop = 0;
				}
				UpMarquee.log("o_layer.myOffsetTop="+o_layer.myOffsetTop+", o_firstChild.offsetHeight="+o_firstChild.offsetHeight+"<BR>");
				if( this.first && o_layer.myOffsetTop==0 ){
					this.wait = true;
					this.first = false;
				}else if( o_layer.myOffsetTop + o_firstChild.offsetHeight ==0 ){
					o_layer.appendChild(o_firstChild);
					o_layer.style.top = 0;
					o_layer.myOffsetTop = 0;
					this.wait = true;
				}else{
					o_layer.myOffsetTop--;
				}
				UpMarquee.log(o_layer.style.top+"<BR>");
				o_layer.style.top = o_layer.myOffsetTop+"px";
				UpMarquee.log(o_layer.style.top+"<BR>");
			}
			var i_msec = 0;
			if( this.wait ){
				i_msec = this.co.waitTime;
				this.wait = false;
			}else{
				i_msec = this.co.speed;
			}
			setTimeout(this.id+".scroll()",i_msec);
		}
		setTimeout(o_div.id+".scroll()",this.speed);
	}
}
UpMarquee.debug = false;
UpMarquee.maxLogCount = 100;
UpMarquee.logCount = 0;
UpMarquee.log = function(s_msg){
	if( UpMarquee.debug ){
		UpMarquee.logCount++;
		if( UpMarquee.logCount>UpMarquee.maxLogCount ){
			return;
		}
		o_logTag = document.getElementById("UpMarquee_log");
		if( o_logTag==null ){
			o_logTag = document.createElement("div");
			o_logTag.id = "UpMarquee_log";
			document.body.appendChild(o_logTag);
		}
		o_logTag.innerHTML += s_msg;
	}
}