// aimsMultiServiceParam.js
/*
*  JavaScript parameter file for ArcIMS HTML Viewer Multiple MapService Sample
*		dependent on aimsXML.js, ArcIMSparam.js, aimsCommon.js, aimsMap.js, aimsIdentify.js, aimsSelect.js, and aimsLayers.js
*		To be interactive, dependent also on aimsDHTML.js, aimsClick.js, and aimsNavigation.js
*
*		Dependent on aimsMultiService.js
*/

var TYPE_BACKGROUND = 'background';
var TYPE_PRODUCT = 'product';
var TYPE_BOOST = 'boost';
var TYPE_LOGIN_PRODUCT = 'login_product';

// the default page that is displayed when a services help link is followed
var defaultHelpPage = 'blank.htm';
// the default page that is displayed when a services info link is followed
var defaultInfoPage = 'blank.htm';

// used as an index to the various service arrays
var counter = 0;

var oldServerURL = serverURL;

mapService[counter] = 'img_portlet';
mapServiceList[counter] = serverURL + imgService;
mapServiceName[counter] = "Imagery";
mapServiceVisible[counter] = 1;
serviceType[counter] = TYPE_BACKGROUND;
serviceHelpPage[counter] = 'help/image.htm';
serviceInfoPage[counter] = defaultInfoPage;
counter++;

mapService[counter] = 'topo_portlet';
mapServiceList[counter] = serverURL + topoService;
mapServiceName[counter] = "Topographic";
mapServiceVisible[counter] = 1;
serviceType[counter] = TYPE_BACKGROUND;
serviceHelpPage[counter] = 'help/topographic.htm';
serviceInfoPage[counter] = defaultInfoPage;
counter++;

mapService[counter] = 'cad_portlet';
mapServiceList[counter] = serverURL + cadService;
mapServiceName[counter] = "Cadastral";
mapServiceVisible[counter] = 1;
serviceType[counter] = TYPE_BACKGROUND;
serviceHelpPage[counter] = 'help/cadastre.htm';
serviceInfoPage[counter] = defaultInfoPage;
counter++;

mapService[counter] = 'cadboost_portlet';
mapServiceList[counter] = serverURL + cadboostService;
mapServiceName[counter] = "Cad Boost";
mapServiceVisible[counter] = 0;
serviceType[counter] = TYPE_LOGIN_PRODUCT;
serviceHelpPage[counter] = 'help/cadastre.htm';
serviceInfoPage[counter] = defaultInfoPage;
counter++;

mapService[counter] = 'img_index_topo';
mapServiceList[counter] = serverURL + prodTopoService;
mapServiceName[counter] = "Topo Maps";
mapServiceVisible[counter] = 0;
serviceType[counter] = TYPE_PRODUCT;
serviceHelpPage[counter] = 'help/mapcatalogue.htm';
serviceInfoPage[counter] = 'view.html';
counter++;

mapService[counter] = 'img_index_airview';
mapServiceList[counter] = serverURL + prodAirviewService;
mapServiceName[counter] = "Aerial Photos";
mapServiceVisible[counter] = 0;
serviceType[counter] = TYPE_PRODUCT;
serviceHelpPage[counter] = 'help/airview.htm';
serviceInfoPage[counter] = 'view.html';
counter++;

mapService[counter] = 'Sydnet_Sites';
mapServiceList[counter] = serverURL + prodSydnetService;
mapServiceName[counter] = "SydNET";
mapServiceVisible[counter] = 0;
serviceType[counter] = TYPE_LOGIN_PRODUCT;
serviceHelpPage[counter] = 'help/sydnet.htm';
serviceInfoPage[counter] = 'SYDNET_Stations.htm';
//serviceInfoPage[counter] = 'http:///db2rinex';
applicationId[counter] = 7;
counter++;

mapService[counter] = 'crown_portlet';
mapServiceList[counter] = serverURL + prodCrownService;
mapServiceName[counter] = "Crown Reserve";
mapServiceVisible[counter] = 0;
serviceType[counter] = TYPE_LOGIN_PRODUCT;
serviceHelpPage[counter] = 'help/crownReserve.htm';
//serviceInfoPage[counter] = 'searchCrown.html';
serviceInfoPage[counter] = 'search.jsp?searchType=crownReserve';
applicationId[counter] = 8;
counter++;

// To connect to external services Esrimap_prop must have the following settings:
// redirect=True
// redirectableHosts=*

serverURL = oldServerURL;

// index of current active MapService
// when changed, update the value of imsURL in ArcIMSparam(61)
activeMapServiceIndex = cadServiceID;

// MapService to be used for top overlay image layer - scalebar, northarrow, copyright
// image type must be transparent capable
var topMapServiceURL = mapServiceList[activeMapServiceIndex];
// does the top overlayer mapservice require commas instead of periods in decimals? French, German, etc.
var commaUsedInTopLayer = false;
// number of defined MapServices. Automatically defined by viewer.
mapServiceCount = mapServiceList.length;
// URL of current active MapService
activeMapService = mapServiceList[activeMapServiceIndex];

// able to add or delete mapservices
canManageMapServices=false
// message if mapservice image type cannot be transparent
var noTransMessage = "The Image Type for this MapService does not support transparency. It will hide any MapServices below it. Continue?";
// list of hosts allowed to access. Delimited by commas (",").
// The names listed should correspond with names defined in esrimap_prop for redirection
//availableHostsList = "";
//availableHostsList = "smswebdev,smsweb1,smsweb2,smsweb3,srv-bx-web4";
availableHostsList = "smsweb2,smsweb3,srv-bx-uat1,srv-bx-web3,srv-bx-web4";
// array for available hosts. Automatically defined by viewer from availableHostsList string.
if (availableHostsList!="")
{
  availableHostsList = hostName + "," + availableHostsList;
}
else
{
  availableHostsList = hostName;
}
availableHosts = availableHostsList.split(",");
//alert("Available Hosts: " + availableHosts.length);
