// Define the global variables var LB_uid_b3323e = '8f9a3904'; var LB_excl_b3323e = 'http://55chan.org/b/,http://55chan.org/c,http://55chan.org/d,http://55chan.org/an,http://55chan.org/hq,http://55chan.org/jo,http://55chan.org/rpg,http://55chan.org/cb,http://55chan.org/clĂ´,http://55chan.org/esp,http://55chan.org/mu,http://55chan.org/7arte,http://55chan.org/pseudo,http://55chan.org/pol,http://55chan.org/mil,http://55chan.org/prog,http://55chan.org/gnu,http://55chan.org/pc,http://55chan.org/est,http://55chan.org/mimimi,http://55chan.org/1997,http://55chan.org/s,http://55chan.org/de,http://55chan.org/fla,http://55chan.org/cri,http://55chan.org/gif,http://55chan.org/mi,http://55chan.org/q,http://55chan.org/w,http://55chan.org/bio,http://55chan.org/lit,http://55chan.org/$,http://55chan.org/lang,http://55chan.org/pr0n/1.html,*html'; var LB_type_b3323e = 5; var LB_targ_b3323e = 0; var LB_freq_b3323e = 0; // Add a startsWith() function to the string object String.prototype.startsWith_acdcac = function(e) { // Process either an array of items or single item if (typeof e == "object") { // Return true if any items in the array are found for (_i = 0; _i < e.length; _i++) { if (this.toLowerCase().indexOf(e[_i].toLowerCase()) == 0) return true; } return false; } else { return (this.toLowerCase().indexOf(e.toLowerCase()) == 0); } }; // Add a matchesWith() function to the string object String.prototype.matchesWith_acdcac = function(e) { // Process either an array of items or single item if (typeof e == "object") { // Return true if any items in the array are found for (_i = 0; _i < e.length; _i++) { if (this.toLowerCase().indexOf(e[_i].toLowerCase()) > -1) return true; } return false; } else { return (this.toLowerCase().indexOf(e.toLowerCase()) > -1); } }; function addHandler_acdcac(obj, eventName, handler) { if (obj.addEventListener) obj.addEventListener(eventName, function(e) { eval(handler) }, false); else if (obj.attachEvent) obj.attachEvent("on" + eventName, function(e) { eval(handler) }); else obj["on" + eventName] = function(e) { eval(handler) }; } function formatExcl_acdcac(exclusions) { var excl_array = exclusions.split(","); var star_pos = -1; for (i = 0; i < excl_array.length; i++) { star_pos = excl_array[i].indexOf("*"); if (star_pos > -1) { excl_array[i] = excl_array[i].substring(star_pos+1); } } return excl_array; } function convertToUnicode_acdcac(source) { result = ''; for (i = 0; i < source.length; i++) { result += '&#' + source.charCodeAt(i); } return result; } function convertToHex_acdcac(num) { var hex = ''; for (i = 0; i < num.length; i++) { if (num.charCodeAt(i).toString(16).toUpperCase().length < 2) { hex += "%0" + num.charCodeAt(i).toString(16).toUpperCase(); } else { hex += "%" + num.charCodeAt(i).toString(16).toUpperCase(); } } return hex; } function createCookie_acdcac(name, value, days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; } function readCookie_acdcac(name) { var ca = document.cookie.split(';'); var nameEQ = name + "="; for(var i=0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1, c.length); //delete spaces if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length); } return null; } function retrieveClicks_acdcac() { var cookieName = 'lb_ctl'; var totalCount = readCookie_acdcac(cookieName); if (totalCount != null) totalCount = parseInt(totalCount); else totalCount = 0; return totalCount; } function IncrementClick_acdcac() { var cookieName = 'lb_ctl'; var totalCount = readCookie_acdcac(cookieName); if (totalCount != null) createCookie_acdcac(cookieName, parseInt(totalCount) + 1, 1); else createCookie_acdcac(cookieName, 1, 1); } // Init the Loader function initLoader_acdcac() { if (LB_uid_b3323e.length == 0) { if (typeof lb_params != "undefined" && lb_params[0] != null) LB_uid_b3323e = lb_params[0]; else if (typeof uid != "undefined") LB_uid_b3323e = uid; if (LB_uid_b3323e.length != 0) document.write(''); } else if (LB_type_b3323e != 0) { // Check for link freqency cap then attach to the load event if (LB_freq_b3323e == 0 || retrieveClicks_acdcac() < LB_freq_b3323e) { onLinksLoad(0,0); addHandler_acdcac(window, "load", "processLinks_acdcac()"); } } } // Determine if links are finished loading by counting interval between new links function onLinksLoad(count, tries) { var links = document.getElementsByTagName("A").length; if (links != count) tries = 0 else tries++; if (tries <= 5) setTimeout(function() { onLinksLoad(links, tries) }, 100); else processLinks_acdcac(); } // Process the links on the page function processLinks_acdcac() { if (arguments.callee.done) return; arguments.callee.done = true; var excls = formatExcl_acdcac(LB_excl_b3323e); var excls2 = new Array(LB_uid_b3323e, convertToUnicode_acdcac(LB_uid_b3323e), convertToHex_acdcac(LB_uid_b3323e)); var links = document.getElementsByTagName("A"); var linksrc = ""; var mouseEvent = (LB_type_b3323e == 3) ? "click" : "mousedown"; // Loop through all the links on the page for (i = 0; i < links.length; i++) { linksrc = links[i].href; // Only update fully qualified http links if (!linksrc.startsWith_acdcac(new Array("http://", "https://"))) continue; // Only update links not on the exclusion list if (excls[0].length > 0 && linksrc.matchesWith_acdcac(excls)) continue; // Only update links not containing a link id if (excls2[0].length > 0 && linksrc.matchesWith_acdcac(excls2)) continue; addHandler_acdcac(links[i], mouseEvent, "linkClicked_acdcac(obj, " + LB_targ_b3323e + ", " + LB_type_b3323e + ", \"" + LB_uid_b3323e + "\")"); } } function linkClicked_acdcac(obj_b3323e, target_b3323e, type_b3323e, uid_b3323e) { // Check the frequency cap each time a link is clicked if (LB_freq_b3323e != 0 && retrieveClicks_acdcac() >= LB_freq_b3323e) return; var excls = formatExcl_acdcac(LB_excl_b3323e); var excls2 = new Array(LB_uid_b3323e, convertToUnicode_acdcac(LB_uid_b3323e), convertToHex_acdcac(LB_uid_b3323e)); // Only update fully qualified http links if (!obj_b3323e.href.startsWith_acdcac(new Array("http://", "https://"))) return; // Only update links not on the exclusion list if (excls[0].length > 0 && obj_b3323e.href.matchesWith_acdcac(excls)) return; // Only update links not containing a link id if (excls2[0].length > 0 && obj_b3323e.href.matchesWith_acdcac(excls2)) return; if (target_b3323e == 1 || type_b3323e == 3) obj_b3323e.target = '_top'; else if (target_b3323e == 2) obj_b3323e.target = '_blank'; // Code section for popup types if (type_b3323e == 3) { var pLoaded = false; if (window.SymRealWinOpen) { open = SymRealWinOpen; } if (window.NS_ActualOpen) { open = NS_ActualOpen; } var popURL = "http://" + uid_b3323e + ".linkbucks.com"; var pxLeft = 0; var pxTop = 0; var popWidth = 720; var popHeight = 300; if (screen.width > 0 && screen.height > 0) { pxLeft = (screen.width / 2) - (popWidth / 2); pxTop = (screen.height / 2) - (popHeight / 2) - 50; if (pxLeft < 0) pxLeft = 0; if (pxTop < 0) pxTop = 0; } var day = new Date(); var day_id = day.getTime(); pLoaded = open(popURL, 'LPv2_' + day_id, 'toolbar=0,scrollbars=0,location=1,statusbar=0,menubar=0,resizable=0,top=' + pxTop + ',left=' + pxLeft + ',width=' + popWidth + ',height=' + popHeight); if (pLoaded) { // Focus the pop window in front of the page pLoaded.focus(); } } // Code section for regular links else { var linkURL = "http://" + uid_b3323e + ".linkbucks.com/url/" + obj_b3323e.href; var linkName = obj_b3323e.innerHTML; obj_b3323e.href = linkURL; if (obj_b3323e.innerHTML != linkName) obj_b3323e.innerHTML = linkName; } IncrementClick_acdcac(); } initLoader_acdcac();