
//#############°ü¸®ÀÚ ·Î±×ÀÎ Ã¼Å© ##########
function admin_login_chk(fm){
	if(!fm.login_id.value){
		alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä");
		fm.login_id.style.border = '2px solid #ff004e';
		fm.login_id.focus();
		return false;
	}else{
		fm.login_id.style.border = '1px solid #999999';
	}
	if(!fm.login_passwd.value){
		alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä");
		fm.login_passwd.style.border = '2px solid #ff004e';
		fm.login_passwd.focus();
		return false;
	}else{
	fm.login_passwd.style.border = '1px solid #999999';
	}

fm.submit();

}

//#############¹®ÀÇ ¸ÞÀÏÃ¼Å© ##########
function check_mail(fm) {  ///// È¸¿ø°¡ÀÔ ¸ÞÀÏ ¸®½ºÆ® Ã¼Å©
if (fm.email_list.value!="" && fm.email_list.value!="self") {
			fm.email2.style.display = 'none';
			fm.email2.value = fm.email_list.value;
		} else if (fm.email_list.value=="self") {
			fm.email2.value = '';
			fm.email2.style.display = '';
			fm.email2.focus();
		}

}

//#############¾Ù¹ü ÄÚ¸àÆ® Ã¼Å© ##########
function album_cmt_input_check(fm){

	if(!fm.cmt_name.value){
	alert("ÀÌ¸§À» ÀÔ·ÂÇØÁÖ¼¼¿ä");
	return false;
	}
	if(!fm.cmt_passwd.value){
	alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä");
	return false;
	}
	fm.submit();

}

//#############¾Ù¹ü ÄÚ¸àÆ® »èÁ¦ ##########
function album_delete_cmt(fm,CmtIdx)
{
	var PasswdBox = eval("fm.cmt_password_"+CmtIdx+".value");
	if(PasswdBox =="")	alert("»èÁ¦ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
	else
	{

		fm.cmt_password.value=PasswdBox;
		fm.cmt_idx.value=CmtIdx;
		fm.submit();
	}
}


//#############¹®ÀÇ ÇÏ±â Ã¼Å© ##########
function qna_chk(fm) {
	if( agree_chk.checked == false ) {
		alert("°³ÀÎÁ¤º¸Ãë±Þ¹æÄ§¿¡ µ¿ÀÇ ÇÏ¼Å¾ß ÇÕ´Ï´Ù.");
		return false;
	}

	if(!fm.name.value){
	alert("ÀÌ¸§À» ÀÔ·ÂÇØÁÖ¼¼¿ä");
	return false;
	}
	if(!fm.phone2.value){
	alert("ÀüÈ­¹øÈ£¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä");
	return false;
	}
	if(!fm.phone3.value){
	alert("ÀüÈ­¹øÈ£¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä");
	return false;
	}
	if(!fm.contents.value){
	alert("»ó´ã³»¿ëÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä");
	return false;
	}

	fm.submit();
}

//#############°Ë»ö ÇÏ±â Ã¼Å© ##########
function resort_search(fm)
{
	if(!fm.Search_Str.value){
	alert("°Ë»öÇÒ ¸®Á¶Æ®¸íÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä.")
	return false;
	}

	fm.submit();
}


//#############¼ýÀÚ¸¸ ÀÔ·Â ##########
function OnlyNumber(num){
ins = num.value;
var pnumresult="";
    for (i=0; i<ins.length; i++) {
        charpnum = ins.substr(i,1);
        if (charpnum.charCodeAt(0) > 46 && charpnum.charCodeAt(0) < 58  )
		pnumresult = pnumresult + charpnum;
    }
num.value = pnumresult;
//if(ins == 0) p_num.value = '';
}


//#############È¸¿øÅ»Åð Ã¼Å© ##########

function OutMember(fm) {
	if(!fm.passwd.value){
	alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.")
	return false;
	}
	if(!fm.out_reason.value){
	alert("Å»Åð»çÀ¯¸¦ ¼±ÅÃÇØÁÖ¼¼¿ä.")
	return false;
	}

	if (confirm(" È¸¿øÅ»Åð¸¦ ÇÏ½Ã°Ú½À´Ï±î?")){
	fm.submit();
	}

}

//ÄíÅ°Ã¼Å©
function getCookie(name) {

	var found = false;
	var start,end;

	for(i = 0; i <= document.cookie.length; i++)
	{
		start = i;
		end = start + name.length;
		if(document.cookie.substring(start,end) ==name)
		{
			found = true;
			break;
		}
	}

	if(found == true)
	{
		start = end + 1;
		end = document.cookie.indexOf(';',start);

		if(end < start)
			end = document.cookie.length;
		return document.cookie.substring(start,end);
	}
	return '';
}

function pop_show()
{

	//ÇÑº¹ÀÌº¥Æ®
	//if(!getCookie('Not_pop4')){
	//window.open('pop/pop4.html','Banner_1','left=395,top=0,width=500,height=530');
	//}

	//ÀÔÁ¡¹®ÀÇ
	if(!getCookie('Not_pop1')){
	window.open('pop/pop1.html','banner1','left=0,top=0,width=300,height=420');
	}
}

function ViewCI( sel ) {
/*
	alert(document.getElementById('btn1').src);
	var imgAry=new Array("","","","");

	fan_bt
	swis_bt
	ital_bt
*/
	var selValue="viewCI"+sel;

	for( var i=1;i<=4;i++ ){
		var Allval="viewCI"+i;
		document.getElementById(Allval).style.display="none";
		if( i == sel ){
			document.getElementById(selValue).style.display="";
		}
	}
}


//ÀÚµ¿½ºÅ©·Ñ
var delay_time=500;
var timer_stat=0;
var mouse_over=0;
var box_height=28;
var user_mouse_over=0;
var move_up_time=5;
function auto_scroll_move(base_height)
{
	if(!user_mouse_over)
	{
		now_scroll_pos=parseInt(movie_box.style.top,10);



		if(now_scroll_pos%box_height==0&&mouse_over==0)
		{
			mouse_over=1;
			timer_stat=0;
		}

		if(mouse_over==0)	movie_box.style.top=now_scroll_pos-1;
		if(mouse_over==1)	timer_stat++;

		if(delay_time==timer_stat)
		{
			mouse_over=0;
			movie_box.style.top=now_scroll_pos-1;
		}

		if((base_height*-1)==now_scroll_pos)
		{
			movie_box.style.top=box_height-1;

			timer_stat=0;
			mouse_over=0;
		}
	}
	setTimeout("auto_scroll_move("+base_height+")",move_up_time);
}



	//¸ÞÀÎ ¿©ÇàÁö¹Ì¸®´Ù³à¿À±â ÇÃ·¡½¬ È¿°ú..
	var leftCt = 0;
	/*
	$(function(){
		$("#album").attr("top", "0");
		imgStart("R");
	});
	*/

	function imgStart(tp){
		clearInterval($("#imgList").attr("timer"));
		if(tp == "R"){ // ¿À¸¥ÂÊ ÀÌµ¿
			imgRight();
			$("#imgList").attr("timer", setInterval("imgRight()", 3000)); // ¸ØÃçÀÖ´Â ½Ã°£
		}else{ // ¿ÞÂÊÀÌµ¿
			if(leftCt == 0){
				var leng = $("#imgList div").size();
				$("#imgList").css("left",parseInt($("#imgList div").eq(0).width()*-1));
				$("#imgList>div").eq(parseInt(leng-1)).clone().prependTo($("#imgList"));
				$("#imgList>div").eq(leng).remove();
				leftCt = 1;
			}
			imgLeft();
			$("#imgList").attr("timer", setInterval("imgLeft()", 3000));
		}
	}
	function imgRight(){
		$("#imgList").animate({
			left : parseInt($("#imgList div").eq(0).width() * -1)
		},300,function(){
			$("#imgList").css("left", "0px");
			$("#imgList>div").eq(0).clone().appendTo($("#imgList"));
			$("#imgList>div").eq(0).remove();
		});
	}
	function imgLeft(){
		var leng = $("#imgList div").size();
		$("#imgList").animate({
			left : 0
		},300,function(){
			$("#imgList").css("left", "0px");
			$("#imgList").css("left",parseInt($("#imgList div").eq(0).width()*-1));
			$("#imgList>div").eq(parseInt(leng-1)).clone().prependTo($("#imgList"));
			$("#imgList>div").eq(leng).remove();
		});
	}


// ÀÌ¹ÌÁö ON/OFF
//imgOnOff(Å¬¸¯ ÀÌ¹ÌÁö ¾ÆÀÌµð°ª,ÀÌ¹ÌÁö º¸¿©Áú°÷,ÀÌ¹ÌÁö°ª¹Þ¾Æ¿À´Â°÷,¿ÂÀÏ¶§ ÀÌ¹ÌÁö, ¿ÀÇÁÀÏ¶§ ÀÌ¹ÌÁö, º¸¿©Áú ÀÌ¹ÌÁö)
//ÀÌ¹ÌÁö ¾ÆÀÌµð´Â imgID + ¼ýÀÚ ·Î ÇÏ±â
function imgOn( ThisID,ImgPlace,HiddenIdx,OnImg,OffImg,showImg,All ){

		document.getElementById(ThisID).src=OnImg;
		document.getElementById(HiddenIdx).value=ThisID;
		document.getElementById('c_info').style.display='';
		document.getElementById(ImgPlace).src=showImg;
		document.getElementById('closeBtnImg').value=OffImg;


}

function imgOff( divId,NowShowIdx,closeBtn ){
	var NSI=document.getElementById(NowShowIdx).value;
	document.getElementById(divId).style.display='none';
	document.getElementById(NSI).src=document.getElementById(closeBtn).value;
}
