var scrollVTimer ;

// stage 초기화
function initStage(idStage, posX, posY) {
	var stage = document.getElementById(idStage);

	// Stage position
	stage.style.position="absolute";
	stage.style.top = posY+'px';
	stage.style.left = posX+'px';

	// Stage size
	stage.style.height = "125px";
}

// text block 초기화
function initText(idText, idStage) {
	var stage = document.getElementById(idStage);
	var objText = document.getElementById(idText);

	objText.style.display = "block";
	objText.style.position = "relative";
	objText.style.top = stage.style.height;
	objText.style.height = "750px";
}

function movUpText(idStage, idText) {
	var objStage = document.getElementById(idStage);
	var objText = document.getElementById(idText);

	if ( parseInt(objText.style.top)*-1 < parseInt(objText.style.height) )
	{
		objText.style.top = (parseInt(objText.style.top) - 1)+'px';
	}
	else
	{
		initText(idText, idStage);
	}

	scrollVTimer = setTimeout("movUpText('"+ idStage + "', '"+idText+"')", 50);
}

function scrollUp(idStage, idText, posX, posY) {
	initStage(idStage, posX, posY);
	initText(idText, idStage);
	movUpText(idStage, idText);
}

var scrollHTimer1;
// 스크롤러의 가로크기
var sliderwidth;
// 스크롤러의 높이 (이미지의 높이와 맞추어 주세요)
var sliderheight;
// 스크롤 속도 (클수록 빠릅니다 1-10)
var slidespeed=1;
var slidedirection=1;
// 배경색상
slidebgcolor="#EAEAEA";

var finalslide='';
var copyspeed=slidespeed;
var actualwidth=2220;
var cross_slide, ns_slide;

function setSliding(){
	cross_slide = document.getElementById("photos1");
	cross_slide2 = document.getElementById("photos2");
	cross_slide2.style.left = actualwidth+'px';
	sliding();
}

function sliding() {
	if (parseInt(cross_slide.style.left)>(actualwidth*(-1)))
		cross_slide.style.left = (parseInt(cross_slide.style.left)-copyspeed*slidedirection)+'px';
	else
		cross_slide.style.left = (parseInt(cross_slide2.style.left)+actualwidth)+'px';

	if (parseInt(cross_slide2.style.left)>(actualwidth*(-1)))
		cross_slide2.style.left = (parseInt(cross_slide2.style.left)-copyspeed*slidedirection)+'px';
	else
		cross_slide2.style.left = (parseInt(cross_slide.style.left)+actualwidth)+'px';

	scrollHTimer1 = setTimeout("sliding()", 50);
}