// search.js

var IsIndex  = window.location.href.indexOf("/index.html") != -1;
var IsSearch = window.location.href.indexOf("/search.html") != -1;
var SearchPath = '';


// Template
// if (){ SearchPath = '' + 'search.html'; }


// #region Doc Gen Services
// 2023-04-21: All landing page items accounted for
if (IsDefaultDataUserGuide){ SearchPath = '/ExpereEZConfig/DefaultData/UserGuide/' + 'search.html'; }
if (IsDefaultDataInstallGuide){ SearchPath = '/ExpereEZConfig/DefaultData/InstallationGuide/' + 'search.html'; }
if (IsDefaultDataODInstGuide){ SearchPath = '/ExpereEZConfig/DefaultData/OD-InstallGuide/' + 'search.html'; }
if (IsDefaultDataUpgradeGuide){ SearchPath = '/ExpereEZConfig/DefaultData/UpgradeGuide/' + 'search.html'; }
if (IsDefaultDataWebServGuide){ SearchPath = '/ExpereEZConfig/DefaultData/WebServicesGuide/' + 'search.html'; }
if (IsDGSChangelog){ SearchPath = '/DGS/Change-Log/' + 'search.html'; }
if (IsDGSImpStrat){ SearchPath = '/DGS/Implementation-Strategies/' + 'search.html'; }
if (IsDGSMgmtToolGuide){ SearchPath = '/DGS/Management-Tool/' + 'search.html'; }
if (IsDGSODInstallGuide){ SearchPath = '/DGS/OD-Installation-Guide/' + 'search.html'; }
if (IsDGSServInstallGuide){ SearchPath = '/DGS/Installation-Guide/' + 'search.html'; }
if (IsDGSServUpgradeGuide){ SearchPath = '/DGS/Upgrade-Process/' + 'search.html'; }
if (IsDGSToolSuite){ SearchPath = '/DGS/Tool-Suite/' + 'search.html'; }
if (IsDGSWebServices){ SearchPath = '/DGS/Web-Services/' + 'search.html'; }
if (IsEOriginalQuickGuide){ SearchPath = '/Expere/eOriginal/QuickGuide/' + 'search.html'; }
if (IsEZConfConsChangelog){ SearchPath = '/ExpereEZConfig/ChangeLog/' + 'search.html'; }
if (IsEZGatewayInstallGuide){ SearchPath = '/ExpereEZConfig/EZGateway/InstallGuide/' + 'search.html'; }
if (IsEZGatewayODInstGuide){ SearchPath = '/ExpereEZConfig/EZGateway/OD-Installation-Guide/' + 'search.html'; }
if (IsEZGatewayWebServGuide){ SearchPath = '/ExpereEZConfig/EZGateway/WebServices/' + 'search.html'; }
if (IsOAuthSetupGuide){ SearchPath = '/OAuth/Setup/' + 'search.html'; }
if (IsPnPInstallGuide){ SearchPath = '/ExpereEZConfig/InstallGuide/' + 'search.html'; }
if (IsPNPUpgradeGuide){ SearchPath = '/ExpereEZConfig/PackagesAndPackets/UpgradeGuide/' + 'search.html'; }
if (IsPNPUserGuide){ SearchPath = '/ExpereEZConfig/PackagesAndPackets/UserGuide/' + 'search.html'; }
if (IsPNPWebServGuide){ SearchPath = '/ExpereEZConfig/WebservicesGuide/' + 'search.html'; }
// #endregion

// #region Authoring
// 2023-04-21: All landing page items accounted for
if (IsAdminToolUG){ SearchPath = AdminToolUG + 'search.html'; }
if (IsAuthoringChangelog){ SearchPath = AuthoringRN + 'search.html'; }
if (IsAuthoringEnvInstUg){ SearchPath = AuthoringEnvInstUg + 'search.html'; }
if (IsDictionaryViewerUG){ SearchPath = DictionaryViewerUG + 'search.html'; }
if (IsEngineInstallationUG){ SearchPath = EngineInstallationUG + 'search.html'; }
if (IsReqEd3UG){ SearchPath = ReqEd3UG + 'search.html'; }
if (IsReqEd4UG){ SearchPath = ReqEd4UG + 'search.html'; }
// #endregion

// #region Engine
// 2023-04-21: All landing page items accounted for
if (IsDocViewerChangelog){ SearchPath = DocViewerChangelog + 'search.html'; }
if (IsDocViewerIntGuide){ SearchPath = DocViewerIntGuide + 'search.html'; }
if (IsDocViewerUserGuide){ SearchPath = DocViewerUserGuide + 'search.html'; }
if (IsEngineChangelog){ SearchPath = EngineChangelog + 'search.html'; }
if (IsExpereDeveloperGuide){ SearchPath = ExpereDeveloperGuide + 'search.html';}
if (IsExpereImpGuide){ SearchPath = ExpereImpGuide + 'search.html'; }
if (IsExpereSystemReq){ SearchPath = ExpereSystemReq + 'search.html'; }
if (IsExpereTestingSystem){ SearchPath = ExpereTestingSystem + 'search.html'; }
// #endregion

// #region I-32
// 2023-04-27: All landing page items accounted for
// if (IsI32){ SearchPath = '' + 'search.html'; }
if (IsI32Changelog){ SearchPath = I32Changelog + 'search.html'; }
if (IsI32FormsDesignUG){ SearchPath = I32FormsDesignUG + 'search.html'; }
if (IsI32ImageUpdateUG){ SearchPath = I32ImageUpdateUG + 'search.html'; }
// #endregion

// #region WK-ESign
// 2023-04-27: All landing page items accounted for
if (IsWKESignCaptureGuide){ SearchPath = WKESignCaptureGuide + 'search.html'; }
if (IsWKESignFAQ){ SearchPath = WKESignFAQ + 'search.html'; }
if (IsWKESignLegacyUserGuide){ SearchPath = WKESignLegacyUserguide + 'search.html'; }
if (IsWKESignOnsiteUG){ SearchPath = WKESignOnsiteUG + 'search.html'; }
if (IsWKESignPushStatusUG){ SearchPath = WKESignPushStatusUG + 'search.html'; }
if (IsWKESignReleaseNotes){ SearchPath = WKESignReleaseNotes + 'search.html'; }
if (IsWKESignSysReq){ SearchPath = WKESignSysReq + 'search.html'; }
if (IsWKESignUserGuide){ SearchPath = WKESignUserGuide + 'search.html'; }
if (IsWKESignWebServices){ SearchPath = WKESignWebServices + 'search.html'; }
// #endregion

// #region WK-Hosted-Expere (EDS)

if (IsWKHostedChangelog){ SearchPath = '/WK-Hosted-Expere/Change-Log/' + 'search.html'; }
if (IsWKHostedImpStrat){ SearchPath = '/WK-Hosted-Expere/Implementation-Strategies/' + 'search.html'; }
if (IsWKHostedToolSuite){ SearchPath = WKHostedToolSuite + 'search.html'; }
if (IsWKHostedWebServices){ SearchPath = '/WK-Hosted-Expere/Web-Services/' + 'search.html'; }
// #endregion

// #region Lending Systems
if (IsAssumptions){ SearchPath = Assumptions + 'search.html'; }
if (IsMortgage){ SearchPath = Mortgage + 'search.html'; }
if (IsSecAdmin){ SearchPath = SecAdmin + 'search.html'; }
if (IsSecAdminSelfHosted){ SearchPath = SecAdminSelfHosted + 'search.html'; }
if (IsVanceo){ SearchPath = Vanceo + 'search.html'; }
// #endregion



if (!IsIndex && !IsSearch){
    $('#searchForm').attr('action', SearchPath);
}

// console.log("SearchPath = " + SearchPath);