﻿	// 타이포웍스 댓글 프레임 높이 지정
	function resizeIfr(obj, minHeight) {
        minHeight = minHeight || 10;
        try {
            var getHeightByElement = function(body) {
                var last = body.lastChild;
                try {
                    while (last && last.nodeType != 1 || !last.offsetTop) last = last.previousSibling;
                    return last.offsetTop+last.offsetHeight;
                } catch(e) {
                    return 0;
                }
        }
        var doc = obj.contentDocument || obj.contentWindow.document;
        if (doc.location.href == 'about:blank') {
            obj.style.height = minHeight+'px';
            return;
        }
        
        if (/MSIE/.test(navigator.userAgent)) {
            var h = doc.body.scrollHeight;
        // ie8에선 ie7과 비교시 약 15px 더 적게 값이 적용됨. if(window.JSON) h+=15;
        } else {
            var s = doc.body.appendChild(document.createElement('DIV'))
            s.style.clear = 'both';

            var h = s.offsetTop;
            s.parentNode.removeChild(s);
        }
        
        if (h < minHeight) h = minHeight;
        obj.style.height = h + 'px';
        if (typeof resizeIfr.check == 'undefined') resizeIfr.check = 0;
        if (typeof obj._check == 'undefined') obj._check = 0;
        
        setTimeout(function(){ resizeIfr(obj,minHeight) }, 200); // check 5 times for IE bug
        } catch (e) { 
            //alert!(e);
        }
    }
    
    // 목록으로 가기
    function FuncGoList(p_num){
		frmList.page.value = p_num;
		frmList.submit();
	}
	
	// 로그인
	function Funclogin(p_obj){	
		if (confirm("로그인후 이용이 가능합니다.\n로그인 하시겠습니까?")){
		    p_obj.action = "/join/Login.asp";
		    p_obj.submit();
		}
	}
	
	//추천하기
	function FuncRecomm(p_frm){
		p_frm.itemnum.value = "04";
		//alert(p_frm.writercd.value);
		p_frm.action="iframebizrecomm.asp";
		p_frm.target="iframework";
		p_frm.submit();
	}
	
	//스크랩
	function FuncScrap(p_frm){
	    p_frm.itemnum.value = "05";
		p_frm.action="iframebizrecomm.asp";
		p_frm.target="iframework";
		p_frm.submit();
	}

    
	
	
