function setTab(/*string*/name,/*int*/ itemCnt,/*int*/ curItem, /**/classHide, /**/classShow) { for(i=1;i<=itemCnt;i++) { eval("document.getElementById('tab_" + name + "_" + i + "').className='" + classHide + "'"); } eval("document.getElementById('tab_" + name + "_" + curItem + "').className='" + classShow + "'"); for(i=1;i<=itemCnt;i++) { eval("ele_hide = document.getElementById('con_" + name + "_" + i +"')"); if(ele_hide) ele_hide.style.display = "none"; } eval("ele_play = document.getElementById('con_" + name + "_" + curItem + "')"); if(ele_play) ele_play.style.display = "block"; } var pause = false; var con_num = 4; var startIndex = 1; function setLoop(){ try{ var oScroll = document.getElementById('banner'); oScroll.noWrap = true; oScroll.onmouseover = function(e){pause = true;}; oScroll.onmouseout = function(e){pause = false;}; setInterval('scrollTopHome()', 3000); }catch(e){} } function scrollTopHome(){ if(pause) return; startIndex += 1; if(startIndex > con_num){startIndex = 1;} setTab('tophome',4,startIndex,'out','on'); } setLoop(); if ($.cookie('mochu-adH') == 'true'){ $('.mochu_theme_banner').css('display', 'none'); } $('body').on('click','.mochu_theme_adh_close',function(){ $('.mochu_theme_banner').css('display','none'); $.cookie('mochu-adH', 'true'); }); $('body').on('mouseover','.mochu_theme_banner',function(){ $('.mochu_theme_adh_close').css('display', 'block'); });