function scroller_rule_left() {
	var data = "";
	imgPlaces = 0;
	moz = document.getElementById&&!document.all
	step = 1; 
	timer_left = "";
	timer_left1 = "";
	speed_left = 50;
	nextPic = 0;
	initPos = new Array()
	nowDivPos = new Array()
	imgHeight = 93;
	var container_w = 163;
	var height_all_check;
	var dbv = "";
	/*
		Set DBV
	*/
	this.set_dbv = function(dbvx) {
		if(dbvx!=null) {
			dbv = dbvx;
		}
	}
	/*
		IMG num
	*/
	this.set_img_num = function(num) {
		imgPlaces = num-1;
	}
	/*
		Data
	*/
	this.set_data = function(obj) {
		data = obj;
	}
	/*
		initHIS3
	*/
	this.display = function(){
		clearTimeout(timer_left1)
		var height_all = 0;
		for(var i=0;i<=imgPlaces;i++){ 
			newImg = document.createElement("IMG")
			newImg.setAttribute("id","scroll_pic_part_"+i)
			newImg.setAttribute("src","")
			newImg.style.position = "absolute";
			newImg.style.width = data[i][2]+'px';
			newImg.style.height = data[i][3]+'px';
			newImg.style.padding = '0 0 0 '+(Math.ceil((container_w-data[i][2])/2)-3)+'px';
			//newImg.style.border = "#ff0000 solid 1px;";
			newImg.title = data[i][4];
			newImg.i = i
			newImg.onclick=function(){
				his3Win(data[i][2]);
			}
			document.getElementById("part_display_area").appendChild(newImg)
			height_all+=parseFloat(data[i][3]);
		}
		height_all_check = height_all;
		containerEL = document.getElementById("part_container")
		displayArea = document.getElementById("part_display_area")
		pic0 = document.getElementById("scroll_pic_part_0")
		containerBorder = (document.compatMode=="CSS1Compat"?0:parseInt(containerEL.style.borderWidth)*2)
		containerWidth = container_w;
		containerEL.style.width = containerWidth+(!moz?containerBorder:"")+"px"
		containerEL.style.height = (imgHeight*4)+(!moz?containerBorder:"")+"px"
		displayArea.onmouseover = function() {
			stopHIS3_left()
		}
		displayArea.onmouseout = function() {
			scrollHIS3_left()
		}
		imgPos_left = 0;
		timer_left1 = setTimeout(this.run_scroller,100);
	}
	/*
		Run scroller
	*/
	this.run_scroller = function() {
		for(var i=0;i<=imgPlaces;i++){
			currentImage = document.getElementById("scroll_pic_part_"+i);
			try {
				var wd = document.getElementById("scroll_pic_part_"+(i-1)).height;
			} catch(Error) {
				var wd = 0;
			}
			imgPos_left+=parseFloat(wd);
			currentImage.style.top = imgPos_left+"px";
			currentImage.style.left = '3px';
			if(nextPic==data.length){
				nextPic = 0;
			}
			currentImage.src = dbv+'picturessmall/'+data[i][0];
			var inb = data[i][1].split('-');
			currentImage.alt = data[i][4];
			currentImage.title = data[i][4];
			currentImage.i = data[i][1];
			if(data[i][1]!='') {
				currentImage.style.cursor = 'pointer';
				currentImage.onclick = function() {
					his3Win(this.i)
				}
			}
		}
		scrollHIS3_left();	
	}
	/*
		Scroll HIS3
	*/
	scrollHIS3_left = function() {
		clearTimeout(timer_left)
		for(var i=0;i<=imgPlaces;i++){
			currentImage = document.getElementById("scroll_pic_part_"+i)
			nowDivPos[i] = parseInt(currentImage.style.top);
			nowDivPos[i]-= step;
			try {
				var wd = imgHeight;	
			} catch(Error) {
				var wd = 0;
			}
			if(nowDivPos[i]<=-wd) {
				if(height_all_check>container_w) {
					currentImage.style.top = (containerWidth+(height_all_check-container_w)-imgHeight)+"px";
				} else {
					currentImage.style.top = (containerWidth)+"px";
				}
				currentImage.alt = data[i][4];
				currentImage.title = data[i][4];
				currentImage.i = data[i][1];
				if(data[i][1]!='') {
					currentImage.style.cursor = 'pointer';
					currentImage.onclick = function() {
						his3Win(this.i)
					}
				}
				
			} else {
				currentImage.style.top = nowDivPos[i]+"px"
			}
		}
		timer_left = setTimeout("scrollHIS3_left()",speed_left)
	}
	/*
		Stop HIS3
	*/
	stopHIS3_left = function(){
		clearTimeout(timer_left)
	}
	/*
		his3Win
	*/
	his3Win = function(loc){
		document.location.target = '_blank';
		document.location.href = dbv+loc;
	}
}
scroller_rule_left = new scroller_rule_left();
