//���̾�̱�
function show_ly(name,flag){
	document.getElementById(name).style.display= flag;
}

function togglePlan() {
	var planBtn = document.getElementById('planBtn');
	var planList = document.getElementById('planList');
	if (planBtn.getAttribute('alt') == '��ü����'){
		planBtn.setAttribute('alt', '����');
		planBtn.setAttribute('src', 'http://image.mujikorea.net/onenone/btn_folding.gif');
		planList.style.height = 'auto';
	} else {
		planBtn.setAttribute('alt', '��ü����');
		planBtn.setAttribute('src', 'http://image.mujikorea.net/onenone/btn_view_all.gif');
		planList.style.height = 40+'px';
	}
}

//��ǰ�� ���̾� ���̱�
function viewComment(n){
	 for(var i = 1; i < 4; i++) {
		 obj = document.getElementById('layComment'+i);
		 txt = document.getElementById('reTxt'+i);
		if( n == i )
		{
			obj.style.display="block";
			txt.style.fontWeight="bold";
		}
		else {

			obj.style.display="none";
			txt.style.fontWeight="normal";
		}
	}
}

//��ǰ�� ���
var oldN = ""
function showComment(curN) {
	if(curN != oldN)	{
		document.getElementById("reviewtit"+curN).className='tit-on';
		document.getElementById("review"+curN).className='view-on';
		if(oldN != '') {
			document.getElementById("reviewtit"+oldN).className='tit-off';
			document.getElementById("review"+oldN).className='view-off';
		}
		oldN = curN;
	} else if (curN == oldN) {
		document.getElementById("reviewtit"+curN).className='tit-off';
		document.getElementById("review"+curN).className='view-off';
		oldN = "";
	}
}

//Q&A ���
var objN = ""
function showQna(qnaN) {
	if(qnaN != objN)	{
		document.getElementById("questiontit"+qnaN).className='tit-on';
		document.getElementById("answer"+qnaN).className='view-on';
		if(objN != '') {
			document.getElementById("questiontit"+objN).className='tit-off';
			document.getElementById("answer"+objN).className='view-off';
		}
		objN = qnaN;
	} else if (qnaN == objN) {
		document.getElementById("questiontit"+qnaN).className='tit-off';
		document.getElementById("answer"+qnaN).className='view-off';
		objN = "";
	}
}

//�� ���� ���
var oldid = "product_obj1"
function showCont(curid) {
	if(curid != oldid)	{
		document.getElementById(curid).style.display = 'block';
		if(oldid != '') {
			document.getElementById(oldid).style.display = 'none';
		}
		oldid = curid;
	}
	location.href = '#' + curid;
}

function moveCont(going) {
	location.href = '#' + going;
}

//����Ʈ�� ���̾� ���̱�
$(document).ready(function(){
	$("div.goodsBtns .smartfooter").click(function(){$("div.goodsBtns>#smartpickOrder").hide();});
	$("div.goodsBtns .spBtn").click(
		function(){
			($("div.goodsBtns>#smartpickOrder").css("display") === "none") ? $("div.goodsBtns>#smartpickOrder").show() : $("div.goodsBtns>#smartpickOrder").hide();
			return false;
		}
	);
});
