
//***************************************************************************
// setArcIMSApplicationPath.js

// ***************************************************************
// set hostApplicationPath to the full url
url = document.location.href;
hostApplicationPath = url; 

// if "website" exists in url, then set hostApplicationPath to the complete url 
// up to the "website" reference. This is done so that when ArcIMS applications
// are run through a proxy server that the url (and port reference) of 
// the server that the application originated from will be used for 
// constructing future url's in the application. This also enables 
// the application to run either through the proxy server
// or directly on the server where the application server is running.
// (intra or internet).

var websitePos=url.indexOf("/website");
if (websitePos > -1) {
   hostApplicationPath = url.substr(0,websitePos);
}
hostApplicationPath = "http://" + document.location.host
// ***************************************************************
