function pic_roll() {

	//

	this.name = "pic";

	//

	this.cur_idx = 1;

	//

	this.last_idx;

	// 

	this.show_idx = 1;

	//

	this.show_sec = 5;

	//

	this.chk_cnt = 0;



	//

	this.auto_flow = function(){

		//alert(this.chk_cnt);

		if(this.chk_cnt + 1 == this.show_sec) {

			this.chk_cnt = 1;

			this.next_pic();

		}

		else {

			this.chk_cnt++;

		}

		window.setTimeout(this.name + ".auto_flow();", 1000);

	}



	// 

	this.next_pic = function () {

		if(this.cur_idx == this.last_idx) {

			this.cur_idx = 1;

		}

		else {

			this.cur_idx++;

		}

		this.show_pic(this.cur_idx);

	}



	//

	this.prev_pic = function () {

		if(this.cur_idx == 1) {

			this.cur_idx = this.last_idx;

		}

		else {

			this.cur_idx--;

		}

		this.show_pic(this.cur_idx);

	}



	this.show_pic = function (idx) {

		// 
		var show_id = this.name + this.show_idx;

		show_obj = document.getElementById(show_id);

		show_obj.style.display = "none";



		//

		var div_id  = this.name + idx;

		this.show_idx = idx;

		new_obj = document.getElementById(div_id);

		new_obj.style.display = "";



		// 

		this.chk_cnt = 1;

	}

}

document.write('');