var urlStatic = 'http://s.c.yinyuetai.com/'; var loginSite = 'http://login.yinyuetai.com/'; var mainSite = '../index.html'; var mvSite = 'http://mv.yinyuetai.com/'; var homeSite = 'http://i.yinyuetai.com/'; var vchartSite = 'http://vchart.yinyuetai.com/'; var commentSite = 'http://comment.yinyuetai.com/'; var playlistSite = 'http://pl.yinyuetai.com/'; var searchSite = 'http://so.yinyuetai.com/'; var vSite = 'http://v.yinyuetai.com/'; var frompc = true;//wap页点击电脑版 var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); window.addEvent('domready', function() { var list = $('sidebars').getElements('li .tab'); var title = $$('.content').getElement('h2')[1]; var text = $$('.content').getElement('.text')[1]; list.each(function(tab) { tab.flag = true; tab.addEvent('click', function() { if (tab.flag) { list.each(function(ee) { if (!ee.flag) { ee.getParent().setStyle('height', '36px'); ee.getPrevious().setStyles({ 'height' : '10px', 'background-position' : '0 -4px', 'top' : '14px' }); ee.flag = true; } }); if (tab.getNext().getElements('a').length > 0) { status(tab, 'show'); } else { var tabid = tab.get('tabid'); var param = "typeId=" + tabid; new Request.HTML({ 'url' : 'include/list', 'method' : 'get', 'data' : param, onSuccess : function(responseTree, responseElements, responseHTML) { var sub = tab.getNext(); sub.set('html', responseHTML); status(tab, 'show'); var suba = sub.getElements('a'); suba.each(function(event) { event.addEvent('click', function() { var subtab = $('sidebars').getElements('li .sub a'); subtab.each(function(t) { if (t.hasClass('active')) { t.removeClass('active'); } }); this.addClass('active'); var index = this.get('index'); new Request.JSON({ url : '/report/show-problem-content', method : 'get', data : 'Id=' + index, onSuccess : function(action) { title.set('text', action.content.title); text.set('html', action.content.content); location.hash = 'tabid=' + tabid + '&index=' + index; } }).send(); }); }); } }).send(); } } else { status(tab, 'hide'); } }); }); if (location.hash != "") { var tabid = RegExp('tabid' + '=([^&]*)').exec(location.hash); var index = RegExp('index' + '=([^&]*)').exec(location.hash); list.each(function(tab) { if (tabid[1] == tab.get('tabid')) { new Request.HTML({ 'url' : 'include/list', 'method' : 'get', 'data' : 'typeId=' + tabid[1], onSuccess : function(responseTree, responseElements, responseHTML) { var sub = tab.getNext(); sub.set('html', responseHTML); status(tab, 'show'); var suba = sub.getElements('a'); suba.each(function(event) { event.addEvent('click', function() { suba.each(function(t) { if (t.hasClass('active')) { t.removeClass('active'); } }); this.addClass('active'); var index = this.get('index'); new Request.JSON({ url : '/report/show-problem-content', method : 'get', data : 'Id=' + index, onSuccess : function(action) { title.set('text', action.content.title); text.set('html', action.content.content); location.hash = 'tabid=' + tabid[1] + '&index=' + index; } }).send(); }); if (index[1] == event.get('index')) { event.addClass('active'); new Request.JSON({ url : '/report/show-problem-content', method : 'get', data : 'Id=' + index[1], onSuccess : function(action) { title.set('text', action.content.title); text.set('html', action.content.content); } }).send(); } }); } }).send(); } }) } else { var tabid = list[0].get('tabid'); var param = "typeId=" + tabid; new Request.HTML({ 'url' : 'include/list', 'method' : 'get', 'data' : param, onSuccess : function(responseTree, responseElements, responseHTML) { var sub = list[0].getNext(); sub.set('html', responseHTML); status(list[0], 'show'); var suba = sub.getElements('a'); suba.each(function(event) { event.addEvent('click', function() { var subtab = $('sidebars').getElements('li .sub a'); subtab.each(function(t) { if (t.hasClass('active')) { t.removeClass('active'); } }); this.addClass('active'); var index = this.get('index'); new Request.JSON({ url : '/report/show-problem-content', method : 'get', data : 'Id=' + index, onSuccess : function(action) { title.set('text', action.content.title); text.set('html', action.content.content); location.hash = 'tabid=' + tabid + '&index=' + index; } }).send(); }); }); suba[0].fireEvent('click'); } }).send(); } $('hot').getElements('li').each(function(hot) { var link = hot.getElement('a'); link.addEvent('click', function() { window.scrollTo(0, 160); var tabid = RegExp('tabid' + '=([^&]*)').exec(this.get('href'))[1]; var index = RegExp('index' + '=([^&]*)').exec(this.get('href'))[1]; list.each(function(tab) { if (tab.get('tabid') == tabid) { new Request.HTML({ 'url' : 'include/list', 'method' : 'get', 'data' : 'typeId=' + tabid, onSuccess : function(responseTree, responseElements, responseHTML) { var sub = tab.getNext(); sub.set('html', responseHTML); status(tab, 'show'); var suba = sub.getElements('a'); suba.each(function(event) { event.addEvent('click', function() { var subtab = $('sidebars').getElements('li .sub a'); subtab.each(function(t) { if (t.hasClass('active')) { t.removeClass('active'); } }); this.addClass('active'); var index = this.get('index'); new Request.JSON({ url : '/report/show-problem-content', method : 'get', data : 'Id=' + index, onSuccess : function(action) { title.set('text', action.content.title); text.set('html', action.content.content); } }).send(); }); if (index == event.get('index')) { var subtab = $('sidebars').getElements('li .sub a'); subtab.each(function(t) { if (t.hasClass('active')) { status(t.getParent().getPrevious(), 'hide'); t.removeClass('active'); } }); event.addClass('active'); new Request.JSON({ url : '/report/show-problem-content', method : 'get', data : 'Id=' + index, onSuccess : function(action) { title.set('text', action.content.title); text.set('html', action.content.content); } }).send(); } }); } }).send(); } }); }); }); }); function status(obj, action) { if (action == 'show') { var sub = obj.getNext(); var height = sub.getHeight() + 2; obj.getParent().setStyle('height', height + obj.getHeight()); obj.getPrevious().setStyles({ 'height' : '4px', 'background-position' : '0 0', 'top' : '16px' }); obj.flag = false; } else if (action == 'hide') { obj.getParent().setStyle('height', obj.getHeight()); obj.getPrevious().setStyles({ 'height' : '10px', 'background-position' : '0 -4px', 'top' : '14px' }); obj.flag = true; } }

var currentUrl = encodeURIComponent(window.location.href); document.getElementById('loginUrl').setAttribute('href','http://login.yinyuetai.com?redirect='+currentUrl); document.getElementById('regUrl').setAttribute('href','http://login.yinyuetai.com?reg=true&redirect='+currentUrl);
(function() { var urls = window.TRACK_SHOW; if (!urls || !urls.push) { urls = []; } urls.push("http://log.collect.yinyuetai.com/view-log?referUrl="+document.referrer); urls.push("http://log.collect.yinyuetai.com/page?referUrl="+document.referrer); for (var i = 0, len = urls.length; i < len; i++) { var url = urls[i]; if (url.indexOf("?") < 0) url += "?" + (new Date()).getTime(); else url += "&" + (new Date()).getTime(); var img = new Image(); img.src = url; img.width = 1; img.height = 1; document.body.appendChild(img); } })(); (function(G, D, s, c, p) { c = { UA : "UA-yinyuetai-000001", NO_FLS : 0, WITH_REF : 1, URL : "http://s.yytcdn.com/js/utils/iwt-min-yyt.js" }; G._iwt ? G._iwt.track(c, p) : (G._iwtTQ = G._iwtTQ || []).push([c, p]), !G._iwtLoading && lo(); function lo(t) { G._iwtLoading = 1; s = D.createElement("script"); s.src = c.URL; t = D.getElementsByTagName("script"); t = t[t.length - 1]; t.parentNode.insertBefore(s, t); } })(this, document); window.YYTrev = "###revision###"; window.YYThostName = "BGP-LF-1RS1086"; window.YYTrequestStart = "1523240962336"; window.YYTrequestEnd = "1523240962427"; var uid1 = "a9wFIMleiaFywam5JFbtRsZd"; var uid = null; var tid = null;// 广告系统用户id try { uid = Y.Cookie.get("yinyuetai_uid"); tid = Y.Cookie.get("tid"); if (uid == null) { uid = uid1; } if (tid == null) { tid = uid1; } var ref = document.referrer || ""; var urls = []; urls.push("http://cm.admaster.com.cn/?tid=1635&type=1&uid=" + uid + "&loc=" + encodeURIComponent(location.href) + "&ref=" + encodeURIComponent(ref)); urls.push("http://cm.admaster.com.cn/?tid=1635&type=1&uid=" + tid + "&loc=" + encodeURIComponent(location.href) + "&ref=" + encodeURIComponent(ref)); if (uid != null && uid.length > 0) { for (var i = 0; i < urls.length; i++) { var url = urls[i]; if (url.indexOf("?") < 0) url += "?" + (new Date()).getTime(); else url += "&" + (new Date()).getTime(); $('body').prepend(''); } } } catch (ex) { } (function() { var csid = "F09828"; var bpid = "yinyuetai"; var e = document.createElement("script"); var s = document.getElementsByTagName("script")[0]; e.src = "http://js.revsci.net/gateway/gw.js?auto=t&csid=" + csid + "&bpid=" + bpid; e.async = true; s.parentNode.insertBefore(e, s); })();