wdgt H T 4 4 }4 4
Resources/en/aboutscreen_search.png
Arial
12
version
230
120
#ffffff
Arial
12
278
120
#ffffff
Arial
10
Copyright © 2007 America Online Inc.
138
135
#ffffff
Arial
10
All rights reserved
228
150
#5f5f5f
mainWindow
258
347
left
0
0
mainWindow.hOffset = 10 + screen.availLeft;
mainWindow.vOffset = 10 + screen.availTop;
background
0
0
hotSearchTimeStamp
#FFFFFF
#000000
0
arial
13
left
114
13
false
searchTextButton
38
185
hoverSearchTextButton();
restSearchTextButton();
onSearch();
collapseButton
1
329
124
onCollapse();
expandButton
false
74
124
onExpand();
updateWindow
235
140
0
1
255
updateHoriDiv
8
119
updateVertDiv
114
119
true
true
0
true
p P UN H // ****************************************************************************
//
// Copyright 2007 AOL LLC All rights reserved.
// This software contains valuable confidential and proprietary information
// of AOL LLC and is subject to applicable licensing agreements.
// Unauthorized reproduction, transmission or distribution of this file and
// its contents is a violation of applicable laws.
//
// A O L L L C C O N F I D E N T I A L
//
// ****************************************************************************
///////////////////////////////////////////////////////////////////////////////
// This file contains utilities for the konfabulator widgets. These utilities
// are product agnostic - this code should be reusable between other AOL
// konfabulator widgets.
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// General utils
///////////////////////////////////////////////////////////////////////////////
function makeUserAgent(product, version, platform)
{
//ex: "AOLSearchGadget/1.0.0.6 (Windows NT 6.0)"
var userAgent = product + "/" + version + " " + "(" + platform + ")";
return userAgent;
}
///////////////////////////////////////////////////////////////////////////////
// Utils for update mechanism
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// checkForUpdates
//
// params:
// productName - product name
// buildName - CM product name
// version - version number of product
// locale - ex: "en-US"
// platform - ex: "Windows NT 6.0"
// callbackFunc - function that handles update information for caller
// - must take 4 parameters: displayUrl, downloadUrl, description, mandatoryFlag
//////////////////////////////////////////////////////////////////////////////
function checkForUpdates(productName, buildName, version, locale, platform, callbackFunc)
{
clearUpdateCheck(productName);
var updateServer = "http://gadgetupd.web.aol.com/checkForUpdates/checkForUpdates.php";
var userAgent = makeUserAgent(productName, version, platform);
//platform apis appear to handle url encoding the parameters with spaces in them, so send them on up
var updateRequestUrl = updateServer + "?" + "locale=" + locale + "&" + "product=" + buildName + "&" + "version=" + version + "&" + "platform=" + platform + "&" + "format=text";
var displayUrl = "";
var downloadUrl = "";
var updateDescription = "";
var updateMandatoryFlag = false;
try
{
var xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET", updateRequestUrl, true);
xmlhttp.setRequestHeader("If-Modified-Since", "Thu, 1 Jan 1970 00:00:00 GMT"); //always fetch it
if (userAgent.length > 0)
{
xmlhttp.setRequestHeader("User-Agent", userAgent);
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4)
{
if (xmlhttp.status == 200)
{
responseLength = xmlhttp.getResponseHeader("Content-Length");
if (responseLength > 0)
{
var responseText = xmlhttp.responseText;
var replyArray = responseText.split(";");
displayUrl = replyArray[0];
downloadUrl = replyArray[1];
updateDescription = replyArray[2];
updateMandatoryFlag = replyArray[3];
if ((displayUrl.length > 0))
{
callbackFunc(displayUrl, downloadUrl, updateDescription, updateMandatoryFlag);
}
}
}
}
}
xmlhttp.send(null);
}
catch(e)
{
}
}
///////////////////////////////////////////////////////////////////////////////
// setNextUpdateCheck
//
// params:
// productName - unique identifier for this product (used to persist and look
// up the offset)
// offset - how far in the future to do next update check (milliseconds)
//////////////////////////////////////////////////////////////////////////////
function setNextUpdateCheck(productName, offset)
{
//persist check again time
var curDate = new Date();
var nextCheckTime = new Date(curDate.getTime() + offset);
var nextCheckUTCTime = nextCheckTime.toUTCString();
preferences.nextUpdateCheck.value = nextCheckUTCTime;
}
///////////////////////////////////////////////////////////////////////////////
// clearNextUpdateCheck
//
// Clears persisted time for next update check.
//
// params:
// productName - unique identifier for this product (used to persist and look
// up the offset)
//////////////////////////////////////////////////////////////////////////////
function clearUpdateCheck(productName)
{
preferences.nextUpdateCheck.value = "";
}
///////////////////////////////////////////////////////////////////////////////
// shouldCheckForUpdate
//
// If a preference was set using setNextUpdateCheck - checks current time against
// that time and returns true if the current time is later. If no time has
// been persisted, this function also returns true.
//
// params:
// productName - unique identifier for this product (used to persist and look
// up the offset)
//////////////////////////////////////////////////////////////////////////////
function shouldCheckForUpdate(productName)
{
var shouldCheck = true;
var curTime = new Date();
var nextUpdateTimeStr = preferences.nextUpdateCheck.value;
if ((nextUpdateTimeStr.length == 0) || (nextUpdateTimeStr == "undefined"))
{
shouldCheck == true;
}
else
{
var nextUpdateTime = new Date(nextUpdateTimeStr);
if (nextUpdateTime.getTime() > curTime.getTime())
{
shouldCheck = false;
}
}
return shouldCheck;
}
p c 4 // ****************************************************************************
//
// Copyright 2007 AOL LLC All rights reserved.
// This software contains valuable confidential and proprietary information
// of AOL LLC and is subject to applicable licensing agreements.
// Unauthorized reproduction, transmission or distribution of this file and
// its contents is a violation of applicable laws.
//
// A O L L L C C O N F I D E N T I A L
//
// ****************************************************************************
var g_omnitureUrl = "http://aol.122.2o7.net/b/ss//6";
var visitoridKey = "HKCU\\Software\\AOL\\gadgetUniqueId";
var reportsuiteid = "aolvistagadgets";
var pagename = "ydg : AOL Search Gadget : ";
var channel ="us.vistagadgets";
//page names for events
var pagenameHeartbeat = "Daily Heartbeat";
var pagenameDock = "Dock Gadget";
var pagenameUndock = "Undock Gadget";
var pagenameSearchDocked = "Search Initiated - Docked";
var pagenameSearchUndocked = "Search Initiated - Undocked";
var pagenameUpdateAvailable = "Update Available";
var pagenameUpdateAccepted = "Update Accepted";
var pagenameUpdatePostponed = "Update Postponed";
function PostOmnitureEvent(theEvent)
{
var retVal = false;
try
{
var xmlhttp = getXMLHttp();
var dom = getXMLDOM();
var pagenameEvent;
var xmlMessage = "";
xmlMessage += "";
xmlMessage += "1.0";
xmlMessage += ""+reportsuiteid+"";
if (theEvent == "Daily Heartbeat")
{
pagenameEvent = pagename + pagenameHeartbeat;
}
else if (theEvent == "Dock")
{
pagenameEvent = pagename + pagenameDock;
}
else if (theEvent == "Undock")
{
pagenameEvent = pagename + pagenameUndock;
}
else if (theEvent == "Search - Docked")
{
pagenameEvent = pagename + pagenameSearchDocked;
}
else if (theEvent == "Search - Undocked")
{
pagenameEvent = pagename + pagenameSearchUndocked;
}
else if (theEvent == "Update Available")
{
pagenameEvent = pagename + pagenameUpdateAvailable;
}
else if (theEvent == "Update Accepted")
{
pagenameEvent = pagename + pagenameUpdateAccepted;
}
else if (theEvent == "Update Postponed")
{
pagenameEvent = pagename + pagenameUpdatePostponed;
}
xmlMessage += ""+pagenameEvent+"";
xmlMessage += ""+getVisitorId()+"";
xmlMessage += "ydg : AOL Search Gadget";
xmlMessage += "" + "ydg : " + theEvent + "";
xmlMessage += "non-authenticated";
xmlMessage += "";
xmlMessage += "" + widget.version + "";
xmlMessage += "" + system.platform + "";
xmlMessage += ""+channel+"";
xmlMessage += "event10"
xmlMessage += "USD";
xmlMessage += "";
xmlhttp.open("POST", g_omnitureUrl, false);
xmlhttp.setRequestHeader("Host", "aol.122.2o7.net");
xmlhttp.setRequestHeader("Content-Length", xmlMessage.length);
xmlhttp.setRequestHeader("User-Agent", makeUserAgent(widget.getLocalizedString("LOCAL_PRODUCT_NAME"), widget.version, system.platform));
xmlhttp.send(xmlMessage);
retVal = true;
dom = null;
xmlhttp = null;
}
catch(e)
{
retVal = false;
}
return retVal;
}
function getVisitorId()
{
var uniqueId ="";
var oShell = COM.createObject("WScript.Shell");
try
{
uniqueId = oShell.RegRead(visitoridKey);
}
catch(err)
{
uniqueId = createUniqueId();
oShell.RegWrite(visitoridKey, uniqueId);
}
return uniqueId;
}
function createUniqueId()
{
var id = createGUID();
var retVal;
var idarray = id.split("-");
id = "";
for (var i=0; i < idarray.length; i++)
{
id += idarray[i];
}
retVal = id.slice(1,16) + "-" + id.slice(16, -3);
return retVal;
}
function createGUID()
{
try
{
var x = COM.createObject("Scriptlet.TypeLib");
return (x.GUID);
}
catch (e)
{
return ("error creating GUID");
}
}
function getXMLHttp()
{
var progIDs = ['Msxml2.XMLHTTP.6.0','Msxml2.XMLHTTP.3.0'];
for (var i = 0; i < progIDs.length; i++)
{
try
{
var xmlHTTP = new COM.createObject(progIDs[i]);
return xmlHTTP;
}
catch (ex)
{
}
}
return null;
}
function getXMLDOM()
{
var progIDs = ['Msxml2.DOMDocument.6.0','Msxml2.DOMDocument.3.0'];
for (var i = 0; i < progIDs.length; i++)
{
try
{
var xmlDOM = new COM.createObject(progIDs[i]);
return xmlDOM;
}
catch (ex)
{
}
}
return null;
}
) UN PNG
IHDR p n( gAMA 7 tEXtSoftware Adobe ImageReadyqe<