﻿var n = 0, _$1 = null, _$0 = "#autoimg", _$2 = _$0 + "2"; $(document).ready(function () { indexLoad(); zj_hover(); }); function indexLoad() { setActive(); autoRun(); setAutoRun(); } function setActive() { var A = "<div id=" + _$2.substr(1) + "><ul>"; for (var _ = 0; _ < $(_$0 + " div").length; _++) { A += "<li>" + (_ + 1).toString() + "</li>"; } A += "</ul></div>"; $(_$0).after(A); $(_$2 + " li").hover(function () { var _ = $(_$2 + " li").index(this); clearAutoRun(); $(_$0 + " div").each(function (A) { if (A == _) { $(this).show(); n = A; $(_$2 + " li").eq(A).attr("class", "curindex"); } else { $(this).hide(); $(_$2 + " li").eq(A).removeAttr("class"); } }); }, function () { setAutoRun(); }); } function setAutoRun() { _$1 = setInterval("autoRun()", 5000); } function clearAutoRun() { clearInterval(_$1); } function autoRun() { if (n > $(_$0 + " div").length - 1) { n = 0; } $(_$0 + " div").each(function (_) { if (_ == n) { $(this).show(); $(_$2 + " li").eq(_).attr("class", "curindex"); } else { $(this).hide(); $(_$2 + " li").eq(_).removeAttr("class"); } }); n++; } function zj_hover() { var B, A, _ = 5, D = 40; $("#rolin li").each(function (_) { $(this).find("div.cont").attr("id", "rolinblk" + _.toString()); $(this).find("span").show(); if (_ != 0) { $(this).find("div.cont").hide(); $(this).find("div.cont").width(0); } else { $(this).find("div.cont").show(); A = $(this).find("div.cont").width(); } }); $("#rolin").find("span").hover(function () { var A = $(this).next(), D = $("#rolin>li>div:visible"); if (A.attr("id") != D.attr("id")) { if (B == null) { B = setInterval(function () { C(A, D); }, _); } } }, function () { }); function C(_, $) { var C = _.width(), E = $.width(); if (C >= A || E <= 0) { _.width(A); $.width(0); $.hide(); clearInterval(B); B = null; } else { _.width(C + D); $.width(A - (C + D) - 2); $.show(); } _.show(); } } function ReqFriendShipLink() { var $ = "68547854"; qqcall($); } function freecall() { var _ = document.getElementById("freephone").value, $ = document.getElementById("authnum").value; if (_ == null || _.length == 0) { alert("请输入电话号码"); document.getElementById("freephone").focus(); return; } if ($ == null || $.length == 0) { alert("请输入验证码"); document.getElementById("authnum").focus(); return; } alert("欢迎使用福州泌尿专科医院免费电话咨询服务，我院在线医生将为您提供准确、全面的医疗咨询。"); window.open("http://tel.kuaishang.cn/calld.php?fromurl=" + window.location.href + "&sid=98&did=204&tel=" + _ + "&authnum=" + $, "福州泌尿专科医院免费电话咨询服务", "height=500,width=500"); } function GetBanner(A, B, C, E, D) { var _ = $("#" + A); if (_ != null && !isNaN(C)) { if (B != 0 && C != 0) { C = 0; } $.get("/Resources/Services/GetBanner.ashx", { bannerId: B, categoryId: C, pos: E, mode: D }, function ($) { _.html($); }); } } function qqcall($) { var _ = "tencent://message/?uin=" + $ + "&amp;Site=福州泌尿专科医院-网络部&amp;Menu=yes"; window.location.href = _; } function search(A, $) { var D = document.getElementById($); if (D != null) { if (D.value.length == 0) { alert("请输入搜索关键字！"); D.focus(); } else { if (trim(D.value) == "请输入搜索关键字") { alert("请输入搜索关键字！"); D.value = ""; D.focus(); } else { var B = document.getElementById($).value, C = "S", _ = "/plus/search.php?kwtype=0&q=" + B + "&s=" + C; top.location.href = _; } } } } function checkEnterKey(_, $) { var A = 13; if (_.keyCode == A) { search("1", $); } } function olzixun() { var $ = "http://lwt.zoosnet.net/LR/Chatpre.aspx?id=LWT44982426"; window.open($, "在线咨询", "height=350,width=550,resizable=no,location=no,toolbar=no,top=100,left=200"); } function setTabHover(F, _, E, C, D) { if (D != null) { var $ = D.parentNode.id, B = document.getElementById($).getElementsByTagName("li"); for (var G = 0; G < B.length; G++) { B[G].className = ""; } } for (G = 1; G <= _; G++) { document.getElementById(C + G).className = "yc"; } var A = document.getElementById("feother"); for (G = 1; G <= _; G++) { if (G == E) { if (F != null) { D.className = F; } document.getElementById(C + G).className = "xs"; } if (A != null) { if (C == "fe") { if (E == 1) { document.getElementById("feother").className = "xs"; } else { document.getElementById("feother").className = "yc"; } document.getElementById("fe1").className = "xs"; } } } } function olcomucount() { try { $.get("/Resources/Services/OnLineCommuNum.ashx", { rdn: Math.random() }, function (_) { $("#olcount").html("&nbsp;" + _ + "&nbsp;"); }); } catch (_) { $("#olcount").html("&nbsp;10&nbsp;"); } } function setHomepage(B) { if (document.all) { document.body.style.behavior = "url(#default#homepage)"; document.body.setHomePage(B); } else { if (window.sidebar) { if (window.netscape) { try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); } catch ($) { alert("该操作被浏览器拒绝，如果想启用该功能，请在地址栏内输入\r\nabout:config\r\n然后将项\r\nsigned.applets.codebase_principal_support\r\n值改为\r\ntrue"); } } try { var _ = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch); _.setCharPref("browser.startup.homepage", B); } catch (A) { } } } } function addBookmark(_, $) { if (window.sidebar) { window.sidebar.addPanel($, _, ""); } else { if (document.all) { window.external.AddFavorite(_, $); } else { if (window.opera && window.print) { return true; } } } } function ltrim($) { return $.replace(/^\s*/g, ""); } function rtrim($) { return $.replace(/\s*$/g, ""); } function trim($) { return rtrim(ltrim($)); }
