<!--


function SearchChk(frm) {
  if(!frm.ss.value || frm.ss.value.length < 2) {
    alert("°Ë»ö¾î´Â 2ÀÚ ÀÌ»ó ÀÔ·ÂÇØÁÖ¼¼¿ä.");
    frm.ss.focus();
    return false;
  }
  return true;
}

function SearchChk2(frm) {
  if(frm.sf.value) {
    if(!frm.ss.value || frm.ss.value.length < 2) {
      alert("°Ë»öÇÏ½Ç Å°¿öµå¸¦ 2ÀÚÀÌ»ó ÀÔ·ÂÇØÁÖ¼¼¿ä.");
      frm.ss.focus();
      return false;
    }
  }
  
  if(frm.ss.value) {
    if(!frm.sf.value) {
      alert("°Ë»öÇÏ½Ç Á¶°ÇÀ» ¼±ÅÃÇØÁÖ¼¼¿ä.");
      frm.sf.focus();
      return false;
    }
  }

  return true;
}

// LAYER IMAGE POPUP
function render_imglayer(spath) {
  var imgObj = new Image();
  imgObj.src = spath;

  var imgLayer = document.createElement("div");
  imgLayer.innerHTML = "";
  imgLayer.style.cssText = "position:absolute;left:"+(document.body.clientWidth/2-parseInt(imgObj.width/2))+";top:"+(document.body.clientHeight/2-parseInt(imgObj.height/2))+";border:3px solid #8B97AD;background:#FFFFFF;";

  with(imgLayer.appendChild(document.createElement("img"))) {
    src = spath;
    alt = spath;
    style.cssText = "margin:10px;border:1px solid #F3F3F3;cursor:pointer;";

    onclick = function() {
        var win = this.parentNode;
        win.parentNode.removeChild(win);
    }
  }

  document.body.appendChild(imgLayer);
}

// HTML ·Î ³Ñ¾î¿Â <img ... > ÅÂ±×ÀÇ ÆøÀÌ Å×ÀÌºíÆøº¸´Ù Å©´Ù¸é Å×ÀÌºíÆøÀ» Àû¿ëÇÑ´Ù.
function resize_image_target() {
    var target = document.getElementsByName('resize_image_target[]');
    var image_width = parseInt('610');
    var image_height = 0;

    for(i=0; i<target.length; i++) { 
        // ¿ø·¡ »çÀÌÁî¸¦ ÀúÀåÇØ ³õ´Â´Ù
        target[i].tmp_width  = target[i].width;
        target[i].tmp_height = target[i].height;
        // ÀÌ¹ÌÁö ÆøÀÌ Å×ÀÌºí Æøº¸´Ù Å©´Ù¸é Å×ÀÌºíÆø¿¡ ¸ÂÃá´Ù
        if(target[i].width > image_width) {
            image_height = parseFloat(target[i].width / target[i].height)
            target[i].width = image_width;
            target[i].height = parseInt(image_width / image_height);
        }
    }
}

function checkEmpty(sField){
  var oEditor = FCKeditorAPI.GetInstance(sField);
  var xContent = oEditor.GetXHTML( true );

  if(!xContent) return false;
  else return true;
}

function SearchFrmChk(frm) {
	if(!frm.ss.value || frm.ss.value.length < 2) {
		alert("°Ë»ö¾î¸¦ 2ÀÚ ÀÌ»ó ÀÔ·ÂÇØÁÖ¼¼¿ä.");
		frm.ss.focus();
		return false;
	}

	return true;
}

function render_download(bs, file) {
  downFrame.location = "/kw_front/parent/common/download.asp?bs="+bs+"&file="+file;
}

function render_pdfview(idx) {
	var vodurl ="/kw_front/common/pdf_view.asp?pdf_file="+idx ;
	window.open(vodurl,"view_pdf","width=840,height=680,toolbar=no, location=no,directories=no,status=no,menubar=no,scrollbars=0,resizable=1,top=0,left=0");
}

function resizeFrame(iframeObj){
        var innerBody = iframeObj.contentWindow.document.body;
        oldEvent = innerBody.onclick;
        innerBody.onclick = function(){ resizeFrame(iframeObj, 1);oldEvent; };
        var innerHeight = innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight);
        iframeObj.style.height = innerHeight;
        var innerWidth = innerBody.scrollWidth + (innerBody.offsetWidth - innerBody.clientWidth);
        iframeObj.style.width = innerWidth;     
        if( !arguments[1] )        /* Æ¯Á¤ ÀÌº¥Æ®·Î ÀÎÇÑ È£Ãâ½Ã ½ºÅ©·ÑÀ» ±×³É µÐ´Ù. */
                this.scrollTo(1,1);
}

//ÇÃ·¡½Ã³ª Obejct ·Îµå½Ã È°¼ºÈ­µÇÁö ¾Ê´Â ¹®Á¦
function viewObject(html) { 
   document.write(html); 
}
function getPageUrl() {
	return window.location.href;
}

function setPNG24(obj) {
	obj.width=obj.height=1;
	obj.className=obj.className.replace(/\bpng24\b/i,'');

	obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');"
	obj.src=''; 
	return '';
}

function render_policy_pop(num, width, height) {
  var plink;

  switch(num) {
    case 1 : plink = "/kw_front/customer/etc/webpolicy.asp"; break;
    case 2 : plink = "/kw_front/customer/etc/authpolicy.asp"; break;
    case 3 : plink = "/kw_front/customer/etc/emailpolicy.asp"; break;
	//case 4 : plink = "/kw_front/customer/etc/affiliate.asp"; break;
	case 4 : plink = "http://help.kyowon.co.kr/etc/affiliate.asp"; break;
  }

  var pwin = window.open(plink, "KYOWONETCFRM"+num, "width="+width+", height="+height+", scrollbars=no");
  pwin.focus();
}

function render_tab(show, hide) {
  document.getElementById(show).style.display = "inline";
  document.getElementById(hide).style.display = "none";
}

/// PRODUCT VIEW OPEN
function render_prodview(status) {
  if(status=="1") {
    document.getElementById("_prodview").style.height="380px";
    document.getElementById("prodfocus").focus();
  } else document.getElementById("_prodview").style.height="50px";
}

/// PRODUCT CONSULT POPUP
function render_prodconsult(seq) {

	var now = new Date();
	var todayDate = now.getFullYear()+"0"+(now.getMonth()+1)+now.getDate()+now.getHours()+"00";	
	//alert(todayDate);
	if((todayDate>"201107291259") && (todayDate<"201108022359")){
		alert("7/31~8/2 Àü »¡°£Ææ¼±»ý´Ô ÈÞ°¡·Î ÀÎÇØ, °ü·Ã¹®ÀÇ ´äº¯ÀÌ ´Ê¾îÁú ¼ö ÀÖ´ÂÁ¡ ¾çÇØ¹Ù¶ø´Ï´Ù.");
	}
	//else{
	  var plink;

	  switch(seq) {
		//case "01" : plink = "http://www.kyowon.co.kr/popup/p_edu_apply_03.asp?h_cd=ED40"; break;
		//case "03" : plink = "http://www.kyowon.co.kr/popup/p_edu_apply_03.asp?h_cd=ED40"; break;
		//default : plink = "http://www.kyowon.co.kr/popup/p_edu_apply_03.asp?h_cd=ED30";
		case "01" : plink = "https://cubig.kyowon.co.kr/interface/requestFreesamSaleCounseling.page?h_cd=ED40"; break;
		case "02" : plink = "https://cubig.kyowon.co.kr/interface/requestFreesamSaleCounseling.page?h_cd=ED10"; break;
		case "03" : plink = "https://cubig.kyowon.co.kr/interface/requestFreesamSaleCounseling.page?h_cd=ED40"; break;
		default : plink = "https://cubig.kyowon.co.kr/interface/requestFreesamSaleCounseling.page?h_cd=ED30";
	  }

	  var pwin = window.open(plink, "PRODCONSULTFRM", "width=520, height=710, scrollbars=no");
	  pwin.focus();
	//}
}

function showMyMinisam(tid) {
	window.open('/kw_front/community/minisam/home/home.asp?tid='+tid,'person_info_i', 'height=631,width=838,scrollbars=no,resizable=no');
}

function render_popup_win(url, wname, width, height, scroll) {
  var wwin = window.open(url, wname, "width="+width+", height="+height+", scorllbars="+scroll+"");
  wwin.focus();
}

function msgWork(){
	alert("ÀÌ¿ë¿¡ ºÒÆíÀ»µå·Á ÁË¼ÛÇÕ´Ï´Ù.\nÇÁ¸®»ù ¼­ºñ½º°¡ ÇöÀç ¼­¹ö ¾÷±×·¹ÀÌµå ÀÛ¾÷À¸·Î ÀÎÇÏ¿© Àá½Ã Áß´ÜµÇ¾ú½À´Ï´Ù.\nÈ¸¿ø´ÔµéÀÇ ¸¹Àº ¾çÇØ¹Ù¶ø´Ï´Ù.\n\nÁ¡°Ë ¿Ï·á ¿¹»ó ½Ã°£ : 10¿ù 17ÀÏ 8½Ã");	
}

function Coupang_popup() {
	window.open('/kw_front/premiumstudy/coupang/pop_coupang.asp','coupang', 'height=630,width=500,scrollbars=no,resizable=no');
}

//if (navigator.userAgent.match("iPad|iPhone|Mobile|UP.Browser|Android|BlackBerry|Windows CE|Nokia|webOS|Opera Mini|SonyEricsson|opera mobi|Windows Phone|IEMobile|POLARIS") != null)
//	location.href = "http://m.freesam.com";


//-->



