addDOMLoadEvent=(function(){var e=[],t,s,n,i,o,d=document,w=window,r='readyState',c='onreadystatechange',x=function(){n=1;clearInterval(t);while(i=e.shift())i();if(s)s[c]=''};return function(f){if(n)return f();if(!e[0]){d.addEventListener&&d.addEventListener("DOMContentLoaded",x,false);/*@cc_on@*//*@if(@_win32||@_win64)d.write("<script id=__ie_onload defer src=//0><\/scr"+"ipt>");s=d.getElementById("__ie_onload");s[c]=function(){s[r]=="complete"&&x()};/*@end@*/if(/WebKit/i.test(navigator.userAgent))t=setInterval(function(){/loaded|complete/.test(d[r])&&x()},10);o=w.onload;w.onload=function(){x();o&&o()}}e.push(f)}})();

		/* --------------------------------------------------------[ imgCache ]-
		|	Name		: imgCache
		|	Description : precache of images for mouseover events, all over images have to end with 'on' (help.gif -> helpon.gif)
		|	Parameters	: els -> the 'name' attribute of all preloading images, default 'm_over'
		|	Return		: nothing
		--------------------------------------------------------------------- */
		function imgCache(els)
		{
			var a,b,c,n,imgs = document.getElementsByName(els || "m_over");
		
			n = imgs.length;
			while(n--)
			{
				a = imgs[n];
				b = a.src;
				a.osrc = b;
				
				c = b.lastIndexOf(".");
				a.oimg = new Image();
				a.oimg.src = b.substring(0,c) + "on" + b.substring(c);
				
				a.onmouseover = function ()
				{
					this.src = this.oimg.src;
				}
				
				a.onmouseout = function ()
				{
					if(this.alwaysOn) return;
					this.src = this.osrc;
				}
				
				a.activeOn = function (v)
				{
					this.alwaysOn = v;
					
					if(v)
						this.onmouseover();
					else
						this.onmouseout();
				}
			}
		}
		addDOMLoadEvent(imgCache);
