try { document.execCommand("BackgroundImageCache", false, true);} catch(err) {} //탑메뉴 function top2menuView(a) //2차메뉴보기 { if(this.id){ eidStr = this.id; eidNum=eidStr.substring(eidStr.lastIndexOf("m",eidStr.length)+1,eidStr.length); a = parseInt(eidNum); } top2menuHideAll(); top1Menu = document.getElementById("top1m"+a); top2Menu = document.getElementById("top2m"+a); if (top1Menu) { top1Menu.className = 'on'; $('#lnb').addClass('active'); //if (top2Menu) { top2Menu.style.display = 'inline';} if (top2Menu) { $(top2Menu).show();} } } function top2menuView2(a) //2차메뉴보기 { if(this.id){ eidStr = this.id; eidNum=eidStr.substring(eidStr.lastIndexOf("m",eidStr.length)+1,eidStr.length); a = parseInt(eidNum); } top2menuHideAll(); top1Menu = document.getElementById("top1m"+a); top2Menu = document.getElementById("top2m"+a); if (top1Menu) { top1Menu.className = 'on'; $('#lnb').addClass('active'); if (top2Menu) { top2Menu.style.display = 'inline';} } } function top2menuHide(a) //2차메뉴감추기 { if(this.id){ eidStr = this.id; eidNum=eidStr.substring(eidStr.lastIndexOf("m",eidStr.length)+1,eidStr.length); a = parseInt(eidNum); } //top2menuHideAll(); top1Menu = document.getElementById("top1m"+a); top2Menu = document.getElementById("top2m"+a); top1MenuCurr = document.getElementById("top1m"+d1n); top2MenuCurr = document.getElementById("top2m"+d1n); if(a<10){ann='0'+a;} else {ann=''+a;} if (top1Menu) { top1Menu.className = ''; $('#lnb').removeClass('active'); if (top2Menu) { top2Menu.style.display = 'none'; } if (top1MenuCurr) { top1MenuCurr.className = 'on'; $('#lnb').addClass('active'); } //if (top2MenuCurr) { top2MenuCurr.style.display = 'inline';} if (top2MenuCurr) { $(top2Menu).show();} } } function top2menuHideAll() //2차메뉴모두감추기 { top1menuEl = document.getElementById("top1menu").childNodes; for (i=1;i<=top1menuEl.length;i++) { top1Menu = document.getElementById("top1m"+i); top2Menu = document.getElementById("top2m"+i); if(i<10){inn='0'+i;} else {inn=''+i;} if (top1Menu) { top1Menu.className = ''; $('#lnb').removeClass('active'); if (top2Menu) { top2Menu.style.display = 'none'; } } } } function initTopMenu(d1,d2,d3,d4) { d1n = d1; d2n = d2; d3n = d3; if(d4=='p'){ d1nn = (d1n<10) ? '0'+d1n : d1n; d2nn = (d2n<10) ? '0'+d2n : d2n; var topmenu = document.getElementById("topmenu"); top1menuEl = document.getElementById("top1menu").childNodes; for (i=1;i<=top1menuEl.length;i++) { top1Menu = document.getElementById("top1m"+i); top2Menu = document.getElementById("top2m"+i); if (top1Menu) { top1Menu.onmouseover = top1Menu.onfocus = top2menuView; top1Menu.onmouseout = top2menuHide; if (top2Menu) { top2Menu.onmouseover = top2Menu.onfocus = top2menuView2; top2Menu.onmouseout = top2menuHide; } } } top2MenuCurrAct = document.getElementById("top2m"+d1n+"m"+d2n); if (top2MenuCurrAct) { //top2MenuCurrAct.getElementsByTagName('a')[0].className = "active"; top2MenuCurrAct.getElementsByTagName("a")[0].style.color="#000"; top2MenuCurrAct.getElementsByTagName("a")[0].style.fontWeight="bold"; top2MenuCurrAct.getElementsByTagName("a")[0].style.letterSpacing="-2px"; } top2menuHide(d1); } else if(d4=='m'){ d1nn = (d1n<10) ? '0'+d1n : d1n; d2nn = (d2n<10) ? '0'+d2n : d2n; var topmenu = document.getElementById("topmenu"); top1menuEl = document.getElementById("top1menu").childNodes; for (i=1;i<=top1menuEl.length;i++) { top1Menu = document.getElementById("top1m"+i); top2Menu = document.getElementById("top2m"+i); if (top1Menu) { top1Menu.onmouseover = top1Menu.onblur = top2menuView; //top1Menu.onmouseout = top2menuHide; if (top2Menu) { top2Menu.onmouseover = top2Menu.onblur; //top2Menu.onmouseout = top2menuHide; } } } top2MenuCurrAct = document.getElementById("top2m"+d1n+"m"+d2n); if (top2MenuCurrAct) { //top2MenuCurrAct.getElementsByTagName('a')[0].className = "active"; top2MenuCurrAct.getElementsByTagName("a")[0].style.color="#000"; top2MenuCurrAct.getElementsByTagName("a")[0].style.fontWeight="bold"; top2MenuCurrAct.getElementsByTagName("a")[0].style.letterSpacing="-2px"; } top2menuHide(d1); } } // 탭메뉴 공통적으로 사용 //ex) tabOn(1,1); function tabOn(tabid,a) { for (i=1;i<=10;i++) { if(i<10){inn="0"+i;} else {inn=""+i;} tabMenu = document.getElementById("tab"+tabid+"m"+i); tabContent = document.getElementById("tab"+tabid+"c"+i); tabMore = document.getElementById("tab"+tabid+"more"+i); if (tabMenu) { //객체가존재하면 if (tabMenu.tagName=="IMG") { tabMenu.src = tabMenu.src.replace("_on.", "_off."); } if (tabMenu.tagName=="A") { tabMenu.className=""; } } if (tabContent) { tabContent.style.display="none"; } if (tabMore) { tabMore.style.display="none"; } } if(a<10){ann="0"+a;} else {ann=""+a;} tabMenu = document.getElementById("tab"+tabid+"m"+a); tabContent = document.getElementById("tab"+tabid+"c"+a); tabMore = document.getElementById("tab"+tabid+"more"+a); // alert(tabMenu.tagName); if (tabMenu) { //객체가존재하면 if (tabMenu.tagName=="IMG") { tabMenu.src = tabMenu.src.replace("_off.", "_on."); } if (tabMenu.tagName=="A") { tabMenu.className="on"; } } if (tabContent) { tabContent.style.display="block"; } if (tabMore) { tabMore.style.display="block"; } } // 탭메뉴 공통적으로 사용 //ex) tabOn(1,1); function tabSite(tabid,a) { for (i=1;i<=10;i++) { if(i<10){inn="0"+i;} else {inn=""+i;} tabMenu = document.getElementById("tab"+tabid+"m"+i); tabContent = document.getElementById("tab"+tabid+"c"+i); tabMore = document.getElementById("tab"+tabid+"more"+i); if (tabMenu) { //객체가존재하면 if (tabMenu.tagName=="IMG") { tabMenu.src = tabMenu.src.replace("_on.", "_off."); } if (tabMenu.tagName=="A") { tabMenu.className=""; } } if (tabContent) { tabContent.style.display="none"; } if (tabMore) { $(tabMore).removeClass("on"); } } if(a<10){ann="0"+a;} else {ann=""+a;} tabMenu = document.getElementById("tab"+tabid+"m"+a); tabContent = document.getElementById("tab"+tabid+"c"+a); tabMore = document.getElementById("tab"+tabid+"more"+a); var list_height =$("#tab"+tabid+"c"+a).height()+80; $("#tab"+tabid+"c"+a).parent().parent().css("height",list_height); // alert(tabMenu.tagName); if (tabMenu) { //객체가존재하면 if (tabMenu.tagName=="IMG") { tabMenu.src = tabMenu.src.replace("_off.", "_on."); } if (tabMenu.tagName=="A") { tabMenu.className="on"; } } if (tabContent) { tabContent.style.display="block"; } if (tabMore) { $(tabMore).addClass("on"); } } /* 배너모음 */ var bannerAuto=null; var bannerDirect="left"; function rightBanner(){ $(".banner_img").stop().animate( {left:"-=145px"},0,function(){ var $bannerObj=$(".banner_img li:first").clone(true); $(".banner_img li:first").remove(); $(".banner_img").css("left",0); $(".banner_img").append($bannerObj); } ) if(bannerAuto)clearTimeout(bannerAuto); bannerAuto=setTimeout(rightBanner,3000) } function leftBanner(){ $(".banner_img").stop().animate( {left:"0px"},0,function(){ var $bannerObj=$(".banner_img li:last").clone(true); $(".banner_img li:last").remove(); $(".banner_img").css("left","0"); $(".banner_img").prepend($bannerObj); } ) if(bannerAuto)clearTimeout(bannerAuto); bannerAuto=setTimeout(rightBanner,3000) } $(document).ready(function(){ bannerAuto=setTimeout(rightBanner,3000) $leftB=$(".banner_control .prev_banner a"); $rightB=$(".banner_control .next_banner a"); $pauseB=$(".banner_control .pause_banner a"); $bannerP_btn=$(".banner_control .pause_banner a img") var bPlay = false; $leftB.click(function(){ if (bPlay == true){ clearTimeout(bannerAuto); }else{ bannerDirect="left" clearTimeout(bannerAuto); leftBanner(); return false; } }); $rightB.click(function(){ if (bPlay == true){ clearTimeout(bannerAuto); }else{ bannerDirect="right" clearTimeout(bannerAuto); rightBanner(); return false; } }); $pauseB.click(function(){ if (bPlay == false){ clearTimeout(bannerAuto); $bannerP_btn.attr("src","images/common/btn_banner_play.gif"); $bannerP_btn.attr("alt","배너재생"); bPlay = true; }else{ bPlay = false; $bannerP_btn.attr("src","images/common/btn_banner_stop.gif"); $bannerP_btn.attr("alt","배너일시정지"); bannerAuto=setTimeout(rightBanner,1500) } }); $(".banner_img li a").bind(" focusin", function(){ clearTimeout(bannerAuto); $bannerP_btn.attr("src","images/common/btn_banner_play.gif"); $bannerP_btn.attr("alt","배너재생"); }); $(".banner_img li a").bind(" focusout", function(){ bPlay = false; bannerAuto=setTimeout(rightBanner,1500) $bannerP_btn.attr("src","images/common/btn_banner_stop.gif"); $bannerP_btn.attr("alt","배너일시정지"); }); //이미지 롤오버 $(".overimg").mouseover(function (){ var file = $(this).attr('src').split('/'); var filename = file[file.length-1]; var path = ''; for(i=0 ; i < file.length-1 ; i++){ path = ( i == 0 )?path + file[i]:path + '/' + file[i]; } $(this).attr('src',path+'/'+filename.replace('_off.','_on.')); }).mouseout(function(){ var file = $(this).attr('src').split('/'); var filename = file[file.length-1]; var path = ''; for(i=0 ; i < file.length-1 ; i++){ path = ( i == 0 )?path + file[i]:path + '/' + file[i]; } $(this).attr('src',path+'/'+filename.replace('_on.','_off.')); }); $("#moviebox .close a").click(function() { window.close(); }); }); // 통합검색 function searchValidation(frm) { if($.trim($('#kwd').val()) == '') { alert('검색단어를 입력하십시오.'); $('#kwd').val(''); $('#kwd').focus(); return false; } return true; }