PageSourceSearch

https://www.cathaysec.com.tw/exclude_AL/js/exclude_AL_include_out_aside.js

js cathaysec.com.tw collected 2026-10-01 14:10:47 UTC 10,053 bytes, 255 lines download raw bytes

1// JavaScript Document
2var userAgent = navigator.userAgent.toLowerCase();
3jQuery.browser = {
4    version: (userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [])[1],
5    safari: /webkit/i.test(userAgent) && !this.chrome,
6    opera: /opera/.test(userAgent),
7    msie: /msie/.test(userAgent) && !/opera/.test(userAgent),
8    //mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent ) ,
9    mozilla: userAgent.match("Firefox"),
10    chrome: /chrome/.test(userAgent) && /webkit/.test(userAgent) && /mozilla/.test(userAgent)
11
12};
13
14$(function () {
15    //include
16    var base = /localhost|test/i.test(location.hostname) ? "http://test.cathaysec.com.tw" : "https://www.cathaysec.com.tw";
17    var href_link = base;
18    var href_link_img = base + "/exclude_AL/images";
19    var href_link_ind = 'href="' + base + '/index_exclude_AL.aspx"';
20    var href_link_ap = 'href="' + base + '/ap/index.html"';
21    var href_link_np = 'href="' + base + '/newPhone/index.html"';
22
23    function link_change(tar) {
24        tar = tar.replace(/\.\./gi, href_link);
25        tar = tar.replace(/images/gi, href_link_img);
26        tar = tar.replace(/href="index_exclude_AL.aspx"/gi, href_link_ind);
27        tar = tar.replace(/href="ap\/index.html"/gi, href_link_ap);
28        tar = tar.replace(/href="newPhone\/index.html"/gi, href_link_np);
29        return tar;
30    }
31
32    $.getScript(base + "/exclude_AL/include/js/i_header.js?v=20260330", function () {
33        i_header = link_change(i_header);
34        $('.all_header').html(i_header);
35        //magemenu
36        $('#header_menu li').each(function (index, element) {
37            $(this).hover(function () {
38                $('.header_menu_content').hide();
39                $('.header_menu_content').eq($(this).index()).show();
40                var suw = $('.header_menu_content').eq($(this).index()).find('ul').width();
41                var spw = $('.header_menu_content').eq($(this).index()).find('.header_menu_content_picture').width();
42                var hmt = $('.header_menu_content').eq($(this).index());
43                var hmL = $('.header_menu_content').eq($(this).index()).find('li').length;
44                hmL = Math.ceil(hmL / 2);
45                hmL = (hmL * suw) + spw + 22;
46                hmt.width(hmL);
47                if ($.browser.msie && ($.browser.version == "7.0")) {
48                    $('.ad').css("margin-top", "-3px");
49                }
50            }, function () {
51                $('.header_menu_content').hide();
52                shitie7(-3);
53                $('.header_menu_content').eq($(this).index()).hover(function () {
54                    shitie7(-3);
55                    $('#header_menu li').eq($(this).index() - 1).css("background", "#f6f6f6");
56                    // }
57                    $(this).show();
58                }, function () {
59                    $(this).hide();
60                    $('#header_menu li').css("background", "none");
61                    shitie7(0);
62                })
63                shitie7(0);
64            });
65        })
66        //magemenu
67    });
68
69
70
71    function shitie7(e) {
72        if ($.browser.msie && ($.browser.version == "7.0")) {
73            $('.ad').css("margin-top", e);
74        }
75    }
76
77
78
79    //footer
80    $.getScript(base + "/exclude_AL/include/js/i_foot.js", function () {
81        i_foot = link_change(i_foot);
82        $('.all_footer').html(i_foot);
83        //web_index
84        wi_go();
85        wi_go();
86        $('.wi_c').hide();
87        $('.wi_t').click(wi_go);
88        $('.wi_t_arrow').click(wi_go);
89        $('.go_top').click(function () {
90            $('html,body').animate({
91                scrollTop: 0
92            }, 1000);
93        })
94        //web_index
95    })
96    //footer
97
98    //body_aside
99    $.getScript(base + "/exclude_AL/include/js/i_body_aside.js?20230215", function () {
100        i_body_aside = link_change(i_body_aside);
101        $('.functions').html(i_body_aside);
102        //stock search
103        var refurl = document.location.href;
104        if (refurl.indexOf("cathayholdings") >= 0) {
105            $('.f_search').html('<iframe id="search" src="https://djinfo.cathaysec.com.tw/z/stkSearch/search.htm?cathayDomain=https://www.cathayholdings.com/securities" allowtransparency="true" width="240" height="45" frameborder="0" scrolling="no"></iframe>');
106        } else {
107            $('.f_search').html('<iframe id="search" src="https://djinfo.cathaysec.com.tw/z/stkSearch/search.htm?cathayDomain=https://www.cathaysec.com.tw" width="240" allowtransparency="true" height="45" frameborder="0" scrolling="no"></iframe>');
108        };
109        //stock search
110        //box
111        box_s();
112        //box
113        //curve_s
114        var curve_s = [
115            "https://djinfo.cathaysec.com.tw/z/skv.djhtm?ASPID=cathaysec&PID=TSE.TW&showAll=0&overlay=0&showTable=0&showLogo=1&w=205&h=185",
116            "https://djinfo.cathaysec.com.tw/z/skv.djhtm?ASPID=cathaysec&PID=OTC.TW&showAll=0&overlay=0&showTable=0&showLogo=1&w=205&h=185",
117            "https://djinfo.cathaysec.com.tw/z/skv.djhtm?ASPID=cathaysec&PID=FITX&showAll=0&overlay=0&showTable=0&showLogo=1&w=205&h=185",
118            "https://djinfo.cathaysec.com.tw/z/js/Marquee/DJMarquee.asp?ASPID=cathaysec&A=1&B=0&C=1&W=2
11805&H=840&CW=60,60,60,0&CH=20"
119        ]
120        $('.f_curve_t ul li').each(function (index, element) {
121            $(this).click(function () {
122                $('#b_c div').eq($(this).index()).find("iframe").attr("src", curve_s[$(this).index()]);
123
124            })
125        });
126        //curve_s
127        //全球指數scrollbar
128        var dragging = false;
129        var iY;
130        $("#bar").mousedown(function (e) {
131            dragging = true;
132            iY = e.clientY - this.offsetTop;
133            this.setCapture && this.setCapture();
134            return false;
135        });
136        document.onmousemove = function (e) {
137            if (dragging) {
138                var e = e || window.event;
139                var oY = e.clientY - iY;
140                if (oY < 0) {
141                    oY = "0";
142                }
143                if (oY > 140) {
144                    oY = "140";
145                }
146                $("#bar").css({ "top": oY + "px" });
147                $(".curve_s4").scrollTop(oY * (850 / 180));
148                return false;
149            }
150        };
151        $(document).mouseup(function (e) {
152            dragging = false;
153            $("#bar")[0].releaseCapture();
154            e.cancelBubble = true;
155
156        })
157        //全球指數scrollbar
158    })
159
160    //body_aside
161
162    //include
163})
164
165
166function gowebindex() {//site map
167    $('html,body').animate(
168        { scrollTop: $(".web_index").offset().top }, 3000);
169}
170function wi_go() { //webindex
171    $('.wi_c').slideToggle("slow", function () {
172        if ($('.wi_c').is(":visible")) {
173            $('.wi_t_arrow').css("background-position", "0px -22px");
174            $('.wi_t').hover(function () {
175                $('.wi_t_arrow').css("background-position", "0px -33px")
176            }, function () {
177                $('.wi_t_arrow').css("background-position", "0px -22px")
178            });
179
180        } else {
181            $(".wi_t").unbind('mouseenter mouseleave');
182            $('.wi_t_arrow').css("background-position", "0px 0px");
183            $('.wi_t').hover(function () {
184                $('.wi_t_arrow').css("background-position", "0px -11px")
185            }, function () {
186                $('.wi_t_arrow').css("background-position", "0px 0px")
187            });
188        }
189    });
190}
191function box_s() {//box
192    $('#b_c div').hide().eq(0).show();
193    $('#b_t ul li').each(function (index, element) {
194        bt_click($(this), $('#b_c .d1'));
195    });
196    $('#n_c_c div').hide().eq(0).show();
197    $('#n_c_t ul li').each(function (index, element) {
198        bt_click($(this), $('#n_c_c .d1'));
199    });
200    $('#n_c_c .d1').eq(0).find('*').show();
201    function bt_click(e, e2) {
202        e.click(function () {
203            e.siblings().removeAttr("id");
204            e.attr("id", "t_active");
205            e2.hide().eq(e.index()).show();
206            e2.eq(e.index()).find('*').show();
207        })
208    }
209    //box
210
211}
212$(window).on('load', function () {
213    //box
214    box_s();
215    //box
216    setTimeout(function () {
217
218        $('head').append('<link href="https://www.cathaysec.com.tw/exclude_AL/css/google_search_include.css" rel="stylesheet" type="text/css" />');
219        $('#gsc-i-id1').css("background", "#ebebeb");
220        $('#gsc-i-id2').css("background", "#ebebeb");
221        $('#gsc-i-id2').focus(function () {
222            $('#gsc-i-id2').css({ "background": "#ebebeb", "height": "17px" });
223            if ($.browser.msie && ($.browser.version == "7.0")) {
224                $('.gscb_a').css({ "line-height": "1em", "margin-top": "-11px" });
225            }
226            if ($.browser.msie && ($.browser.version == "8.0")) {
227                $('.gscb_a').css({ "line-height": "1em", "margin-top": "-8px" });
228            }
229
230        }).blur(function () {
231            $('#gsc-i-id2').css("background", "#ebebeb");
232        })
233        $('#gsc-i-id1').focus(function () {
234            $('#gsc-i-id1').css({ "background": "#ebebeb", "height": "18px" });
235            if ($.browser.msie && ($.browser.version == "7.0")) {
236                $('.gscb_a').css({ "line-height": "1em", "margin-top": "-11px" });
237            }
238            if ($.browser.msie && ($.browser.version == "8.0")) {
239                $('.gscb_a').css({ "line-height": "1em", "margin-top": "-8px" });
240            }
241
242        }).blur(function () {
243            $('#gsc-i-id1').css("background", "#ebebeb");
244        })
245        $('.gsc-results-close-btn').click(function () {
246            $('input.gsc-input').css("background", "#ebebeb");
247        })
248        $('.gsc-modal-background-image').click(function () {
249            $('input.gsc-input').css("background", "#ebebeb");
250        })
251    }, 300);
252
253
254
255})

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.