home *** CD-ROM | disk | FTP | other *** search
- <HTML>
- <HEAD>
- <SCRIPT LANGUAGE="Javascript1.2">
-
- ///////////////// BEGIN FLYOBJECTS ///////////////////////////////
- //------------------------------------------
- // catch javascript errors
- //------------------------------------------
- function myonerror(msg, URL, lineNum) {
- /*
- window.alert("!!! A Javascript error has occurred !!!\n\n" +
- "Msg:\t" + msg + "\n" +
- "URL:\t" + URL + "\n" +
- "Line:\t" + lineNum + "\n\n" +
- "Please email clientdev@flyswat.com immediately!\n\n" +
- "NOTE: This message should only appear internally.");
- */
- return true;
- }
- window.onerror = myonerror;
- //------------------------------------------
-
- var flyobjectsversion = 8;
-
- // Javascript Objects which are used by the Win32 code
- // when generating data.
- // Any of the flystyle pages should be able to assume that
- // these data structures are present.
-
- //------------------------------------------------------------------
- // The environment object
- //------------------------------------------------------------------
- function FSSystemEnvironment(userID, serialNum, sessionID, distTag, buildNum)
- {
- this.userID = userID;
- this.serialNum = serialNum;
- this.sessionID = sessionID;
- this.distTag = distTag;
- this.buildNum = buildNum;
- }
-
- function FSLinksEnvironment(redURL, src, requestID, isValidLinksSet)
- {
- this.redURL = redURL;
- this.src = src;
- this.requestID = requestID;
- if (isValidLinksSet.toLowerCase() == "true") {
- this.isValidLinksSet = true;
- }
- else {
- this.isValidLinksSet = false;
- }
- }
-
- //------------------------------------------------------------------
-
-
- //------------------------------------------------------------------
- // The category object
- //------------------------------------------------------------------
- function FSCategory(name, keywords, hidden, boosterPackCategory, bpID, bpRev)
- {
- this.name = name;
- this.keywords = keywords;
- this.hidden = hidden;
- this.boosterPackCategory = boosterPackCategory;
- this.bpID = bpID;
- this.bpRev = bpRev;
-
- /* display properties */
- this.globalID;
- this.keyListID;
- this.expandImageID;
- this.keyListShowing;
-
- /* display functions */
- this.initializeDisplayProperties = initializeCategoryDisplayProperties;
- this.showKeyList = showKeyList;
- this.hideKeyList = hideKeyList;
- }
-
- function initializeCategoryDisplayProperties(cat)
- {
- this.globalID = setGlobalID("CAT");
- this.keyListID = setGlobalID("KEYLIST");
- this.expandImageID = setGlobalID("CATEXPANDIMG");
- this.keyListShowing = false;
- }
-
- function hideKeyList()
- {
- with (eval("document.all." + this.keyListID)) {
- style.display = "none";
- this.keyListShowing = false;
- }
-
- if (FS_WINDOW_TYPE == "POPUP") {
- with (eval("document.all." + this.expandImageID)) {
- src = DownNormal.src;
- }
- }
- }
-
- function showKeyList(cat)
- {
- with (eval("document.all." + this.keyListID)) {
- if (innerHTML == "") {
-
- if (FS_WINDOW_TYPE == "POPUP") {
- innerHTML = assemblePopupKeyListHTML(cat);
- }
- else {
- innerHTML = assembleVertKeyListHTML(cat);
- }
-
- if (FS_WINDOW_TYPE == "POPUP") {
- //also show link types
- for (var k in this.keywords) {
- if (!this.keywords[k].ltListShowing) {
- this.keywords[k].showLTList(cat,k);
- }
- }
- }
-
- }
- style.display = "block";
- this.keyListShowing = true;
-
- }
-
- if (FS_WINDOW_TYPE == "POPUP") {
- with (eval("document.all." + this.expandImageID)) {
- src = UpNormal.src;
- }
- }
-
- if ((FS_WINDOW_TYPE == "SEARCH") || (FS_WINDOW_TYPE == "LINKS_LIST"))
- scrollVertPanel("document.all." + this.globalID, "document.all." + this.keyListID);
- }
-
-
- //key list used only in vertical panel
- function initializeKeyListHTML(cat)
- {
- var keywords = this.keywords;
- var keyHTML = "";
- var catWideHTML = "";
- for (var k in keywords) {
- keywords[k].initializeDisplayProperties(cat, k);
- if (keywords[k].categoryWide)
- catWideHTML += keywords[k].HTML;
- else
- keyHTML += keywords[k].HTML;
- }
-
- this.keyListHTML = combineKeyAndCatWideHTML(keyHTML, catWideHTML);
-
- }
-
- //------------------------------------------------------------------
-
-
- //------------------------------------------------------------------
- // The keyword object
- //------------------------------------------------------------------
- function FSKeyword(name, code, linktypes, mt, cat, categoryWide, categoryCode)
- {
- this.name = name;
- this.code = code;
- this.mt = mt;
- this.linktypes = linktypes;
- this.category = cat;
- this.categoryWide = categoryWide;
- this.categoryCode = categoryCode;
-
- /* display properties */
- this.globalID;
- this.ltListID;
- this.ltListShowing;
-
- /* display functions */
- this.initializeDisplayProperties = initializeKeywordDisplayProperties;
- this.showLTList = showLTList;
- this.hideLTList = hideLTList;
- }
-
- function initializeKeywordDisplayProperties(cat, k)
- {
- this.globalID = setGlobalID("KEY");
- this.ltListID = setGlobalID("LTLIST");
- this.ltListShowing = false;
- }
-
- function initializeVertKeywordDisplayProperties(cat, k)
- {
- this.globalID = setGlobalID("KEY");
- this.ltListID = setGlobalID("LTLIST");
- this.ltListShowing = false;
-
- if (this.categoryWide) {
- //put provider list in place of lt list
- var linktype = this.linktypes[0];
- this.ltListID = linktype.providerListID;
- linktype.initializeDisplayProperties(cat, k, 0);
- this.vertHTML = assembleVertKeywordCatWideHTML(this.categoryCode, this.name, this.globalID, linktype.URL, linktype.providers,
- linktype.providerListID, linktype.expandImageID, cat, k, 0);
- }
- else {
- this.vertHTML = assembleVertKeywordHTML(this.name, this.globalID, cat, k);
- }
-
- }
-
- function hideLTList()
- {
- with (eval("document.all." + this.ltListID)) {
- style.display = "none";
- this.ltListShowing = false;
- }
- }
-
- function showLTList(cat, k)
- {
- with (eval("document.all." + this.ltListID)) {
-
- if (innerHTML == "") {
- innerHTML = assembleLTListHTML(cat, k);
- }
-
- style.display = "block";
- this.ltListShowing = true;
- }
-
- if ((FS_WINDOW_TYPE == "SEARCH") || (FS_WINDOW_TYPE == "LINKS_LIST")) {
- scrollVertPanel("document.all." + this.globalID, "document.all." + this.ltListID);
- }
- }
-
-
- //------------------------------------------------------------------
-
-
- //------------------------------------------------------------------
- // The linktype object
- //------------------------------------------------------------------
- function FSLinkType(name, type)
- {
- this.name = name;
- this.type = type;
-
- /* display properties */
- this.globalID;
- this.URL;
-
- this.providers;
- this.providerListID;
- this.expandImageID;
- this.providerListHTML;
- this.showProviderList = showProviderList;
- this.hideProviderList = hideProviderList;
- this.providerListShowing;
-
- /* display functions */
- this.initializeDisplayProperties = initializeLinkTypeDisplayProperties;
- }
-
- function initializeLinkTypeDisplayProperties(cat, k, l)
- {
- this.globalID = setGlobalID("LT");
- this.providerListID = setGlobalID("PROVLIST");
- this.expandImageID = setGlobalID("LTEXPANDIMG");
- this.URL = "flyswat:clickthrough2:" + assembleFSURL(cat, k, l);
- this.providers = fsproviderhash.GetProviderList(this.type);
- this.providerListShowing = false;
- }
-
- function hideProviderList()
- {
- with (eval("document.all." + this.providerListID)) {
- style.display = "none";
- this.providerListShowing = false;
- }
-
- with (eval("document.all." + this.expandImageID)) {
- src = PlusNormal.src;
- }
- }
-
- function showProviderList(cat, k, l)
- {
- with (eval("document.all." + this.providerListID)) {
-
- if (innerHTML == "") {
- innerHTML = assembleProviderListHTML(cat, k, l);
- }
- style.display = "block";
- this.providerListShowing = true;
- }
-
- with (eval("document.all." + this.expandImageID)) {
- src = MinusNormal.src;
- }
-
- if ((FS_WINDOW_TYPE == "SEARCH") || (FS_WINDOW_TYPE == "LINKS_LIST")) {
- if (fscategories[cat].keywords[k].categoryWide)
- scrollVertPanel("document.all." + fscategories[cat].keywords[k].globalID, "document.all." + this.providerListID);
- else
- scrollVertPanel("document.all." + this.globalID, "document.all." + this.providerListID);
- }
- }
- //------------------------------------------------------------------
-
-
- //------------------------------------------------------------------
- // The provider object
- //------------------------------------------------------------------
- function FSProvider(tag, name, bFixed)
- {
- this.tag = tag;
- this.name = name;
- this.bFixed = bFixed;
-
- /* display properties */
- this.globalID;
- this.URL;
-
- /* display functions */
- this.initializeDisplayProperties = initializeProviderDisplayProperties;
- }
-
- function initializeProviderDisplayProperties(cat, k, l, p)
- {
- this.globalID = setGlobalID("PROV");
- this.URL = "flyswat:clickthrough2:" + assembleFSURL(cat, k, l, p);
- }
- //------------------------------------------------------------------
-
-
-
- // The global provider hash
- function FSProviderHash()
- {
- this.AddProviderList = fsprovhashAddProviderList;
- this.LinkTypeArray = new Array();
- this.ProviderListArray = new Array();
- this.index = 0;
- this.GetProviderList = fsGetProviderList;
- }
-
- // Add provider list to provider hash
- function fsprovhashAddProviderList(linktype, providerList)
- {
- this.LinkTypeArray[this.index] = linktype;
- this.ProviderListArray[this.index] = providerList;
- this.index++;
- }
-
- // Get provider list from provider hash
- function fsGetProviderList(linktype)
- {
- var providers = new Array();
- for (var l in this.LinkTypeArray)
- {
-
- if (this.LinkTypeArray[l] == linktype)
- {
- providers = this.ProviderListArray[l];
- return providers;
- }
- }
- return providers;
- }
-
-
-
- ///////////////// END FLYOBJECTS ///////////////////////////////