//var scrollerheight=82;		// ½ºÅ©·Ñ·¯ÀÇ ¼¼·Î 
	var html,a1=1,wait_flag_d=false,wait_flag_u=true;	
	var bMouseOver = 1;
	var scrollspeed = 1000;		// Scrolling ¼Óµµ         
	var waitingtime = 5000;		// ¸ØÃß´Â ½Ã°£
	var scroll_content=new Array();
	var startPanel=0, n_panel=0, i=0;
	var temp = 0;
	var active_u = false, active_d = false;
	var firsttime = true;
	var k=0,i=0,kk=1,yy=0,zz=0;

	function startscroll(a1)
	{ // ½ºÅ©·Ñ ½ÃÀÛ
		z=1;
		for (z in scroll_content) 
			insert_area(z, a1++);
	//	}
		k=z-4;
		k1=k
		k3=k;
			window.setTimeout("scrolling_up()",1);
	}	

	function scrolling_up(){ // ½ÇÁ¦·Î ½ºÅ©·Ñ ÇÏ´Â ºÎºÐ
	if(wait_flag_d) return;
		if (bMouseOver && wait_flag_u)
		{	
			if(zindex1==0){
			for (i=k;i<=z;i++){
				tmp = document.getElementById('scroll_area'+i).style;
				tmp.top = parseInt(tmp.top)+scrollspeed;
				}
				temp += scrollspeed;
				if(temp >= scrollerheight) {//´ë±â½Ã°£
					wait_flag_u = false;
					active_u= false;
					temp = 0;
										document.getElementById('scroll_area'+k).style.visibility="hidden";
										document.getElementById('scroll_area'+k).style.visibility="visible";
					k++;
					if(firsttime) window.setTimeout("wait_flag_u=true;scrolling_up()",100);
					return;					
				}
				if (parseInt(tmp.top)>=92)
					{
						k=(k1=k1-1);
						zindex1=1;	
					window.setTimeout("wait_flag_u=true;scrolling_up()",2000);
					return;	
					}

				//window.setTimeout("scrolling_up()",1);

				}
			else if(zindex1==1){
			
				tmp = document.getElementById('scroll_area'+k).style;
				tmp.top = parseInt(tmp.top)+scrollspeed;			
				temp += scrollspeed;

				if(temp >= scrollerheight) {//´ë±â½Ã°£
					wait_flag_u = false;
					active_u= false;
					temp = 0;
					yy++;

					document.getElementById('scroll_area'+k).style.visibility="hidden";
										document.getElementById('scroll_area'+k).style.visibility="visible";
					k++;
					
					if(k>z){k=1;}
										
					if(yy>=5){
						xx=k;
						if(xx>z){xx=xx-z;}

						document.getElementById('scroll_area'+xx).style.top="-23px";
						document.getElementById('scroll_area'+xx).style.zIndex=document.getElementById('scroll_area'+xx).style.zIndex+15;

						k=(k1=k1-1);
						yy=0;


						if (k==0)
							{
							k=z;
							zindex1=1; 
							k1=k;
						
						}
						window.setTimeout("wait_flag_u=true;scrolling_up()",2000);
							return;}

					if(firsttime) window.setTimeout("wait_flag_u=true;scrolling_up()",100);
					return;					
					}

			}
		}
			window.setTimeout("scrolling_up()",10);
	}


	function insert_area(idx, n){ // area »ðÀÔ
		html = '';
		html='<div style="background-color:#ffffff;z-index:'+(14-idx)+';left: 0px; width: 100%; position: absolute; top:'+(-scrollerheight)+'px" id="scroll_area'+idx+'">\n';
		html+=scroll_content[idx];
		html+='</div>\n';

								

		
		document.write(html);

	}

	function documentWrite(a1){
		
       startscroll(a1);
	
		
		
	}
function wait1(a1){
		
       startscroll(a1);
	
		
		
	}
