function lib() {} lib.prototype.init = function() {} lib.prototype.attachEventListener = function (target, eventType, functionRef, capture) { if (typeof target.addEventListener != "undefined") { target.addEventListener(eventType, functionRef, capture); } else if (typeof target.attachEvent != "undefined") { target.attachEvent("on" + eventType, functionRef); } else { eventType = "on" + eventType; if (typeof target[eventType] == "function") { var oldListener = target[eventType]; target[eventType] = function() { oldListener(); return functionRef(); } } else { target[eventType] = functionRef; } } return true; } lib.prototype.addLoadListener = function(fn) { if (typeof window.addEventListener != 'undefined') { window.addEventListener('load', fn, false); } else if (typeof document.addEventListener != 'undefined') { document.addEventListener('load', fn, false); } else if (typeof window.attachEvent != 'undefined') { window.attachEvent('onload', fn); } else { var oldfn = window.onload; if (typeof window.onload != 'function') { window.onload = fn; } else { window.onload = function() { oldfn(); fn(); }; } } } lib.prototype.stopDefaultAction = function(event) { event.returnValue = false; if (typeof event.preventDefault != "undefined") { event.preventDefault(); } } lib.prototype.addClass = function(target, className) { target.className += " " + className; } lib.prototype.removeClass = function(target, className) { target.className= target.className.replace(className, ""); } var baseLib = new lib(); baseLib.init(); function powercomGroup() {} powercomGroup.prototype.init = function() { //preload the background images var imgs = ['bg_powercom_home','bg_novaris','bg_datacall','bg_powercom_consultants']; var obj = []; var i; for(i=0;i