
	// Hot Item ½ºÅ©·Ñ START	
	var ScrollDiv = function(increase_value, interval_time, move_div_width, move_div_length, autodelay_time) {
		this.increase_value = increase_value;
		this.interval_time = interval_time;
		this.moving_cnt = 0;
		this.interval_obj = null;
		this.move_div_width = move_div_width;
		this.move_div_length = move_div_length;
		this.active_div = new Array(move_div_length);
		this.scrolling_div = new Array(move_div_length+1);
		this.scrolling_flag = false;
		this.autodelay_time = autodelay_time;
		this.auto_interval_obj = null;

		for (i=0; i<move_div_length+1 ; i++) {
			if (i != move_div_length) this.active_div[i] = i;
			this.scrolling_div[i] = i;
		}
	}

	var hotItem1_scrollObj = new ScrollDiv(2, 3, 160, 4, 3000);

	ScrollDiv.prototype.fn_scroll = function(direction, kind) {

		if (this.scrolling_flag) {
			return;
		}

		if (this.auto_interval_obj != null) {
			clearTimeout(this.auto_interval_obj);
		}

		this.scrolling_flag = true;

		var scroll_obj = document.getElementsByName(kind+"_scroll_div");

		if (scroll_obj == null || scroll_obj.length <= this.move_div_length) {
			return;
		}

		if (direction == "L") {
			for (i=-1; i<this.scrolling_div.length-1; i++) {
				if (i == -1) {
					if(this.active_div[0] - 1 < 0) 
						this.scrolling_div[i+1] = scroll_obj.length-1;
					else 
						this.scrolling_div[i+1] = this.active_div[0] - 1;

					scroll_obj[this.scrolling_div[i+1]].style.left = -this.move_div_width;
					
				} else {
				
					this.scrolling_div[i+1] = this.active_div[i];

					this.active_div[i] -= 1;
					if (this.active_div[i] < 0) {
						this.active_div[i] = scroll_obj.length-1;
					}
				}
			}

		} else {
			for (i=0; i<this.scrolling_div.length; i++) {
				if (i == this.move_div_length) {
					if (this.active_div[i-1] > scroll_obj.length-1) 
						this.scrolling_div[i] = 0;
					else
						this.scrolling_div[i] = this.active_div[i-1];
					
					scroll_obj[this.scrolling_div[i]].style.left = this.move_div_width * this.move_div_length;
					
				} else {
				
					this.scrolling_div[i] = this.active_div[i];

					this.active_div[i] += 1;
					if (this.active_div[i] > scroll_obj.length-1) {
						this.active_div[i] = 0;
					}
				}
			}
		}

		eval(kind+"_scrollObj").fn_doScrolling(direction,kind);

	}

	ScrollDiv.prototype.fn_doScrolling = function(direction,kind) {
		var scroll_obj = document.getElementsByName(kind+"_scroll_div");

		if (this.moving_cnt == this.move_div_width) {

			this.moving_cnt = 0;
			clearTimeout(this.interval_obj);
			this.scrolling_flag = false;
			
			if (kind == "hotItem1")
				this.auto_interval_obj = setTimeout("hotItem1_scrollObj.fn_scroll('" + direction + "','hotItem1')", this.autodelay_time);
			//else if (kind == "hotItem2")
				//this.auto_interval_obj = setTimeout("hotItem2_scrollObj.fn_scroll('" + direction + "','hotItem2')", this.autodelay_time);			
				
			return;
		}

		for (i=0; i<this.scrolling_div.length; i++) {
			if (direction == "L") {
				scroll_obj[this.scrolling_div[i]].style.left = parseInt(scroll_obj[this.scrolling_div[i]].style.left) + this.increase_value;
			} else {
				scroll_obj[this.scrolling_div[i]].style.left = parseInt(scroll_obj[this.scrolling_div[i]].style.left) - this.increase_value;
			}
		}

		this.moving_cnt += this.increase_value;

		this.interval_obj = setTimeout(kind+"_scrollObj.fn_doScrolling('" + direction + "','" + kind + "')", this.interval_time);
	}


	if (window.addEventListener) {
		window.addEventListener("load", function(){hotItem1_scrollObj.fn_scroll('R','hotItem1');}, false);
	} else if (window.attachEvent) {
		window.attachEvent("onload", function(){hotItem1_scrollObj.fn_scroll('R','hotItem1');});
	} else {
		window.onload = function(){hotItem1_scrollObj.fn_scroll('R','hotItem1');};
	}	

	// scroll : Hot Item end
