<!--
function ujf_setslide(aVal) {
	if(aVal) {
		if( document.getElementById("cs_"+aVal).style.pixelWidth==0 || !document.getElementById("cs_"+aVal).style.width ) {
			if( document.getElementById("cs_1").style.pixelWidth>=0 || document.getElementById("cs_1").style.width!="" ) { ujf_moveslide(1,'c'); }
			if( document.getElementById("cs_2").style.pixelWidth>=0 || document.getElementById("cs_2").style.width!="" ) { ujf_moveslide(2,'c'); }
			if( document.getElementById("cs_3").style.pixelWidth>=0 || document.getElementById("cs_3").style.width!="" ) { ujf_moveslide(3,'c'); }
			if( document.getElementById("cs_4").style.pixelWidth>=0 || document.getElementById("cs_4").style.width!="" ) { ujf_moveslide(4,'c'); }
			ujf_moveslide(aVal,'o');
			ujf_fadeImage("csImg_"+aVal);
		} else {
			ujf_moveslide(aVal,'c');
		}
	}
}

function ujf_moveslide(aVal,aTag) {
	var sObj = document.getElementById("cs_"+aVal);
	var maxWidth=76; var minWidth=0; var intVal = 5;
	var tmpWidth = sObj.style.width.replace("px",""); // ff ¿ëÀÔ´Ï´Ù.
	var tmpVal;

	if(aTag=='o') { // ½½¶óÀÌµå ¿­±â..
		if((sObj.style.pixelWidth+(intVal-4)>=maxWidth)||(tmpWidth+(intVal-4)>=maxWidth)) {
			sObj.style.pixelWidth = maxWidth ;
			sObj.style.width = maxWidth + "px";
			clearTimeout(timer1);
		} else {
			sObj.style.pixelWidth = sObj.style.pixelWidth + (intVal-4);
			tmpVal = tmpWidth + (intVal-4);
			sObj.style.width = tmpVal + "px";
			var timer1=setTimeout("ujf_moveslide("+aVal+",'o')",75);
		}
	} else {
		if((sObj.style.pixelWidth-intVal<=minWidth)||(tmpWidth-intVal)<=minWidth) {
			sObj.style.pixelWidth = minWidth;
			sObj.style.width = "";
			clearTimeout(timer2);
		} else {
			sObj.style.pixelWidth = sObj.style.pixelWidth - intVal;
			tmpVal = tmpWidth - intVal;
			sObj.style.width = tmpVal + "px";
			var timer2=setTimeout("ujf_moveslide("+aVal+",'c')",10);
		}
	}
}

function ujf_setOpacity(obj, opacity) {
	opacity = (opacity == 100)?99.999:opacity;

	// IE/Win
	obj.style.filter = "alpha(opacity:"+opacity+")";

	// Safari<1.2, Konqueror
	obj.style.KHTMLOpacity = opacity/100;

	// Older Mozilla and Firefox
	obj.style.MozOpacity = opacity/100;

	// Safari 1.2, newer Firefox and Mozilla, CSS3
	obj.style.opacity = opacity/100;
}

function ujf_fadeIn(objId,opacity) {
	if (document.getElementById) {
		obj = document.getElementById(objId);
		if (opacity <= 100) {
			ujf_setOpacity(obj, opacity);
			opacity += 10;
			window.setTimeout("ujf_fadeIn('"+objId+"',"+opacity+")", 100);
		}
	}
}

function ujf_fadeImage(aImg) {
	image = document.getElementById(aImg);
	ujf_setOpacity(image, 0);
	ujf_fadeIn(aImg,0 );
}

function ujf_chkMail(ObjMail)
{
	var mailexp = /[a-z0-9]{2,}@[a-z0-9-]{2,}\.[a-z0-9]{2,}/i; 
	if(!mailexp.test(ObjMail))
	{
		return false;
	}
	return true;
}


function setCookie( name, value, expiredays )
{
	var todayDate = new Date();
	todayDate.setDate( todayDate.getDate() + expiredays );
	document.cookie = name + "=" + escape( value ) + "; path=/; " + (expiredays?"expires=" + todayDate.toGMTString() + ";":"");
}

function getCookie( name )
{
	var nameOfCookie = name + "=";
	var x = 0;
	while ( x <= document.cookie.length )
	{
		var y = (x+nameOfCookie.length);
		if ( document.cookie.substring( x, y ) == nameOfCookie ) {
			if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
			endOfCookie = document.cookie.length;
			return unescape( document.cookie.substring( y, endOfCookie ) );
		}
		x = document.cookie.indexOf( " ", x ) + 1;
		if ( x == 0 )
		break;
	}
	return "";
}

//-->
