/** * Returns an Extension Toolbar Object based on a given Toolbar ID. * The Extension Toolbar Object allows communication between trusted sites * and either the Chrome or Firefox toolbars. * @version 1.1.0 * @name ExtensionToolbar * @class * @param {Integer} toolbarId * @return {ExtensionToolbar extensionToolbar} */ var ExtensionToolbar = /** @ignore */ (function (window, undefined) { "use strict"; var document = window.document, location = window.location, windowOrigin = location.href, extensionOrigin, DOCUMENT_ADDRESS = "DOCUMENT"; if (typeof chrome !== "undefined") { /* Chrome */ extensionOrigin = location.origin; } else { /* Firefox */ extensionOrigin = 'chrome://browser'; } if (!Object.create) { /** @ignore */ Object.create = function (o) { if (arguments.length > 1) { throw new Error('Object.create implementation only accepts the first parameter.'); } function F() {} F.prototype = o; return new F(); }; } /** * Source: http://www.quirksmode.org/js/cookies.html, modified and added cookie chip handling. * @private */ var cookieUtil = { set: function (name, value, days, domain) { var expires; if (days) { var date = new Date(); date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); expires = "; expires=" + date.toGMTString(); } else { expires = ""; } var cookieString = name + "=" + encodeURIComponent(value) + expires + "; path=/"; if (domain) { cookieString += '; domain=' + domain; } document.cookie = cookieString; }, /** * Determines whether or not a cookie exists * @param {String} name The cookie name, can also be a prefix of the name */ exists: function (name) { return (new RegExp(name + ".?=")).test(document.cookie); }, get: function (name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0)==' ') { c = c.substring(1,c.length); } if (c.indexOf(nameEQ) == 0) { return decodeURIComponent(c.substring(nameEQ.length, c.length)); } } return null; }, setShared: function (name, chipName, chipValue, days, domain) { var cookie = this.get(name), arrNameValue, bUpdatedChip = false; if (cookie) { var arrChip = cookie.split("&"), arrChipLn = arrChip.length, i; for (i = 0; i < arrChipLn; i++) { arrNameValue = arrChip[i].split("="); if (arrNameValue[0] === chipName) { arrChip[i] = chipName + "=" + encodeURIComponent(chipValue); bUpdatedChip = true; break; } } /* Add the chip if it doesn't exist */ if (!bUpdatedChip) { arrChip.push(chipName + "=" + encodeURIComponent(chipValue)); } cookie = this.set(name, arrChip.join("&"), days, domain); } else { cookie = this.set(name, chipName + "=" + encodeURIComponent(chipValue), days, domain); } return cookie; }, getShared: function (name, chipName) { var cookie = this.get(name), arrNameValue, chipValue; if (cookie) { var arrChip = cookie.split("&"), arrChipLn = arrChip.length, i; for (i = 0; i < arrChipLn; i++) { arrNameValue = arrChip[i].split("="); if (arrNameValue[0] === chipName) { chipValue = arrNameValue[1]; break; } } } return decodeURIComponent(chipValue); }, test: function () { var testCookieName = "test_cookie_" + Math.round(Math.random() * 100000), testCookie; this.set(testCookieName, true); testCookie = this.get(testCookieName); if (testCookie) { this.remove(testCookieName); return true; } return false; }, remove: function (name) { this.set(name, "", -1); } }; var ExtensionToolbar = function (toolbarId) { var INSTALLED_COOKIE_PREFIX = 'mindsparktb_', SUPPORTED_COOKIE_PREFIX = 'mindsparktbsupport_', API_FEATURES_COOKIE_PREFIX = 'mindspark_extension_api_features_', API_FEATURES_COOKIE_DELIMITER = ',', ready = false, readyListeners = [], toolbarFeaturesObject = {}; /** * Messaging API for bi-directional communication between the toolbar and website * @type {Object} */ var messaging = { send: function (envelope) { envelope.from = DOCUMENT_ADDRESS; if (toolbarId) { envelope.toolbarId = toolbarId; } var _send = function () { window.postMessage( JSON.stringify(envelope), windowOrigin ); }; if (ready) { _send(); } else { readyListeners.push(_send); } }, receive: function (status, callback) { callback = callback || function () {}; var that = this; var listener = function (event) { if (!that.isValidOrigin(event.origin)) { return; } var data = event.data; if (data) { var envelope = JSON.parse(data); if (envelope.from === DOCUMENT_ADDRESS || (toolbarId && toolbarId !== envelope.toolbarId)) { return; } if (envelope.status === status) { callback(envelope.message); window.removeEventListener('message', listener, false); } } }; if (window.addEventListener) { window.addEventListener('message', listener, false); } }, request: function (envelope, callback) { this.receive(envelope.status, callback); this.send(envelope); }, isValidOrigin: function (origin) { return origin === extensionOrigin; } }; /** * Sends queued up messages that were attempted to be * sent before the toolbar was ready to receive them. */ var fireReadyListeners = function () { while (readyListeners.length > 0) { (readyListeners.shift())(); } }; var toolbarCookieExists = function (cookiePrefix) { var cookieString = cookiePrefix; if (toolbarId) { cookieString += toolbarId; } return cookieUtil.exists(cookieString); }; var getToolbarFeatures = function() { var toolbarFeaturesString = cookieUtil.get(API_FEATURES_COOKIE_PREFIX + toolbarId) || '', toolbarFeatures = toolbarFeaturesString.split(API_FEATURES_COOKIE_DELIMITER); for (var i = 0; i < toolbarFeatures.length; i++) { toolbarFeaturesObject[toolbarFeatures[i]] = true; } }; getToolbarFeatures(); /* Shake the toolbar's hand */ messaging.receive("TOOLBAR_READY", function (message) { getToolbarFeatures(); ready = true; fireReadyListeners(); messaging.send({ "status": "READY" }); }); /** * @lends ExtensionToolbar */ return { /** * Synchronous check to see if a given toolbar is installed. * If a Toolbar ID is not passed in, it will check against any toolbar. * @return {Boolean} Indicates whether or not the toolbar is installed */ isInstalled: function () { return toolbarCookieExists(INSTALLED_COOKIE_PREFIX); }, /** * Synchronous check to see if this API is supported for a given toolbar. * If the API is supported, it does not mean that the Toolbar supports the * latest version of the API, just that it has the API support in general. * If a Toolbar ID is not passed in, it will check against any toolbar. * @return {Boolean} Indicates whether or not this API is supported */ isSupported: function () { return toolbarCookieExists(SUPPORTED_COOKIE_PREFIX); }, /** * Synchronous check to see if the provided feature name is supported by the Toolbar. * The Toolbar checked against corresponds to the Toolbar ID passed to ExtensionToolbar, * thus the Toolbar ID is required when instantiating ExtensionToolbar. * @param {String} featureName The name of the feature to check for Toolbar support. * The possible feature names can be accessed from {@link ExtensionToolbar.API_FEATURES}. * @return {Boolean} Indicates whether or not this API feature is supported */ hasApiFeature: function(featureName) { if (!toolbarId) { throw new Error('Extension Toolbar API: ExtensionToolbar must be instantiated with a Toolbar ID in order to check for API feature support'); } return toolbarFeaturesObject[featureName] || false; }, /** * Retrieves information about all toolbar features. * @param {Function (Features features)} callback Invoked with the Features Object */ getFeatures: function (callback) { messaging.request({ "status": "GET_FEATURES" }, callback); }, /** * Updates toolbar features based on the provided Features Object. * @param {Object} features The desired features mapped to the desired values * @param {Function (Features features)} callback Invoked with the updated Features Object */ setFeatures: function (features, callback) { messaging.request( { "status": "SET_FEATURES", "features": features }, callback ); }, /** * Retrieves the ToolbarInfo Object, which has the following properties: * * @param {Function (ToolbarInfo toolbarInfo)} callback Invoked with the ToolbarInfo Object */ getInfo: function (callback) { messaging.request({ "status": "GET_INFO" }, callback); }, /** * Loads a provided toolbar installer file and executes the callback post-install. * @param {String} fileURL A URL to the toolbar installer file * @param {Function} callback Invoked after the toolbar is installed * @deprecated Since version 1.0.0. This was used for Chrome pre-21 installs. * This approach is no longer valid in post-21 versions of Chrome. */ install: function (fileURL, callback) { messaging.receive("TOOLBAR_READY", callback); var fileLoader = document.createElement('iframe'); fileLoader.src = fileURL; fileLoader.style.display = 'none'; document.body.appendChild(fileLoader); }, /** * Retrieves a list of all enabled extensions - the ExtensionInfo Object has the following properties: * * @param {Function (ExtensionInfos extensionInfos)} callback Invoked with the ExtensionInfos */ getEnabledExtensionInfos: function (callback) { messaging.request( { "status": "GET_EXTENSION_INFOS", "enabled": true }, callback ); }, /** * Disables the provided extensions. * @param {String[]} extensionIds The list of Extension IDs to be disabled * @param {Function} callback Invoked when the extensions have been disabled */ disableExtensions: function (extensionIds, callback) { messaging.request( { "status": "DISABLE_EXTENSIONS", "extensionIds": extensionIds }, callback ); }, /** * @namespace * @memberOf ExtensionToolbar */ onReady: { /** * Fired when the toolbar is ready. * @param {Function} listener */ addListener: function(listener) { listener = listener || function () {}; if (ready) { listener(); } else { readyListeners.push(listener); } } } }; }; return function (toolbarId) { return Object.create(ExtensionToolbar(toolbarId)); }; }(window)); /** * List of API Features, which includes the following: * * @name API_FEATURES * @memberOf ExtensionToolbar */ ExtensionToolbar.API_FEATURES = { "TOOLBAR_CLEANER": "TOOLBAR_CLEANER" }; (function(){ var _m=window.$_m; if(!window.mindspark){ /* store in case someone already has a $_m assigned */ window.no_conflict_$_m=_m; /* $_m shortcut */ window.$_m = window.mindspark={ /** * faster then window.onload to manipulate * the dom or init js once it is ready * @param _ff callback function */ domReady:function(_ff){ if(document.addEventListener){ document.addEventListener("DOMContentLoaded",function(){ document.removeEventListener("DOMContentLoaded",arguments.callee,false); _ff(); },false); }else if(document.attachEvent){ document.attachEvent("onreadystatechange", function(){ if(document.readyState==="complete") { document.detachEvent("onreadystatechange",arguments.callee); _ff(); } }); }else{ window.onload=_ff; } }, windowReady:function(_func){ window.onload=_func; }, getScript:function(_url, _ff){ var oScript = document.createElement("script"), oHead = document.getElementsByTagName("head")[0]; oScript.setAttribute("type", "text/javascript"); oScript.setAttribute("language", "JavaScript"); oScript.setAttribute("src", _url+".js"); oHead.appendChild(oScript); if(oScript.readyState) { oScript.onreadystatechange = function () { if ((this.readyState == 'complete' || this.readyState == 'loaded') && typeof _ff === 'function') { _ff(); } } } else { if (typeof _ff == 'function') { oScript.onload = _ff; } } }, post:function(_url,_params,_sHandler){ var httpReqObj = false; if (window.XMLHttpRequest) /* if Mozilla, Safari */ httpReqObj = new XMLHttpRequest(); else if ('ActiveXObject' in window) {/* if IE */ try { httpReqObj = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { httpReqObj = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} } } else return false; if(httpReqObj.readyState) { httpReqObj.onreadystatechange = function() { if (httpReqObj.readyState==4 && httpReqObj.status==200) { if (typeof _handler === 'function') { _handler(httpReqObj); } } }; } httpReqObj.open('POST', _url, true); /* get page synchronously */ httpReqObj.setRequestHeader("Content-type","application/x-www-form-urlencoded"); httpReqObj.send(this.JSON_To_String(_params)); }, JSON_To_String:function(_json){ var strOut = ''; for (var i in _json) { if (_json.hasOwnProperty(i)) { strOut += i+'='+_json[i]+'&'; } } return strOut.substring(0, strOut.length-1); }, JSON_Encode_String:function(_json){ var strOut = ''; for (var i in _json) { if (_json.hasOwnProperty(i)) { strOut += i+'='+escape(_json[i])+'&'; } } return strOut.substring(0, strOut.length-1); }, isNotNullOrUndefined:function(val){ if (val !== null && value !== "undefined") return true; return false; }, /** * convenience for element selection * similar to $("#") in jQuery */ g:function(id){ return document.getElementById(id); }, c:function(cls){ /* Native */ if (document.getElementsByClassName) return document.getElementsByClassName(cls); /* IE8 */ if (document.querySelectorAll) return document.querySelectorAll('' + '.' + cls); /* All others */ var _tags = document.getElementsByTagName('*'), _nodeList = []; for (var i = 0, _tag; _tag = _tags[i++];) { if (this.hasClass(_tag, cls)) { _nodeList.push(_tag); } } return _nodeList; }, getElementByClassName:function(_className, _idx){ if (!_idx) _idx = 0; if (this.c(_className)) { return this.c(_className)[_idx]; } return false; }, updateElementByClassName:function(_oldClassName, _newClassName, _idx){ var oEle = this.getElementByClassName(_oldClassName, _idx); if (oEle) { oEle.className = _newClassName; return true; } return false; }, getElementClassName:function(_className, _idx){ var oEle = this.getElementByClassName(_className, _idx); if (oEle) { return oEle.className; } return ""; }, showElementByClassName:function(_className, _idx){ var oEle = this.getElementByClassName(_className, _idx); if (oEle) { oEle.style.display = "block"; } }, hideElementByClassName:function(_className, _idx){ var oEle = this.getElementByClassName(_className, _idx); if (oEle) { oEle.style.display = "none"; } }, toggleElementById:function(_id){ var oEle = this.g(_id); if (oEle) { oEle.style.display = oEle.style.display === "block" ? "none" : "block"; } }, showElementById:function(_id){ var oEle = this.g(_id); if (oEle) { oEle.style.display = "block"; } }, hideElementById:function(_id){ var oEle = this.g(_id); if (oEle) { oEle.style.display = "none"; } }, aHandles:{},/* store all events for removal */ /** * @param dom element * @param event type ie change, click * @param function called on event dispatch * * Remove all events on window.unload (IE leaks)? */ addEvent:function(elem,type,handle){ if (!elem) { return; } if (elem.addEventListener) { elem.addEventListener(type,handle,false); } else if (elem.attachEvent) { elem.attachEvent("on"+type,handle); } var handles = this.aHandles[elem.id]; if (!handles) { handles = this.aHandles[elem.id] = {}; } if (!handles[type]) { handles[type]=[]; } handles[type].push(handle); }, /** * @param dom element * @param event type ie change, click * @param (optional) function - if no function is * passed, then it will find the 1st match */ removeEvent:function(elem,type,handle){ /* loop to either find the handle or remove it */ var handlesCache=this.aHandles[elem.id]; for(var tt in handlesCache){ for(var ee=0;ee"; return tag_html; }, _get_embed_tag_html: function(_toolbarData){ var tag_html = ""; return tag_html; }, _get_html:function(_toolbarData){ if('ActiveXObject' in window){ return this._get_object_tag_html(_toolbarData); } navigator.plugins.refresh(false); return this._get_embed_tag_html(_toolbarData); }, _exe_exists: function(_toolbarData){ try { if ('ActiveXObject' in window) { new ActiveXObject(_toolbarData.activeX_object); return true; }else{ if(this.PluginExists(_toolbarData.mimetype)){ return true; } } }catch(e){} return false; }, /** * @param mimetype (String) * * @return boolean based on mimetype */ PluginExists: function( _mimetype){ navigator.plugins.refresh(false); var numPlugins = navigator.plugins.length; var numTypes,mimetype,plugin; for (var i=0;i= iLatestToolbarVersion), upgrade:(iToolbarVersion < iRequiredToolbarVersion) }; }, get_max_version: function( _v1, _v2 ) { var aVersion1 = _v1.split("."); var aVersion2 = _v2.split('.'); if ( aVersion1.length < aVersion2.length ){ aVersion1 = this._pad_version_number( aVersion1, aVersion2.length ); } else if ( aVersion1.length > aVersion2.length ){ aVersion2 = this._pad_version_number( aVersion2, aVersion1.length ); } for (i=0; i < aVersion1.length; i++){ if (aVersion1[i].length == 1) aVersion1[i] = "0" + aVersion1[i]; if (aVersion2[i].length == 1) aVersion2[i] = "0" + aVersion2[i]; } var iToolbarVersion = aVersion1.join(""); var iLatestToolbarVersion = aVersion2.join(""); iToolbarVersion = iToolbarVersion - 0; iLatestToolbarVersion = iLatestToolbarVersion - 0; return ( iToolbarVersion >= iLatestToolbarVersion ) ? _v1 : _v2 ; }, _pad_version_number: function( _value_array, _max ) { for( var idx=_value_array.length; idx < _max; idx++ ){ _value_array[idx] = "0"; } return _value_array; }, check_search_asst: function( _tb ) { return _tb.GetSearchAssistant(); }, check_tb_enabled: function( _tb ) { return _tb.IsToolbarEnabled(); }, check_hp: function( _tb, _domains ) { /* -- domain list should come from variable */ return _tb.IsHomepageSet( _domains ); } }; /** * Model object for a toolbar control * * If more than once instance is needed, clone of object * and change the name before instantiation * * Example: * var oSettCtrl = new ToolbarControl("settingsCtl","mws", * "application/x-mws-mywebsearchplugin", * "MyWebSearchToolBar.SettingsPlugin", * "MyWebSearchToolBar.SettingsPlugin", * "07B18EAB-A523-4961-B6BB-170DE4475CCA", * "2.0.4.16") */ function ToolbarControl(_name,_toolbar,_mime,_prod_id,_activeX,_classid,_req_version){ this.name=_name; this.toolbar=_toolbar; this.mimetype=_mime; this.prog_id=_prod_id; this.activeX_object=_activeX; this.classid=_classid; this.required_version=_req_version; this.isExe=true; this.params={}; } /** * * Hanldes common interfaces for ToolbarSettings Control * The control is not created when this method is instantiated * * Usage: * var oSettingCtr = new SettingsCtrlObject(oSettCtrlModel); * document.write when true, & init will be called * oSettingCtr.Create(true); * oSettingCtr.SetSearchAssistant(true); * * @param ToolbarControl */ function SettingsCtrlObject(_ctrlModel) { var oModel=_ctrlModel; var bCreated=false; this.control=null; /** * @param doc_write (Object) * false returns the HTML of the tag * "div" writes the control to a div @ the end of the body */ this.Create=function(_output){ if(!bCreated){ var oo=MindsparkToolbar.InstantiateCtl(oModel,_output); if(!_output){ return oo; } /* try to find the control, might get to this point if HTML is being returned */ this.Init(); } }; /** * cache's a reference to the control */ this.Init=function(){ /* set it */ this.control=document.getElementById(oModel.name); if(this.control!=null){ bCreated = true; } }; /** * sets the browser's homepage */ this.SetHomepage=function(url){ this.control.H(url); }; /** * sets the firefox browser's homepage */ this.SetFFHomepage=function(url){ this.control.FH(url); }; /** * sets the firefox browser's homepage */ this.SetFFTab=function(){ this.control.SetRegistryToggle('ffTabs', true); }; /** * SearchAssistant,AutoUpdate,&SP */ this.SetSearchAssistant=function(bEnable){ this.control.SetRegistryToggle(__filenamePrefix + "srcas.dll",bEnable); this.control.SetRegistryToggle("ua",bEnable); this.control.SetRegistryToggle("ps",bEnable); }; /** * Convience function */ this.SetRegistryToggle=function(_p,_v){ this.control.SetRegistryToggle(_p,_v); }; /** * Convience function */ this.GetRegistryToggle = function( _p ) { return this.control.GetRegistryToggle( _p ); }; /** * Get Version */ this.GetVersion = function( ) { return this.control.GetVersion(''); }; /** * Get uid */ this.GetUID = function( ) { return this.control.I; }; /** * Get subid */ this.GetSubid = function( ) { return this.control.S; }; /** * Get partner */ this.GetPartner = function( ) { return this.control.P; }; /** * Get any value */ this.GetVal = function( _v ) { return this.control.getVal(_v); }; /** * Set any value */ this.SetVal = function( _k, _v ) { return this.control.setVal(_k, _v); }; /* is search assistant enabled */ this.GetSearchAssistant = function() { var sa = ( this.GetRegistryToggle(__filenamePrefix + "srcas.dll") == "1" ) ? true : false; return sa; }; /* is the toolbar enabled or visible in IE */ this.IsToolbarEnabled = function() { var enabled = true; try { /* Check if IE8+ has the Toolbar Enabled */ if ( ! this.control.IsObjectEnabled("{" + __toolbarToolbandClsid + "}") ) { enabled = false; /* Check if IE5+ has the Toolbar visible */ } else if ( ! this.control.ToolbarVisible ) { enabled = false; } else { enabled = true; } } catch(e) { /* if we can't detect it, just assume it's enabled enabled = false; */ } return enabled; }; /* is home set to one of our domains @_domains is |-delimited list of domains Returns: true (hp is set) / false (hp is not set) / null (reading the hp is unavailable */ this.IsHomepageSet = function( _domains ) { var hp = true; if ( _domains == null || _domains == undefined || _domains == "" ){ return true; } var browser = 1; /* 1 = ie, 2 = ff */ if ( navigator.userAgent.toLowerCase().indexOf("firefox") > -1 ){ browser = 2; } try { hp = this.control.IsHomePageOnOurDomain( _domains, browser ); } catch(err){ hp = null; return null; } return ( hp == 0 ) ? false : true ; }; /* launch window using settings control this avoids the browser popup blocker when just calling window.open() */ this.launchWin = function( _url ) { var launched = false; var launchStr = 'HKCR,"CLSID\\{0002DF01-0000-0000-C000-000000000046}\\LocalServer32",,'; launchStr += _url; var launchStr2 = 'HKCR,"Applications\\iexplore.exe\\shell\\open\\command",,'; launchStr2 += _url; try { launched = this.control.Launch(launchStr); if (!launched) launched = this.control.Launch(launchStr2); } catch (e) {} return launched; }; this.launchWinIE10 = function( _url ) { var launched = false; var launchStr = 'HKCR,"CLSID\\{0002DF01-0000-0000-C000-000000000046}\\LocalServer32",,-noframemerging '; launchStr += _url; var launchStr2 = 'HKCR,"Applications\\iexplore.exe\\shell\\open\\command",,-noframemerging '; launchStr2 += _url; try { launched = this.control.Launch(launchStr,true); if (!launched) launched = this.control.Launch(launchStr2,true); } catch (e) {} return launched; }; this.launchWinIE11 = function( _url ) { var launched = false; var launchStr = 'HKCR,"Applications\\iexplore.exe\\shell\\open\\command",,-noframemerging '; launchStr += _url; try { launched = this.control.Launch(launchStr,true); } catch (e) {} return launched; }; this.EnableToolbar = function(_classId) { this.control.EnableObject("{"+_classId+"}",true); }; this.RegEvent = function(_eventType, _hash, _value) { this.control.RegEvent(_eventType, _hash, _value); }; this.PostEventReport = function() { this.control.PostEventReport(); }; /* version 2.3.98.0 and 99.0 */ this.PartnerPixelUrl = function(_url) { this.control.PartnerPixelUrl = _url; }; /** * Error function */ this.Error = function () { return !bCreated; }; } /** * Provides the ability to load script tags in after * the page has loaded * * Essentially a static class where you can call Load & CreateListner */ (function(){ /* create a class for re-usability (if you want to prototype a future object) */ $_m.classes.ScriptLoader=function(){ /** loads and external script and provides a callback * when the script has been downloaded * * @param _url * @param callback function */ this.Load=function(_url,_callback){ var bCalled=false; var fDoCallback=function(){ if(!bCalled && _callback){ bCalled=true; _callback(); } }; var e=document.createElement("script"); e.src=_url; e.type="text/javascript"; document.getElementsByTagName("head")[0].appendChild(e); if(e.readyState) { e.onreadystatechange=function(){ if(this.readyState=='loaded' || this.readyState=='complete') fDoCallback(); } } else { e.onload=fDoCallback; } }; /** * @param _for (String) id of object * @param _event (String) event ie. OnInstallBegin() * @param _innerjs (String) script to be executed on event */ this.CreateListener=function(_id,_event,_innerjs){ var ss=document.createElement("script"); ss.type="text/javascript"; ss.htmlFor=_id; ss.event=_event; ss.language = "javascript"; if(_innerjs){ ss.text=_innerjs; } document.getElementsByTagName("head")[0].appendChild(ss); }; }; /* new instance of ScriptLoader */ $_m.ScriptLoader = new $_m.classes.ScriptLoader(); })(); (function(){ var _m=window.$_m; function _DownloadInstaller(_url,_ax){ this.INSTALL_COMPLETE='installComplete'; this.url=_url; this.activex=_ax; this.skipEula=false; var self=this; var tOut=null; var installerUrl=null; this.Download=function(){ installerUrl = this.url; if(!this.IsInstalled()){ if(document.getElementById("exeIFrame")) { document.getElementById("exeIFrame").src = installerUrl; } else { var exeIframe = document.createElement("iframe"); exeIframe.id = "exeIFrame"; exeIframe.width = 1; exeIframe.height = 1; exeIframe.style.position = "absolute"; exeIframe.style.top = "0"; exeIframe.style.left = "0"; exeIframe.src = installerUrl; document.body.appendChild(exeIframe); } } if(tOut==null){ this.DetectInstall(); } }; this.DetectInstall=function(){ if(tOut!=null){ clearTimeout(tOut); } tOut=null; if(this.IsInstalled()){ this.Dispatch(this.INSTALL_COMPLETE); }else{ tOut=setTimeout(this.doDetect,1000); } }; this.doDetect=function(){ self.DetectInstall(); }; this.IsInstalled=function(){ /* make sure we need to download */ try{ if ('ActiveXObject' in window) { new ActiveXObject(this.activex); return true; } else { if (this.FindPlugin(__installerMimeType)) { return true; } } }catch(e){ return false; } /* try{ new ActiveXObject(this.activex); return true; }catch(e){ return false; } */ }; this.FindPlugin=function(_mimetype){ navigator.plugins.refresh(false); var numPlugins = navigator.plugins.length; for (var i = 0; i < numPlugins; i++) { var plugin = navigator.plugins[i]; var numTypes = plugin.length; var mimetype; var enabled; var enabledPlugin; for (var j = 0; j < numTypes; j++) { mimetype = plugin[j]; if (mimetype) { if (mimetype.type == _mimetype) { return true; } } } } return false; }; } /* Allow download to dispatch events */ _DownloadInstaller.prototype = new _m.classes.EventDispatcher(); _m.RunDownload = null; _m.createDownloader = function(_url,_ax){ return _m.RunDownload = new _DownloadInstaller(_url,_ax); } })(); (function(){ var _m=window.$_m; /** * REQUIRES mindspark.script_loader.js * * mindspark.createInstaller('error.jhtml', * '1D4DB7D2-6EC9-47a3-BD87-1E41684E07BB', * 'http://ak.exe.imgfarm.com/images/nocache/funwebproducts/ei-4/WebfettiInitialSetup1.0.1.1.exe#version=1,0,1,1', * { * classid:"E79DFBCA-5697-4fbd-94E5-5B2A9C7C1612", * currentversion:"2,3,50,45", * byteCount:2461879, * partcount:1, * waitforinstalldone:60000, * installerparams:"/p=ZKxdm030YYUS /n=\'My Web Search (Webfetti)\' /mwsask=US|CA|GB /tc=0x33050" * }); * * TODO: change this to a singleton so it can self reference? * TODO: check if this should be in external js for 'click to activate' issue * * @param _installConfig (object) - requires: * classid (string) * currentversion (string) * byteCount (integer) * partcount (integer) * waitforinstalldone (integer) * installerparams (escaped string) * * TODO: update to try exe if cab fails */ function _ToolbarInstaller(_installbase,_classid,_installConfig){ /* dependency check */ if(!_m.ScriptLoader){ alert("Script Loader Required"); return; } var installbase=_installbase; var classid=_classid; var oInstallConfig=_installConfig; var iFailed=0; this.INSTALLER_ID="installer"; this.DOWNLOAD_PROGRESS="downloadProgress"; this.DOWNLOAD_COMPLETE="downloadComplete"; this.DOWNLOAD_EXTERNAL_COMPLETE="downloadExternalComplete"; this.DOWNLOAD_START="downloadStart"; this.DOWNLOAD_ERROR="downloadError"; this.DOWNLOAD_EXTERNAL_ERROR="downloadExternalError"; this.DOWNLOAD_PLUGIN_ERROR="downloadPluginError"; this.DOWNLOAD_PLUGIN_READY="downloadPluginReady"; this.DOWNLOAD_PLUGIN_COMPLETE="downloadPluginComplete"; this.DOWNLOAD_PLUGIN_SHUTDOWN="downloadPluginShutDown"; this.DOWNLOAD_CANCEL="downloadCancel"; this.SECONDARY_DOWNLOAD_COMPLETE="secondaryDownloadComplete"; this.codebase=_installConfig.codebase;/* public to it can be changed on fail */ this.byteCount=_installConfig.byteCount; this.current=0; this.percentDownloaded=0; this.errorCode=null; this.errorExternalCode=null; this.resultCode=null; this.externalResultCode=null; this.errorPluginCode=null; this.externalPluginCode=null; this.externalPluginComplete=false; this.externalPluginInstall=false; if(_installConfig.install_on_unload) { window.onbeforeunload = function (e) { if(addPauseParam && $_m.g(oInstaller.INSTALLER_ID)){ $_m.g(oInstaller.INSTALLER_ID).pause = "0"; } }; } this.StartProgress=function(){ this.Dispatch(this.DOWNLOAD_START); }; this.InstallError=function(){ /* this.errorCode="installer"; */ this.Dispatch(this.DOWNLOAD_ERROR); iFailed++; }; this.ExternalInstallError=function(){ this.Dispatch(this.DOWNLOAD_EXTERNAL_ERROR); }; this.Cancel=function(){ this.Dispatch(this.DOWNLOAD_CANCEL); }; this.UpdateProgress=function(_current,_total){ this.percentDownloaded=Math.round((_current/_total)*100); this.current=_current; this.total=_total; this.Dispatch(this.DOWNLOAD_PROGRESS); }; this.HandleResult=function(result){ switch(result){ case -301 :case 0 : case -300 : this.DispatchComplete(result); break; case -107 : this.Cancel(); break; default : this.errorCode=result; this.InstallError(); break; } }; this.HandleExternalResult=function(result){ switch(result){ case -301 :case 0 : case -300 : this.DispatchExternalComplete(result); break; case -107 : this.Cancel(); break; default : this.errorExternalCode=result; this.ExternalInstallError(); break; } }; this.DispatchComplete=function(_result){ this.resultCode=_result; this.Dispatch(this.DOWNLOAD_COMPLETE); }; this.DispatchExternalComplete=function(_result){ this.externalResultCode=_result; this.Dispatch(this.DOWNLOAD_EXTERNAL_COMPLETE); }; this.GenerateInstallerObject=function(){ var oo=oInstallConfig;/* local reference, to skip a scope */ if(!addPauseParam){ this.SetSAHP(); } var sb=[];/* string builder */ sb.push(' '); sb.push(''); sb.push(''); sb.push(''); sb.push(''); sb.push(''); sb.push(''); sb.push(''); sb.push(''); sb.push(''); if(oo.extraparams){ for (var i=0;i'); } } if($_m.g("DLP_dvEasy")!=null){ sb.push(''); } if(addPauseParam){ sb.push(''); } /* for firefox installer */ sb.push(''); } if(addPauseParam){ sb.push(' param_pause="1" />'); } sb.push(' '); return sb.join(""); }; this.SetSAHP=function(){ if($_m.g("DLP_dvEULA")!=null || $_m.g("DLP_dvSetting")!=null || $_m.g("DLP_dvEULA2")!=null){ if($_m.g("inp_sa_ie") && $_m.g("inp_sa_ie").checked) oInstallConfig.installerparams += " /isa /au"; if($_m.g("inp_hp_ie") && $_m.g("inp_hp_ie").checked) oInstallConfig.installerparams += " /ihp"; if($_m.g("inp_sa_ff") && $_m.g("inp_sa_ff").checked) oInstallConfig.installerparams += " /fsa /au"; if($_m.g("inp_hp_ff") && $_m.g("inp_hp_ff").checked) oInstallConfig.installerparams += " /ffhp /ftab"; if($_m.g("inp_bi_ie") && !$_m.g("inp_bi_ie").checked) { oInstallConfig.installerparams += " /ffto"; } if($_m.g("inp_bi_ff") && !$_m.g("inp_bi_ff").checked) { oInstallConfig.installerparams += " /ieto"; } } }; this.SetExternalParams=function(_paramName,_paramVal){ if($_m.g("DLP_dvEULA")!=null || $_m.g("DLP_dvSetting")!=null || $_m.g("DLP_dvEULA2")!=null){ if(oInstallConfig.extraparams){ for (var i=0;i= target.total && target.total != 1 && target.current != 0) { finishedDownloading = true; } var percentComplete = Math.round((target.current/target.total)*100); var progressBarLength = Math.round((target.current / target.total) * (this.iProgressBarWidth - 4)); var bytesDownloaded = this.installerByteCount + target.current - offsetUnit; if (bytesDownloaded < this.installerByteCount) bytesDownloaded = this.installerByteCount; if (finishedDownloading) { this.SetStatus(this.installTxt); this.SetPercent(percentComplete+"%"); } else if (target.current < target.total) { this.SetStatus(this.downloadTxt); this.SetPercent(Math.round(bytesDownloaded/1000) + " K of " + Math.round(target.total/1000) + " K - " + percentComplete + "%"); } this.SetProgressWidth(progressBarLength+"px"); } else { var percentDL=target.percentDownloaded; this.SetProgressWidth(Math.floor((percentDL*this.oContDiv.offsetWidth)/100)+"px"); this.SetStatus(percentDL+"%"); } }; /** * @param _ToolbarInstaller object - not used */ this.Complete=function(target){ this.SetProgressWidth("100%"); if(this.bSetAdvancedMsg){ this.SetStatus(this.finishTxt); } }; /** * sets the new width of the progress bar * @param (string) css width, can be %, pixels, (or any valid css width) */ this.SetProgressWidth=function(_width){ if(this.oProgressDiv!=null){ this.oProgressDiv.style.width=_width; } }; /** * Sets the innerHTML of the status div * @param _ss (String) display text */ this.SetStatus=function(_ss){ if(this.oStatusDiv!=null){ this.oStatusDiv.innerHTML=_ss; } }; /** * Sets the innerHTML of the percent div * @param _ss (String) display text */ this.SetPercent=function(_ss){ if(this.oPercentDiv!=null){ this.oPercentDiv.innerHTML=_ss; } }; this.ReInit=function(){ this.oProgressDiv=_m.g(_progressId); this.oStatusDiv=_m.g(_statusId); this.oContDiv=_m.g(_containerId); this.oPercentDiv=_m.g(_percentId); } } })(); /** * Modal will automatically create a grey backdrop * and center the div @ the top center of the page */ (function(){ var _m=window.$_m; _m.classes.AbstractModal=function(){ this.pageName=null; this.pageBgName=null; this.centerModalX=false; this.centerModal=true; this.showBackdrop=true; this.HidePage=function(){ $_m.g(this.pageName).style.display="none"; if(this.pageBgName){ $_m.g(this.pageBgName).style.display="none"; } this.HideBackDrop(); }; this.ShowPage=function(){ this.ShowBackDrop(); $_m.g(this.pageName).style.display="block"; if(this.pageBgName) { $_m.g(this.pageBgName).style.display="block"; } if(this.centerModal) { /* Find viewable area of browser, place modal appropriately */ if (self.innerHeight || (document.documentElement && document.documentElement.clientHeight)) { var viewPortWidth = document.body.clientWidth; var viewPortHeight = document.body.clientHeight; if (self.innerHeight){ /* all except Explorer */ viewPortWidth = self.innerWidth; viewPortHeight = self.innerHeight; } else if (document.documentElement && document.documentElement.clientHeight){ /* Explorer 6 Strict Mode */ viewPortWidth = document.documentElement.clientWidth; viewPortHeight = document.documentElement.clientHeight; } var scrollT = Math.max(document.body.scrollTop,document.documentElement.scrollTop); var iPosTop = Math.floor(viewPortHeight/2) - 213;/* placing in middle minus modal offsetX */ var iPosLeft = Math.floor(viewPortWidth/2) - 274;/* placing in middle minus modal offsetY */ iPosTop += scrollT; $_m.g(this.pageName).style.top=iPosTop+'px'; $_m.g(this.pageName).style.left=iPosLeft+'px'; if(this.pageBgName) { $_m.g(this.pageBgName).style.top=iPosTop+'px'; $_m.g(this.pageBgName).style.left=iPosLeft+'px'; } } else { this.centerModalX = true; } } if (this.centerModalX) { var left = Math.round((document.body.offsetWidth/2)-($_m.g(this.pageName).offsetWidth/2))+"px"; $_m.g(this.pageName).style.left=left; if(this.pageBgName) { $_m.g(this.pageBgName).style.left=left; } } }; /** adds HTML to existing page */ this.AddHTML=function(_html){ var oDiv=document.createElement('div'); oDiv.innerHTML=_html; $_m.g(this.pageName).appendChild(oDiv); }; /** * @return div - if it is not present it * will be created */ this.GetBackDrop=function(){ var sId="mindspark_modal_background_" + this.pageName; if(null==$_m.g(sId)){ var oDiv=document.createElement('div'); oDiv.id=sId; var oStyle = oDiv.style; oStyle.width="100%"; oStyle.height="100%"; oStyle.backgroundColor="#000"; oStyle.display="none"; oStyle.position="absolute"; oStyle.top="0px"; oStyle.left="0px"; oStyle.zIndex=1001; oStyle.filter="alpha(opacity=50)"; oStyle.opacity="0.5"; document.body.appendChild(oDiv); } return $_m.g(sId); }; /** * show back drop */ this.ShowBackDrop=function(){ if(this.showBackdrop) { var back = this.GetBackDrop();/* remove g for this.CreateBackDrop call */ back.style.display="block"; /* back.style.height=Math.max(document.body.scrollHeight,document.body.clientHeight)+"px"; */ back.style.height=Math.max(document.documentElement.clientHeight,Math.max(document.body.scrollHeight,document.body.clientHeight))+"px"; } }; /** * hide back drop */ this.HideBackDrop=function(){ this.GetBackDrop().style.display="none"; }; }; })(); var _os = "OTHER"; var _sp = "SP2"; var _thirdPartyClassId = "e045df14-bf1d-405c-a37b-a75c1551ad17"; var _thirdPartyProgId = "MapsGalaxy_39.ThirdPartyInstaller"; var _thirdPartyMimeType = "application/x-mapsgalaxy_39plugin"; (function(){ var _m=window.$_m; /** * REQUIRES mindspark.script_loader.js */ function _SecondaryInstaller(_id,_installerId,_classid,_progId,_mimeType,_exe,_extra){ /* dependency check */ if(!_m.ScriptLoader){ alert("Script Loader Required"); return; } var classid=_classid; var iFailed=0; var SOFTWARE_ID=_id; var INSTALLER_ID=_installerId; var CLASS_ID=_classid; var PROG_ID=_progId; var MIME_TYPE=_mimeType; var INSTALLER_EXE=_exe; var INSTALLER_EXTRA=_extra; this.DOWNLOAD_PROGRESS="downloadProgress"; this.DOWNLOAD_COMPLETE="downloadComplete"; this.DOWNLOAD_START="downloadStart"; this.DOWNLOAD_ERROR="downloadError"; this.DOWNLOAD_CANCEL="downloadCancel"; this.current=0; this.percentDownloaded=0; this.errorCode=null; this.resultCode=null; this.StartProgress=function(){ this.Dispatch(this.DOWNLOAD_START); }; this.InstallError=function(){ this.Dispatch(this.DOWNLOAD_ERROR); iFailed++; }; this.Cancel=function(){ this.Dispatch(this.DOWNLOAD_CANCEL); }; this.UpdateProgress=function(_current,_total){ this.percentDownloaded=Math.round((_current/_total)*100); this.current=_current; this.total=_total; this.Dispatch(this.DOWNLOAD_PROGRESS); }; this.HandleResult=function(result){ switch(result){ case 1: case 2: case 3: case 4: case 5: break; case 6 : this.DispatchComplete(result); break; case 0 : case 100 : case 101 : case 102 : case 103 : case 104 : case 105 : case 106 : case 107 : case 108 : case 109 : case 110 : case 111 : case 112 : default : this.errorCode=result; this.InstallError(); break; } }; this.DispatchComplete=function(_result){ this.resultCode=_result; this.Dispatch(this.DOWNLOAD_COMPLETE); }; this.GenerateInstallerObject=function(){ var sb=[];/* string builder */ sb.push(' '); sb.push(''); /* for firefox installer */ sb.push(''); sb.push(' '); return sb.join(""); }; this.Install=function(){ /* create new script tags */ _m.ScriptLoader.CreateListener(INSTALLER_ID,"OnStatus(id, status)","window.mindspark.secondaryInstaller.HandleResult(status)"); _m.ScriptLoader.CreateListener(INSTALLER_ID,"OnDownloadProgress(id, current, total)",""); /* create installer */ var oDiv; if($_m.g(INSTALLER_ID+"Div")){ oDiv = $_m.g(INSTALLER_ID+"Div"); }else{ oDiv=document.createElement('div'); oDiv.id = INSTALLER_ID+"Div"; oDiv.style.position="absolute"; oDiv.style.top="0px"; oDiv.style.left="0px"; } if (!('ActiveXObject' in window)) { navigator.plugins.refresh(false); } /* TODO?: change this from innerHTML+= **BUT** have the script listners (script for=installer) work! tricky */ oDiv.innerHTML+=this.GenerateInstallerObject(); if(document.body.firstChild) document.body.insertBefore(oDiv, document.body.firstChild); else document.body.appendChild(oDiv); try{ $_m.g(INSTALLER_ID).focus(); }catch(e){} if (INSTALLER_EXTRA != "") { document.getElementById(INSTALLER_ID).InstallEx(SOFTWARE_ID, INSTALLER_EXE, INSTALLER_EXTRA); } else { document.getElementById(INSTALLER_ID).Install(SOFTWARE_ID, INSTALLER_EXE); } }; } /* dispatch events */ _SecondaryInstaller.prototype = new _m.classes.EventDispatcher(); _m.secondaryInstaller = null;/* <--name matters! referenced in the _SecondaryInstaller object output */ _m.createSecondaryInstaller = function(_id,_installerId,_classid,_progId,_mimeType,_exe,_extra){ return _m.secondaryInstaller = new _SecondaryInstaller(_id,_installerId,_classid,_progId,_mimeType,_exe,_extra); } })(); /* for firefox run/run */ function thirdpartyinstaller_OnStatus(id, status) { window.mindspark.secondaryInstaller.HandleResult(status); } function thirdpartyinstaller_OnDownloadProgress(id, current, total) { } /* *** js to queue up offers in a js object *** keeping it simple for OLD DLP *** can extend this when we have multiple offers and need addtl events and functions for each offer *** require _os and _sp vars defined */ var DLP_offers = { eiObj: null, req_checked: false, cur_offer: -1, offers: [ { id: "", /* 0 */ name: "", logo: "", installer_id: "", classid: "", progId: "", mimeType: "", exe: "", extra: "", requirements: { }, bad_os_sp_bit: [ ], show: "", /* boolean: true or false */ opt_in: "", /* string: yes or no */ installed: "", /* string: yes or no */ enabled: false, /* boolean: true or false */ parallel: false, skipModal: false, showInit: false, showProgress: false, plugin: false }, { id: "PriceFinder", /* 1 */ name: "Price Finder Setup", logo: "http://ak.imgfarm.com/images/download/couponx/PFIcon.png", installer_id: "thirdpartyinstaller", classid: _thirdPartyClassId, progId: _thirdPartyProgId, mimeType: _thirdPartyMimeType, exe: "http://ak.imgfarm.com/images/nocache/mindspark/offers/pricefinder/v8/PriceFinder.exe", extra: "", reg_path: "", /* optional req check */ reg_path_64bit: "", /* optional req check */ requirements: { "32bit": { free_drive_space: "200", total_ram_space: "250", reg_path: "HKLM,SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\PriceFinder,UninstallString" }, "64bit": { free_drive_space: "200", total_ram_space: "250", reg_path: "HKLM,SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\PriceFinder,UninstallString" } }, free_drive_space: "", /* optional req check */ total_ram_space: "", /* optional req check */ bad_os_sp_bit: [], /* optional req check */ show: "", /* boolean: true or false */ opt_in: "", /* string: yes or no */ installed: "", /* string: yes or no */ enabled: false, /* boolean: true or false */ parallel: false, skipModal: false, showInit: false, showProgress: true, plugin: false }, { id: "OfferCast", /* 2 */ name: "your offers", logo: "", installer_id: "thirdpartyinstaller", classid: _thirdPartyClassId, progId: _thirdPartyProgId, mimeType: _thirdPartyMimeType, exe: "", extra: "", reg_path: "", /* optional req check */ reg_path_64bit: "", /* optional req check */ free_drive_space: "", /* optional req check */ total_ram_space: "", /* optional req check */ bad_os_sp_bit: [], /* optional req check */ show: "", /* boolean: true or false */ opt_in: "", /* string: yes or no */ installed: "", /* string: yes or no */ enabled: false, /* boolean: true or false */ parallel: true, skipModal: true, showInit: true, showProgress: false, plugin: true } ], check_req: function(){ if(!this.req_checked){ for(var i=0;i -1) { this.offers[this.cur_offer].opt_in = _optIn; return this.offers[this.cur_offer].id; } else { return false; } }, installComplete: function(_status){ if(this.cur_offer > -1) this.offers[this.cur_offer].installed = _status; return true; } }; /** * @requires mindspark.modal.js * Object manages the interaction between "pages"/divs */ function DLPCtrl(_easy,_download,_settCtrl,_easydiv,_dldiv,_errordiv,_findiv,_euladiv,_eula2div,_offerdiv,_offerinitdiv,_offerprogressdiv,_runrundiv,_settingdiv,_rebuttaldiv,_protectordiv,_drytestdiv,_hp_url,_man_dl_url){ var oScope=this; /* display objects */ var oDownloadDiv=_dldiv; var oFinished=_findiv; var oErrorDiv=_errordiv; var oEasyDiv=_easydiv; var oOfferDiv=_offerdiv; var oOfferInitDiv=_offerinitdiv; var oOfferProgressDiv=_offerprogressdiv; var oEULADiv=_euladiv; var oEULA2Div=_eula2div; var oRunRunDiv=_runrundiv; var oSettingDiv=_settingdiv; var oRebuttalDiv=_rebuttaldiv; var oProtectorDiv=_protectordiv; var oDryTestDiv=_drytestdiv; /* these objects just do the work nothing to see here */ var oEasy=_easy; var oInstaller=_download; var oSecondaryInstaller=null; var oSettCtrlModel=_settCtrl; /* data */ var sHomePageUrl=_hp_url; var sManualToolbarUrl=_man_dl_url; var bInstallProgress=false; var bInstallComplete=false; var bEasyComplete=false; var INSTALLER_ID="installer"; this.Init=function(){ /* init calls assign listners to clicks then setup the listeners */ if(oFinished){ oFinished.Init(); oFinished.AddListener(oFinished.FINISHED,function(){oScope.FinishedComplete();}); } if(oEasyDiv){ oEasyDiv.Init(); } if(oErrorDiv){ oErrorDiv.Init(); oErrorDiv.AddListener(oErrorDiv.DL,function(){oScope.ManualDownload();}); } if(oDownloadDiv){ oDownloadDiv.AddListener(oDownloadDiv.INSTALL_PROGRESS,function(){oScope.InstallProgress();}); } if(oEULADiv){ oEULADiv.Init(); oEULADiv.AddListener(oEULADiv.ACCEPT,function(){oScope.AcceptEULA();}); oEULADiv.AddListener(oEULADiv.CANCEL,function(){oScope.Cancel();}); oEULADiv.AddListener(oEULADiv.NEXT,function(){oScope.EulaNext();}); } if(oEULA2Div){ oEULA2Div.Init(); oEULA2Div.AddListener(oEULA2Div.ACCEPT,function(){oScope.AcceptEULA2();}); oEULA2Div.AddListener(oEULA2Div.CANCEL,function(){oScope.CancelEULA2();}); } if(oRunRunDiv){ oRunRunDiv.Init(); } if(oSettingDiv){ oSettingDiv.Init(); oSettingDiv.AddListener(oSettingDiv.CANCEL,function(){oScope.SetSettings("false");}); oSettingDiv.AddListener(oSettingDiv.CANCELBI,function(){oScope.SetBISettings("false");}); oSettingDiv.AddListener(oSettingDiv.SET,function(){oScope.SetSettings("true");}); } if(oRebuttalDiv){ oRebuttalDiv.Init(); oRebuttalDiv.AddListener(oRebuttalDiv.CANCEL,function(){oScope.RebuttalCancel();}); oRebuttalDiv.AddListener(oRebuttalDiv.CLOSE,function(){oScope.RebuttalClose();}); if(oEULA2Div) oRebuttalDiv.AddListener(oRebuttalDiv.ACCEPT,function(){oScope.EulaNext();}); else oRebuttalDiv.AddListener(oRebuttalDiv.ACCEPT,function(){oScope.AcceptEULA();}); if(oEULADiv) { oEULADiv.RemoveListener(oEULADiv.CANCEL); oEULADiv.AddListener(oEULADiv.CANCEL,function(){oScope.RebuttalShow();}); } } if(oProtectorDiv){ oProtectorDiv.Init(); oProtectorDiv.AddListener(oProtectorDiv.CLOSE,function(){}); oProtectorDiv.AddListener(oProtectorDiv.FINISH,function(){}); } if(oDryTestDiv){ oDryTestDiv.Init(); oDryTestDiv.AddListener(oDryTestDiv.FINISH,function(){oScope.Cancel();}); } if(oOfferDiv){ oOfferDiv.AddListener(oOfferDiv.COMPLETE,function(target){oScope.AcceptOffer();}); } oEasy.AddListener(oEasy.INSTALL_COMPLETE,function(){oScope.EasyComplete();}); oInstaller.AddListener(oInstaller.DOWNLOAD_COMPLETE,function(target){oScope.DownloadComplete();}); oInstaller.AddListener(oInstaller.DOWNLOAD_EXTERNAL_COMPLETE,function(target){oScope.offerDownloadComplete();}); oInstaller.AddListener(oInstaller.DOWNLOAD_EXTERNAL_ERROR,function(target){oScope.offerError(target);}); oInstaller.AddListener(oInstaller.DOWNLOAD_PLUGIN_ERROR,function(target){oScope.pluginError(target);}); oInstaller.AddListener(oInstaller.DOWNLOAD_PLUGIN_READY,function(target){oScope.pluginReady(target);}); oInstaller.AddListener(oInstaller.DOWNLOAD_PLUGIN_COMPLETE,function(target){oScope.pluginComplete(target);}); }; this.ShowEasyDialog=function(){ oEasy.Download(); if((browserVer == "IE9" || browserVer == "IE10" || browserVer == "IE11") && bEasyComplete){ } else if(oRunRunDiv && !bEasyComplete){ oRunRunDiv.Show(); } }; this.Error=function(){ unifiedLogging.logEvent('Error', { errorCode: oInstaller.errorCode, errorType: "installerError" }, { section:"install" } ); if(oDownloadDiv){ oDownloadDiv.HidePage(); } if(oOfferInitDiv) { oOfferInitDiv.HidePage(); } oErrorDiv.ShowPage(); }; this.RebuttalShow=function(){ unifiedLogging.logEvent('InstallerAccepted', { optIn: false }, { section:"install" } ); unifiedLogging.logEvent('InstallerHostAccepted', { optIn: false }, { section:"install" } ); if(oEULADiv){ oEULADiv.ShowPage(); } if(oRebuttalDiv){ oRebuttalDiv.ShowPage(); } }; this.RebuttalClose=function(){ if(oEasyDiv){ oEasyDiv.HidePage(); } if(oEULADiv){ oEULADiv.HidePage(); } if(oRunRunDiv){ oRunRunDiv.HidePage(); } if(oSettingDiv){ oSettingDiv.HidePage(); } if(oRebuttalDiv){ oRebuttalDiv.HidePage(); } if(oDryTestDiv){ oDryTestDiv.HidePage(); } oScope.Reset(); }; this.RebuttalCancel=function(){ if(oEasyDiv){ oEasyDiv.HidePage(); } if(oEULADiv){ oEULADiv.ShowPage(); } if(oRunRunDiv){ oRunRunDiv.HidePage(); } if(oSettingDiv){ oSettingDiv.HidePage(); } if(oRebuttalDiv){ oRebuttalDiv.HidePage(); } if(oDryTestDiv){ oDryTestDiv.HidePage(); } oScope.Reset(); }; this.Cancel=function(){ /* set param values T/F */ unifiedLogging.logEvent('InstallerAccepted', { optIn: false }, { section:"install" } ); unifiedLogging.logEvent('InstallerHostAccepted', { optIn: false }, { section:"install" } ); if(oEasyDiv){ oEasyDiv.HidePage(); } if(oEULADiv){ oEULADiv.HidePage(); } if(oRunRunDiv){ oRunRunDiv.HidePage(); } if(oSettingDiv){ oSettingDiv.HidePage(); } if(oRebuttalDiv){ oRebuttalDiv.HidePage(); } if(oDryTestDiv){ oDryTestDiv.HidePage(); } if (!oRebuttalDiv) { oScope.Reset(); } }; this.EasyComplete=function(){ bEasyComplete=true; if(oRunRunDiv && (browserVer == "IE9" || browserVer == "IE10" || browserVer == "IE11" || browserName === "FF" && bucket === "S04411")){ oRunRunDiv.HidePage(); } if(oEasyDiv){ oEasyDiv.ShowPage(); if(!oDryTestDiv) { oInstaller.Install(); } } else { if(!oDryTestDiv && addPauseParam){ oInstaller.Install(); } if(oEULADiv){ oEULADiv.ShowPage(); }else if(oSettingDiv){ oSettingDiv.ShowPage(); } } unifiedLogging.logEvent('InstallerInvoked', {} , { section:"install" } ); if(oEasy.skipEula){ this.AcceptEULA(); } }; this.EulaNext=function(){ if (browserName == "IE" && !isFirefoxInstalled()) { var inp_sa_ff = document.getElementById( 'inp_sa_ff' ); inp_sa_ff.parentNode.removeChild( inp_sa_ff ); var inp_hp_ff = document.getElementById( 'inp_hp_ff' ); inp_hp_ff.parentNode.removeChild( inp_hp_ff ); var inp_bi_ff = document.getElementById( 'inp_bi_ff' ); inp_bi_ff.parentNode.removeChild( inp_bi_ff ); var params = { optIn: true, searchAssistantOptionIE: ($_m.g("inp_sa_ie")?true:false), searchAssistantOptInIE: ($_m.g("inp_sa_ie") && $_m.g("inp_sa_ie").checked?true:false), homePageOptionIE: ($_m.g("inp_hp_ie")?true:false), homePageOptInIE: ($_m.g("inp_hp_ie") && $_m.g("inp_hp_ie").checked?true:false) }; unifiedLogging.logEvent('InstallerHostAccepted', params , { section:"install" } ); this.AcceptEULA(); } else { if(oEULADiv){ oEULADiv.HidePage(); } if(!oDryTestDiv && addPauseParam) { window.onbeforeunload = function (e) { oInstaller.uncheckBI(); oInstaller.SetSAHP(); oInstaller.SetInstallerParams(); if($_m.g(oInstaller.INSTALLER_ID)){ $_m.g(oInstaller.INSTALLER_ID).pause = "0"; } }; } if(browserName && browserName == "FF") { var params = { optIn: true, searchAssistantOptionFF: ($_m.g("inp_sa_ff")?true:false), searchAssistantOptInFF: ($_m.g("inp_sa_ff") && $_m.g("inp_sa_ff").checked?true:false), homePageOptionFF: ($_m.g("inp_hp_ff")?true:false), homePageOptInFF: ($_m.g("inp_hp_ff") && $_m.g("inp_hp_ff").checked?true:false) }; } else { var params = { optIn: true, searchAssistantOptionIE: ($_m.g("inp_sa_ie")?true:false), searchAssistantOptInIE: ($_m.g("inp_sa_ie") && $_m.g("inp_sa_ie").checked?true:false), homePageOptionIE: ($_m.g("inp_hp_ie")?true:false), homePageOptInIE: ($_m.g("inp_hp_ie") && $_m.g("inp_hp_ie").checked?true:false) }; } unifiedLogging.logEvent('InstallerHostAccepted', params , { section:"install" } ); if(oEULA2Div) { oEULA2Div.Show(); }else if(oSettingDiv){ oSettingDiv.ShowPage(); } } }; this.AcceptEULA=function(){ if(oEULADiv){ oEULADiv.HidePage(); } if(oDryTestDiv) { oDryTestDiv.Show(); } else if(addPauseParam){ /* Modify SA and HP checkboxes in installerparams based on selections */ oInstaller.SetSAHP(); oInstaller.SetInstallerParams(); $_m.g(oInstaller.INSTALLER_ID).pause = "0"; } else { oInstaller.Install(); } }; this.AcceptEULA2=function(){ if(browserName && browserName == "FF") { var params = { optIn: true, searchAssistantOptionIE: ($_m.g("inp_sa_ie")?true:false), searchAssistantOptInIE: ($_m.g("inp_sa_ie") && $_m.g("inp_sa_ie").checked?true:false), homePageOptionIE: ($_m.g("inp_hp_ie")?true:false), homePageOptInIE: ($_m.g("inp_hp_ie") && $_m.g("inp_hp_ie").checked?true:false) }; } else { var params = { optIn: true, searchAssistantOptionFF: ($_m.g("inp_sa_ff")?true:false), searchAssistantOptInFF: ($_m.g("inp_sa_ff") && $_m.g("inp_sa_ff").checked?true:false), homePageOptionFF: ($_m.g("inp_hp_ff")?true:false), homePageOptInFF: ($_m.g("inp_hp_ff") && $_m.g("inp_hp_ff").checked?true:false) }; } unifiedLogging.logEvent('InstallerSecondaryAccepted', params , { section:"install" } ); if(oDryTestDiv) oDryTestDiv.Show(); else oScope.SetSettings("true"); }; this.CancelEULA2=function(){ oInstaller.externalPluginComplete = true; if(DLP_offers.isPlugin()) { OnLaunchShutDownStart(); } DLP_offers.disableAll(); unifiedLogging.logEvent('InstallerSecondaryAccepted', { optIn: false }, { section:"install" } ); if(oDryTestDiv) oDryTestDiv.Show(); else oScope.SetBISettings("false"); }; this.SetBISettings=function(_set){ if(oEULADiv){ oEULADiv.HidePage(); } if(oEULA2Div){ oEULA2Div.HidePage(); } if(_set == "false") { oInstaller.uncheckBI(); } oInstaller.SetSAHP(); oInstaller.SetInstallerParams(); $_m.g(oInstaller.INSTALLER_ID).pause = "0"; }; this.SetSettings=function(_set){ if(oEULADiv){ oEULADiv.HidePage(); } if(oEULA2Div){ oEULA2Div.HidePage(); } if(_set == "false") { oInstaller.uncheckSAHP(); } oInstaller.SetSAHP(); oInstaller.SetInstallerParams(); $_m.g(oInstaller.INSTALLER_ID).pause = "0"; }; this.StartProgress=function(){ if(oRunRunDiv){ oRunRunDiv.HidePage(); } if(oEasyDiv){ oEasyDiv.HidePage(); } /* show offers */ DLP_offers.check_req(); if(DLP_offers.show() && oOfferDiv) { oOfferDiv.Init(); oOfferDiv.AddListener(oOfferDiv.COMPLETE,function(){oScope.offerComplete();}); oOfferDiv.AddListener(oOfferDiv.CANCEL,function(){oScope.offerComplete();}); if(DLP_offers.offers[DLP_offers.cur_offer].skipModal){ if(DLP_offers.offers[DLP_offers.cur_offer].showInit && oOfferInitDiv) { oOfferInitDiv.Show(); } oOfferDiv.AcceptOffer("yes"); } else { oOfferDiv.Show(); } } else { if(oDownloadDiv){ oDownloadDiv.ShowPage(); } } }; this.InstallProgress=function(){ /* set param values T/F */ var params = { optIn: true, searchAssistantOptionIE: ($_m.g("inp_sa_ie")?true:false), searchAssistantOptInIE: ($_m.g("inp_sa_ie") && $_m.g("inp_sa_ie").checked?true:false), homePageOptionIE: ($_m.g("inp_hp_ie")?true:false), homePageOptInIE: ($_m.g("inp_hp_ie") && $_m.g("inp_hp_ie").checked?true:false), searchAssistantOptionFF: ($_m.g("inp_sa_ff")?true:false), searchAssistantOptInFF: ($_m.g("inp_sa_ff") && $_m.g("inp_sa_ff").checked?true:false), homePageOptionFF: ($_m.g("inp_hp_ff")?true:false), homePageOptInFF: ($_m.g("inp_hp_ff") && $_m.g("inp_hp_ff").checked?true:false), browserInstallOptionIE: ($_m.g("inp_bi_ie")?true:false), browserInstallOptInIE: ($_m.g("inp_bi_ie") && $_m.g("inp_bi_ie").checked?true:false), browserInstallOptionFF: ($_m.g("inp_bi_ff")?true:false), browserInstallOptInFF: ($_m.g("inp_bi_ff") && $_m.g("inp_bi_ff").checked?true:false) }; unifiedLogging.logEvent('InstallerAccepted', params , { section:"install" } ); }; this.DownloadComplete=function(){ this.bInstallComplete = true; if(oDownloadDiv){ oDownloadDiv.HidePage(); } if(!DLP_offers.show()) { if(DLP_offers.install()){ if(DLP_offers.offers[DLP_offers.cur_offer].plugin) { /* if we're still polling for plugin to complete, do nothing else call install start */ if(oInstaller.externalPluginInstall) { if(oOfferProgressDiv) { oOfferProgressDiv.Show(); } OnLaunchStartInstallStart(); } if(oInstaller.externalPluginComplete) { oScope.RunRunComplete(); } } else { if(oEasyDiv){ oEasyDiv.ShowPage(); } oScope.OfferInstall(); } } else if(oProtectorDiv && browserName === "FF"){ oProtectorDiv.ShowBackDrop(); if (DLP_Protector.tbProtectorInit) { oScope.RunRunComplete(); } } else { oScope.RunRunComplete(); } } else { if(oOfferDiv){ oOfferDiv.ShowBackDrop(); } else if(oEULADiv) { oEULADiv.ShowBackDrop(); } else if(oEasyDiv) { oEasyDiv.ShowBackDrop(); } } }; this.FinishedComplete=function(){ }; this.offerPluginComplete=function(){ DLP_offers.installComplete('yes'); if(oOfferInitDiv) { oOfferInitDiv.HidePage(); } if(oOfferDiv) { oOfferDiv.HidePage(); } if(oInstaller.externalPluginInstall) { if(oOfferProgressDiv) { oOfferProgressDiv.Show(); } OnLaunchStartInstallStart(); } if( DLP_offers.install() ) { oScope.OfferInstall(); } else if( !this.bInstallComplete) { if(oDownloadDiv){ oDownloadDiv.ShowPage(); } } else { oInstaller.Dispatch(oInstaller.SECONDARY_DOWNLOAD_COMPLETE); oScope.RunRunComplete(); } }; this.offerDownloadComplete=function(){ DLP_offers.installComplete('yes'); if(oOfferProgressDiv) { oOfferProgressDiv.Hide(); } if(DLP_offers.cur_offer > -1){ var result_code = oInstaller.externalResultCode; /* parallel result code */ var installer_type = "parallel_installer"; if(oSecondaryInstaller) { result_code = oSecondaryInstaller.resultCode; /* secondary installer result code */ installer_type = "secondary_installer"; } if(DLP_offers.offers[DLP_offers.cur_offer].plugin) { oInstaller.externalPluginComplete = true; result_code = oInstaller.externalPluginCode; installer_type = "plugin_installer"; } unifiedLogging.logEvent('3rdPartyOfferDownloadComplete', { bundleName: DLP_offers.offers[DLP_offers.cur_offer].name, installerType: installer_type, resultCode: result_code}, {section:"install"} ); if( DLP_offers.install() ) { oScope.OfferInstall(); } else if( !this.bInstallComplete) { if(oDownloadDiv){ oDownloadDiv.ShowPage(); } } else if(!oInstaller.externalPluginInstall) { oInstaller.Dispatch(oInstaller.SECONDARY_DOWNLOAD_COMPLETE); oScope.RunRunComplete(); } } }; this.offerComplete=function(){ /* killing content so inp_offer checkbox can be recycled */ document.getElementById(DLP_offers.offers[DLP_offers.cur_offer].id).innerHTML = ""; oOfferDiv.RemoveListener(oOfferDiv.COMPLETE); oOfferDiv.RemoveListener(oOfferDiv.CANCEL); oOfferDiv.Reset(); /* if there's more offers or current offer is a plugin and not installed yet */ if( DLP_offers.show() || (DLP_offers.offers[DLP_offers.cur_offer].plugin && DLP_offers.install())) { if(DLP_offers.offers[DLP_offers.cur_offer].showInit && oOfferInitDiv) { oOfferInitDiv.Show(); } else if(oOfferDiv) { oOfferDiv.Show(); oOfferDiv.AddListener(oOfferDiv.COMPLETE,function(){oScope.offerComplete();}); oOfferDiv.AddListener(oOfferDiv.CANCEL,function(){oScope.offerComplete();}); } } else if( this.bInstallComplete) { if(oOfferInitDiv) { oOfferInitDiv.HidePage(); } if(oOfferDiv) { oOfferDiv.HidePage(); } if( DLP_offers.install() ) { if(oEasyDiv){ oEasyDiv.ShowPage(); } oScope.OfferInstall(); } else { oScope.RunRunComplete(); } } else { if(oOfferDiv){ oOfferDiv.HidePage(); } if(oOfferInitDiv){ oOfferInitDiv.HidePage(); } if(oDownloadDiv){ oDownloadDiv.ShowPage(); } } }; this.offerError=function(_evt){ var errorCode = (_evt.errorCode?_evt.errorCode:_evt.errorExternalCode); if(oOfferProgressDiv) { oOfferProgressDiv.Hide(); } /* if(DLP_offers.isPlugin()) { OnLaunchShutDownStart(); } */ if (DLP_offers.install()) { DLP_offers.installComplete('error'); if(DLP_offers.offers[DLP_offers.cur_offer].plugin) { oInstaller.externalPluginComplete = true; oScope.offerPluginComplete(); } else { oScope.offerComplete(); } } else { DLP_offers.disableParallel(); } unifiedLogging.logEvent('Error', { errorCode: errorCode, errorType: "offerError" }, { section:"install" } ); }; this.pluginError=function(_evt){ var errorCode = _evt.errorPluginCode; if(DLP_offers.install()) { DLP_offers.installComplete('error'); if(DLP_offers.offers[DLP_offers.cur_offer].plugin) { oInstaller.externalPluginComplete = true; oScope.offerPluginComplete(); } else { oScope.offerComplete(); } } else { DLP_offers.disableParallel(); } unifiedLogging.logEvent('Error', { errorCode: errorCode, errorType: "pluginError" }, { section:"install" } ); }; this.pluginReady=function(){ if(oOfferInitDiv) { oOfferInitDiv.Hide(); } if(oOfferDiv) { oOfferDiv.Show(); } DLP_offers.installComplete('initialized'); OnLaunchIsCompleteStart(); }; this.pluginComplete=function(){ oInstaller.externalPluginInstall = true; oInstaller.externalPluginComplete = true; oScope.offerPluginComplete(); }; this.AcceptOffer=function(){ if(DLP_offers.install() && DLP_offers.offers[DLP_offers.cur_offer].parallel) { this.OfferInstall(); } }; this.OfferInstall=function(){ if(DLP_offers.offers[DLP_offers.cur_offer].plugin) { if(oOfferInitDiv) { oOfferInitDiv.Show(); } OnLaunchShowUIStart(); } else { if(oOfferProgressDiv) { oOfferProgressDiv.Show(); } if(DLP_offers.offers[DLP_offers.cur_offer].parallel) { $_m.g(oInstaller.INSTALLER_ID).runexternalinstaller = "1"; } else { oSecondaryInstaller = $_m. createSecondaryInstaller( DLP_offers.offers[DLP_offers.cur_offer].id, DLP_offers.offers[DLP_offers.cur_offer].installer_id, DLP_offers.offers[DLP_offers.cur_offer].classid, DLP_offers.offers[DLP_offers.cur_offer].progId, DLP_offers.offers[DLP_offers.cur_offer].mimeType, DLP_offers.offers[DLP_offers.cur_offer].exe, DLP_offers.offers[DLP_offers.cur_offer].extra ); oSecondaryInstaller.AddListener(oSecondaryInstaller.DOWNLOAD_COMPLETE,function(target){oScope.offerDownloadComplete();}); oSecondaryInstaller.AddListener(oSecondaryInstaller.DOWNLOAD_ERROR,function(target){oScope.offerError(target);}); oSecondaryInstaller.Install(); } } }; this.RunRunComplete=function(){ if(oEULADiv){ oEULADiv.HidePage(); } if(oEasyDiv){ oEasyDiv.HidePage(); } if(oOfferDiv){ oOfferDiv.offerDownloadComplete(); } if(oFinished){ oFinished.ShowPage(); } if(oProtectorDiv){ try { /* Populate Protector Div */ if(!oSettingCtr.Error()){ if (DLP_Protector.tbTotalDisplayed>0) { if(oFinished) oFinished.HidePage(); oProtectorDiv.ShowPage(); } else { if(oFinished) oFinished.ShowPage(); } } } catch(e){ oProtectorDiv.HidePage(); if(oFinished) oFinished.ShowPage(); } } }; /** * @param _action (String) path * if the action starts w/ a "/" it's assumed to be more absolute * and "splash" will not be prepended */ this.Track=function(_action){ }; this.ManualDownload=function(_action){ if(sManualToolbarUrl != '') { unifiedLogging.logEvent('ManualInstallInvoked', {installerSource:'splash'}); window.location=sManualToolbarUrl; } else { window.location=window.location; } }; this.Reset=function(){ /* if(DLP_offers.isPlugin()) { OnLaunchShutDownStart(); } */ if($_m.g(INSTALLER_ID+"Div")){ $_m.g(INSTALLER_ID+"Div").innerHTML = ""; /* var installerObj = $_m.g(INSTALLER_ID); */ /* if(installerObj) installerObj.parentNode.removeChild(installerObj); */ } }; this.Init(); } function ErrorDisplay(_div,_bgDiv){ this.pageName = _div; this.pageBgName = _bgDiv; this.DL="DLP_ErrorDLClick"; var DL_BTN_ID="DLP_btnDownload"; var bInit=false; var oScope=this; this.Init=function(){ if(!bInit){ bInit=true; $_m. bind(DL_BTN_ID,'click', function(){ oScope.HidePage(); oScope.Dispatch(oScope.DL); }); } }; } function EasyDisplay(_div){ this.pageName = _div; var bInit=false; var oScope=this; this.Init=function(){ if(!bInit){ bInit=true; } }; } function DownloadDisplay(_div,_bgDiv){ this.pageName=_div; this.pageBgName = _bgDiv; this.INSTALL_PROGRESS="DLP_installProgress"; var bInstallProgress=false; var oScope=this; this.InstallProgress=function(){ if(!bInstallProgress){ bInstallProgress=true; oScope.Dispatch(oScope.INSTALL_PROGRESS); } }; } function FinishedDisplay(_div,_bgDiv){ this.pageName = _div; this.pageBgName = _bgDiv; this.FINISHED="DLP_FinishedClick"; var TRY_BTN_ID="DLP_btnFinished"; var bInit=false; var oScope=this; this.Init=function(){ if(!bInit){ bInit=true; $_m. bind(TRY_BTN_ID,'click', function(){ unifiedLogging.logEvent('InstallerFinishedButton', {}, {section:"install"} ); oScope.HidePage(); oScope.Dispatch(oScope.FINISHED); }); } }; } function EULADisplay(_div,_bgDiv){ this.pageName = _div; this.pageBgName = _bgDiv; this.ACCEPT="DLP_EULAAcceptClick"; this.CANCEL="DLP_EULACancelClick"; this.NEXT="DLP_EULANextClick"; var ACCEPT_BTN_ID="DLP_btnEULAAccept"; var CANCEL_BTN_ID="DLP_btnEULAClose"; var TOGGLE_BTN_ID="DLP_ckBoxAgree"; var NEXT_BTN_ID="DLP_btnEULANext"; var bInit=false; var oScope=this; this.Init=function(){ if(!bInit){ bInit=true; if(document.getElementById(ACCEPT_BTN_ID)){ $_m. bind(ACCEPT_BTN_ID,'click', function(){ oScope.HidePage(); oScope.Dispatch(oScope.ACCEPT); }); } if(document.getElementById(CANCEL_BTN_ID)){ $_m. bind(CANCEL_BTN_ID,'click', function(){ oScope.HidePage(); oScope.Dispatch(oScope.CANCEL); }); } if(document.getElementById(TOGGLE_BTN_ID)){ $_m. bind(TOGGLE_BTN_ID,'click', function(){ document.getElementById(ACCEPT_BTN_ID).disabled = !document.getElementById(TOGGLE_BTN_ID).checked; }); } if(document.getElementById(NEXT_BTN_ID)){ $_m. bind(NEXT_BTN_ID,'click', function(){ oScope.HidePage(); oScope.Dispatch(oScope.NEXT); }); } } }; } function EULA2Display(_div,_bgDiv){ this.pageName = _div; this.pageBgName = _bgDiv; this.ACCEPT="DLP_EULA2AcceptClick"; this.CANCEL="DLP_EULA2CancelClick"; var ACCEPT_BTN_ID="DLP_btnEULAAccept"; var CANCEL_BTN_ID="DLP_btnEULAClose2"; var bInit=false; var oScope=this; this.Init=function(){ if(!bInit){ bInit=true; if(document.getElementById(ACCEPT_BTN_ID)){ $_m. bind(ACCEPT_BTN_ID,'click', function(){ oScope.HidePage(); oScope.Dispatch(oScope.ACCEPT); }); } if(document.getElementById(CANCEL_BTN_ID)){ $_m. bind(CANCEL_BTN_ID,'click', function(){ oScope.HidePage(); oScope.Dispatch(oScope.CANCEL); }); } } }; this.Show=function(){ if(DLP_offers.isEnabled()){ var secondaryTextVal = document.getElementById("DLP_btnEULAClose2_secondaryText").value; if(document.getElementById("DLP_btnEULAClose2_input")) document.getElementById("DLP_btnEULAClose2_input").value = secondaryTextVal; else if(document.getElementById("DLP_btnEULAClose2_div")) document.getElementById("DLP_btnEULAClose2_div").innerHTML = secondaryTextVal; else document.getElementById("DLP_btnEULAClose2").innerHTML = secondaryTextVal; } this.ShowPage(); }; } function OfferDisplay(_div,_bgDiv){ this.pageName = _div; this.pageBgName = _bgDiv; this.COMPLETE="DLP_OfferCompleteClick"; this.CANCEL="DLP_OfferCancelClick"; this.TOGGLE="DLP_OfferToggleClick"; this.INSTALL_COMPLETE="DLP_OfferInstallComplete"; var COMPLETE_BTN_ID="DLP_btnComplete"; var SKIP_BTN_ID="DLP_btnSkip"; var CANCEL_BTN_ID="DLP_btnOfferCancel"; var INPUT_BTN_ID="inp_offer"; var bInit=false; var oScope=this; this.Init=function(){ if(!bInit){ bInit=true; if(document.getElementById(COMPLETE_BTN_ID)){ $_m. bind(COMPLETE_BTN_ID,'click', function(){ var _optIn = "no"; if(document.getElementById(INPUT_BTN_ID)) { if(document.getElementById(INPUT_BTN_ID).checked){ _optIn = "yes"; } } else { _optIn = "yes"; } unifiedLogging.logEvent('3rdPartyOfferAccept', { bundleName: DLP_offers.offers[DLP_offers.cur_offer].name, optIn: (_optIn == "yes")}, {section:"install"} ); oScope.AcceptOffer(_optIn); }); } if(document.getElementById(SKIP_BTN_ID)){ $_m. bind(SKIP_BTN_ID,'click', function(){ document.getElementById(DLP_offers.optIn("no")).style.display = "none"; unifiedLogging.logEvent('3rdPartyOfferAccept', { bundleName: DLP_offers.offers[DLP_offers.cur_offer].name, optIn: false}, {section:"install"} ); oScope.Dispatch(oScope.CANCEL); }); } if(document.getElementById(CANCEL_BTN_ID)){ $_m. bind(CANCEL_BTN_ID,'click', function(){ document.getElementById(DLP_offers.optIn("no")).style.display = "none"; unifiedLogging.logEvent('3rdPartyOfferAccept', { bundleName: DLP_offers.offers[DLP_offers.cur_offer].name, optIn: false}, {section:"install"} ); oScope.Dispatch(oScope.CANCEL); }); } if(document.getElementById(INPUT_BTN_ID)){ $_m. bind(INPUT_BTN_ID,'click', function(){ if(document.getElementById(INPUT_BTN_ID).checked) document.getElementById(COMPLETE_BTN_ID).value = "Accept"; else document.getElementById(COMPLETE_BTN_ID).value = "Next"; oScope.Dispatch(oScope.TOGGLE); }); } } }; this.Show=function(){ if(!DLP_offers.offers[DLP_offers.cur_offer].skipModal){ var html = ''; if(DLP_offers.offers[DLP_offers.cur_offer].logo){ html += " "; } if(DLP_offers.offers[DLP_offers.cur_offer].name){ html += DLP_offers.offers[DLP_offers.cur_offer].name; } document.getElementById("DLP_dvOffer").className += " "+DLP_offers.offers[DLP_offers.cur_offer].id; document.getElementById("DLP_offerTitle").innerHTML = html; document.getElementById(DLP_offers.offers[DLP_offers.cur_offer].id).style.display = "block"; } unifiedLogging.logEvent('3rdPartyOfferShow', { bundleName: DLP_offers.offers[DLP_offers.cur_offer].name}, {section:"install"} ); this.ShowPage(); }; this.AcceptOffer=function(_optIn){ document.getElementById(DLP_offers.optIn(_optIn)).style.display = "none"; oScope.Dispatch(oScope.COMPLETE); }; this.offerDownloadComplete=function(){ oScope.Dispatch(oScope.INSTALL_COMPLETE); }; this.Reset=function(){ bInit=false; this.Init(); }; } function OfferInitDisplay(_div,_bgDiv){ this.pageName = _div; this.pageBgName = _bgDiv; var bInit=false; var oScope=this; this.Init=function(){ if(!bInit){ bInit=true; } }; this.Show=function(){ if(DLP_offers.offers[DLP_offers.cur_offer].showInit){ var html = '', offerInitID = "DLP_"+DLP_offers.offers[DLP_offers.cur_offer].id+"Init"; if(DLP_offers.offers[DLP_offers.cur_offer].logo){ html += " "; } if(DLP_offers.offers[DLP_offers.cur_offer].name){ html += DLP_offers.offers[DLP_offers.cur_offer].name; document.getElementById("DLP_offerInitName").innerHTML = DLP_offers.offers[DLP_offers.cur_offer].name; } if(document.getElementById(offerInitID)) { document.getElementById(offerInitID).style.display = "block"; } this.ShowPage(); } }; this.Hide=function(){ this.HidePage(); }; } function OfferProgressDisplay(_div,_bgDiv){ this.pageName = _div; this.pageBgName = _bgDiv; var bInit=false; var oScope=this; this.Init=function(){ if(!bInit){ bInit=true; } }; this.Show=function(){ if(DLP_offers.offers[DLP_offers.cur_offer].showProgress){ var html = '', offerProgressID = "DLP_"+DLP_offers.offers[DLP_offers.cur_offer].id+"Progress"; if(DLP_offers.offers[DLP_offers.cur_offer].logo){ html += " "; } if(DLP_offers.offers[DLP_offers.cur_offer].name){ html += DLP_offers.offers[DLP_offers.cur_offer].name; document.getElementById("DLP_offerStatusName").innerHTML = DLP_offers.offers[DLP_offers.cur_offer].name; } if(document.getElementById((offerProgressID))) { document.getElementById(offerProgressID).style.display = "block"; } this.ShowPage(); } }; this.Hide=function(){ this.HidePage(); }; } function RunRunDisplay(_div,_hide){ this.pageName = _div; this.autoHide = (_hide?_hide:"true"); var bInit=false; var oScope=this; var CLOSE_BTN_ID="DLP_btnRunRunClose"; this.Init=function(){ if(!bInit){ bInit=true; if(document.getElementById(CLOSE_BTN_ID)){ $_m. bind(CLOSE_BTN_ID,'click', function(){ oScope.Hide(); }); } } }; this.Show=function(){ this.ShowPage(); if(this.autoHide == "true") setTimeout(this.Hide,30000); }; this.Hide=function(){ oScope.HidePage(); }; } function SettingDisplay(_div){ this.pageName = _div; this.SET="DLP_SettingSetClick"; this.CANCEL="DLP_SettingCancelClick"; this.CANCELBI="DLP_SettingCancelBIClick"; var bInit=false; var oScope=this; var SET_BTN_ID="DLP_btnSettingSet"; var CANCEL_BTN_ID="DLP_btnSettingClose"; var CANCELBI_BTN_ID="DLP_btnSettingCancelBI"; this.Init=function(){ if(!bInit){ bInit=true; if(document.getElementById(SET_BTN_ID)){ $_m. bind(SET_BTN_ID,'click', function(){ oScope.HidePage(); oScope.Dispatch(oScope.SET); }); } if(document.getElementById(CANCEL_BTN_ID)){ $_m. bind(CANCEL_BTN_ID,'click', function(){ oScope.HidePage(); oScope.Dispatch(oScope.CANCEL); }); } if(document.getElementById(CANCELBI_BTN_ID)){ $_m. bind(CANCELBI_BTN_ID,'click', function(){ oScope.HidePage(); oScope.Dispatch(oScope.CANCELBI); }); } } }; } function RebuttalDisplay(_div,_bgDiv){ this.pageName = _div; this.pageBgName = _bgDiv; this.CANCEL = "DLP_RebuttalCancelClick"; this.CLOSE = "DLP_RebuttalCloseClick"; this.ACCEPT = "DLP_RebuttalAcceptClick"; var bInit=false; var oScope=this; var CANCEL_BTN_ID="DLP_btnRebuttalCancel"; var CLOSE_BTN_ID="DLP_btnRebuttalClose"; var ACCEPT_BTN_ID="DLP_btnRebuttalAccept"; this.Init=function(){ if(!bInit){ bInit=true; if(document.getElementById(CANCEL_BTN_ID)){ $_m. bind(CANCEL_BTN_ID,'click', function(){ oScope.HidePage(); unifiedLogging.logEvent('InstallerRebuttal', { action: "cancel"}, {section:"install"} ); oScope.Dispatch(oScope.CANCEL); }); } if(document.getElementById(CLOSE_BTN_ID)){ $_m. bind(CLOSE_BTN_ID,'click', function(){ oScope.HidePage(); unifiedLogging.logEvent('InstallerRebuttal', { action: "quit"}, {section:"install"} ); oScope.Dispatch(oScope.CLOSE); }); } if(document.getElementById(ACCEPT_BTN_ID)){ $_m. bind(ACCEPT_BTN_ID,'click', function(){ oScope.HidePage(); unifiedLogging.logEvent('InstallerRebuttal', { action: "continue"}, {section:"install"} ); oScope.Dispatch(oScope.ACCEPT); }); } } }; } function ProtectorDisplay(_div,_bgDiv){ this.pageName = _div; this.pageBgName = _bgDiv; this.NO_THANKS = "DLP_ProtectorNoThanksClick"; this.CLOSE = "DLP_ProtectorCloseClick"; this.FINISH = "DLP_ProtectorFinishClick"; var bInit=false; var oScope=this; var NO_THANKS_BTN_ID="DLP_btnProtectorNoThanks"; var CLOSE_BTN_ID="DLP_btnProtectorClose"; var FINISH_BTN_ID="DLP_btnProtectorFinish"; this.Init=function(){ if(!bInit){ bInit=true; if(document.getElementById(NO_THANKS_BTN_ID)){ $_m. bind(NO_THANKS_BTN_ID,'click', function(){ oScope.HidePage(); oScope.Dispatch(oScope.NO_THANKS); }); } if(document.getElementById(CLOSE_BTN_ID)){ $_m. bind(CLOSE_BTN_ID,'click', function(){ oScope.HidePage(); oScope.Dispatch(oScope.CLOSE); }); } if(document.getElementById(FINISH_BTN_ID)){ $_m. bind(FINISH_BTN_ID,'click', function(){ oScope.HidePage(); oScope.Dispatch(oScope.FINISH); }); } } }; } function DryTestDisplay(_div,_bgDiv){ this.pageName = _div; this.pageBgName = _bgDiv; this.FINISH = "DLP_DryTestFinishClick"; this.SHOW = "DLP_DryTestShow"; var bInit=false; var oScope=this; var FINISH_BTN_ID="DLP_btnDryTestFinish"; this.Init=function(){ if(!bInit){ bInit=true; if(document.getElementById(FINISH_BTN_ID)){ $_m. bind(FINISH_BTN_ID,'click', function(){ oScope.HidePage(); oScope.Dispatch(oScope.FINISH); }); } } }; this.Show=function(){ this.ShowPage(); oScope.Dispatch(oScope.SHOW); }; } /* allow all modals to dispatch events */ $_m.classes.AbstractModal.prototype = new $_m.classes.EventDispatcher(); /** * @extends mindspark.modal.AbstractModal */ FinishedDisplay.prototype = new $_m.classes.AbstractModal(); DownloadDisplay.prototype = new $_m.classes.AbstractModal(); ErrorDisplay.prototype = new $_m.classes.AbstractModal(); EasyDisplay.prototype = new $_m.classes.AbstractModal(); OfferDisplay.prototype = new $_m.classes.AbstractModal(); EULADisplay.prototype = new $_m.classes.AbstractModal(); EULA2Display.prototype = new $_m.classes.AbstractModal(); RunRunDisplay.prototype = new $_m.classes.AbstractModal(); SettingDisplay.prototype = new $_m.classes.AbstractModal(); RebuttalDisplay.prototype = new $_m.classes.AbstractModal(); ProtectorDisplay.prototype = new $_m.classes.AbstractModal(); OfferInitDisplay.prototype = new $_m.classes.AbstractModal(); OfferProgressDisplay.prototype = new $_m.classes.AbstractModal(); DryTestDisplay.prototype = new $_m.classes.AbstractModal(); function getFlashObjectString(mov,w,h,id){ if(!id){id="SmileyTour";} /* set all the variables here */ var flashObj = new Object(); flashObj.classid = "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"; flashObj.codebase = "#version=6,0,0,0"; flashObj.width = w; flashObj.height = h; flashObj.id = id; flashObj.align = "middle"; /* params */ flashObj.movie = mov; flashObj.play = "true"; flashObj.menu = "false"; flashObj.quality = "high"; flashObj.wmode = "transparent"; flashObj.bgcolor = "#ffffff"; flashObj.allowscriptaccess = "always"; /* embed */ flashObj.type = "application/x-shockwave-flash"; flashObj.pluginspage = "http://www.macromedia.com/go/getflashplayer"; /* output the object and embed tags using the data entered above */ var flashTag = "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n"; return flashTag; } /* SWFObject v2.2 is released under the MIT License */ var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y0){for(var af=0;af0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad'}}aa.outerHTML='"+af+"";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab reqMajorVer) return true; else if (versionObj.major == reqMajorVer){ if (versionObj.minor > reqMinorVer) return true; else if (versionObj.minor == reqMinorVer){ if (versionObj.release >= reqRevision) return true; else return false; } else return false; } else return false; } var isFlashInstalled = DetectFlashVersion(6,0,0); /** * Abandonment - pops window w/ given URL * Usage: * mindspark.createAbandon("http://www.ask.com"); * mindspark.abandonPop.enable(); */ (function(){ var _m=window.$_m; function _abandonmentPop(_url,_full,_feat){ this.width=720; this.height=300; this.top=64; this.left=64; this.url=_url; this.features=''; if(_feat){ this.features=_feat; } var self=this; this.setFullWindow=function(){ this.width=screen.width-12; this.height=screen.height-64; this.top=0; this.left=0; this.features="scrollbars=yes,toolbar=yes,menubar=yes,status=yes,location=yes,resizable=yes"; }; this.enable=function(){ _m.addEvent(window,"unload",this.handler); }; this.disable=function(){ _m.removeEvent(window,"unload",this.handler); }; this.pop=function(){ try{ if(this.url!=null && this.url!=''){ window.open(this.url, "abandon", this.features + ",top=" + this.top + ",left=" + this.left + ",width=" + this.width + ",height=" + this.height); } }catch(e){} }; this.handler=function(){ self.pop(); }; if(_full){ this.setFullWindow(); } } _m.abandonPop = null; _m.createAbandon = function(_url,_full,_feat){ return _m.abandonPop = new _abandonmentPop(_url,_full,_feat); } })(); /** * Allow to set cookie and get cookie * * * */ (function(){ var _m=window.mindspark; _m.classes.cookieChip=function(){ /** * get cookie value * @param cookie id */ this.getCookieVal=function(offset){ var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) { endstr = document.cookie.length; } return unescape(document.cookie.substring(offset, endstr)); }; /** * * @param secure * @param path * @param value * @param escapeVal * @param name * @param expires * @param domain */ this.setCookie=function(name,value,expires,path,domain,secure,escapeVal){ var val = name + "="; val += (escapeVal) ? escape( value ) : value; val += ( expires ? ";expires=" + expires.toUTCString() : "" ); val += ";path=" + ( path ? path : "/" ); val += ";domain=" + ( domain ? domain : this.getBaseDomain() ); val += ( secure ? ";secure" : "" ); document.cookie = val; }; /** * * @param name */ this.getCookie=function(name){ var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var ii = 0; while (ii < clen) { var jj = ii + alen; if (document.cookie.substring(ii, jj) == arg) { return this.getCookieVal (jj); } ii = document.cookie.indexOf(" ", ii) + 1; if (ii == 0) break; } }; /** * * @param sCookVal * @param sChip */ this.newCookieParse=function(sChip,sCookVal){ var c = new RegExp("(?:\\&|^)"+sChip+"=(?:\\w|\.)+(\\&|$)"); var tmp = sCookVal; var b = 0; if ((tmp != null) && (tmp != "")) { var rtmp = c.exec(tmp); if ((rtmp != null) && (typeof rtmp.length == 'number')){ b = rtmp[0]; if(b.indexOf("&")!=-1){/* remove & */ b=b.substring(1,(b.length-1)); } b=b.substring(sChip.length+1); } } return b; }; /** * * @param sChipName * @param sChipVal * @param sCookieName */ this.setCookieChip=function(sCookieName,sChipName,sChipVal){ var sCookieVal=this.getCookie(sCookieName); var fSetChip=function(){ var s=sChipName+'='+sChipVal+'&'; /* format if first chip or just append */ (sCookieVal==null)?sCookieVal='&'+s:sCookieVal+=s; /* set */ this.setCookie(sCookieName,sCookieVal,this.getPermDate(),'/'); }; if(sCookieVal==null){/* no cookie */ fSetChip(); }else{ var sExistChipVal=this.newCookieParse(sChipName,sCookieVal); if((!sExistChipVal) && (sCookieVal.indexOf(sChipName+'=')==-1)){/* cookie is set, not the chip */ fSetChip(); }/* else its already set - we're good */ } }; /** * */ this.getPermDate=function(){ var dExp = new Date(); dExp.setTime(dExp.getTime() + (1825*24*60*60*1000));/* 5 yrs */ return dExp; }; /** * */ this.getBaseDomain=function(){ var parts = document.domain.split("."); var i = parts.length; if (i < 2) return document.domain; return "." + parts[i-2] + "." + parts[i-1]; /* return document.location.href.match(/:\/\/(.[^/]+)/)[1]; */ }; }; /* new instance of cookieChip */ $_m.cookieChip = new $_m.classes.cookieChip(); })(); /** * instantly fire pixels */ (function(){ var _m=window.$_m; _m.classes.Pixel=function(_url){ this.pixelUrl = _url; this.TrackPixel=function(_params){ var img = new Image(); img.src=this.pixelUrl+"?"+_params+"&r="+this.getRandNum(); }; this.getRandNum=function(){ var randNum = Math.floor(Math.random()*9999999999); while (String(randNum).length < 10) { randNum='0'+randNum; } return randNum; } }; _m.pixel = null; _m.loadPixel=function(_url){ return _m.pixel = new _m.classes.Pixel(_url); }; })(); var __toolbarToolbandClsid = "364ea597-e728-4ce4-bb4a-ed846ef47970"; var __filenamePrefix = "39"; var __progId = "MapsGalaxy_39Installer.Start"; var __installerMimeType = "application/x-mapsgalaxy_39pluginei"; var bucket = "YYA"; var partnerIdString = "^UX^yyyyyy^YYA^us"; var successUrl = "installComplete.jhtml"; var ftwin; function openFeatures(){ var atts="screenX=20,screenY=20,left=20,top=20,width=410,height=175"; $_m .createPassThrough("passThrough.jhtml?vm=","features",atts); mindspark.passThrough.pop(); } function abandonPopup(url, placement, features) { if (bShowAbandonPopup) { if (placement == null) { placement = new DefaultWindowPlacement(); } if (features == null || features == '') { features = "scrollbars=no,toolbar=no,menubar=no,status=no,location=no,resizable=no"; } try { window.open(url, "abandon", features + ",top=" + placement.getTop() + ",left=" + placement.getLeft() + ",width=" + placement.getWidth() + ",height=" + placement.getHeight()); } catch(ee) { } } } function generateExternalObject(html){document.write(html);} function checkCookies(){ var now = new Date(); var expDate = new Date(now.setMinutes(now.getMinutes() + 5)); $_m. cookieChip.setCookie("cookieEnabled", "true", expDate, "/", document.domain); var cookieEnabled = $_m. cookieChip.getCookie("cookieEnabled"); if(cookieEnabled==null || cookieEnabled=='' || cookieEnabled=='undefined'){ unifiedLogging.setCookieChip('cookiesEnabled', 0); window.location = ""; } else { unifiedLogging.setCookieChip('cookiesEnabled', 1); } } function getHomeMWSUrl(url){ var newUrl = url + (url.indexOf("?")==-1?"?":"&"); if(oSettingCtr){ return newUrl+"p2=^UX^yyyyyy^YYA^us&ptb="+oSettingCtr.GetUID()+"&n=780bd8c6"; } else { return newUrl+"p2=^UX^yyyyyy^YYA^us&ptb=&n=780bd8c6"; } } function getPluginData(){ var now = new Date(); var installDate = dateFormat(now,"yyyymmddhh"); var toolbarId = "0DEEA020-0EBE-4D9E-B2FE-9107FEFCB918"; var partnerId = partnerIdString; var partnerSubId = ""; var dlput = "YYA"; var homePage = "false"; var homePageOption = "false"; var defaultSearch = "false"; var defaultSearchOption = "false"; var installType = "MANUAL_OTHER"; var partnerPixelUrl = getPartnerPixelUrl("0DEEA020-0EBE-4D9E-B2FE-9107FEFCB918"); var absSuccessUrl = validateAbsolutePathUrl(successUrl); var sa_optin_label = "inp_sa"; var hp_optin_label = "inp_hp"; if($_m.g("inp_sa_ff")) sa_optin_label = "inp_sa_ff"; if($_m.g("inp_hp_ff")) hp_optin_label = "inp_hp_ff"; if($_m.g(hp_optin_label)) { homePageOption = "true"; homePage = ($_m.g(hp_optin_label).checked?"true":"false"); } if($_m.g(sa_optin_label)) { defaultSearchOption = "true"; defaultSearch = ($_m.g(sa_optin_label).checked?"true":"false"); } var toolbarData = { "toolbarId": toolbarId, "partnerId": partnerId, "partnerSubId": partnerSubId, "installDate": installDate, "homePageOption": homePageOption, "homePage": homePage, "defaultSearchOption": defaultSearchOption, "defaultSearch": defaultSearch, "installType": installType, "successUrl": encodeURIComponent(absSuccessUrl), "dlput": dlput }; return toolbarData; } function setPluginCookies(){ var now = new Date(); var installDate = dateFormat(now,"yyyymmddhh"); var expDate = new Date(now.setMinutes(now.getMinutes() + 5)); $_m. cookieChip.setCookie("partnerId",partnerIdString,expDate); $_m. cookieChip.setCookie("installDate",installDate,expDate); $_m. cookieChip.setCookie("toolbarId", "0DEEA020-0EBE-4D9E-B2FE-9107FEFCB918",expDate); $_m. cookieChip.setCookie("partnerSubId","",expDate); $_m. cookieChip.setCookie("dlput", "YYA", expDate); $_m. cookieChip.setCookie("installType", "MANUAL_OTHER", expDate); var absSuccessUrl = validateAbsolutePathUrl(successUrl); $_m. cookieChip.setCookie("successUrl", absSuccessUrl, expDate); var sa_optin_label = "inp_sa"; var hp_optin_label = "inp_hp"; if($_m.g("inp_sa_ff")) sa_optin_label = "inp_sa_ff"; if($_m.g("inp_hp_ff")) hp_optin_label = "inp_hp_ff"; if($_m.g(sa_optin_label)) { $_m. cookieChip.setCookie("defaultSearchOption","true",expDate); $_m. cookieChip.setCookie("defaultSearch",""+$_m.g(sa_optin_label).checked,expDate); } if($_m.g(hp_optin_label)) { $_m. cookieChip.setCookie("homePageOption","true",expDate); $_m. cookieChip.setCookie("homePage",""+$_m.g(hp_optin_label).checked,expDate); } } function trackFooterLinks(){ if($_m.g("HelpLink")){ $_m. bind("HelpLink","click", function(){ unifiedLogging.logEvent('UIControl', {"label":"HelpLink", "type":"Footer"}, {section:"install"}); }); } if($_m.g("PoliciesLink")){ $_m. bind("PoliciesLink","click", function(){ unifiedLogging.logEvent('UIControl', {"label":"PoliciesLink", "type":"Footer"}, {section:"install"}); }); } if($_m.g("HiringLink")){ $_m. bind("HiringLink","click", function(){ unifiedLogging.logEvent('UIControl', {"label":"HiringLink", "type":"Footer"}, {section:"install"}); }); } if($_m.g("UninstallLink")){ $_m. bind("UninstallLink","click", function(){ unifiedLogging.logEvent('UIControl', {"label":"UninstallLink", "type":"Footer"}, {section:"install"}); }); } if($_m.g("ContactLink")){ $_m. bind("ContactLink","click", function(){ unifiedLogging.logEvent('UIControl', {"label":"ContactLink", "type":"Footer"}, {section:"install"}); }); } if ($_m.g("Asset3Text") && $_m.g("Asset3Text").getElementsByTagName('a')){ $_m. addEvent($_m.g("Asset3Text").getElementsByTagName('a')[0], "click", function(){ unifiedLogging.logEvent('UIControl', {"label":"MoreInfoLink", "type":"Splash"}, {section:"install"}); }); } } function mirrorCookiesToGlobalDomain() { } function getInternetExplorerVersion() { var rv = -1; /* Return value assumes failure. */ var ua = navigator.userAgent; if (navigator.appName == 'Microsoft Internet Explorer') { var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})"); if (re.exec(ua) != null) rv = parseFloat( RegExp.$1 ); } else if (navigator.appName == 'Netscape') { var re = new RegExp("IE ([0-9]{1,}[\.0-9]{0,})"); if(ua.indexOf("rv:11")!=-1) re = new RegExp("rv:([0-9]{1,}[\.0-9]{0,})"); if (re.exec(ua) != null) rv = parseFloat( RegExp.$1 ); } return rv; } function IsWindowsUIBrowserExperience() { var windowsUIBrowserExperience = false; if (window.innerHeight >= screen.height) { try { !!new ActiveXObject("htmlfile"); } catch (e) { windowsUIBrowserExperience = getInternetExplorerVersion() >= 10.0; } } return windowsUIBrowserExperience; } function IsWindowsUIBrowserExperience8_1() { var windowsUIBrowserExperience = false; try { !!new ActiveXObject("htmlfile"); } catch (e) { windowsUIBrowserExperience = getInternetExplorerVersion() >= 10.0; } return windowsUIBrowserExperience; } function convertToDynamicExe(_exe) { var dynExe_path = _exe.substring(0,_exe.lastIndexOf("/")); var dynExe_filename_full = _exe.substring(_exe.lastIndexOf("/") + 1, _exe.lastIndexOf(".")); var dynExe_filename = dynExe_filename_full.substring(0, dynExe_filename_full.lastIndexOf(".")); var dynExe_fullurl = dynExe_path + "/man" + dynExe_filename_full + "/" + dynExe_filename; var ocampaign = "yyyyyy"; var ocobrand = "UX"; var otrackId = "YYA"; var ocountry = "US"; if (PartnerIdFactory) { var useOldFormat = (ocobrand == null || ocobrand.length == 2) && (otrackId == null || otrackId.length == 2); var pf = new PartnerIdFactory(); var p = pf.makePartnerId(ocobrand, ocampaign, otrackId, ocountry, null, null, useOldFormat); partnerIdString = p.toString(); } if(partnerIdString != "") { dynExe_fullurl += ".pd" + partnerIdString; } if("" != "") { dynExe_fullurl += "." + ""; } dynExe_fullurl += ".exe"; return dynExe_fullurl; } function convertToDynamicChromeExe(_exe,_tbId) { var dynExe_fullurl = ""; if (_exe != "") { var dynExe_path = _exe.substring(0,_exe.lastIndexOf("/")); var dynExe_filename_full = _exe.substring(_exe.lastIndexOf("/") + 1, _exe.lastIndexOf(".")); var dynExe_filename = dynExe_filename_full.substring(0, dynExe_filename_full.lastIndexOf(".")); dynExe_fullurl = dynExe_path + "/chr" + dynExe_filename_full + "/" + dynExe_filename_full; if(_tbId) { dynExe_fullurl += "." + _tbId; } dynExe_fullurl += ".exe"; } return dynExe_fullurl; } function convertToDynamicMSNIExe(_exe,_tbId) { var dynExe_fullurl = ""; if (_exe != "") { var dynExe_path = _exe.substring(0,_exe.lastIndexOf("/")); var dynExe_filename_full = _exe.substring(_exe.lastIndexOf("/") + 1, _exe.lastIndexOf(".")); var dynExe_filename = dynExe_filename_full.substring(0, dynExe_filename_full.lastIndexOf(".")); dynExe_fullurl = dynExe_path + "/msni" + dynExe_filename_full + "/" + dynExe_filename_full; if(_tbId) { dynExe_fullurl += "." + _tbId; } dynExe_fullurl += ".exe"; } return dynExe_fullurl; } function biToggle() { if ($_m.g("inp_sa_ff")) $_m.g("inp_sa_ff").checked=$_m.g("inp_bi_ff").checked; if ($_m.g("inp_hp_ff")) $_m.g("inp_hp_ff").checked=$_m.g("inp_bi_ff").checked; if ($_m.g("inp_sa_ff")) $_m.g("inp_sa_ff").disabled=!$_m.g("inp_bi_ff").checked; if ($_m.g("inp_hp_ff")) $_m.g("inp_hp_ff").disabled=!$_m.g("inp_bi_ff").checked; } function getPartnerPixelUrl(_tbid) { var sCurrPathName= location.pathname.substring(0,location.pathname.lastIndexOf("/")+1); var partnerPixelUrl = 'http://'+location.hostname+sCurrPathName.substring(0,sCurrPathName.lastIndexOf("/")+1)+ 'install_pixels.jhtml?partner='+partnerIdString; partnerPixelUrl += '&coId=84b4d5639d8645e69cd0b717961937ed'; partnerPixelUrl += '&cake_id='; partnerPixelUrl += '&offer_id='; return partnerPixelUrl; } function getOffsitePartnerPixelUrl(_tbid) { var partnerPixelUrl = 'http://mapsgalaxy.dl.tb.ask.com/install_pixels.jhtml?partner='+partnerIdString; partnerPixelUrl += '&coId=84b4d5639d8645e69cd0b717961937ed'; partnerPixelUrl += '&cake_id='; partnerPixelUrl += '&offer_id='; return partnerPixelUrl; } function validateAbsolutePathUrl(_url) { var sCurrPathName= location.pathname.substring(0,location.pathname.lastIndexOf("/")+1); var url = _url; if(url.indexOf("http:") != 0) { url = 'http://'+location.hostname+sCurrPathName.substring(0,sCurrPathName.lastIndexOf("/")+1) + url; } return url; } function onSplashPixel() { var pixelIframe = document.createElement("iframe"); pixelIframe.width = 1; pixelIframe.height = 1; pixelIframe.src = "splashPixels.jhtml"; document.body.appendChild(pixelIframe); } function isFirefoxInstalled() { var eiObj = document.getElementById('installer'), _osBit = (eiObj.Is64BitOS()?"64":"32"), reg_path = { "32": "HKLM,SOFTWARE\\Mozilla\\Mozilla Firefox,CurrentVersion", "64": "HKLM,SOFTWARE\\Wow6432Node\\Mozilla\\Mozilla Firefox,CurrentVersion" }; return eiObj.DoesRegistryPathExist(reg_path[_osBit])=="1" ? true : false; } window.toolbarDetectData = [ ]; function currentBrowserName() { if (navigator.userAgent.search(/Firefox/i) > -1) { return 'firefox'; } if (navigator.appName.search(/Internet Explorer/i) > -1) { if (navigator.userAgent.search(/Opera\s/i) < 0) { return 'msie'; } } return 'unknown'; } function firstInstalled(toolbarDetectDataArray) { /* Get the current browser name. */ var currentBrowser = currentBrowserName(); for (var k = 0; k < toolbarDetectDataArray.length; k++) { var toolbar = toolbarDetectDataArray[k]; if (toolbar && (toolbar.browser == currentBrowser || toolbar.browser == 'dual' || !toolbar.browser)) { var control = new ToolbarControl( 'settingsCtl', toolbar.internalProductName, toolbar.mimeType, toolbar.toolbarSettingsProgId, toolbar.toolbarSettingsProgId, toolbar.toolbarSettingsClsid, toolbar.requiredVersion ); if (MindsparkToolbar.IsInstalled(control)) { var settingsControl = new SettingsCtrlObject(control); settingsControl.Create("div"); var bsf = settingsControl.control && settingsControl.control.BrowsersSupported; bsf = null; if (bsf) { var expectedBsf = toolbar.browser == 'msie' ? 0x01 : toolbar.browser == 'firefox' ? 0x02 : 0x03; if (bsf == expectedBsf) { return control; } } else { return control; } } } } return null; } function convertToolbarDataToDetectData(rawItems) { var items = []; items.byClassId = {}; for (var p in rawItems) { var rawItem = rawItems[p]; var item = { browser: rawItem.settingsCtl.browser, internalProductName: rawItem.settingsCtl.toolbar, mimeType: rawItem.settingsCtl.mimetype, toolbarSettingsProgId: rawItem.settingsCtl.prog_id, toolbarSettingsClsid: rawItem.settingsCtl.classid, requiredVersion: rawItem.settingsCtl.required_version, fileNamePrefix: rawItem.settingsCtl.fileNamePrefix }; items.push(item); items.byClassId[item.toolbarSettingsClsid] = item; } return items; } function isAnyToolbarInGroup(toolbars, group) { if (!group.byClassId) { throw 'Internal error: given group must contain byClassId map, as returned by convertToolbarDataToDetectData.'; } for (var k = 0; k < toolbars.length; k++) { var toolbar = toolbars[k]; if (toolbar && isToolbarInGroup(toolbar, group)) { return true; } } return false; } function isToolbarInGroup(toolbar, group) { if (!group.byClassId) { throw 'Internal error: given group must contain byClassId map, as returned by convertToolbarDataToDetectData.'; } return !!group.byClassId[toolbar.toolbarSettingsClsid]; } var debug = function(msg){ /* console.log(msg); */ }; var unifiedLogging = { src: 'http://ak.imgfarm.com/images/anx/anemone-1.2.7', chipParams: {}, appSpecificMap: { section : 'xx', platform : 'xp', installerType : 'xi', refPartner : 'xrp', refCobrand : 'xrco', refSub : 'xrs', refCampaign : 'xrca', refTrack : 'xrt', refCountry : 'xrcc' }, cookiesEnabled: -1, campaignVal: '', enabled: false, appSpecificParams: { spid: null, /* splash page id */ /* theme: null, Splash/Landing Page Theme (optional) */ platform: "vicinio", /* DLP Platform: old or vicinio */ refPartner: null, /* Full FUTURE Partner ID as determined by the DLP process to be written into windows registry upon successful conversion of the lead into a toolbar installation */ refSub: null, /* Full FUTURE Sub ID as determined by the DLP process to be written into windows registry upon successful conversion of the lead into a toolbar installation. */ installerType: null /* Type of the installer: ActiveX Web Installer, RunRun, XPI, EXT */ }, /* Stores expected events and perspective parameters */ events: { "SuccessPopDisplayButton" : [], "SuccessPopCloseButton" : [], "ManualInstallLanding" : [], "ManualInstallInvoked" : ["installerSource"], "ToolbarDetect": [], "GoogleAnalytics": ['varName','varValue'], "SplashLanding": ['cookiesEnabled'], "EnableLanding": [], "SplashLandingClicked": [], /* 'action' Type of click on the splash landing page. Button vs Middle vs Top. */ "InstallerInvoked": [], "InstallerAccepted": [], "InstallerHostAccepted": [], "InstallerSecondaryAccepted": [], "3rdPartyOfferCriteriaCheck" : ['bundleName','criteriaPass','failType'], "3rdPartyOfferShow" : ['bundleName'], "3rdPartyOfferAccept" : ['bundleName','optIn'], "3rdPartyOfferDownloadComplete" : [], "InstallerFinished": ['searchAssistantOptIn','homePageOptIn','tbUID','tbVer'],/* ,'withIE','withFF','withSF','withCH' */ "InstallerFinishedButton": [], "Error": ['errorCode','errorType'], "VendorPixelFrame": [], "PixelFrameTB": ['tbUID','tbVer'], "PostInstallPop": ['popStyle','url'], "UIControl": ['label','type'], "InstallerRebuttal": [], /* 'action' quit, cancel or continue */ "TBCleanupInitialize":['TBcleanupDetect','TBcleanupDetectList','TBcleanupDisplayed','TBcleanupDisplayedList'], "TBCleanupProcess":['TBcleanupSelected','TBcleanupSelectedList','TBcleanupDisabled','TBcleanupDisabledList'], "PageRedirect": [] }, load: function( appParams, callback ){ this.enabled = ( typeof(_Anemone) != 'undefined' ); /* if _Anemone is missing load it dynamically */ if (!this.enabled) { var oScope = this; $_m .getScript(this.src, function() { oScope.load(appParams, callback); }); return; } /* load appSpecificParams, set in the back-end */ if (this.isNotNullOrUndefined(appParams)) { for (prop in this.appSpecificParams) { if (appParams[prop] !== null) { this.appSpecificParams[prop] = appParams[prop]; } } } if (typeof callback === "function") { callback(); } }, /* Param aggregate & trigger * @param name - event name * @param params - anemone params * @params opt - optional app params such as section, cookies enabled, campaignVal, etc... */ logEvent: function(name, params, cookieOpt){ if (this.enabled) { if (this.events[ name ] !== null) { var anemone_params = params, hasParams = false; try { /* set anemone event params */ if (this.isNotNullOrUndefined(anemone_params)) { hasParams = true; } /* set optional environment params */ if (this.isNotNullOrUndefined(cookieOpt)) { this.chipParams = cookieOpt; } /* trigger event */ if (hasParams) { _Anemone.logEvent(name, anemone_params); } else { _Anemone.logEvent(name); } } catch(e) { /* console.log("message: "+e.message); */ } } else { /* alert('Undefined event was triggered!') */ } } else { /* alert('Unified Logging is disabled = ' + name) */ } }, isNotNullOrUndefined: function( _var ) { if (_var !== undefined && _var !== null) { return true; } return false; }, setCookieChip: function(name,val){ if (this.isNotNullOrUndefined(this[name])){ this[name] = val; } }, getCookieChips: function() { var chips = {}, prop = null; for (p_name in this.chipParams) { prop = this.appSpecificMap[p_name]; if (this.isNotNullOrUndefined(prop)) { chips[prop] = this.chipParams[p_name]; } } return chips; } }; var _anxGetAppCookieChips = function () { return unifiedLogging.getCookieChips(); }; /* Version 1.1.6 - See com.mindspark.util.partnerid.PartnerId.java */ INVALID_SUB_ID = 'XXXXXXXXXX'; function PartnerIdFactory() { /** Parses a serialized partner ID in either old or new format. @param s serialized partner ID @param subId sub-ID (not part of the serialized string) -- can be null or omitted @param defaultCobrand cobrand to use if serialized cobrand is invalid @return partner ID object (will never be null). If the serialized ID is empty or invalid, and defaultCobrand is specified, this will return a valid partner ID consisting of just the default cobrand, using the new format if the serialized ID begins with a '^' or the default cobrand is longer than 2 characters, or the old format otherwise. If the serialized ID is empty or invalid, and defaultCobrand is null or omitted, this will return an empty (invalid) partner ID object. */ var _parse = function (s, subId, defaultCobrand) { if (typeof(s) === 'undefined') s = null; if (typeof(subId) === 'undefined') subId = null; if (typeof(defaultCobrand) === 'undefined') defaultCobrand = null; s = trim(s); if (isEmpty(s)) { if (defaultCobrand === null) return new PartnerId(null, null, null, null, null, null, "", null, false); return getDefaultPartnerId(defaultCobrand, subId, s, defaultCobrand.length === 2); } if (s.charAt(0) == DELIMITER) return parseNew(s, subId, defaultCobrand); return parseOld(s, null, subId, defaultCobrand); }; this.parse = _parse; /* Creates a new partner ID from its components. It will be serialized using the new format. All the parameters except cobrand may be null or omitted (useOldFormat defaults to false) -- if the cobrand is invalid, returns a PartnerId object flagged invalid. All the parameters will be validated. If the sub-ID is invalid, it will be set to INVALID_SUB_ID. If any other parameters are invalid, they will be null in the resulting PartnerId object. */ this.makePartnerId = function (cobrand, campaign, track, country, subId, parent, useOldFormat) { if (typeof(cobrand) === 'undefined') cobrand = null; if (typeof(campaign) === 'undefined') campaign = null; if (typeof(track) === 'undefined') track = null; if (typeof(country) === 'undefined') country = null; if (typeof(subId) === 'undefined') subId = null; if (typeof(parent) === 'undefined') parent = null; if (typeof(useOldFormat) === 'undefined') useOldFormat = false; return new PartnerId(cobrand, campaign, track, country, _validateSubId(subId), parent, null, null, useOldFormat); }; /* Constructs a "viral" partner ID given parent and child strings. The new partner ID will use the new format unless both parent and child use the old format. Note that if the parent ID itself has a parent, that parent (the grandparent) will be used as the parent of the resulting ID. */ var _makeViralPartnerId = function (child, parent, subId) { if (typeof(subId) === 'undefined') subId = null; var childId = _parse(child, subId); if (typeof(parent) === 'undefined' || parent === null) { return childId; } var parentId = _parse(parent); var useOldFormat = childId.isOldFormat() && (!parentId.hasParent() && parentId.isOldFormat() || parentId.hasParent() && parentId.getParent().isOldFormat()); return new PartnerId(childId.getCobrand(), childId.getCampaign(), childId.getTrack(), childId.getCountry(), _validateSubId(subId), parentId, null, null, useOldFormat); }; this.makeViralPartnerId = _makeViralPartnerId; this.validateField = _validateField; this.isFieldValid = _isFieldValid; this.validateCountry = _validateCountry; this.validateSubId = _validateSubId; this.urlEncodePartnerId = _urlEncodePartnerId; /* Private "constants" */ var DELIMITER = '^'; var PARENT_DELIMITER = '_'; var NEW_PARTNER_PARAM = 'p2'; var MAX_ID_LEN = 23; /* this is the size of Vlad's buffer */ var VALID_FIELD = /^[a-zA-Z0-9]{1,6}$/; var VALID_SUB_ID = /^[a-zA-Z0-9_-]{2,100}$/; var TRIM_LEFT = /^\s+/; var TRIM_RIGHT = /\s+$/; /* Private constructor */ function PartnerId(_cobrand, _campaign, _track, _country, _subId, _parent, _serializedForm, _reportingTrack, useOldFormat) { var cobrand = toUpperCase(_validateField(_cobrand)); var campaign = null; var track = null; var country = null; var parent = null; var subId = null; var reportingTrack = null; var serializedForm = ""; if (cobrand != null) { /* If no cobrand, partner ID is invalid -- all fields should be null except serializedForm, which will be the empty string */ campaign = toLowerCase(_validateField(_campaign)); track = toUpperCase(_validateField(_track)); country = _validateCountry(_country); if (_parent != null) { /* Use the grandparent if present */ if (_parent.hasParent()) _parent = _parent.getParent(); if (!_parent.isValid()) _parent = null; /* Forget the parent sub-ID, since it will not be serialized */ if (_parent != null && _parent.hasSubId()) { _parent = new PartnerId (_parent.getCobrand(), _parent.getCampaign(), _parent.getTrack(), _parent.getCountry(), null, null, _parent.toString(), _parent.getReportingTrack(), _parent.isOldFormat()); } } parent = _parent; /* Don't validate subId here -- if we're synthesizing a new partner ID, it will have been validated by the public makePartnerId method; if we're processing an existing partner ID, leave it unvalidated since reporting doesn't validate it. */ if (!isEmpty(_subId)) subId = trim(_subId); serializedForm = trim(_serializedForm); if (serializedForm == null) { /* Make sure to use the validated values! */ var pair = []; if (useOldFormat) pair = serializeOld(cobrand, campaign, track, country, parent); else pair = serializeNew(cobrand, campaign, track, country, parent); serializedForm = pair[0]; reportingTrack = pair[1]; } else reportingTrack = trim(toLowerCase(_reportingTrack)); } this.toString = function () { return serializedForm; }; this.getCobrand = function () { return cobrand; }; this.getCampaign = function () { return campaign; }; this.getTrack = function () { return track; }; this.getCountry = function () { return country; }; this.getSubId = function () { return subId; }; this.getReportingTrack = function () { return reportingTrack; }; this.getParent = function () { return parent; }; this.getChild = function () { if (parent == null) return this; return new PartnerId(cobrand, campaign, track, country, subId, null, null, null, useOldFormat); }; this.hasCobrand = function () { return cobrand != null; }; this.hasCampaign = function () { return campaign != null; }; this.hasTrack = function () { return track != null; }; this.hasCountry = function () { return country != null; }; this.hasSubId = function () { return subId != null; }; this.hasParent = function () { return parent != null; }; this.addToUrl = function (baseUrl, oldParamName, oldParamName2) { var s = ''; if (baseUrl != null) s = trim(baseUrl); if (_isValid()) { var lastChar = '\0'; if (s.length > 0) lastChar = s.charAt(s.length - 1); if (lastChar != '?' && lastChar != '&') { if (s.indexOf('?') >= 0 || s.indexOf('&') >= 0) s += '&'; else s += '?'; } s += _appendQueryParameters(oldParamName, oldParamName2); } return s; }; /* Convenience method which returns a new partner ID object using this partner ID as the parent. @param child serialized child partner ID (old or new format) @return new partner ID object. If both the child and parent use the old format, the new partner ID will also use the old format; otherwise, it will use the new format. */ this.makeViralPartnerId = function (child, childSubId) { if (typeof(childSubId) === 'undefined') childSubId = null; return _makeViralPartnerId(child, serializedForm, childSubId); }; this.isValid = _isValid; this.isNewFormat = _isNewFormat; this.isOldFormat = _isOldFormat; this.appendQueryParameters = _appendQueryParameters; function _isValid() { return cobrand != null; } function _isNewFormat() { return serializedForm.length > 0 && serializedForm.charAt(0) == DELIMITER; } function _isOldFormat() { return serializedForm.length > 0 && serializedForm.charAt(0) != DELIMITER; } function _appendQueryParameters(oldParamName, oldParamName2) { var s = ''; if (!_isValid()) return s; var encoded = _urlEncodePartnerId(serializedForm); if (_isNewFormat()) s += 'p2='; else { if (!isEmpty(oldParamName2)) s += oldParamName2 + '=' + encoded + '&'; s += oldParamName + '='; } s += encoded; if (subId != null) { s += '&si=' + urlEncode(subId); } return s; } } function parseNew(s, subId, defaultCobrand) { /* First, apply reporting's validation */ if (s.charAt(0) != DELIMITER) return getDefaultPartnerId(defaultCobrand, subId, s, false); /* 1. Extract and validate cobrand */ var leadingDelimiterStripped = s.substring(1); var st = new StringTokenizer(leadingDelimiterStripped); var cobrand = st.nextToken(DELIMITER); if (!_isFieldValid(cobrand)) return getDefaultPartnerId(defaultCobrand, subId, s, false); /* 2. If "track" contains any invalid characters (currently only pipes), treat it as empty. */ if (st.hasMoreTokens() && st.remainder().indexOf('|') > 0) return getDefaultPartnerId(cobrand, subId, s, false); /* As far as reporting is concerned, this is a valid partner ID, so we can now break out the remaining fields. First see if there's a parent partner ID */ var childPart = st.nextToken (PARENT_DELIMITER); var parent = null; if (st.hasMoreTokens()) { /* Parent may be old or new format due to legacy code If the parent cobrand is invalid, ignore the parent partner ID */ parent = _parse(normalizeParent(st.remainder()), null, null); } var stChild = new StringTokenizer(childPart); var campaign = stChild.nextToken(DELIMITER); var track = stChild.nextToken(DELIMITER); var country = stChild.nextToken(DELIMITER); /* allow for more (currently undefined) fields */ /* Extract the reporting track (all but the cobrand) */ var reportingTrack = null; var pos = leadingDelimiterStripped.indexOf(DELIMITER); if (pos > 0) reportingTrack = leadingDelimiterStripped.substring(pos); return new PartnerId(cobrand, campaign, track, country, subId, parent, s, reportingTrack, false); } function normalizeParent(parent) { /* Parent may be old format due to some legacy code which constructs viral partner IDs by simply concatenating the child and parent. It may be ambiguous whether the parent is an old-format ID or a new-format ID containing just the cobrand. Since old-format IDs must be either 2, 8, 10, or 12 characters long, and new-format cobrands must be 6 chars or fewer, we can use the length to discriminate. */ var parentIsOldFormat = parent.indexOf (DELIMITER) < 0 && (parent.length === 2 || parent.length > 6); /* Legacy code may include an extraneous delimiter */ if (!parentIsOldFormat && parent.charAt(0) !== DELIMITER) parent = DELIMITER + parent; return parent; } /* Logic is copied from search, which is based on Vlad's parser */ function parseOld(partnerParam, idCookie, subId, defaultCobrand) { var serializedPartnerString = null; var cobrand = null; var reportingTrack = null; var campaign = null; var track = null; var country = null; var parent = null; if (partnerParam != null) { serializedPartnerString = partnerParam; partnerParam = partnerParam.toUpperCase(); if (partnerParam.length > 2) { reportingTrack = partnerParam.substring(2); cobrand = partnerParam.substring(0, 2); } else { cobrand = partnerParam; } if (reportingTrack==null && idCookie != null && idCookie.length <= MAX_ID_LEN) { reportingTrack = idCookie; /* The "original partner ID" is a somewhat hazy concept. It is intended to be either the ptnrS parameter or the ptnrS + id cookies concatenated, hence this logic. */ if (serializedPartnerString.length == 2) serializedPartnerString += idCookie; } /* If cobrand is not valid, use default */ if (!_isFieldValid(cobrand) || cobrand.length != 2) { cobrand = defaultCobrand; } } else { /* No cobrand found -- use default */ cobrand = defaultCobrand; } if (cobrand == null) return new PartnerId(null, null, null, null, null, null, "", null); /* If id contains a pipe, consider it invalid */ if (reportingTrack != null && reportingTrack.indexOf('|') >= 0) reportingTrack = null; var origTid = reportingTrack; if (reportingTrack != null) { /* Break out parts of id Use serializedPartnerString, not reportingTrack so that parent will have original case */ var pos = serializedPartnerString.indexOf(PARENT_DELIMITER); if (pos >= 0) { /* Parent may be old or new format due to legacy code If the parent cobrand is invalid, ignore the parent partner ID */ parent = _parse(normalizeParent(serializedPartnerString.substring(pos + 1)), null, null); pos = reportingTrack.indexOf (PARENT_DELIMITER); if (pos >= 0) /* should always be true */ reportingTrack = reportingTrack.substring (0, pos); } var len = reportingTrack.length; if (len <= 6) campaign = reportingTrack; else campaign = reportingTrack.substring(0, 6); if (len >= 8) { track = reportingTrack.substring(6, 8); if (len >= 10) country = reportingTrack.substring(8, 10); } } return new PartnerId(cobrand, campaign, track, country, subId, parent, serializedPartnerString, origTid, true); } function serializeNew(cobrand, campaign, track, country, parent) { var s = DELIMITER; if (cobrand != null) s += cobrand; var reportingTrackStart = s.length; s += DELIMITER; if (campaign != null) s += campaign; s += DELIMITER; if (track != null) s += track; s += DELIMITER; if (country != null) s += country; if (parent != null) { s += PARENT_DELIMITER; /* Even if parent partner ID was in old format, when we serialize the compound partner ID, we must use the new format. Also, don't serialize the parent's parent (if any). */ s += serializeNew(parent.getCobrand(), parent.getCampaign(), parent.getTrack(), parent.getCountry(), null)[0].substring(1); } var reportingTrack = s.substring(reportingTrackStart).toLowerCase(); return [s, reportingTrack]; } function serializeOld(cobrand, campaign, track, country, parent) { if (cobrand == null) return ["", ""]; if (cobrand.length != 2) return ["", ""]; /* throw an exception? */ var s = cobrand; var reportingTrackStart = s.length; if (length(campaign) == 6) { s += campaign; if (length(track) == 2) { s += track; if (length(country) == 2) s += country; } } if (parent != null) { /* Even if parent partner ID was in new format, when we serialize the compound partner ID, we must use the old format. Also, don't serialize the parent's parent (if any). */ var serializedParent = serializeOld(parent.getCobrand(), parent.getCampaign(), parent.getTrack(), parent.getCountry(), null)[0]; if (serializedParent.length > 0) { s += '_' + serializedParent; } } var reportingTrack = s.substring(reportingTrackStart).toLowerCase(); return [s, reportingTrack]; } function length(s) { if (s == null) return 0; return s.length; } function _validateField(field) { field = trim(field); if (isEmpty(field)) { return null; } if (!VALID_FIELD.test(field)) { return null; } return field; } function _validateCountry(country) { country = _validateField(country); if (country == null) return null; if (country.length != 2) return null; return country.toLowerCase(); } function _validateSubId(subId) { subId = trim(subId); if (isEmpty(subId)) { return null; } if (!VALID_SUB_ID.test(subId)) { return INVALID_SUB_ID; } return subId; } function _isFieldValid(field) { return _validateField(field) != null; } function getDefaultPartnerId(cobrand, subId, origValue, useOldFormat) { return new PartnerId(cobrand, null, null, null, subId, null, origValue, null, useOldFormat); } function isEmpty(s) { return s == null || s.length == 0; } function toUpperCase(s) { if (s == null) return null; return s.toUpperCase(); } function toLowerCase(s) { if (s == null) return null; return s.toLowerCase(); } /* From jQuery, but returns null if arg is null */ trim = String.prototype.trim ? function (text) { return text == null ? null : String.prototype.trim.call(text); } : function (text) { return text == null ? null : text.toString().replace(TRIM_LEFT, "").replace(TRIM_RIGHT, ""); }; /* encodeURI and encodeURIComponent, conforming to the RFC, encode the caret delimiter, which will mess up reporting (they don't URL-decode) and may significantly increase the length of the URL. */ function _urlEncodePartnerId(partnerId) { return encodeURIComponent(partnerId).replace(/%5[eE]/g, '^'); } function urlEncode(s) { return encodeURIComponent(s); } function StringTokenizer(text) { var s = text; var start = 0; var len = 0; if (text != null) len = text.length; this.hasMoreTokens = function() { return start < len; }; this.nextToken = function (delim) { if (!this.hasMoreTokens()) return null; var pos; for (pos = start; pos < len; pos++) { if (s.charAt(pos) == delim) { var result = s.substring(start, pos); start = pos + 1; return result; } } /* No more delimiters found -- return the rest of the string */ var result = s.substring(start); start = len; return result; }; this.remainder = function () { if (!this.hasMoreTokens()) return null; return s.substring(start); }; } } _AnemoneParams = {}; _AnemoneParams.backFillRequired = false; var redirectDLP = null; var IEOverlayRedirect = null; var bSuccessPopped = false; var sToolbarId = 202980021; var _extension_toolbar = ExtensionToolbar(sToolbarId); // spid (xs) // theme (xt) // refMarketing (xrm) unifiedLogging.logEvent = function(name, params, extras) { if (typeof params === 'undefined' || typeof params === null) { params = {}; } params['eventType'] = name; params['section'] = 'external'; params['platform'] = 'vicinio'; params['installerType'] = "MANUAL_OTHER"; params['refPartner'] = '^UX^yyyyyy^YYA^us'; params['refCobrand'] = 'UX'; params['refCampaign']= 'yyyyyy'; params['refTrack'] = 'YYA'; params['refCountry'] = 'US'; var oParams = $_m .JSON_Encode_String(params), src = "http://free.mapsgalaxy.com/anemone_js.jhtml?partner=^UX^yyyyyy^YYA^us&"+oParams, conversionId = "84b4d5639d8645e69cd0b717961937ed"; if (conversionId !== "") { src += "&coId=" + conversionId; } document.body.appendChild(new anemoneFrame(src, name)); }; var anemoneFrame = function(_src, _name){ this.oFrm = ""; this._id = 'anemoneFrame_'+_name this._src = _src; this._name = _name; this.trigger = function() { this.oFrm = document.createElement("iframe"); this.oFrm.setAttribute("style", 'display:none;'); this.oFrm.setAttribute("id", this._id); this.oFrm.setAttribute("src", this._src); var oScope = this; if(this.oFrm.onreadystatechange != undefined) { this.oFrm.onreadystatechange = function () { if (this.readyState == 'complete' || this.readyState == 'loaded') { oScope.SetTimeoutObj(oScope, 10, oScope.remove, null); } }; } else { this.oFrm.onload = function () { oScope.SetTimeoutObj(oScope, 10, oScope.remove, null); }; } return this.oFrm; }; //maintain scope after setTimeout is triggered this.SetTimeoutObj = function(o, t, f, a) { return setTimeout(function() { f.call(o,a); }, t); }; this._bRemovedIFrame = false; this.remove = function() { if (!this._bRemovedIFrame) { try { document.body.removeChild(this.oFrm); this._bRemovedIFrame = true; } catch (e) {} } }; return this.trigger(); }; var oDLPCtrl = null; var oEasyCtrl = null; var oEULADiv = null; var oEULA2Div = null; var oRebuttalDiv = null; var oInstaller = null; var oEasyDiv = null; var oSettingCtr = null; var oSettCtrl = null; var sRedirectUrl = ""; var browserVer = "OTHER"; var browserName = "OTHER"; var installerTotalBytes = ("6056320"!=""?6056320:0); var successUrl = "http://free.mapsgalaxy.com/installComplete.jhtml"; var successPopUrl = "http://free.mapsgalaxy.com/installComplete.jhtml"; var suppressRedirect = false; var suppressAbandonPop = true; // logic to determine where to go next var latestVersionRedirect = "http://free.mapsgalaxy.com/alreadyInstalled.jhtml"; var sInstalledVersion = ""; var bInitRunRun = false; var addPauseParam = false; addPauseParam = false; function initRunRun (){ if(!suppressAbandonPop) { $_m .createAbandon("tryagain.jhtml",true); $_m .abandonPop.enable(); } // set if cookie enabled checkCookies(); unifiedLogging.load(); oSettCtrl = new ToolbarControl("settingsCtl", "MapsGalaxy", "application/x-mapsgalaxy_39plugin", "MapsGalaxy_39.SettingsPlugin", "MapsGalaxy_39.SettingsPlugin", "4b7d0b0c-cff3-49c5-9bc3-ffabc031c822", "2.5.14.83"); var oDownloadDiv = new DownloadDisplay("DLP_dvDownload"); var oFinishedDiv = new FinishedDisplay("DLP_dvFinished"); var oErrorDiv = new ErrorDisplay("DLP_dvError"); var oRunRunDiv = null; oEasyCtrl = $_m. createDownloader("http://ak.imgfarm.com/images/nocache/vicinio/installers/202980021.YYA.3/236464-140318110046-YYA.3/MapsGalaxy.exe", "MapsGalaxy_39Installer.Start"); oInstaller = $_m. createInstaller('', '8f0b76e1-4e46-427b-b55b-b90593468ac6', { codebase:'http://ak.imgfarm.com/images/nocache/vicinio/installers/202980021.YYA.3/239653-140325105237-YYA.3/MapsGalaxySetup.exe', classid:"364ea597-e728-4ce4-bb4a-ed846ef47970", currentversion:"2,5,14,83", byteCount:6056320, partcount:1, waitforinstalldone:120000, installerparams:"/p=^UX^yyyyyy^YYA^us" }); drawRunRunModals(); oEasyDiv = new EasyDisplay("DLP_dvEasy"); oDLPCtrl = new DLPCtrl(oEasyCtrl,oInstaller,oSettCtrl,oEasyDiv,oDownloadDiv,oErrorDiv,oFinishedDiv,oEULADiv,oEULA2Div,null,null,null,oRunRunDiv,null,oRebuttalDiv,null,null,"success.jhtml","http://ak.imgfarm.com/images/nocache/vicinio/installers/202980021.YYA.3/239653-140325105237-YYA.3/MapsGalaxySetup2.5.14.83.^UX^man000^YYA^.exe"); //show download progress var oProgressObj = new $_m.classes.ProgressIndicator("DLP_progressBarDIV", "DLP_statusDIV", "DLP_progressBarContainer","DLP_percentDIV",installerTotalBytes,true); oProgressObj.downloadTxt = "Downloading MapsGalaxy..."; oProgressObj.installTxt = "Installing MapsGalaxy..."; oProgressObj.finishTxt = "Congratulations, MapsGalaxy has been successfully installed!"; //wrap in anon functions to keep the scope of oProgressObj oInstaller.AddListener(oInstaller.DOWNLOAD_START,function(target){ if(typeof(downloadstartFuncOverride) == "function"){ downloadstartFuncOverride(); } else { if(mindspark.abandonPop){ $_m .abandonPop.disable(); } oDLPCtrl.StartProgress();} } ); oInstaller.AddListener(oInstaller.DOWNLOAD_PROGRESS,function(target){ if(typeof(downloadprogressFuncOverride) == "function"){ downloadprogressFuncOverride(); } else { oDownloadDiv.InstallProgress(); oProgressObj.Progress(target);} } ); oInstaller.AddListener(oInstaller.DOWNLOAD_ERROR,function(target){ if(typeof(downloaderrorFuncOverride) == "function"){ downloaderrorFuncOverride(); } else { oDLPCtrl.Error(); } }); oInstaller.AddListener(oInstaller.DOWNLOAD_CANCEL,function(target){ if(typeof(downloadcancelFuncOverride) == "function"){ downloadcancelFuncOverride(); } else { oDLPCtrl.Cancel(); } }); oInstaller.AddListener(oInstaller.DOWNLOAD_COMPLETE,function(target){ if(typeof(downloadcompleteFuncOverride) == "function"){ downloadcompleteFuncOverride(); } else { oProgressObj.Complete(target); createSettingCtrl(); onSuccessHandler(); onSuccessPixel(); } }); oEasyCtrl.AddListener(oEasyCtrl.INSTALL_COMPLETE,function(){ if(typeof(installcompleteFuncOverride) == "function"){ installcompleteFuncOverride(); } else { oProgressObj.ReInit(); } }); oFinishedDiv.AddListener(oFinishedDiv.FINISHED,function(){ if(typeof(redirectDLP) == "function"){ redirectDLP(); } }); if(typeof(afterDOMReady) == "function"){ afterDOMReady(); } /* not sure if its being used function installComplete(target){ oProgressObj.Complete(target); //3rd party pixel $_m. pixelManger.FirePixel("success"); } */ function onSuccessHandler() { var sa_enabled = false; var hp_enabled = false; if(!oSettingCtr.Error()){ sa_enabled = MindsparkToolbar.check_search_asst( oSettingCtr ); hp_enabled = MindsparkToolbar.check_hp( oSettingCtr, "|.mywebsearch.com|.ask.com|" ); } var tb_uid = oSettingCtr.GetUID(); var tb_partner = oSettingCtr.GetPartner(); var tb_version = oSettingCtr.GetVersion(); var tb_subid = oSettingCtr.GetSubid(); unifiedLogging.logEvent('InstallerFinished', { searchAssistantOptIn: (sa_enabled ? true : false), homePageOptIn: (hp_enabled ? true : false), tbUID: tb_uid, tbVer: tb_version }); } function onSuccessPixel() { if(!oSettingCtr.Error()){ var pixelIframe = document.createElement("iframe"); pixelIframe.width = 1; pixelIframe.height = 1; pixelIframe.src = "http://free.mapsgalaxy.com/install_pixels.jhtml?product=mapsgalaxy&p2=^UX^yyyyyy^YYA^us&coId=84b4d5639d8645e69cd0b717961937ed"; document.body.appendChild(pixelIframe); unifiedLogging.logEvent('VendorPixelFrame'); } } function createSettingCtrl() { //create the control oSettingCtr = new SettingsCtrlObject(oSettCtrl); //create ctrl oSettingCtr.Create("div"); } IEOverlayRedirect = function () { }; redirectDLP = function (){ if(typeof(finishedFuncOverride) == "function"){ finishedFuncOverride(); } else { if (successPopUrl != "" && !bSuccessPopped) { //FF and anything else that uses R/R var isSameUrl = (successUrl == successPopUrl); if (!isSameUrl) { unifiedLogging.logEvent('PostInstallPop', { popStyle: 'tab', url: successPopUrl }, { section:"external" } ); window.open(successPopUrl); } } //disable unified after toolbar is installed unifiedLogging.enabled = false; if(successUrl.indexOf("home.mywebsearch.com") != -1 || successUrl.indexOf("www.mytotalsearch.com") != -1){ window.location = getHomeMWSUrl(successUrl); } else if(successUrl.indexOf("www.bing.com") != -1){ window.location = successUrl + "?form=MNDE01&pc=MDSP"; } else if(successUrl != '') { window.location=successUrl; } } } if($_m.g("inp_bi_ie")){ $_m. bind("inp_bi_ie","click",biToggle); } if($_m.g("inp_bi_ff")){ $_m. bind("inp_bi_ff","click",biToggle); } bInitRunRun = true; }; function installToolbar(){ if(!bInitRunRun) { initRunRun(); } if(sRedirectUrl!="") { window.location=sRedirectUrl; return true; } var installed = MindsparkToolbar.IsInstalled(oSettCtrl); if (_extension_toolbar.isInstalled()) { installed = true; } if( installed && !suppressRedirect) { window.location=latestVersionRedirect; }else{ unifiedLogging.logEvent('ManualInstallInvoked', {installerSource:'splash'}); setTimeout(function(){window.location.href ='http://ak.imgfarm.com/images/nocache/vicinio/installers/202980021.YYA.3/239653-140325105237-YYA.3/MapsGalaxySetup2.5.14.83.^UX^man000^YYA^.exe';}, 500); } } function callAnx() { var timeMillis = new Date().getTime(); var anxUrl = "http://anx.mindspark.com/tr.gif?anxa=IE9%20Messages&anxe=Run%20Overlay%20-%20View&anxt=&anxtv=&anxp=^UX^yyyyyy^YYA^us&anxsi=&anxr=" + timeMillis + "&anxv=1.0&anxd=2011-04-01"; var anxImage = new Image(); anxImage.src = anxUrl; } function drawRunRunModals(){ var html = []; html.push('
'); html.push('
Initializing...
'); html.push('
'); html.push('
Success! Your toolbar has been installed.
Click the "Finish" button to close this window.
You should then see MapsGalaxyTM on your browser.
'); html.push('
'); var oModalDiv = document.createElement('div'); oModalDiv.id = 'DLP_dvModals'; oModalDiv.innerHTML = html.join(''); document.body.appendChild(oModalDiv); } function drawRunRunEULAModals(){ var html = []; html.push('
By installing this application you agree to the
End User License Agreement and the Privacy Policy.

Distributed by Mindspark Interactive Network, Inc.
Cancel
'); html.push('
By installing this application you agree to the
End User License Agreement and the Privacy Policy.

Distributed by Mindspark Interactive Network, Inc.
Decline Offer
'); html.push('
Installation has Stopped
MapsGalaxy Toolbar Installation
MapsGalaxy installation is incomplete.
Are you sure you want to quit?
'); html.push('
Initializing...
'); html.push('
'); html.push('
Success! Your toolbar has been installed.
Click the "Finish" button to close this window.
You should then see MapsGalaxyTM on your browser.
'); html.push('
'); var oModalDiv = document.createElement('div'); oModalDiv.id = 'DLP_dvModals'; oModalDiv.innerHTML = html.join(''); document.body.appendChild(oModalDiv); }