function S4() { return (((1+Math.random())*0x10000)|0).toString(16).substring(1); } function guid() { return (S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4()); } function openPopup(pUrl,pTarget,pWidth,pHeight,pTop,pLeft,pStatus) { if(!pUrl) return; if(!pTarget) pTarget="popup"; if(!pStatus) pStatus="toolbar=no,location=no,status=no,menubar=no,scrollbars=off,resizable=yes" if(!pWidth || !pHeight) { pWidth=100;pHeight=100; } pStatus+=",width="+pWidth+",height="+pHeight; if(!pTop || !pLeft){ pLeft=(screen.width-pWidth)/2; pTop=(screen.height-pHeight)/2; } pStatus+=",top="+pTop+",left="+pLeft; //alert(pUrl+","+pTarget+","+pStatus); var win = window.open(pUrl,pTarget,pStatus); if(win) win.focus(); } function chkEmail(email) { var filter = /^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i ; if(filter.test(email)) return true; return false; } function chkTel(tel){ var filter = /^[0-9]{2,3}\-[0-9]{3,4}\-[0-9]{4,4}$/ if (filter.test(tel) ) return true; return false; } function addCommas(nStr) { nStr += ''; var x = nStr.split('.'); var x1 = x[0]; var x2 = x.length > 1 ? '.' + x[1] : ''; var rgx = /(\d+)(\d{3})/; while (rgx.test(x1)) { x1 = x1.replace(rgx, '$1' + ',' + '$2'); } return x1 + x2; } function makeSelect(name,data,selected,dispClass,selectTitle,optionsTitle,id){ var html=""; return html; } /* function chkInputNumber(obj,evt) { //숫자만 입력 받게끔 하는 함수. //입력 허용 키 if( ( evt.keyCode >= 48 && evt.keyCode <= 57 ) //숫자열 0 ~ 9 : 48 ~ 57 || ( evt.keyCode >= 96 && evt.keyCode <= 105 ) //키패드 0 ~ 9 : 96 ~ 105 || evt.keyCode == 8 //BackSpace || evt.keyCode == 46 //Delete //|| evt.keyCode == 110 //소수점(.) : 문자키배열 //|| evt.keyCode == 190 //소수점(.) : 키패드 || evt.keyCode == 37 //좌 화살표 || evt.keyCode == 39 //우 화살표 || evt.keyCode == 35 //End 키 || evt.keyCode == 36 //Home 키 || evt.keyCode == 9 //Tab 키 ){ if(evt.keyCode == 48 || evt.keyCode == 96) { //0을 눌렀을경우 if( obj.value == "" || obj.value == '0') //아무것도 없거나 현재 값이 0일 경우에서 0을 눌렀을경우 evt.returnValue=false; //-->입력되지않는다. else //다른숫자뒤에오는 0은 return; //-->입력시킨다. } else //0이 아닌숫자 return; //-->입력시킨다. } else { //숫자가 아니면 넣을수 없다. alert('숫자만 입력가능합니다'); evt.returnValue=false; } } $(document).ready(function(){ $("#btnFontSizeUp").click(function(){ resizeFont(1); }); $("#btnFontSizeReset").click(function(){ $(".resizeFontElement").css({"font-size":"","line-height":""}); }); $("#bntFontSizeDn").click(function(){ resizeFont(-1); }); function resizeFont(i){ $("#contents *").each(function(data){ var fontsize = Number($(this).css("font-size").replace("px",""))+i; var lineheight= Number($(this).css("line-height").replace("px",""))+i; $(this).css({"font-size":fontsize+"px","line-height":lineheight+"px"}); $(this).addClass("resizeFontElement"); }); } }); function include_script(src) { var script = document.createElement("script"); script.type = 'text/javascript'; script.src = src; document.getElementsByTagName('head')[0].appendChild(script); } function cpChildSet(){ if(opener && opener.$("#content")){ var content = opener.$("#content").html(); // 치환 content = content.replace(/]*>/gi,"").replace(/<\/a>/gi, "") content = content.replace(/onClick="[^\n]*"/gi,"").replace(/onClick='[^\n]*'/gi, "") content = content.replace(/onMouseOver="[^\n]*"/gi,"").replace(/onMouseOver='[^\n]*'/gi, "") content = content.replace(/onmouseover="[^\n]*"/gi,"").replace(/onmouseover='[^\n]*'/gi, "") document.getElementById("printArea").innerHTML = content; // 윈도우 전체 출력 window.print(true, window); // 닫히지 않을경우 10초후 닫힘 self.close(function(){ setTimeout(self.close(), 10000); }); } else { alert("출력이 불가능 합니다."); self.close(); } } function goLogin(msg){ if(msg){ if(confirm("로그인 후 이용하실수 있습니다. 지금 로그인 하시겠습니까?")) { openPopup("/login/popWinLogin.do","login",410,450,0,0,""); } } else { openPopup("/login/popWinLogin.do","login",410,450,0,0,""); } } function goRealname(){ if(confirm("실명인증 후 이용할 수 있습니다. 지금 확인하시겠습니까?")){ openPopup("/realname/popWinRealname.do","realname",410,450,0,0,""); } } //매인배너 var count_num =0; var bn_px=0; var bn_num; var bn_ul; jQuery(document).ready(function(){ function bn_start(){ defaultMar = 24;//배너끼리 여백 입력 //jQuery("div.wrap>ul").attr("motion", "easeInOutExpo") bn_ul=jQuery("div.wrap>ul"); bn_li=jQuery("div.wrap>ul>li"); bn_ul.attr("top", "0"); jQuery("div.wrap").css({"position":"relative","overflow":"hidden"}); bn_ul.css({"width":"10000px","position":"absolute"}); //var aaa = jQuery("div.wrap>ul").attr("width", jQuery("div.wrap>ul>li").eq(count_num).innerWidth()); bn_num = bn_li.length; bn_ul.attr("total", bn_li.size()); bn_li.each(function (){ jQuery(this).clone().appendTo(jQuery(bn_ul)); }); bn_ul.hover(function(){ bn_stop(); },function(){ bn_stop(); bn_move(); }); //배너시작 bn_move(); } bn_start(); }); function my_banner(){ if(count_num == bn_num){ bn_px = 0; count_num = 0; } if (jQuery("div.wrap>ul:animated").size()) return false; var width = bn_li.eq(count_num).width(); var pos = (parseInt(bn_ul.attr("top"))+1); // var mar = pos * defaultMar; bn_px += width+defaultMar; bn_ul.attr("top", pos); bn_ul.animate({ left: ((bn_px * -1) + "px") }, 500 ,function() { var pos = parseInt(jQuery("div.wrap>ul").attr("top")); var total = parseInt(jQuery("div.wrap>ul").attr("total")); if (pos>=total) { jQuery("div.wrap>ul").attr("top", 0); jQuery("div.wrap>ul").css("left", "0px"); } } ); count_num++; } function bn_left(){ bn_stop(); my_banner(); } function bn_right(){ bn_stop(); if (jQuery("div.wrap>ul:animated").size()) return false; var width = bn_li.eq(count_num-1).width(); var pos = (parseInt(bn_ul.attr("top"))+1)-2; //var mar = pos * defaultMar; if(pos>=0) { bn_px -= width+defaultMar; count_num--; bn_ul.attr("top", pos); bn_ul.animate({ left: ((bn_px * -1) + "px") }, 500 ,function() { var pos = parseInt(bn_ul.attr("top")); var total = parseInt(bn_ul.attr("total")); if (pos>=total) { bn_ul.attr("top", 0); bn_ul.css("left", "0px"); } } ); }else{ alert('첫번째 배너입니다'); } } function bn_stop(){ clearInterval(bn_ul.attr("timer")); } function bn_move(){ bn_stop(); bn_ul.attr("timer", setInterval(my_banner, 3000)); } function initNavigation(seq) { nav = document.getElementById("reportTab"); nav.menu = new Array(); nav.current = null; nav.menuseq = 0; navLen = nav.childNodes.length; allA = nav.getElementsByTagName("a") for(k = 0; k < allA.length; k++) { allA.item(k).onmouseover = allA.item(k).onfocus = function () { nav.isOver = true; } } for (i = 0; i < navLen; i++) { navItem = nav.childNodes.item(i); if (navItem.tagName != "LI") continue; navAnchor = navItem.getElementsByTagName("a").item(0); navAnchor.submenu = navItem.getElementsByTagName("ul").item(0); navAnchor.onmouseover = navAnchor.onfocus = function () { if (nav.current) { menuImg = nav.current.childNodes.item(0); menuImg.src = menuImg.src.replace("_on.gif", ".gif"); if (nav.current.submenu) nav.current.submenu.style.display = "none"; nav.current = null; } if (nav.current != this) { menuImg = this.childNodes.item(0); menuImg.src = menuImg.src.replace(".gif", "_on.gif"); if (this.submenu) this.submenu.style.display = "block"; nav.current = this; } nav.isOver = true; } nav.menuseq++; nav.menu[nav.menuseq] = navAnchor; } if (nav.menu[seq]) nav.menu[seq].onmouseover(); } function initNavigation2(seq) { nav1 = document.getElementById("noticeTab"); nav1.menu = new Array(); nav1.current = null; nav1.menuseq = 0; navLen = nav1.childNodes.length; allA = nav1.getElementsByTagName("a") for(k = 0; k < allA.length; k++) { allA.item(k).onmouseover = allA.item(k).onfocus = function () { nav1.isOver = true; } } for (i = 0; i < navLen; i++) { navItem = nav1.childNodes.item(i); if (navItem.tagName != "LI") continue; navAnchor = navItem.getElementsByTagName("a").item(0); navAnchor.submenu = navItem.getElementsByTagName("ul").item(0); navAnchor.onmouseover = navAnchor.onfocus = function () { if (nav1.current) { menuImg = nav1.current.childNodes.item(0); menuImg.src = menuImg.src.replace("_on.gif", ".gif"); if (nav1.current.submenu) nav1.current.submenu.style.display = "none"; nav1.current = null; } if (nav1.current != this) { menuImg = this.childNodes.item(0); menuImg.src = menuImg.src.replace(".gif", "_on.gif"); if (this.submenu) this.submenu.style.display = "block"; nav1.current = this; } nav1.isOver = true; } nav1.menuseq++; nav1.menu[nav1.menuseq] = navAnchor; } if (nav1.menu[seq]) nav1.menu[seq].onmouseover(); } function chkBirthday(birthday){ var filter = /^[0-9]{4,4}\-[0-9]{1,2}\-[0-9]{1,2}$/ if (filter.test(birthday) ) return true; return false; } */