PageSourceSearch

https://www.beepworld.de/hp/appfiles/general.js?version=1

js beepworld.de collected 2026-10-01 10:28:58 UTC 22,662 bytes, 637 lines download raw bytes

1/**
2*
3* bw phrases
4*
5*/
6
7if (typeof(langid) == "undefined") langid = 1;
8
9var bw_phrases = new Array;
10bw_phrases[1] = new Object;
11bw_phrases[2] = new Object;
12bw_phrases[3] = new Object;
13
14bw_phrases[1]['mobile_view'] = 'Mobile Ansicht';
15bw_phrases[2]['mobile_view'] = 'Mobile View';
16bw_phrases[3]['mobile_view'] = 'Versione mobile';
17
18bw_phrases[1]['standard_view'] = 'Standard Ansicht';
19bw_phrases[2]['standard_view'] = 'Standard View';
20bw_phrases[3]['standard_view'] = 'Versione standard';
21
22bw_phrases[1]['pageeditor'] = 'Seitenbearbeitung';
23bw_phrases[2]['pageeditor'] = 'Page editor';
24bw_phrases[3]['pageeditor'] = 'Elaborazione pagine';
25
26bw_phrases[1]['pageeditor_hint'] = 'Sichtbar nur für Sie als Seiteninhaber!';
27bw_phrases[2]['pageeditor_hint'] = 'Visible only to you as a page owner!';
28bw_phrases[3]['pageeditor_hint'] = 'Visibile solo a voi come un proprietario di pagina!';
29
30bw_phrases[1]['shop_cart'] = 'Warenkorb';
31bw_phrases[2]['shop_cart'] = 'Cart';
32bw_phrases[3]['shop_cart'] = 'Carrello';
33
34bw_phrases[1]['cookiechoice'] = ['Diese Webseite benutzt Cookies.', '/apps/privacy', 'Mehr Information', 'Alle annehmen', 'Alle nicht notwendigen ablehnen'];
35bw_phrases[2]['cookiechoice'] = ['This website uses cookies.', 'http://www.beep.com/privacy.html', 'Further information', 'Accept'];
36bw_phrases[3]['cookiechoice'] = ['Questo sito web utilizza i cookies.', 'http://www.beepworld.it/privacy.html', 'Più informazione', 'Concordato'];
37
38bw_phrases[1]['photoalbum_more'] = 'Mehr anzeigen';
39bw_phrases[2]['photoalbum_more'] = 'Show more';
40bw_phrases[3]['photoalbum_more'] = 'Mostra di più';
41
42bw_phrases[1]['youtube_privacy'] = 'Mit dem Klicken auf "Video abspielen" erklärst du, dass du unsere <a href="/apps/privacy" target="_blank">Datenschutzerklärung</a> zur Kenntnis genommen hast und mit der Weitergabe deiner personenbezogenen Daten an den amerikanischen Drittanbieter YouTube einverstanden bist.';
43bw_phrases[1]['youtube_privacy_play'] = '<div class="bw_youtube_button_play"><svg xmlns="http://www.w4.org/2000/svg" viewBox="0 0 26 26"><polygon fill="#ffffff" points="9.33 6.69 9.33 19.39 19.3 13.04 9.33 6.69"/><path fill="#ffffff" d="M26,13A13,13,0,1,1,13,0,13,13,0,0,1,26,13ZM13,2.18A10.89,10.89,0,1,0,23.84,13.06,10.89,10.89,0,0,0,13,2.18Z"/></svg></div>Video abspielen</div>';
44
45/**
46*
47* bw youtube
48*
49*/
50
51$(window).resize(function() {
52    bw_youtube_check();
53});
54
55function bw_youtube_check() {
56    $('.bw_youtube[width="auto"]').each(function() {
57        bw_youtube_resize(this);
58    });
59}
60
61function bw_youtube_resize(this_p) {
62    var w = $(this_p).parent().css('width');
63    $(this_p).css({'width': w, 'height': (w.replace(/px/,'')/1.778)+'px'});
64}
65
66function bw_youtube_privacy_accept() {
67    bw_cookiechoice_close();
68    bw_youtube_init_player();
69}
70
71function bw_youtube_init_player() {
72    $('.bw_youtube_privacy').hide();
73    $('.bw_youtube').show();
74    $('.bw_youtube').each(function() {
75        $(this).attr('src', $(this).attr('data-media'));
76    });
77}
78
79/**
80*
81* bw cookiechoice
82*
83*/
84
85function bw_cookiechoice_check() {
86    if ($('div[class^=fastad-content]').length > 0 || (typeof(bw_cookiechoice) != "undefined" && bw_cookiechoice == true)) {
87        if (typeof(bw_cookiechoice) == 'boolean' && bw_cookiechoice == false) {
88            return true;
89        }
90        bw_cookiechoice_show();
91    }
92}
93function bw_cookiechoice_show() {
94    if (readCookie('bw_cookiechoice') != '1') {
95        $('body').append('<div id="bw_cookiechoice"><div class="bw_cookiechoice_table"><div class="bw_cookiechoice_row"><div class="bw_cookiechoice_cell">' + bw_phrases[langid]['cookiechoice'][0] + '&nbsp;&nbsp;<a target="_blank" href="' + bw_phrases[langid]['cookiechoice'][1] + '">' + bw_phrases[langid]['cookiechoice'][2] + '</a></div><div class="bw_cookiechoice_cell"><a href="#" onclick="bw_cookiechoice_close(); return false;">' + bw_phrases[langid]['cookiechoice'][3] + '</a><a href="#" onclick="bw_cookiechoice_close(); return false;">' + bw_phrases[langid]['cookiechoice'][4] + '</a></div></div></div></div>');
96
97        var cookiechoice_background = '#333';
98        var cookiechoice_color = '#fff';
99
100        if ($('.bw_customstyle_content_background_color').length > 0 && typeof($('.bw_customstyle_content_background_color').css('backgroundColor')) != "undefined") {
101            cookiechoice_background = $('#bw_cookiechoice a').css('color');
102            cookiechoice_color = $('.bw_customstyle_content_background_color').css('backgroundColor');
103
104            if (cookiechoice_color == 'transparent') cookiechoice_color = '#fff';
105            else if (cookiechoice_color.match(/rgba/)) cookiechoice_color = cookiechoice_color.replace(/rgba\((\d+),\s?(\d+),\s?(\d+)(,\s?.+?)\)/, "rgb($1, $2, $3)");
106        }
107
108        $('#bw_cookiechoice .bw_cookiechoice_cell:last-child a').css({'backgroundColor': co
108okiechoice_background, 'color': cookiechoice_color});
109        $('.bw_youtube_privacy_player').hide();
110
111    }
112}
113function bw_cookiechoice_close() {
114    document.cookie = 'bw_cookiechoice=1; path=/';
115    $('#bw_cookiechoice').hide('slow');
116    bw_youtube_init_player();
117}
118$(document).ready(function () {
119    if (typeof(showLogoutBox) == "undefined") setTimeout("bw_cookiechoice_check();", 300);
120    if (readCookie('bw_cookiechoice') == '1') {
121        bw_youtube_init_player();
122    } else {
123        $('.bw_youtube_privacy p').each(function() {
124            this.innerHTML = bw_phrases[langid]['youtube_privacy'];
125        });
126        $('.bw_youtube_button').each(function() {
127            this.innerHTML = bw_phrases[langid]['youtube_privacy_play'];
128        });
129    }
130});
131
132
133/**
134*
135* bw single background
136*
137*/
138
139$(window).resize(function() {
140    bw_singleBackground();
141});
142
143$(document).ready(function () {
144    bw_singleBackground();
145});
146
147var bw_background_resize = -1;
148var bw_background_ratio = 0;
149var bw_background_image = null;
150var bw_background_element = 'body';
151function bw_singleBackground(type) {
152    // init
153    if (bw_background_resize == -1) {
154
155        if ($('.bw_customstyle_background_image').length > 0) {
156            bw_background_element = '.bw_customstyle_background_image';
157        }
158
159        var backgroundSize = $(bw_background_element).css('backgroundSize');
160        if (typeof(backgroundSize) != "undefined") {
161            if (backgroundSize.match(/^auto(\sauto)?$/) == null) {
162                var image = $(bw_background_element).css('backgroundImage').replace(/url\(["'](.+?)["']\)/, "$1");
163                if (image == 'none') {
164                    bw_background_resize = 0;
165                } else {
166                    if (!image.match(/pagefiles/)) {
167                        // default
168                        bw_background_ratio = 1.4;
169                        bw_background_resize = 1;
170
171                    } else {
172                        // custom
173                        bw_background_image = new Image;
174                        $(bw_background_image).attr('src', image).attr('id', 'bw_background_image_temp').css('visibility', 'hidden');
175                        $(bw_background_element).append(bw_background_image);
176                        setTimeout("bw_setBackgroundRatio();", 150);
177                    }
178                }
179            }
180            else bw_background_resize = 0;
181        }
182
183    }
184
185    // resize
186    if (bw_background_resize == 1) {
187
188        if ($(window).width() < 800) {
189            $('html ' + bw_background_element).css('backgroundSize', 'cover');
190        } else {
191            if (bw_background_element == '.bw_customstyle_background_image') {
192                var header_width = $('.bw_customstyle_background_image').width();
193                var header_height = $('.bw_customstyle_background_image').height();
194                var header_min_height = $('.bw_customstyle_background_image').css('min-height').replace(/px/, '');
195                if (header_min_height > 0) header_height = header_min_height;
196
197                if (header_width / header_height < bw_background_ratio) {
198                    $('html ' + bw_background_element).css('backgroundSize', 'auto 100%');
199                } else {
200                    $('html ' + bw_background_element).css('backgroundSize', '100% auto');
201                }
202            }
203            else if (bw_background_element == 'body' && $(window).width() / $(window).height() < bw_background_ratio) {
204                $('html ' + bw_background_element).css('backgroundSize', 'auto 100%');
205            } else {
206                $('html ' + bw_background_element).css('backgroundSize', '100% auto');
207            }
208        }
209        if (bw_background_element == 'body') $('#bw_customstyle_background_effect').css('backgroundAttachment', 'fixed');
210        else $('#bw_customstyle_background_effect').css('backgroundAttachment', 'local');
211    }
212
213    // design 9
214    if ($('.d9_menu').length > 0) {
215        $('.d9_subtitle_main').css({
216            'bottom': 0,
217            'top': ($('.d9_menu').height()-20) + 'px',
218            'position': 'absolute',
219            'width': '100%'
220        });
221    }
222
223    // design 11
224    if ($('.d11_menu').length > 0) {
225        $('.d11_subtitle_main').css({
226            'bottom': 0,
227            'top': $('.d11_menu').height() + 'px',
228            'position': 'absolute',
229            'width': '100%'
230        });
231    }
232}
233
234function bw_setBackgroundRatio() {
235
236    bw_background_ratio = $(bw_background_image).width() / $(bw_background_image).height();
237    if (bw_background_ratio > 0) {
238        bw_background_resize = 1;
239        bw_singleBackground();
240        $('#bw_background_image_temp').remove();
241    }
242    else setTimeout("bw_setBackgroundRatio();", 100);
243}
244
245
246/**
247*
248* bw image
249*
250*/
251
252$(document).ready(function () {
253
254    $('a.bw_image[bw_image_width][bw_image_height]').mousedown(function() {
255        bw_image_show(
256            $(this).attr('href'),
257            $(this).attr('bw_image_width'),
258            $(this).attr('bw_image_height')
259        );
260    });
261    $('a.bw_image[bw_image_width][bw_image_height]').each(function() {
262        $(this).append('<div class="bw_image_zoom"></div>');
263    });
264});
265
266$(document).keydown(function(e) {
267    if ($('#bw_image_overlay').css('display') == 'block') {
268        bw_image_hide();
269    }
270});
271
272function bw_image_show(url, width, height) {
273    var border = 10;
274    var ratio = width/height;
275    if ($('#bw_image_overlay').css('display') == 'block') {
276        return false;
277    }
278
279    $('body').append('<div id="bw_image_overlay" onclick="bw_image_hide();"><div id="bw_image_full" onclick="bw_image_hide();"><img src="' + url + '" alt="" \/><\/div><\/div>');
280
281    var win_h = $('#bw_image_overlay').height()-border-2;
282    if (win_h > 0 && win_h < height) {
283        height = win_h;
284        width  = height*ratio;
285    }
286    var win_w = $('#bw_image_overlay').width()-border-2;
287    if (win_w > 0 && win_w < width) {
288        width  = win_w;
289        height = width/ratio;
290    }
291
292    $('#bw_image_full img').css('height', height + 'px').css('width', width + 'px');
293    $('#bw_image_full').css('margin-top', '-' + ((1*height+border)/2) + 'px');
294    $('#bw_image_overlay').fadeIn(300);
295}
296
297function bw_image_hide() {
298    $('#bw_image_overlay').fadeOut(300, function () {
299        $('#bw_image_overlay').remove();
300    });
301}
302
303
304/**
305 * readCookie
306 */
307function readCookie(name) {
308
309    var nameEQ = name + '=';
310    var ca = document.cookie.split(';');
311    for (var i=0;i < ca.length;i++) {
312
313        var c = ca[i];
314        while (c.charAt(0) == ' ') {
315            c = c.substring(1,c.length);
316        }
317        if (c.indexOf(nameEQ) == 0) {
318            return c.substring(nameEQ.length,c.length);
319        }
320
321    }
322
323    return null;
324}
325
326/* navigation for mobile */
327function bw_navigation_toggle() {
328
329    if ($('body').hasClass('bw_navigation_show')) {
330        // hide
331        $('body').removeClass('bw_navigation_show');
332    } else {
333        // show
334        $('body').addClass('bw_navigation_show');
335        $('html, body').animate({ scrollTop: 0 }, 500);
336    }
337}
338
339$(document).ready(function() {
340
341    /**
342    *
343    * bw options
344    *
345    */
346
347    if (typeof(showLogoutBox) == "undefined") {
348
349        if ($('.bw_submenu_mobile').html() != null) {
350            /* MOBILE */
351            $('body').append('<div id="bw_options"></div>');
352            $('#bw_customstyle_background_effect').append('<div id="bw_options_bottom"></div>');
353        } else {
354            /* STANDARD */
355            $('body').append('<div id="bw_options"></div>');
356        }
357    }
358
359    /**
360     *
361     * membership logout button
362     *
363     */
364
365   /**
366    * logoutBox
367    */
368
369   function logoutBox() {
370
371       if (typeof showLogoutBox !== 'undefined'
372           && showLogoutBox == false
373       ) {
374           return false;
375       }
376
377       var session = readCookie('bw_membership_session');
378       if (!session) {
379           return false;
380       }
381
382       var sessionData = session.split('|');
383       var userName    = sessionData[3]; // FIXME needs entities encoding
384
385       $('#bw_options').append('<div class="bw_option_link" id="bw_membership_logout" href="javascript:void(0)" title=""><b>' + userName  + ':</b>&nbsp;<a href="/apps/login?a=logout">Logout</a></div>');
386   }
387
388   // display logoutBox
389   logoutBox();
390
391
392       /**
393    *
394    * RESPONSIVE
395    *
396    */
397
398    if ($('.d12_menu, .d11_menu, .d10_menu, .d9_menu').length > 0) {
399
400        $('body').addClass('bw_responsive');
401
402        // navigation button for responsive
403        $('#bw_options').append('<link href="/appfiles/icon.css" rel="stylesheet" type="text/css" /><a class="bw_option_link" id="bw_navigation_button" href="javascript:void(0)" title="" onclick="bw_navigation_toggle(
403); return false;"></a>');
404
405        // subtitle
406        if ($('#bw_header_subtitle span').length == 0) {
407            $('#bw_header_subtitle').html('<span>' + $('#bw_header_subtitle').html() + '</span>');
408        }
409    }
410
411    if ($('.d11_menu, .d10_menu, .d9_menu').length > 0) {
412
413        var bw_linkmenu_content = document.createElement('div');
414        $(bw_linkmenu_content).attr('class', 'bw_linkmenu_content');
415        $(bw_linkmenu_content).html($('.bw_submenu_top').clone());
416        $('body').append($(bw_linkmenu_content));
417        $('.bw_linkmenu_content .bw_linkmenu').removeClass('bw_submenu_top').removeClass('init').addClass('bw_submenu_down');
418
419        if ($('.d9_menu, .d11_menu').length > 0) {
420            setTimeout("$('.bw_linkmenu_content .bw_customstyle_navigation_active_background_color').parentsUntil( '.bw_linkmenu', 'li').children('a').addClass('bw_customstyle_navigation_link_inactive_color');", 500);
421            setTimeout("$('.bw_linkmenu_content a.bw_customstyle_navigation_link_active_color').removeClass('bw_customstyle_navigation_link_inactive_color');", 500);
422        }
423        if ($('.d10_menu').length > 0) {
424            setTimeout("$('.bw_linkmenu_content .bw_customstyle_navigation_active_background_color').parentsUntil( '.bw_linkmenu', 'li').children('a').not('.bw_customstyle_navigation_link_active_color').addClass('bw_customstyle_navigation_link_inactive_color');", 500);
425            $('.bw_linkmenu_content .bw_linkmenu').addClass('bw_customstyle_bar_background_color');
426        }
427        bw_linkmenu_responsive();
428    }
429
430
431    /**
432    *
433    * bw mobile
434    *
435    */
436
437    if (readCookie('bw_mobile') == '0') {
438
439        /* STANDARD */
440
441        if (typeof(showLogoutBox) == "undefined") {
442
443            // link to mobile
444            $('#bw_options').append('<a class="bw_option_link" id="bw_mobile" href="javascript:void(0)" title="">' + bw_phrases[langid]['mobile_view'] + '</a>');
445            $('#bw_mobile').click(function() {
446                document.cookie = 'bw_mobile=1; path=/';
447                top.location.href = getNocacheUrl();
448            });
449        }
450    }
451    if ($('.bw_submenu_mobile').html() != null) {
452
453        /* MOBILE */
454
455        if (typeof(showLogoutBox) == "undefined") {
456
457            // link to standard
458            $('#bw_options').append('<a class="bw_option_link" id="bw_mobile" href="javascript:void(0)" title="">' + bw_phrases[langid]['standard_view'] + '</a>');
459            $('#bw_mobile').click(function() {
460                document.cookie = 'bw_mobile=0; path=/';
461                top.location.href = getNocacheUrl();
462            });
463        }
464
465        // youtube
466        $('.bw_youtube, iframe[src*="youtube.com"]').each(function() {
467            var ratio = $(this).width() / $(this).height();
468            $(this).css('width', '100%');
469            $(this).css('height', ($(this).width() / ratio) + 'px');
470        });
471
472        // mp3player
473        $('object[data*="\/hp\/widgets\/mp3player\/player.swf"]').each(function() {
474            var settings = decodeURIComponent($(this).html().replace(/\s/g, '').replace(/&amp;/g, '&'));
475            var file = settings.replace(/.*mp3=(.+?)(?:&|"|$).*/g, "$1");
476            var loop = settings.replace(/.*loop=(.+?)(?:&|"|$).*/g, "$1");
477            var width = settings.replace(/.*width=(.+?)(?:&|"|$).*/g, "$1");
478            var bgcolor = settings.replace(/.*bgcolor1=(.+?)(?:&|"|$).*/g, "$1");
479
480            if (loop == '1') loop = ' loop="loop"'; else loop = '';
481            if (width > 10) width = 'width:' + width + 'px;'; else width = '';
482            if (bgcolor.match(/^[0-9a-f]{6}$/i)) bgcolor = 'background:#' + bgcolor + ';'; else bgcolor = 'background:#000;';
483
484            $('<audio src="' + file + '" controls="controls"' + loop + ' style="border-radius:4px;' + width + bgcolor + '"></audio>').insertAfter(this);
485            $(this).html('').remove();
486        });
487    }
488
489
490    /**
491    *
492    * bw_shop
493    *
494    */
495
496
497    $('#bw_product_addtocart, .bw_shop_button[data_productid]').click(function() {
498
499        if ($(this).hasClass('inactive')) return false;
500        if (bw_shop_wait == true) return false;
501        bw_shop_wait = true;
502
503        var widget = false;
504        if ($(this).attr('id') != 'bw_product_addtocart') {
505            widget = true;
506            $('.bw_shop_button').addClass('inactive');
507        }
508
509
510        $(this).addClass('wait');
511        var productid = $(this).attr('data_productid');
512
513        var data = new Object;
514        data.productid = productid;
515
516        $.post("/apps/shop?a=insert_item", data, function(xml) {
517            $(xml).find('data').each(function(i) {
518                var status = $('status', this).text();
519                var message = $('message', this).text();
520                var count_items = $('count_items', this).text();
521
522                bw_shop_count_items = count_items;
523                bw_shop_update_count_items();
524
525                if (widget == false) {
526                    /* product page */
527                    $('#bw_product_addtocart').hide().removeClass('wait');
528                    $('.bw_shop_status span').html(message);
529                    $('.bw_shop_status span a').attr('href', '/apps/shop?a=cart');
530                    $('.bw_shop_status').addClass(status).fadeIn().css('display', 'inline-block');
531
532                    $('.bw_shop_status_close').click(function() {
533                        bw_shop_close_status();
534                    });
535                    setTimeout("bw_shop_close_status();", 4000);
536
537                } else {
538                    /* shop widget */
539                    setTimeout("bw_shop_close_widget();", 1000);
540                }
541
542
543            });
544        });
545    });
546
547    function bw_shop_cart_button() {
548        if (readCookie('bw_shop_cart') != null && typeof(showLogoutBox) == "undefined") {
549            $.post("/apps/shop?a=count_items", function(count) {
550                if (count > 0) {
551                    bw_shop_count_items = count;
552                    bw_shop_update_count_items();
553                }
554            });
555        }
556    }
557    bw_shop_cart_button();
558});
559
560var bw_shop_wait = false;
561var bw_shop_count_items = 0;
562function bw_shop_update_count_items() {
563    bw_shop_create_cart();
564    $('#bw_shop_cart_button span').html('(' + bw_shop_count_items + ')');
565}
566
567function bw_shop_close_widget() {
568    $('.bw_shop_button').removeClass('wait');
569    $('.bw_shop_button').removeClass('inactive');
570    bw_shop_wait = false;
571}
572
573function bw_shop_close_status() {
574    $('.bw_shop_status').fadeOut('fast', function() {
575        $('.bw_shop_status span').html('');
576        $('#bw_product_addtocart').show();
577    });
578    bw_shop_wait = false;
579}
580
581function bw_shop_create_cart() {
582    if (!document.getElementById('bw_shop_cart_button')) {
583        $('#bw_options').append('<a class="bw_option_link" id="bw_shop_cart_button" href="/apps/shop?a=cart" title="">' + bw_phrases[langid]['shop_cart'] + '&nbsp;<span></span></a>');
584        bw_shop_update_count_items();
585    }
586}
587
588function getNocacheUrl() {
589
590    var url = window.location.href;
591
592    url = url.replace(/frameset_inhalt\.htm/, "index.htm");
593    url = url.replace(/[\?&]nocache=\d+/, "")
594
595    var para = '?';
596    if (url.match(/\?/)) {
597        para = '&';
598    }
599    return url + para + 'nocache=' + Math.floor(Math.random()*9999);
600}
601
602
603/**
604*
605* bw_pebutton
606*
607*/
608
609function bw_pebutton() {
610
611    if (typeof(bw_appid) != "undefined" && typeof(bw_appname) != "undefined" && typeof(bw_server_url) != "undefined") {
612        bw_server_url_unsecure = bw_server_url.replace(/^https:\/\//i, 'http://');
613
614        if (self == top) {
615            $('#bw_options').append('<div class="bw_option_link" id="bw_pageeditor_button" href="javascript:void(0)"><a title="' + bw_phrases[bw_langid]['pageeditor_hint'] + '" onclick="bw_openpe(this);" href="' + bw_server_url_unsecure + '/cgi-bin/hp/hpchange.pl?o=pageeditor&appid=' + bw_appid + '&appname=' + bw_appname + '">' + bw_phrases[bw_langid]['pageeditor'] + '</a></div>');
616        }
617
618        // ####################################
619        // send ready to iframe in pageeditor
620
621        $(document).ready(function() {
622
623            if (top != self && typeof(template_preview) == "undefined") {
624
625                setTimeout("window.parent.postMessage('', '" + bw_server_url_unsecure + "/cgi-bin/hp/hpchange.pl?o=pageeditor');", 100);
626            }
627        });
628    }
629
630}
631
632function bw_openpe(this_p) {
633    if (top != self) {
634        top.location.href = this_p.href;
635        return false;
636    }
637}

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.