PageSourceSearch

https://www.intsend.com/wp-content/themes/business_analysis_wp/script.js

js intsend.com collected 2026-09-29 14:09:10 UTC 13,096 bytes, 402 lines download raw bytes

1/* begin Page */
2
3
4
5// required for IE7, #150675
6if (window.addEvent) window.addEvent('domready', function() { });
7
8var artEventHelper = {
9	'bind': function(obj, evt, fn) {
10		if (obj.addEventListener)
11			obj.addEventListener(evt, fn, false);
12		else if (obj.attachEvent)
13			obj.attachEvent('on' + evt, fn);
14		else
15			obj['on' + evt] = fn;
16	}
17};
18
19var artUserAgent = navigator.userAgent.toLowerCase();
20
21var artBrowser = {
22	version: (artUserAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [])[1],
23	safari: /webkit/.test(artUserAgent) && !/chrome/.test(artUserAgent),
24	chrome: /chrome/.test(artUserAgent),
25	opera: /opera/.test(artUserAgent),
26	msie: /msie/.test(artUserAgent) && !/opera/.test(artUserAgent),
27	mozilla: /mozilla/.test(artUserAgent) && !/(compatible|webkit)/.test(artUserAgent)
28};
29 
30artCssHelper = function() {
31    var is = function(t) { return (artUserAgent.indexOf(t) != -1) };
32    var el = document.getElementsByTagName('html')[0];
33    var val = [(!(/opera|webtv/i.test(artUserAgent)) && /msie (\d)/.test(artUserAgent)) ? ('ie ie' + RegExp.$1)
34    : is('firefox/2') ? 'gecko firefox2'
35    : is('firefox/3') ? 'gecko firefox3'
36    : is('gecko/') ? 'gecko'
37    : is('chrome/') ? 'chrome'
38    : is('opera/9') ? 'opera opera9' : /opera (\d)/.test(artUserAgent) ? 'opera opera' + RegExp.$1
39    : is('konqueror') ? 'konqueror'
40    : is('applewebkit/') ? 'webkit safari'
41    : is('mozilla/') ? 'gecko' : '',
42    (is('x11') || is('linux')) ? ' linux'
43    : is('mac') ? ' mac'
44    : is('win') ? ' win' : ''
45    ].join(' ');
46    if (!el.className) {
47     el.className = val;
48    } else {
49     var newCl = el.className;
50     newCl += (' ' + val);
51     el.className = newCl;
52    }
53} ();
54
55(function() {
56    // fix ie blinking
57    var m = document.uniqueID && document.compatMode && !window.XMLHttpRequest && document.execCommand;
58    try { if (!!m) { m('BackgroundImageCache', false, true); } }
59    catch (oh) { };
60})();
61
62var artLoadEvent = (function() {
63    var list = [];
64
65    var done = false;
66    var ready = function() {
67        if (done) return;
68        done = true;
69        for (var i = 0; i < list.length; i++)
70            list[i]();
71    };
72
73    if (document.addEventListener && !artBrowser.opera)
74        document.addEventListener('DOMContentLoaded', ready, false);
75
76    if (artBrowser.msie && window == top) {
77        (function() {
78            try {
79                document.documentElement.doScroll('left');
80            } catch (e) {
81                setTimeout(arguments.callee, 10);
82                return;
83            }
84            ready();
85        })();
86    }
87
88    if (artBrowser.opera) {
89        document.addEventListener('DOMContentLoaded', function() {
90            for (var i = 0; i < document.styleSheets.length; i++) {
91                if (document.styleSheets[i].disabled) {
92                    setTimeout(arguments.callee, 10);
93                    return;
94                }
95            }
96            ready();
97        }, false);
98    }
99
100    if (artBrowser.safari || artBrowser.chrome) {
101        var numStyles;
102        (function() {
103            if (document.readyState != 'loaded' && document.readyState != 'complete') {
104                setTimeout(arguments.callee, 10);
105                return;
106            }
107            if ('undefined' == typeof numStyles) {
108                numStyles = document.getElementsByTagName('style').length;
109                var links = document.getElementsByTagName('link');
110                for (var i = 0; i < links.length; i++) {
111                    numStyles += (links[i].getAttribute('rel') == 'stylesheet') ? 1 : 0;
112                }
113                if (document.styleSheets.length != numStyles) {
114                    setTimeout(arguments.callee, 0);
115                    return;
116                }
117            }
118            ready();
119        })();
120    }
121
122    if (!(artBrowser.msie && window != top)) { // required for Blogger Page Elements in IE, #154540
123        artEventHelper.bind(window, 'load', ready);
124    }
125    return ({
126        add: function(f) {
127            list.push(f);
128        }
129    })
130})();
131
132
133function artGetElementsByClassName(clsName, parentEle, tagName) {
134	var elements = null;
135	var found = [];
136	var s = String.fromCharCode(92);
137	var re = new RegExp('(?:^|' + s + 's+)' + clsName + '(?:$|' + s + 's+)');
138	if (!parentEle) parentEle = document;
139	if (!tagName) tagName = '*';
140	elements = parentEle.getElementsByTagName(tagName);
141	if (elements) {
142		for (var i = 0; i < elements.length; ++i) {
143			if (elements[i].className.search(re) != -1) {
144				found[found.length] = elements[i];
145			}
146		}
147	}
148	return found;
149}
150
151var _artStyleUrlCached = null;
152function artGetStyleUrl() {
153    if (null == _artStyleUrlCached) {
154        var ns;
155        _artStyleUrlCached = '';
156        ns = document.getElementsByTagName('link');
157        for (var i = 0; i < ns.length; i++) {
158            var l = ns[i];
159            if (l.href && /style\.ie6\.css(\?.*)?$/.test(l.href)) {
160                return _artStyleUrlCached = l.href.replace(/style\.ie6\.css(\?.*)?$/, '');
161            }
162        }
163
164        ns = document.getElementsByTagName('style');
165        for (var i = 0; i < ns.length; i++) {
166            var matches = new RegExp('import\\s+"([^"]+\\/)style\\.ie6\\.css"').exec(ns[i].innerHTML);
167            if (null != matches && matches.length > 0)
168                return _artStyleUrlCached = matches[1];
169        }
170    }
171    return _artStyleUrlCached;
172}
173
174function artFixPNG(element) {
175	if (artBrowser.msie && artBrowser.version < 7) {
176		var src;
177		if (element.tagName == 'IMG') {
178			if (/\.png$/.test(element.src)) {
179				src = element.src;
180				element.src = artGetStyleUrl() + 'images/spacer.gif';
181			}
182		}
183		else {
184			src = element.currentStyle.backgroundImage.match(/url\("(.+\.png)"\)/i);
185			if (src) {
186				src = src[1];
187				element.runtimeStyle.backgroundImage = 'none';
188			}
189		}
190		if (src) element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "')";
191	}
192}
193
194function artHasClass(el, cls) {
195	return (el && el.className && (' ' + el.className + ' ').indexOf(' ' + cls + ' ') != -1);
196}
197/* end Page */
198
199/* begin Menu */
200function artGTranslateFix() {
201	var menus = artGetElementsByClassName("art-menu", document, "ul");
202	for (var i = 0; i < menus.length; i++) {
203		var menu = menus[i];
204		var childs = menu.childNodes;
205		var listItems = [];
206		for (var j = 0; j < childs.length; j++) {
207			var el = childs[j];
208			if (String(el.tagName).toLowerCase() == "li") listItems.push(el);
209		}
210		for (var j = 0; j < listItems.length; j++) {
211			var item = listItems[j];
212			var a = null;
213			var gspan = null;
214			for (var p = 0; p < item.childNodes.length; p++) {
215				var l = item.childNodes[p];
216				if (!(l && l.tagName)) continue;
217				if (String(l.tagName).toLowerCase() == "a") a = l;
218				if (String(l.tagName).toLowerCase() == "span") gspan = l;
219			}
220			if (gspan && a) {
221				var t = null;
222				for (var k = 0; k < gspan.childNodes.length; k++) {
223					var e = gspan.childNodes[k];
224					if (!(e && e.tagName)) continue;
225					if (String(e.tagName).toLowerCase() == "a" && e.firstChild) e = e.firstChild;
226					if (e && e.className && e.className == 't') {
227						t = e;
228						if (t.firstChild && t.firstChild.tagName && String(t.firstChild.tagName).toLowerCase() == "a") {
229							while (t.firstChild.firstChild) t.appendChild(t.firstChild.firstChild);
230							t.removeChild(t.firstChild);
231						}
232						a.appendChild(t);
233						break;
234					}
235				}
236				gspan.parentNode.removeChild(gspan);
237			}
238		}
239	}
240}
241artLoadEvent.add(artGTranslateFix);
242
243function artAddMenuSeparators() {
244	var menus = artGetElementsByClassName("art-menu", document, "ul");
245	for (var i = 0; i < menus.length; i++) {
246		var menu = menus[i];
247		var childs = menu.childNodes;
248		var listItems = [];
249		for (var j = 0; j < childs.length; j++) {
250			var el = childs[j];
251			if (String(el.tagName).toLowerCase() == "li") listItems.push(el);
252		}
253		for (var j = 0; j < listItems.length - 1; j++) {
254			var item = listItems[j];
255			var span = document.createElement('span');
256			span.className = 'art-menu-separator';
257			var li = document.createElement('li');
258			li.appendChild(span);
259			item.parentNode.insertBefore(li, item.nextSibling);
260		}
261	}
262}
263artLoadEvent.add(artAddMenuSeparators);
264
265function artMenuIE6Setup() {
266	var isIE6 = navigator.userAgent.toLowerCase().indexOf("msie") != -1
267    && navigator.userAgent.toLowerCase().indexOf("msie 7") == -1;
268	if (!isIE6) return;
269	var aTmp2, i, j, oLI, aUL, aA;
270	var aTmp = artGetElementsByClassName("art-menu", document, "ul");
271	for (i = 0; i < aTmp.length; i++) {
272		aTmp2 = aTmp[i].getElementsByTagName("li");
273		for (j = 0; j < aTmp2.length; j++) {
274			oLI = aTmp2[j];
275			aUL = oLI.getElementsByTagName("ul");
276			if (aUL && aUL.length) {
277				oLI.UL = aUL[0];
278				aA = oLI.getElementsByTagName("a");
279				if (aA && aA.length)
280					oLI.A = aA[0];
281				oLI.onmouseenter = function() {
282					this.className += " art-menuhover";
283					this.UL.className += " art-menuhoverUL";
284					if (this.A) this.A.className += " art-menuhoverA";
285				};
286				oLI.onmouseleave = function() {
287					this.className = this.className.replace(/art-menuhover/, "");
288					this.UL.className = this.UL.className.replace(/art-menuhoverUL/, "");
289					if (this.A) this.A.className = this.A.className.replace(/art-menuhoverA/, "");
290				};
291			}
292		}
293	}
294}
295artLoadEvent.add(artMenuIE6Setup);
296/* end Menu */
297
298/* begin Layout */
299function artLayoutIESetup() {
300    var isIE = navigator.userAgent.toLowerCase().indexOf("msie") != -1;
301    if (!isIE) return;
302    var q = artGetElementsByClassName("art-content-layout", document, "div");
303    if (!q || !q.length) return;
304    for (var i = 0; i < q.length; i++) {
305        var l = q[i];
306        var l_childs = l.childNodes;
307        var r = null;
308        for (var p = 0; p < l_childs.length; p++) {
309            var l_ch = l_childs[p];
310            if ((String(l_ch.tagName).toLowerCase() == "div") && artHasClass(l_ch, "art-content-layout-row")) {
311                r = l_ch;
312                break;
313            }
314        }
315        if (!r) continue;
316        var c = [];
317        var r_childs = r.childNodes;
318        for (var o = 0; o < r_childs.length; o++) {
319            var r_ch = r_childs[o];
320            if ((String(r_ch.tagName).toLowerCase() == "div") && artHasClass(r_ch, "art-layout-cell")) {
321                c.push(r_ch);
322            }
323        }
324        if (!c || !c.length) continue;
325        var table = document.createElement("table");
326        table.className = l.className;
327        var row = table.insertRow(-1);
328        table.className = l.className;
329        for (var j = 0; j < c.length; j++) {
330            var cell = row.insertCell(-1);
331            var s = c[j];
332            cell.className = s.className;
333            while (s.firstChild) {
334                cell.appendChild(s.firstChild);
335            }
336        }
337        l.parentNode.insertBefore(table, l);
338        l.parentNode.removeChild(l);
339    }
340}
341artLoadEvent.add(artLayoutIESetup);
342/* end Layout */
343
344/* begin Button */
345
346function artButtonsSetupJsHover(className) {
347	var tags = ["input", "a", "button"];
348	for (var j = 0; j < tags.length; j++){
349		var buttons = artGetElementsByClassName(className, document, tags[j]);
350		for (var i = 0; i < buttons.length; i++) {
351			var button = buttons[i];
352			if (!button.tagName || !button.parentNode) return;
353			if (!artHasClass(button.parentNode, 'art-button-wrapper')) {
354				if (!artHasClass(button, 'art-button')) button.className += ' art-button';
355				var wrapper = document.createElement('span');
356				wrapper.className = "art-button-wrapper";
357				if (artHasClass(button, 'active')) wrapper.className += ' active';
358				var spanL = document.createElement('span');
359				spanL.className = "l";
360				spanL.innerHTML = " ";
361				wrapper.appendChild(spanL);
362				var spanR = document.createElement('span');
363				spanR.className = "r";
364				spanR.innerHTML = " ";
365				wrapper.appendChild(spanR);
366				button.parentNode.insertBefore(wrapper, button);
367				wrapper.appendChild(button);
368			}
369			artEventHelper.bind(button, 'mouseover', function(e) {
370				e = e || window.event;
371				wrapper = (e.target || e.srcElement).parentNode;
372				wrapper.className += " hover";
373			});
374			artEventHelper.bind(button, 'mouseout', function(e) {
375				e = e || window.event;
376				button = e.target || e.srcElement;
377				wrapper = button.parentNode;
378				wrapper.className = wrapper.className.replace(/hover/, "");
379				if (!artHasClass(button, 'active')) wrapper.className = wrapper.className.replace(/active/, "");
380			});
381			artEventHelper.bind(button, 'mousedown', function(e) {
382				e = e || window.event;
383				button = e.target || e.srcElement;
384				wrapper = button.parentNode;
385				if (!artHasClass(button, 'active')) wrapper.className += " active";
386			});
387			artEventHelper.bind(button, 'mouseup', function(e) {
388				e = e || window.event;
389				button = e.target || e.srcElement;
390				wrapper = button.parentNode;
391				if (!artHasClass(button, 'active')) wrapper.className = wrapper.className.replace(/active/, "");
392			});
393		}
394	}
395}
396
397artLoadEvent.add(function() { artButtonsSetupJsHover("art-button"); });
398/* end Button */
399
400
401
402artLoadEvent.add(function() { artButtonsSetupJsHover("button"); });

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.