function fnAns(obj){
	if($("#ans_tr_"+obj).css("display") == "none"){
		$("#ques_btn_"+obj);
		$(".ans_tr").hide();
		$("#ans_tr_"+obj).show();
		var maxNo = $(".ans_tr").length;
	    for (i=1;i<=maxNo;i++ ){
	        var imgSrc2 = $("#ques_btn_"+i).attr("src");
	        $("#ques_btn_"+i).attr("src", imgSrc2.replace("_up", "_down"));
	    }	
	    var imgSrc = $("#ques_btn_"+obj).attr("src");
	    $("#ques_btn_"+obj).attr("src", imgSrc.replace("_down", "_up"));
	}else{
		$(".ans_tr").hide();
		var maxNo = $(".ans_tr").length;
	    for (i=1;i<=maxNo;i++ ){
	        var imgSrc2 = $("#ques_btn_"+i).attr("src");
	        $("#ques_btn_"+i).attr("src", imgSrc2.replace("_up", "_down"));
	    }	
	}
}
function layer_open(el, el2){
    $('.layer').addClass('open');
    $('#'+el2).fadeIn();
    var temp = $('#' + el);
    $('#'+el2+" .bg").css("height",$(document).height() );
    t_height = $(document).scrollTop(); //상단 높이
    height = t_height + 80; //상단부터 띄워야 하는 높이
    temp.css('top', height);
}
function layer_open_set(el, el2, w1, h1, className){
    $('.layer').addClass('open');
    $('#layer1').attr('class','layer_popup_'+className);
    $('#layer1').attr('style','width:'+w1+'px;height:'+h1+'px;');
    $('#'+el2).fadeIn();
    var temp = $('#' + el);
    $('#'+el2+" .bg").css("height",$(document).height() );
    t_height = $(document).scrollTop(); //상단 높이
    height = t_height + 80; //상단부터 띄워야 하는 높이
    temp.css('top', height);
}

function layer_close(){
	$('.layer').fadeOut();
}

function layer_close_2(){
	$('#layer_root_2').hide();
}
 
