1///<reference path="jquery.min.js"> 2///<reference path="jstorage.min.js"> 3var comm = { 4 check: function (a) { var f = $(a).closest('form')[0]; if (f.un.value == '') { alert('请è¾å ¥æ¨çç¨æ·åï¼'); f.un.focus(); return false; } if (f.pwd.value == '') { alert('请è¾å ¥æ¨çå¯ç ï¼'); f.pwd.focus(); return false; } return false}, 5 addFavor: function (sURL, sTitle) { try { window.external.addFavorite(sURL, sTitle); } catch (e) { try { window.sidebar.addPanel(sTitle, sURL, ""); } catch (e) { alert("å å ¥æ¶è失败ï¼è¯·ä½¿ç¨Ctrl+Dè¿è¡æ·»å "); } } return false; }, 6 setHome: function (a, sURL) { try { a.style.behavior = 'url(#default#homepage)'; a.setHomePage(sURL); return false } catch (e) { } return false }, 7 filterCsm: function (v) { var d = $('#dvPopCsm'), arr = arrCTYCSM[v].filter($('#iptType').val()); if (arr && arr.length > 0) { d.find('div:first').html($(arr).map(function () { return '<a href="' + this.u + '" target="_blank">' + this.t + '</a>' }).get().join('')).end().show(); $('#dvPopCsm').paging('div:first a', 10); } else d.hide(); }, 8 filterCountry: function (v) { var arr; for (var i = 0; i < arrCTEX.length; i++) if (arrCTEX[i].v == v) { arr = arrCTEX[i].c; break; } $('#dvCC').combo('load', arr ? arr.filter($('#iptType').val()) : []); }, 9 setAction: function (o, out) { var f = o.form; if (f.tp.selectedIndex == 0) f.action = 'http://lvyou168.cn/' + (out ? 'searchout' : 'lucenesearch') + '.aspx'; else f.action = 'http://lvyou168.cn/clients.aspx'; }, 10 loading: function (btn, show) { sp = $(btn).parent(); var p = sp.parent(); if (show) { sp.hide(); p.append('<span class="loading"' + (show === true ? '' : ' style="line-height:' + show + 'px"') + '>请ç¨å...</span>'); } else { p.find('span:last').remove(); sp.show() } }, 11 JSON: function (xhr) { var r = {}; if (200 == xhr.status) { try { r = eval('(' + xhr.responseText + ')'); } catch (ex) { r = { success: false, err: 'JSONæ ¼å¼ä¸ç¬¦åè§åï¼\nERROR:'+xhr.responseText} } } else r = { success: false, err: 'æå¡å¨å¿ï¼è¯·ç¨ååè¯ï¼' }; if (r.offline) { alert('å·²ç»è¶ æ¶ï¼è¯·éæ°ç»å½ç³»ç»ï¼'); throw 'å·²ç»è¶ æ¶ï¼è¯·éæ°ç»å½ç³»ç»ï¼'; } if (r.poweroff) { alert('没ææä½æéï¼'); throw '没ææä½æéï¼'; } return r; }, 12 isIndex:$('div.indexslider').length>0 13}; 14(function () { 15 if (location.pathname != '/') return; 16 var needProxy = location.hostname != 'lvyou168.cn'; 17 try { document.domain = 'lvyou168.cn'; } catch (e) { }
18 if (needProxy) document.write('<iframe src="http://lvyou168.cn/newindex/js/storageproxyutf8.html" style="display:none" id="ifrStorageProxy"></iframe>'); 19 function MyHistory(id) { this.el = $('#' + id); if (this.el.length == 0) throw ('dom not exist!'); this.read(); this.updateHtml(); $('a').click(function () { window.MyHistory.parseA(this) }); } 20 MyHistory.prototype.max = 10; 21 MyHistory.prototype.TTL = 30 * 24 * 60 * 60 * 1000;//ä¿å30天 22 MyHistory.prototype.history = []; 23 MyHistory.prototype.parseA = function (a) { 24 var img = $('img', a), text = img.attr('alt') || img.attr('title') || $(a).text() || '', href = a.href||'';// a.getAttribute('href'); 25 //if (text != '' && href && href != '#' && !/^javascript:/i.test(href)) { 26 27 if (text != '' && text.length > 3 && ((a.getAttribute('href') || '').length > 3) && /^https?:\/\//i.test(href)) { 28 //href = a.href; 29 this.add({ text: text.replace(new RegExp('^[\\s' + String.fromCharCode(8226) + ']+'), ''), href: href }) 30 } 31 } 32 MyHistory.prototype.isExist = function (item) { for (var i = this.history.length - 1; i >= 0; i--) if (this.history[i].href == item.href) { this.history.splice(i, 1); break;} } 33 MyHistory.prototype.add = function (item) { this.isExist(item); if (this.history.length >= this.max) this.history.splice(0, 1); this.history.push(item); this.save(); this.updateHtml() } 34 MyHistory.prototype.save = function () { if (!needProxy) $.jStorage.set('myhistory', this.history, { TTL: this.TTL }); else document.getElementById('ifrStorageProxy').contentWindow.save(this.history, this.TTL) } 35 MyHistory.prototype.read = function () { try { this.history = needProxy ? document.getElementById('ifrStorageProxy').contentWindow.read() : ($.jStorage.get('myhistory') || []); } catch (e) { } } 36 MyHistory.prototype.updateHtml = function () { var s = ''; for (var i = this.history.length - 1; i >= 0; i--) s += '<a rel="nofollow" title="' + this.history[i].text + '" style="display:block;overflow:hidden;text-align:left;width:100%;height:22px;text-overflow:ellipsis;white-space:nowrap;" href="' + this.history[i].href + '" target="_blank">' + String.fromCharCode(8226) + ' ' + this.history[i].text + '</a>'; this.el.html(s || '没æè®°å½'); } 37 if (needProxy) document.getElementById('ifrStorageProxy').onload = function () { window.MyHistory = new MyHistory('spHistory') }; 38 else $(function () { window.MyHistory = new MyHistory('spHistory'); }); 39})(); 40$(function () { 41 if (!window.isIndex) $('#top_info').hide(); 42 $(window).bind('scroll resize', function () { if ($(window).scrollTop() <= 0) $("#top_icon").hide(); else $("#top_icon").css('display', 'block'); }); 43 $('#ulTrip a').click(function () { var me = $(this).parent(), id = me.attr('data-id'); if (id) $.get('/ashx/click.ashx?tp=3&id=' + id, function () { me.removeAttr('data-id') }) }); 44 $("#top_icon").click(function () { $('html, body').animate({ scrollTop: 0 }, 200); return false; }); 45 var f = $('#dvSearchTab').parent().next()[0], scUrl=['http://lvyou168.cn/search.aspx','http://lvyou168.cn/incoming-services-providers/','http://destinations.lvyou168.cn/','http://attractions.lvyou168.cn/']; 46 $('#dvSearchTab a').click(function () { 47 f.action = scUrl[$(this).index()]//(f.tp.value = $(this).index()) == '0' ? 'http://lvyou168.cn/lucenesearch.aspx' : 'http://lvyou168.cn/clients.aspx'; 48 $(this).addClass('cur').siblings().removeClass('cur'); 49 }); 50 if (comm.isIndex) { 51 $('#ulNewsTab li').mouseover(function () { 52 $('div.newslist_main').hide().eq($(this).index()).show(); 53 $(this).find('a').addClass('cur').end().siblings().find('a').removeClass('cur'); 54 }); 55 $('div.indexslider').each(function () { 56 var d = $('>div', this), li = $('li', this); 57 d.append('<ul class="destinations_ul clearfix"></ul>'); 58 for (var i = 4; i < 8; i++) d.find('ul:last').append(li.eq(i)) 59 d.append('<ul class="destinations_ul clearfix"></ul>'); 60 for (var i = 8; i < 12; i++) d.find('ul:last').append(li.eq(i)) 61 }).mouseenter(function () { doAnimate($(this).next(), true) }).mouseleave(function () { doAnimate($(this).next()) }); 62 var dnav = $('div.destinations_nav'); 63 dnav.find('a').click(function (e, isTimer) { 64 var index = $(this).index(); 65 $(this).parent().prev().animate({ scrollLeft: index * 600 }, 600); 66 $(this).addClass('cur').siblings().removeClass('cur'); 67 if (!isTimer) doAnimate($(this).parent()); 68 return false; 69 }); 70 function doAnimate(d,stop) { 71 (d||dnav).each(function () { 72 var me = $(this), timer = me.data('timer'),as=me.find('a'); 73 clearInterval(timer); 74 if (stop) return; 75 timer = setInterval(function () { 76 var index = me.find('a.cur').index(); 77 index++; 78 if (index >= as.length) index = 0; 79 as.eq(index).trigger('click', true); 80 }, 20000); 81 me.data('timer', timer); 82 }); 83 } 84 doAnimate(dnav); 85 } 86}); 87var _hmt = _hmt || []; 88(function () { 89 var hm = document.createElement("script"); 90 hm.src = "https://hm.baidu.com/hm.js?f977a7d7f718c7d82c486be76e485a4d"; 91 var s = document.getElementsByTagName("script")[0]; 92 s.parentNode.insertBefore(hm, s); 93})(); 94 95 96var _hmt = _hmt || []; 97(function() { 98 var hm = document.createElement("script"); 99 hm.src = "https://hm.baidu.com/hm.js?63b559be148bf2ef28345231be276982"; 100 var s = document.getElementsByTagName("script")[0]; 101 s.parentNode.insertBefore(hm, s); 102})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.