function btn_n(num){

	if(num != 0){
	if(num==1){
		//alert('µî·ÏµÈ ÀÌ¹ÌÁö°¡ ÇÏ³ª ÀÔ´Ï´Ù.');
	}
	if(num==2){
		var layer_h = document.getElementById("photo_hid").value;
		var photo_l_1 = document.getElementById("photo_layer_0");
		var photo_l_2 = document.getElementById("photo_layer_1");
		var photo_show = document.getElementById(layer_h);
		photo_l_1.style.display = "none";
		photo_l_2.style.display = "none";
		photo_show.style.display = "block";

		if(layer_h == "photo_layer_1"){
			document.getElementById("photo_hid").value = "photo_layer_0";
			document.getElementById("photo_hid2").value = "photo_layer_0";
		}else if(layer_h == "photo_layer_0"){
			document.getElementById("photo_hid").value = "photo_layer_1";
			document.getElementById("photo_hid2").value = "photo_layer_1";
		}
	}
	if(num==3){
		var layer_h = document.getElementById("photo_hid").value;
		var photo_l_1 = document.getElementById("photo_layer_0");
		var photo_l_2 = document.getElementById("photo_layer_1");
		var photo_l_3 = document.getElementById("photo_layer_2");
		var photo_show = document.getElementById(layer_h);
		photo_l_1.style.display = "none";
		photo_l_2.style.display = "none";
		photo_l_3.style.display = "none";
		photo_show.style.display = "block";

		if(layer_h == "photo_layer_1"){
			document.getElementById("photo_hid").value = "photo_layer_2";
			document.getElementById("photo_hid2").value = "photo_layer_0";
		}else if(layer_h == "photo_layer_2"){
			document.getElementById("photo_hid").value = "photo_layer_0";
			document.getElementById("photo_hid2").value = "photo_layer_1";
		}else if(layer_h == "photo_layer_0"){
			document.getElementById("photo_hid").value = "photo_layer_1";
			document.getElementById("photo_hid2").value = "photo_layer_2";
		}
	}
	if(num==4){
		var layer_h = document.getElementById("photo_hid").value;
		var photo_l_1 = document.getElementById("photo_layer_0");
		var photo_l_2 = document.getElementById("photo_layer_1");
		var photo_l_3 = document.getElementById("photo_layer_2");
		var photo_l_4 = document.getElementById("photo_layer_3");
		var photo_show = document.getElementById(layer_h);
		photo_l_1.style.display = "none";
		photo_l_2.style.display = "none";
		photo_l_3.style.display = "none";
		photo_l_4.style.display = "none";
		photo_show.style.display = "block";

		if(layer_h == "photo_layer_1"){
			document.getElementById("photo_hid").value = "photo_layer_2";
			document.getElementById("photo_hid2").value = "photo_layer_0";
		}else if(layer_h == "photo_layer_2"){
			document.getElementById("photo_hid").value = "photo_layer_3";
			document.getElementById("photo_hid2").value = "photo_layer_1";
		}else if(layer_h == "photo_layer_3"){
			document.getElementById("photo_hid").value = "photo_layer_0";
			document.getElementById("photo_hid2").value = "photo_layer_2";
		}else if(layer_h == "photo_layer_0"){
			document.getElementById("photo_hid").value = "photo_layer_1";
			document.getElementById("photo_hid2").value = "photo_layer_3";
		}
	}
	if(num==5){
		var layer_h = document.getElementById("photo_hid").value;
		var photo_l_1 = document.getElementById("photo_layer_0");
		var photo_l_2 = document.getElementById("photo_layer_1");
		var photo_l_3 = document.getElementById("photo_layer_2");
		var photo_l_4 = document.getElementById("photo_layer_3");
		var photo_l_5 = document.getElementById("photo_layer_4");
		var photo_show = document.getElementById(layer_h);
		photo_l_1.style.display = "none";
		photo_l_2.style.display = "none";
		photo_l_3.style.display = "none";
		photo_l_4.style.display = "none";
		photo_l_5.style.display = "none";
		photo_show.style.display = "block";

		if(layer_h == "photo_layer_1"){
			document.getElementById("photo_hid").value = "photo_layer_2";
			document.getElementById("photo_hid2").value = "photo_layer_0";
		}else if(layer_h == "photo_layer_2"){
			document.getElementById("photo_hid").value = "photo_layer_3";
			document.getElementById("photo_hid2").value = "photo_layer_1";
		}else if(layer_h == "photo_layer_3"){
			document.getElementById("photo_hid").value = "photo_layer_4";
			document.getElementById("photo_hid2").value = "photo_layer_2";
		}else if(layer_h == "photo_layer_4"){
			document.getElementById("photo_hid").value = "photo_layer_0";
			document.getElementById("photo_hid2").value = "photo_layer_3";
		}else if(layer_h == "photo_layer_0"){
			document.getElementById("photo_hid").value = "photo_layer_1";
			document.getElementById("photo_hid2").value = "photo_layer_4";
		}
	}

	}
}

function btn_p(num){

	if(num != 0){
	if(num==1){
		//alert('µî·ÏµÈ ÀÌ¹ÌÁö°¡ ÇÏ³ª ÀÔ´Ï´Ù.');
	}
	if(num==2){
		if(document.getElementById("photo_hid2").value == "photo_layer_4"){
			document.getElementById("photo_hid2").value = "photo_layer_1";
		}
		var layer_h = document.getElementById("photo_hid2").value;
		var photo_l_1 = document.getElementById("photo_layer_0");
		var photo_l_2 = document.getElementById("photo_layer_1");
		var photo_show = document.getElementById(layer_h);
		photo_l_1.style.display = "none";
		photo_l_2.style.display = "none";
		photo_show.style.display = "block";
	
	 if(layer_h == "photo_layer_0"){
			document.getElementById("photo_hid2").value = "photo_layer_1";
			document.getElementById("photo_hid").value = "photo_layer_1";
		}else{
			document.getElementById("photo_hid2").value = "photo_layer_0";
			document.getElementById("photo_hid").value = "photo_layer_0";
		}
	}
	if(num==3){
		if(document.getElementById("photo_hid2").value == "photo_layer_4"){
			document.getElementById("photo_hid2").value = "photo_layer_2";
		}
		var layer_h = document.getElementById("photo_hid2").value;
		var photo_l_1 = document.getElementById("photo_layer_0");
		var photo_l_2 = document.getElementById("photo_layer_1");
		var photo_l_3 = document.getElementById("photo_layer_2");
		var photo_show = document.getElementById(layer_h);
		photo_l_1.style.display = "none";
		photo_l_2.style.display = "none";
		photo_l_3.style.display = "none";
		photo_show.style.display = "block";

		if(layer_h == "photo_layer_1"){
			document.getElementById("photo_hid2").value = "photo_layer_0";
			document.getElementById("photo_hid").value = "photo_layer_2";
		}else if(layer_h == "photo_layer_2"){
			document.getElementById("photo_hid2").value = "photo_layer_1";
			document.getElementById("photo_hid").value = "photo_layer_0";
		}else if(layer_h == "photo_layer_0"){
			document.getElementById("photo_hid2").value = "photo_layer_2";
			document.getElementById("photo_hid").value = "photo_layer_1";
		}
	}
	if(num==4){
		if(document.getElementById("photo_hid2").value == "photo_layer_4"){
			document.getElementById("photo_hid2").value = "photo_layer_3";
		}
		var layer_h = document.getElementById("photo_hid2").value;
		var photo_l_1 = document.getElementById("photo_layer_0");
		var photo_l_2 = document.getElementById("photo_layer_1");
		var photo_l_3 = document.getElementById("photo_layer_2");
		var photo_l_4 = document.getElementById("photo_layer_3");
		var photo_show = document.getElementById(layer_h);
		photo_l_1.style.display = "none";
		photo_l_2.style.display = "none";
		photo_l_3.style.display = "none";
		photo_l_4.style.display = "none";
		photo_show.style.display = "block";

		if(layer_h == "photo_layer_1"){
			document.getElementById("photo_hid2").value = "photo_layer_0";
			document.getElementById("photo_hid").value = "photo_layer_2";
		}else if(layer_h == "photo_layer_2"){
			document.getElementById("photo_hid2").value = "photo_layer_1";
			document.getElementById("photo_hid").value = "photo_layer_3";
		}else if(layer_h == "photo_layer_3"){
			document.getElementById("photo_hid2").value = "photo_layer_2";
			document.getElementById("photo_hid").value = "photo_layer_0";
		}else if(layer_h == "photo_layer_0"){
			document.getElementById("photo_hid2").value = "photo_layer_3";
			document.getElementById("photo_hid").value = "photo_layer_1";
		}
	}

	if(num==5){
		var layer_h = document.getElementById("photo_hid2").value;
		var photo_l_1 = document.getElementById("photo_layer_0");
		var photo_l_2 = document.getElementById("photo_layer_1");
		var photo_l_3 = document.getElementById("photo_layer_2");
		var photo_l_4 = document.getElementById("photo_layer_3");
		var photo_l_5 = document.getElementById("photo_layer_4");
		var photo_show = document.getElementById(layer_h);
	
		photo_l_1.style.display = "none";
		photo_l_2.style.display = "none";
		photo_l_3.style.display = "none";
		photo_l_4.style.display = "none";
		photo_l_5.style.display = "none";
		photo_show.style.display = "block";

		if(layer_h == "photo_layer_1"){
			document.getElementById("photo_hid2").value = "photo_layer_0";
			document.getElementById("photo_hid").value = "photo_layer_2";
		}else if(layer_h == "photo_layer_2"){
			document.getElementById("photo_hid2").value = "photo_layer_1";
			document.getElementById("photo_hid").value = "photo_layer_3";
		}else if(layer_h == "photo_layer_3"){
			document.getElementById("photo_hid2").value = "photo_layer_2";
			document.getElementById("photo_hid").value = "photo_layer_4";
		}else if(layer_h == "photo_layer_4"){
			document.getElementById("photo_hid2").value = "photo_layer_3";
			document.getElementById("photo_hid").value = "photo_layer_0";
		}else if(layer_h == "photo_layer_0"){
			document.getElementById("photo_hid2").value = "photo_layer_4";
			document.getElementById("photo_hid").value = "photo_layer_1";
		}
	}

	}
	
}


function total_search(){
	var f = document.frm1;
	if(trim(f.s_word.value)==""){
		alert('°Ë»ö³»¿ëÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä.');
		return false;
	}
	
	f.action = "/etc/search.php";
	f.submit();
}
