function bluring() { try{ if(event.srcElement.tagName=='A'||event.srcElement.tagName=='IMG') { document.body.focus(); } }catch( e ) { } } try{ document.onfocusin=bluring; }catch( e ) { } var rurl = location.href; var purl = getUrl(rurl); function getUrl(url_str) { var real_url; if (url_str.indexOf('/') > 0) { real_url = url_str.split('/'); real_url = real_url[0]+'//'+real_url[2]+'/'+real_url[3]+'/'; } return real_url; } function goLocate(go_url) { //document.location = purl + go_url; window.location.href = purl + go_url; } /************************************************* Appended by CodeTrend(@Kyson Lee) Date: 2014.02 *************************************************/ $(document).ready(function(){ /********************************/ // Show all menus from header /********************************/ var checkInterval = 100; var intervalFnOuter = null; var intervalFnInner = null; var hoverOuter = false; var hoverInner = false; function showMenu() { $("#menuAll").slideDown("fast", function() { if(hoverInner || hoverOuter) $(this).stop(true,true); }); } function hideMenu() { $("#menuAll").slideUp("fast", function() { if(!hoverInner && !hoverOuter) $(this).stop(true,true); }); } function checkOnInner() { if(hoverInner == false) hideMenu(); } function checkOnOuter() { if(hoverOuter == false) hideMenu(); else showMenu(); } $("#topmenu_div").mouseenter(function(){ hoverOuter = true; //if($("#menuAll").css("display") == "none") //$("#menuAll").slideDown(); intervalFnOuter = setTimeout(checkOnOuter, checkInterval); }); $("#topmenu_div").mouseleave(function(){ hoverOuter = false; intervalFnOuter = setTimeout(checkOnInner, checkInterval); }); $("#menuAll").mouseenter(function(){ hoverInner = true; }); $("#menuAll").mouseleave(function(){ hoverInner = false; intervalFnInner = setTimeout(checkOnOuter, checkInterval); }); /********************************/ // show family sites from footer /********************************/ $("#family_sites_btn").click(function(){ if($("#family_sites").css("display") == "none") $("#family_sites").css("display", "block"); else $("#family_sites").css("display", "none"); }); }); function showOpaqueMsgBox(url, var_width, var_height) { //alert($(document).height() + ", " + $(window).height()); $("#opaque_msglayer").css("display", "block"); var w_width = (var_width != undefined) ? var_width : 650; var w_height = (var_height != undefined) ? var_height : ($(window).height()*0.8); var border = $("#opaque_msgborder"); border.css("width", w_width + "px"); border.css("height", w_height + "px"); border.css("margin-left", (-1*border.width()/2) + "px"); border.css("margin-top", (-1*border.height()/2) + "px"); var frame = $("#msgFrame"); frame.css("margin-top", "29px"); frame.attr("width", w_width); frame.attr("height", (w_height-29)); frame.attr("src", url); frame.load(function() { border.css("display", "block"); var actualHeight = $(this).contents().find("body").height(); //alert(actualHeight); actualHeight += (29+50); // 50 = redundancy if(w_height > actualHeight) { w_height = actualHeight; border.css("height", w_height + "px"); border.css("margin-top", (-1*border.height()/2) + "px"); $(this).attr("height", (w_height-29)); } }); } function hideOpaqueMsgBox() { $("#opaque_msgborder").css("display", "none"); $("#opaque_msglayer").css("display", "none"); } var Browser = { Version: function() { var version = 999; // we assume a sane browser if (navigator.appVersion.indexOf("MSIE") != -1) // bah, IE again, lets downgrade version number version = parseFloat(navigator.appVersion.split("MSIE")[1]); return version; } } $.fn.loadAlphaImage = function() { var element = this[0]; var items = $("#" + element.id + " div > img"); //alert(element.id + ", " + items.length); var imgpath = null; items.each(function(i) { imgpath = $(this).attr("src"); $(this).css("-ms-filter", "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=" + imgpath + ", sizingMethod='crop')"); $(this).css("filter", "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=" + imgpath + ", sizingMethod='crop')"); }); } // ±ÛÀÚ¼öÁ¦ÇÑ(Byte) function cropTextByte(str,limit){ if(!str) return ""; var tmpStr = str; var byte_count = 0; var len = str.length; var dot = ""; for(i=0; i 4) return 2; else return 1; } // Check policy & privacy agreement function checkPolicyAgree(_form) { var allChecked = true; var chkBoxes = $(_form).find("input[type='checkbox']"); //alert(chkBoxes.length); chkBoxes.each(function(){ if(!this.checked) { allChecked = false; } }); if(!allChecked) alert("ÀÌ¿ë¾à°ü ¹× °³ÀÎÁ¤º¸Ãë±Þ¹æħ¿¡ µ¿ÀÇÇÏ¼Å¾ß ÇÕ´Ï´Ù."); return allChecked; }