<!-- Version=2.50 Date=09/27/07 Name=accounts.js -->
//---- Copyright 2004 RuMe Interactive Corporation. All Rights Reserved ------
//
//                  Version :  Sep 27 2007
//
//   Modifications :
//    May 12,2010 : Created prep site for WWE - MK
//    May 11,2010 : Created prep site for office max 250 - MK
//    Mar 02,2010 : Created bank-temp for new testing - MK
//    Dec 31,2009 : Created Agilence to go live in 2010 - MK
//    Jul 13,2009 : Created Panera-prep and Panera went live - MK
//    May 29,2009 : Created gander prep and gander went live - mk
//    Mar 16,2009 : Create bankcap testing db - mk
//    Mar 02,2009 : Create lowes database - MK
//    Feb 13,2009 : Create sage database - MK
//    Feb 09,2009 : Create rcc-datashare - MK
//    Aug 14,2008 : Create cp3 database for airline demo - MK
//    Jun 20,2008 : Create cititrends live Database - MK
//    Feb 29,2008 : Create cititrends Database - MK
//    Feb 15,2008 : Create sage database - MK
//    Feb 07,2008 : Create hospitality-datashare database - MK
//    Jan 17,2008 : Create Stars 260 site - MK
//    Jan 14,2008 : Create TJX-transfer - MK
//    Dec 18,2007 : Create Nola-Han for Hosipital asset manager - MK
//    Oct 30,2007 : Move dollar-general to server 1 - MK
//    Oct 30,2007 : Hospitality demo for Joe - MK
//    Oct 22,2007 : Add preventis-cs for preventis customer support - MK
//    Oct 17,2007 : Create tiffany260 to test asset manager - MK
//    Oct 16,2007 : Create RF1 - MK
//    Oct 12,2007 : Create sample DB with no IICE numbers or records - MK
//    Oct 09,2007 : Add Target-crp on server 1 with server 4 database - MK
//    Sep 27,2007 : Add Nola250 for Rich - MK
//    Aug 21,2007 : Add preventis (brazilian company)- MK
//    Aug 20,2007 : Change supervalu to pricechopper - MK
//    Aug 10,2007 : Added apisdemo - for Stan - CZ
//    Jul 24,2007 : Added Demo251 --> Conversion of Code-Coop code to invision -- MK
//    May 31,2007 : Added tjx-prep  - CZ
//    May 14,2007 : Added prefumania-prep - JVT 
//    May 03,2007 : Add Bebe-prep - CZ
//    Feb 19,2007 : Add Charming-prep - CB
//    Jan 29,2007 : Add opendoor2007 - CB
//    Jan 26,2007 : Add saks-mssql-win32 - JC
//    Jan 08,2006 : Add guess-prep250 and ratner-prep250 - CB
//    Jan 08,2006 : Add winn-dixie-prep - CB
//    Dec 19,2006 : Add mervyns-prep - CB
//                : Add bloomingdales-prep-245 - oq
//    Dec 15,2006 : Add support company id - CB
//    Nov 27,2006 : Add nexcom-claims to 2.40 - CB
//    Nov 06,2006 : Add nexcom-prep to the 2.50 roster - CB
//    Sep 05,2006 : Change dollar general prep to 2.50 - CB
//    Aug 25,2006 : Update setting for Mervyns-Import - JC
//    Aug 17,2006 : Add Mervyns-Import - JC
//    Aug 01,2006 : Add OfficeMax-prep - CB
//    Jul 24,2006 : Set up Nexcom as an alias
//    Jul 19,2006 : Add ratner live - CB
//    Jul 18,2006 : Create THD alias for homedepot-prep - CB
//    Jul 13,2006 : Added walmart-prep and nordstrom-prep - MIK
//                : opendoor alias to walmart-prep - RH
//    Jul 07,2006 : Added demo250 - CB
//    See Top
//
//    Jan 25,2006 : Add saks-prep - CB
//    Jan 30,2006 : Added Mervyns-prep - CB
//    Feb 10,2006 : Add polo-pilot - CB
//    Feb 13,2006 : move KB Toys to invision - CB
//    Feb 21,2006 : Add bloomingdale-reports - CB
//    Mar 03,2006 : Add polo-reports - CB
//    Mar 09,2006 : add stage stores - CB
//    Mar 22,2006 : add nexcom-prep - CB
//    Apr 10,2006 : add sixflags-prep - CB
//    Apr 11,2006 : Move saks to 240 - CB
//    Apr 12,2006 : move polo and bloomingdale to 241 - CB
//    Apr 12,2006 : Add saks236 for review - CB
//    Apr 17,2006 : Add sixflags240 - JVT
//    Apr 17,2006 : Moved sixflags to 240 - JVT
//    Apr 21,2006 : Add stage-stores-import - JC
//    May 03,2006 : Move Mervyns to 245 - CB
//    May 08,2006 : Create ratner-prep - CB/JW
//    May 08,2006a : Create Ace-prep245; & kbtoys-prep245 - JW	
//    May 15,2006 : Add homedepot-prep and limited - prep to 250 - CB
//    May 26,2006 : Add demo245 - JW
//    Jun 01,2006 : Add Ux250 - RH
//    Jun 16,2006 : Add tiffany-prep to 250 - CB
//    Jun 22,2006 : Add polo-training to 241; lined up = char's - JW
//    See Top
//
// Do not modify 
  var MD5on = true;
  var MD5off= false;
  var MD5onoff = MD5off;		// Turn on or off password encryption
  var AccountSel = "demo";		// Selected account
  var AccountPath = "menu.html";	// Default path
  var AccountValid = false;		// valid account
  var AccountList = new Array();
  var AccountAliases = new Array();


// 0. Set up variables for system paths
  var Dev210Path    = "APIS210/PortalSystem/Core/Logon.asp";	// server 1
// send all 230 to server 2
  var Dev230Path    = "https://secure1.apisonline.com/APIS230/PortalSystem/Core/setcompany.asp"; // server 2
  var HomeDepot230Path = "https://secure1.apisonline.com/HomeDepot230/PortalSystem/Core/setcompany.asp"; // server 2
  var xDev230Path   = "https://secure1.apisonline.com/APIS235/PortalSystem/Core/setcompany.asp" // server 2
  var Invision235   = "http://www.apisenterprise.com/APIS235/PortalSystem/Core/setcompany.asp" // Balancer
  var Invision235_1 = "https://www1.apisenterprise.com/APIS235/PortalSystem/Core/setcompany.asp" // server 1
  var Invision235_2 = "https://www2.apisenterprise.com/APIS235/PortalSystem/Core/setcompany.asp" // server 2
  var Invision235_B = "https://www1.apisenterprise.com/APIS235/PortalSystem/Core/select_server.asp" //Load Balancer
  var Invision235_TB = "https://www2.apisenterprise.com/APIS235/PortalSystem/Core/select_server.asp" //Test Balancer
  var Invision235_B_NS = "http://www1.apisenterprise.com/APIS235/PortalSystem/Core/select_server.asp" //Load Balancer - Not Secure
  var Invision235_2_NS = "http://www2.apisenterprise.com/APIS235/PortalSystem/Core/setcompany.asp" // Server 2 - Not Secure
  
  var Rila = "https://www3.apisenterprise.com/Rila/menu.asp" // rila account
  
  var Invision235_IPB = "http://69.18.192.198/APIS235/PortalSystem/Core/select_server.asp" // IP Balancer

  var Invision236_IPB = "http://69.18.192.199/APIS236/PortalSystem/Core/select_server.asp" // IP Balancer
  var Invision236_B_NS = "http://www1.apisenterprise.com/APIS236/PortalSystem/Core/select_server.asp" //Load Balancer - Not Secure
  
  //var Invision236_B   = "https://www1.apisenterprise.com/APIS236/PortalSystem/Core/select_server.asp" //Load Balancer
  var Invision236_1 = "https://www1.apisenterprise.com/APIS241/PortalSystem/Core/setcompany.asp" // server 1
  var Invision236_2 = "https://www2.apisenterprise.com/APIS241/PortalSystem/Core/setcompany.asp" // server 2
  var Invision236_3 = "https://www3.apisenterprise.com/APIS236/PortalSystem/Core/setcompany.asp" // server 3
  
  var Invision236_B = "https://www2.apisenterprise.com/APIS236/PortalSystem/Core/setcompany.asp" // server 2

  var Invision240_N   = "http://www2.apisenterprise.com/APIS240N/PortalSystem/Core/setcompany.asp"
  var Invision240    = "http://www.apisenterprise.com/APIS240/PortalSystem/Core/setcompany.asp" // Balancer
  var Invision240_1  = "https://www1.apisenterprise.com/APIS240/PortalSystem/Core/setcompany.asp" // server 1
  var Invision240_2  = "https://www2.apisenterprise.com/APIS240/PortalSystem/Core/setcompany.asp" // server 2
  var Invision240_NS = "http://www2.apisenterprise.com/APIS240/PortalSystem/Core/setcompany.asp" // server 2
  var Invision240_B  = "https://www1.apisenterprise.com/APIS240/PortalSystem/Core/select_server.asp" //Load Balancer
  var Invision241_2  = "https://www2.apisenterprise.com/APIS241/PortalSystem/Core/setcompany.asp"
  var Invision245_3  = "https://www3.apisenterprise.com/APIS245/PortalSystem/Core/setcompany.asp" 
  var Invision250_3  = "https://www3.apisenterprise.com/APIS250/PortalSystem/Core/setcompany.asp"
  var Invision250_3_2  = "https://www3.apisenterprise.com/APIS252/PortalSystem/Core/setcompany.asp"
  var Invision251_3  = "https://www3.apisenterprise.com/APIS251/PortalSystem/Core/setcompany.asp"
  var InvisionN250_1  = "https://www1.apisenterprise.com/Nola250/PortalSystem/Core/setcompany.asp"
  var Uxbridge250    =   "https://www.apissupport.com" 

  var Invision250_2  = "https://www2.apisenterprise.com/APIS250/PortalSystem/Core/setcompany.asp"
  var InvisionPalm_2 = "https://www2.apisenterprise.com/palm_audit/PortalSystem/Core/setcompany.asp" //Load Balancer
  var Test210Path    = "PortalSystem/core/Logon.asp"
  
  var Invision260_1  = "https://www1.apisenterprise.com/APIS260/PortalSystem/Core/setcompany.asp"
  var InvisionS260_3 = "https://www3.apisenterprise.com/Support260/PortalSystem/Core/setcompany.asp"
  var Invision260_3  = "https://www3.apisenterprise.com/Apis260/PortalSystem/Core/setcompany.asp" 
  var Stars260_1     = "https://www1.apisenterprise.com/Stars260/PortalSystem/Core/setcompany.asp"
  var Stars260_3     = "https://www3.apisenterprise.com/Stars260/PortalSystem/Core/setcompany.asp"

// 1. Set up Account Aliases
  AccountAliases["bloom"]           = "bloomingdale";
  AccountAliases["bloomingdales"]   = "bloomingdale";
  AccountAliases["bloomingdale245"] = "blommingdales-prep-245";
  //AccountAliases["bloomingdale-prep-250"] = "blommingdales-prep-250";
  AccountAliases["6flags"]          = "sixflags";
  AccountAliases["home depot"]      = "homedepot";
  AccountAliases["kb"]              = "kaybeetoys";
  AccountAliases["kbtoys"]          = "kaybeetoys";
  AccountAliases["levitz"]          = "seamans";
  AccountAliases["limited brands"]  = "limited";
  AccountAliases["nexcom"]          = "nexcom-prep";
  AccountAliases["opendoor"]        = "walmart-prep";
  AccountAliases["palmer reifler"]  = "limited";
  AccountAliases["six flags"]       = "sixflags";
  AccountAliases["sport chalet"]    = "sportchalet";
  AccountAliases["lt"]              = "mayco";
  AccountAliases["rm"]              = "mayco";
  AccountAliases["c21"]             = "century21";
  AccountAliases["steveandbarrys"]  = "steveandbarry";
  AccountAliases["thd"]  	          = "homedepot-prep";
  AccountAliases["ace-prep245"]     = "ace";
  

// 2. Set up Account Elements
// Entry [0] is cookie to set which defines the database type and address in Portal.asp
// Entry [1] is the version of APIS to use by setting the path of the signon
// Entry [2] is whether to use password encryption
  AccountList["cardinal-adam"]        = ["cardinal-adam", "https://www1.apisenterprise.com/adam/PortalSystem/Core/setcompany.asp",  MD5off];
  AccountList["cardinal-apis"]        = ["cardinal-apis", "https://www1.apisenterprise.com/apis250/PortalSystem/Core/setcompany.asp",  MD5off]

  AccountList["apishr"]               = ["apishr",   "https://www3.apisenterprise.com/Master260/PortalSystem/Core/setcompany.asp",  MD5off]
  AccountList["apis_remote"] 	        = ["apis_remote",     Invision245_3,  MD5off];
  AccountList["cp3"]                  = ["cp3",   Invision250_3,  MD5off];
  AccountList["charming"]             = ["charming",   Invision250_3,  MD5off];
  AccountList["charming-prep"]        = ["charming-prep",   Invision250_3,  MD5off];
  //AccountList["charming-test"]        = ["charming-test","https://www3.apisenterprise.com/Demo250/PortalSystem/Core/setcompany.asp",  MD5off];
  AccountList["bebe-prep"]            = ["bebe-prep",       Invision250_3,  MD5off];  
  AccountList["bebe"]                 = ["bebe",            Invision250_3,  MD5off];  
  AccountList["limited-prep"]         = ["limited-prep",    Invision250_3,  MD5off]; 
  AccountList["homedepot-prep"]       = ["homedepot-prep",  Invision250_3,  MD5off]; 
  AccountList["tiffany-prep"]         = ["tiffany-prep",    Invision250_3,  MD5off]; 
  AccountList["tiffany-260"]          = ["tiffany-prep",  InvisionS260_3,  MD5off];
  AccountList["mervyns250-prep"]      = ["mervyns250-prep", Invision250_3,  MD5off];  
  AccountList["opendoor2007"]         = ["opendoor2007",    InvisionS260_3,  MD5off];
  
  AccountList["ace-prep245"]	      = ["ace", Invision245_3,  MD5off];
  AccountList["ace"] 	              = ["ace", Invision245_3,  MD5off];
  AccountList["bloomingdale"] 	      = ["bloomingdale", Invision245_3,  MD5off];
  AccountList["bloomingdale-live"]    = ["bloomingdale", Invision250_3,  MD5off];
  AccountList["bloomingdale-prep"]    = ["bloomingdale-prep", Invision250_3,  MD5off];
  AccountList["bloomingdale-reports"] = ["bloomingdale-reports", Invision240_2,  MD5off];
  
  AccountList["bloomingdales-prep-245"] = ["bloomingdales-prep-245", Invision245_3,  MD5off];
  
  AccountList["bloomingdale250"]      = ["bloomingdale250", Invision250_3,  MD5off];
  AccountList["sakshr"]               = ["sakshr", Invision250_3,  MD5off];  
  AccountList["macys-prep"]           = ["macys-prep", Invision240_2,  MD5off];
  AccountList["winn-dixie-demo"]      = ["winn-dixie-demo", Invision250_3,  MD5off];
  AccountList["ratner-prep250"]       = ["ratner-prep250", Invision250_3,  MD5off];
  AccountList["guess-prep"]        = ["guess-prep250", Invision250_3,  MD5off];
  AccountList["mervyns-prep"]         = ["mervyns-prep", Invision240_2,  MD5off];
  AccountList["mervyns-import"]       = ["mervyns-import", Invision245_3,  MD5off];
  AccountList["mervyns-import-local"] = ["mervyns-import-local", Test210Path,  MD5off];
  AccountList["mervyns245"]           = ["mervyns245", Invision245_3,  MD5off];
  AccountList["mervyns"]              = ["mervyns", Invision245_3,  MD5off];
  AccountList["nola"]                 = ["nola", InvisionN250_1, MD5off]; 
  AccountList["ratner-prep"]          = ["ratner-prep", Invision245_3,  MD5off];
  AccountList["ratner-prepv2"]        = ["ratner-prepv2", Invision250_3,  MD5off];
 //  AccountList["ratner"]               = ["ratner", Invision245_3,  MD5off];
  AccountList["ratner-236"]           = ["ratner-236", Invision245_3,  MD5off];
  AccountList["ratner-prep"]          = ["ratner-prep", Invision250_3,  MD5off];
  AccountList["ratner"]               = ["ratner", Invision250_3,  MD5off];
  AccountList["stars"]                = ["stars", Stars260_1,  MD5off];
//  AccountList["bloomingdale-test"]  = ["bloomingdale-test", xDev230Path,  MD5off];
  
  AccountList["century21"]    	      = ["century21", xDev230Path,  MD5off];
  AccountList["demo"]         	      = ["demo", Dev210Path,  MD5off];
  AccountList["demo230"]      	      = ["demo230", Dev230Path,  MD5off];
  AccountList["demo235"]      	      = ["demo235", Invision235_B,  MD5off];
  AccountList["demo236"]      	      = ["demo235", Invision236_B,  MD5off];
  AccountList["demo236i"]      	      = ["demo235", Invision236_IPB,  MD5off];
  AccountList["demo240"]      	      = ["demo240", Invision240_2,  MD5off];
  AccountList["demo245"]      	      = ["demo245", Invision245_3,  MD5off];
  
  AccountList["hospitality"]          = ["hospitality", Invision250_3,  MD5off];
  AccountList["hlp-datashare"]        = ["hlp-datashare", Invision250_3,  MD5off];
  AccountList["bank-cap-250"]         = ["bank-cap", "https://www3.apisenterprise.com/bankcap250/PortalSystem/Core/setcompany.asp",  MD5off];
  AccountList["bank-cap"]             = ["bank-cap", "https://www3.apisenterprise.com/bankcap260/PortalSystem/Core/setcompany.asp",  MD5off];
  AccountList["bank-temp"]            = ["bank-temp", "https://www3.apisenterprise.com/bankcap260/PortalSystem/Core/setcompany.asp",  MD5off];
  AccountList["bank-cap2"]            = ["bank-cap", "https://www3.apisenterprise.com/bankcap260v2/PortalSystem/Core/setcompany.asp",  MD5off];
  AccountList["bank-cap-test"]        = ["bank-cap-test", "https://www3.apisenterprise.com/bankcap260/PortalSystem/Core/setcompany.asp",  MD5off];
  AccountList["rcc-datashare"]        = ["rccdatashare", "https://www3.apisenterprise.com/bankcap260/PortalSystem/Core/setcompany.asp",  MD5off];
  AccountList["nfssc-datashare"]      = ["nfssc-datashare", "https://www3.apisenterprise.com/bankcap260/PortalSystem/Core/setcompany.asp",  MD5off];
  AccountList["nwa"]      	          = ["nwa", Invision250_3,  MD5off];
  AccountList["demo250"]      	      = ["demo250", Invision250_3,  MD5off];
  AccountList["sony"]      	          = ["sony", Invision250_3,  MD5off];
  AccountList["tkmaxx"]   	          = ["tkmaxx", Invision250_3,  MD5off];
  AccountList["panera"]      	        = ["panera", Invision250_3,  MD5off];
  AccountList["panera-prep"]      	  = ["panera-prep", Invision250_3,  MD5off];
  AccountList["firstcitizens"]      	= ["firstcitizens", Invision250_3,  MD5off];
  AccountList["gander"]      	        = ["gander", "http://www3.apisenterprise.com/apis250/PortalSystem/Core/setcompany.asp",  MD5off];
  AccountList["gander-prep"]      	  = ["gander-prep", "http://www3.apisenterprise.com/apis250/PortalSystem/Core/setcompany.asp",  MD5off];
  AccountList["circuit-city"]  	      = ["circuit-city", "https://www3.apisenterprise.com/ccapis250/PortalSystem/Core/setcompany.asp",  MD5off];
  AccountList["adam"]      	          = ["adam", "https://www3.apisenterprise.com/adam/PortalSystem/Core/setcompany.asp",  MD5off];
  AccountList["pra-cms"]      	      = ["pra-cms", "https://www3.apisenterprise.com/adam/PortalSystem/Core/setcompany.asp",  MD5off];
  AccountList["nordstrom-prep"]       = ["nordstrom-prep", "https://www3.apisenterprise.com/adam/PortalSystem/Core/setcompany.asp",  MD5off];

  AccountList["bank-cap-adam"] 	      = ["bank-cap-adam", "https://www3.apisenterprise.com/adam/PortalSystem/Core/setcompany.asp",  MD5off];
  AccountList["capindex-cms"]      	  = ["capindex-cms", "https://www3.apisenterprise.com/adam/PortalSystem/Core/setcompany.asp",  MD5off];
  AccountList["demo251"]              = ["demo251", InvisionN250_1,  MD5off];
  AccountList["pricechopper-prep"]    = ["pricechopper-prep", Invision250_3,  MD5off];
  AccountList["target"]               = ["target", "https://www3.apisenterprise.com/Demo250/PortalSystem/Core/setcompany.asp",  MD5off];
  AccountList["walmart-canada"]       = ["walmart-canada", "https://www3.apisenterprise.com/WalMart260/PortalSystem/Core/setcompany.asp",  MD5off];

  AccountList["target-crp"]           = ["target-crp", Invision260_1, MD5off];
  AccountList["macs"]      	          = ["macs", Invision250_3,  MD5off];
  AccountList["support"]      	      = ["support", InvisionS260_3,  MD5off];
  AccountList["nasp"]      	          = ["nasp", "https://www1.apisenterprise.com/NASP250/PortalSystem/Core/setcompany.asp",  MD5off];
  AccountList["coach-prep"]           = ["coach-prep", Invision250_3,  MD5off];
  AccountList["coach"]                = ["coach", Invision250_3,  MD5off];
  AccountList["coach-orc"]            = ["coach-orc", Stars260_3,  MD5off];
  AccountList["walmart-prep"]         = ["walmart-prep", Invision250_3,  MD5off];
  AccountList["office-prep"]          = ["office-prep", Invision250_3,  MD5off];
  AccountList["officemax-prep"]       = ["officemax-prep", Invision250_3,  MD5off];
//  AccountList["tjx-prep"]             = ["tjx-prep", Invision250_3,  MD5off];
//  AccountList["tjx-temp"]      	      = ["tjx-temp", Invision250_3,  MD5off];
  AccountList["tjx-prep"]             = ["tjx-prep", Invision260_1,  MD5off];
  AccountList["tjx-temp"]	            = ["tjx-temp", Invision260_1,  MD5off];
  AccountList["tjx-prep2"]            = ["tjx-prep2", "https://www1.apisenterprise.com/TJX250/PortalSystem/Core/setcompany.asp",  MD5off];
  AccountList["tjx-temp2"]	          = ["tjx-temp2", "https://www1.apisenterprise.com/TJX250/PortalSystem/Core/setcompany.asp",  MD5off];
//  AccountList["tjx-transfer"]         = ["tjx-transfer", Invision260_1,  MD5off];
  AccountList["sage"]                 = ["sage", Invision250_3,  MD5off];
  AccountList["lowes"]                = ["lowes", Invision260_3,  MD5off];
  AccountList["sage-old"]             = ["sage-old", Invision250_3,  MD5off];
  AccountList["sage-prep"]            = ["sage-prep", Invision250_3,  MD5off];
  AccountList["sage-260"]             = ["sage-260", InvisionS260_3,  MD5off];
  AccountList["palmaudit"]            = ["palmaudit", InvisionPalm_2,  MD5off];
  AccountList["demojunk"]     	      = ["demojunk", Dev230Path,  MD5off];

  AccountList["dollar-general-test"]  = ["dollar-general", Invision240_1,  MD5off];
//  AccountList["dollar-general"]       = ["dollar-general", Invision240_NS,  MD5off];
  AccountList["dg-offline"]           = ["dollar-general-prep", Invision240_NS,  MD5off];
//  AccountList["dollar-general-temp"]  = ["dollar-general-temp", Invision245_3,  MD5off];
  AccountList["dollar-general-temp"]  = ["dollar-general-temp", Invision240_NS,  MD5off];
//  AccountList["dollar-generals"]    = ["dollar-general", Invision235_B,  MD5off];
  AccountList["dollar-general-prep"]  = ["dollar-general-prep", Invision250_3,  MD5off];
  AccountList["dollar-general-ns"]    = ["dollar-general", Invision235_B_NS,  MD5off];
  AccountList["dollar-general-236"]   = ["dollar-general", Invision236_B_NS, MD5off];
  AccountList["dgc-demo"] 	          = ["dgc-demo", Invision235_B_NS,  MD5off];

//Dolllar General Live 250
  AccountList["dollar-general"]       = ["dollar-general", Invision250_3,  MD5off];

  AccountList["academy-prep"]         = ["academy-prep", Invision250_3,  MD5off];

  AccountList["stage-stores-prep"]    = ["stage-stores-prep", Invision250_3,  MD5off];
  AccountList["stage-stores-temp"]    = ["stage-stores-temp", Invision245_3,  MD5off];
  AccountList["stage-stores"]	      = ["stage-stores", Invision250_3,  MD5off];
//  AccountList["stage-stores"]	      = ["stage-stores", Invision240_2,  MD5off];
  AccountList["stage-stores-import"]  = ["stage-stores-import", Invision240_2,  MD5off];

  AccountList["kbtoys-demo"] 	        = ["kbtoys-demo", Invision236_B,  MD5off];
  AccountList["guess"]        	      = ["guess", xDev230Path,  MD5off];
  AccountList["homedepot"]    	      = ["homedepot", HomeDepot230Path,  MD5off];
  AccountList["homedepot236"]  	      = ["homedepot236", Invision236_B,  MD5off];
  AccountList["invision1"]    	      = ["invision", Invision235_1,  MD5off];
  AccountList["invision2"]    	      = ["invision", Invision235_2,  MD5off];
  AccountList["invisionb"]    	      = ["invision", Invision235_B,  MD5off];
  AccountList["invision2b"]   	      = ["invision", Invision235_TB,  MD5off];
  AccountList["invision"]     	      = ["invision", Invision235,  MD5off];
  AccountList["jimmy"]     	          = ["jimmy", Invision236_B,  MD5off];
//   AccountList["hm"]                = ["hm", Dev210Path,  MD5off];
  //AccountList["kaybeetoys"]   	      = ["kaybeetoys", xDev230Path,  MD5off];
  AccountList["kaybeetoys"]   	      = ["kaybeetoys", Invision236_B,  MD5off];
  AccountList["kbtoys2"]   	         = ["kbtoys2", "https://www3.apisenterprise.com/APIS236/PortalSystem/Core/setcompany.asp",  MD5off];
  AccountList["kbtoys-prep"] 	      = ["kbtoys-prep", Invision236_B,  MD5off];
  AccountList["kbtoys-demo"] 	      = ["kbtoys-demo", Invision236_B,  MD5off];
//  AccountList["kmart-ip"]      	      = ["kmart", Invision236_IPB,  MD5off];
//  AccountList["kmart"]      	      = ["kmart", Invision236_B,  MD5off];
//  AccountList["kmart240"]      	      = ["kmart", Invision240_2,  MD5off];
//  AccountList["kmart-in"]     	      = ["kmart-in", Invision235_TB,  MD5off];
//  AccountList["kroger"]       	      = ["kroger", Dev230Path,  MD5off];  
  AccountList["mayco"]        	      = ["mayco", Invision236_3,  MD5off];
  AccountList["lttesting"]        	  = ["lttesting", Invision236_3,  MD5off];
  AccountList["mayco236"]      	      = ["mayco", Invision236_B,  MD5off];
  AccountList["mayco-ns"]     	      = ["mayco", Invision235_B_NS,  MD5off];
  AccountList["mayco-test"]   	      = ["mayco-test", Invision236_3,  MD5off];
  AccountList["mayco-import"] 	      = ["mayco-import", Invision235_B,  MD5off];
  AccountList["mayco-import-rm"]      = ["mayco-import-rm", Invision235_B,  MD5off];
  AccountList["mayco-km"]             = ["mayco-km", Invision235_B,  MD5off];
  AccountList["mayco-hecht"]          = ["mayco-hecht", Invision236_B,  MD5off];
  AccountList["mayco2"]       	      = ["mayco2", Invision235,  MD5off];
//  AccountList["limited-prep"]  	  = ["limited-prep", Invision240_2,  MD5off];
  AccountList["macys"]        	      = ["macys", xDev230Path,  MD5off];
  AccountList["macys-prep"]        	      = ["macys-prep", xDev230Path,  MD5off];
  AccountList["macys-test"]   	      = ["macys-test", xDev230Path,  MD5off];
//  AccountList["nexcom"]       	      = ["nexcom",Invision240_2,  MD5off];
  AccountList["cititrends-prep"]       	  = ["cititrends-prep",Invision250_3,  MD5off];
  AccountList["cititrends"]       	  = ["cititrends",Invision250_3,  MD5off];
  AccountList["nexcom-prep"]       	  = ["nexcom-prep",Invision250_3,  MD5off];
  AccountList["nexcom-claims"]       	= ["nexcom-claims",Invision240_2,  MD5off];
  AccountList["nola-han"]             = ["nola-han",InvisionS260_3,  MD5off];
//  AccountList["nordstrom"]          = ["nordstrom", xDev230Path,  MD5off];
  AccountList["nordstrom-test"]       = ["nordstrom-test", Invision240_2,  MD5off];
  AccountList["officemax"]     	      = ["officemax", Invision236_B,  MD5off];
  AccountList["officemax-training"]	  = ["officemax-training", Invision236_B,  MD5off];
  AccountList["officemax-demo"]	      = ["officemax-demo", Invision236_B,  MD5off];
  AccountList["palmer"]       	      = ["palmer", Dev230Path,  MD5off];
  AccountList["perfumania"]   	      = ["perfumania", Invision245_3,  MD5off];
  AccountList["perfumania210"]	      = ["perfumania", Dev210Path,  MD5off];
  AccountList["perfumania230"]	      = ["perfumania230", Dev230Path,  MD5off];
  AccountList["perfumania-prep"]	    = ["perfumania-prep", Invision245_3,  MD5off];
//  AccountList["polo"]         	      = ["polo", Invision241_2,  MD5off];
  AccountList["polo-240"]         	  = ["polo-240", Invision241_2,  MD5off];
  AccountList["polo-training"]        = ["polo-training", Invision241_2,  MD5off];
  AccountList["polo-reports"]	        = ["polo-reports", Invision240_2,  MD5off];
  AccountList["polo235"]      	      = ["polo235", Invision235_B,  MD5off];
  AccountList["polo-prep"]            = ["polo-prep", Invision240_2,  MD5off];
  AccountList["polo-pilot"]           = ["polo-pilot", Invision240_2,  MD5off];
  AccountList["polo-audit-prep"]      = ["polo-audit-prep", Invision240_2,  MD5off];
  AccountList["polo-250prep"]         = ["polo-250prep", Invision250_3,  MD5off];
  AccountList["polo-live"]            = ["polo-live", Invision250_3,  MD5off];
  AccountList["polo"]                 = ["polo", Invision250_3,  MD5off];
  AccountList["polo2"]                = ["polo2", Invision250_3_2,  MD5off];
  AccountList["polo-audit"]           = ["polo-audit", "https://www3.apisenterprise.com/polo250/PortalSystem/Core/setcompany.asp",  MD5off];
  
  AccountList["saks236"]              = ["saks236", Invision236_B,  MD5off];
  AccountList["rf1"]                  = ["rf1", InvisionS260_3, MD5off];
  AccountList["rila"]                 = ["rila", Invision250_3,  MD5off]; 
  AccountList["rila-prep"]            = ["rila-prep", Invision250_3,  MD5off]; 

  AccountList["saks-240"]             = ["saks-240", Invision240_2,  MD5off];
  AccountList["saks"]     	          = ["saks", Invision250_3,  MD5off];
  AccountList["saks-cll-demo"]        = ["saks-cll-demo", Invision240_2,  MD5off];
  AccountList["saks-prep"]     	      = ["saks-prep", Invision250_3,  MD5off];
  //AccountList["seamans"]            = ["seamans", Dev210Path,  MD5off];
  AccountList["starbucks"]    	      = ["starbucks", Invision235_B, MD5off];
  AccountList["prep-steveandbarry"]   = ["prep-steveandbarry", Invision240_2,  MD5off];
  AccountList["prep-sixflags"]	      = ["prep-sixflags", Invision240_2,  MD5off];
  AccountList["steveandbarry"]	      = ["steveandbarry", Invision240_2,  MD5off];
  AccountList["seamans"]      	      = ["seamans", Dev230Path, MD5off];  
//  AccountList["sixflags"]     	  = ["sixflags", Dev230Path, MD5off];
  AccountList["sixflags230"]  	      = ["sixflags230", Dev230Path, MD5off];
  AccountList["sixflags"]	            = ["sixflags", Invision245_3,  MD5off];
  AccountList["sftraining"]   	      = ["sftraining", Dev210Path, MD5off];
  AccountList["sportchalet"]  	      = ["sportchalet", Dev230Path, MD5off];  
  AccountList["tiffany"]      	      = ["tiffany", Invision240_2, MD5off];
  AccountList["apisdemo"]      	      = ["apisdemo", Invision250_3, MD5off];
  AccountList["demo270"]      	      = ["apisdemo", "https://www3.apisenterprise.com/apis270/PortalSystem/Core/setcompany.asp", MD5off];

  AccountList["walmart"]      	      = ["walmart", Invision240_2, MD5off];
  AccountList["wwe-prep"]             = ["wwe-prep", Invision250_3,  MD5off];
  AccountList["big-5-poc"]            = ["big-5-poc", Invision250_3,  MD5off];
   
  // Test Accounts
  AccountList["demo-access"]          = ["demo-access", Test210Path,  MD5off];
  AccountList["demo-live"]            = ["demo-live", Test210Path,  MD5off];
  AccountList["demo-mysql-win32"]     = ["demo-mysql-win32", Test210Path,  MD5off];
//   AccountList["hm-live"]           = ["hm-live", Test210Path,  MD5off];
  AccountList["homedepot-mssql"]      = ["homedepot-mssql", Test210Path,  MD5off];
  AccountList["homedepot-mysql-win32"]= ["homedepot-mysql-win32", Test210Path,  MD5off];
  AccountList["homedepot-live"]       = ["homedepot-live", Test210Path,  MD5off];
  AccountList["guess-mysql"]          = ["guess-mysql", Dev210Path,  MD5off];
//	AccountList["kaybeetoys"]   	  = ["kbtoys-mysql-win32", Dev230Path,  MD5off];
//  AccountList["kmart-access"  ]       = ["kmart-access"  , Test210Path,  MD5off];
//  AccountList["kmart-mssql"]          = ["kmart-mssql", Test210Path,  MD5off];
//  AccountList["kmart-mysql-linux"]    = ["kmart-mysql-linux", Test210Path,  MD5off];
//  AccountList["kmart-mysql-win32"]    = ["kmart-mysql-win32", Test210Path,  MD5off];
//  AccountList["kmart-live"]           = ["kmart-live", Test210Path,  MD5off];
//  AccountList["limited-mysql-win32"]  = ["limited-mysql-win32", Test210Path,  MD5off];
  AccountList["lt-live"]              = ["lt-live", Test210Path,  MD5off];
  AccountList["lt-local"]             = ["lt-local", Test210Path,  MD5off];
  AccountList["masterdb"]             = ["masterdb", Test210Path,  MD5off];
  AccountList["macys-mysql-win32"]    = ["macys-mysql-win32", Test210Path,  MD5off];
  AccountList["macys-live"]           = ["macys-live", Test210Path,  MD5off];
  AccountList["nexcom-live"]          = ["nexcom-live", Test210Path,  MD5off];
  AccountList["nexcom-mssql"]         = ["nexcom-mssql", Test210Path,  MD5off];
  AccountList["nexcome-mysql-win32"]  = ["nexcom-mysql-win32", Test210Path,  MD5off];
  AccountList["nordstrom-live"]       = ["nordstrom-live", Test210Path,  MD5off];
  AccountList["saks-access"]          = ["saks-access", Test210Path,  MD5off];
  AccountList["saks-mssql"]           = ["saks-mssql", Test210Path,  MD5off];
  AccountList["saks-mysql-linux"]     = ["saks-mysql-linux", Test210Path,  MD5off];
  AccountList["saks-mysql-win32"]     = ["saks-mysql-win32", Test210Path,  MD5off];
  AccountList["saks-mssql-win32"]     = ["saks-mssql-win32", Test210Path,  MD5off];
  AccountList["seamans-live"]         = ["seamans-live", Test210Path,  MD5off];  
  AccountList["sixflags-access"]      = ["sixflags-access", Test210Path,  MD5off];
  AccountList["sixflags-mssql"]       = ["sixflags-mssql", Test210Path,  MD5off];
  AccountList["sixflags-mysql-linux"] = ["sixflags-mysql-linux", Test210Path,  MD5off];
  AccountList["sixflags-mysql-win32"] = ["sixflags-mysql-win32", Test210Path,  MD5off];
  AccountList["sixflags-live"]        = ["sixflags-live", Test210Path,  MD5off];
  AccountList["ux250"]                = ["ux250", Uxbridge250,  MD5off];

  AccountList["apis800"]              = ["apis800", Invision235_2,  MD5off];

  AccountList["bal_test"]             = ["invision", Invision235_B,  MD5off];
  AccountList["mayco-import"]         = ["mayco-import", Invision235_1,  MD5off];
//  AccountList["ace-prep245"]          = ["ace-prep245", Invision245_3,  MD5off];
  AccountList["kbtoys-prep245"]       = ["kbtoys-prep245", Invision245_3,  MD5off];
  
  AccountList["bloomingdale250"]      = ["bloomingdale250", Invision250_3,  MD5off];
 
  AccountList["preventis"]            = ["preventis", InvisionS260_3,  MD5off];  
  AccountList["preventis-cs"]         = ["preventis-cs", Invision250_3,  MD5off];
  AccountList["bloomingdales-250prep"]= ["bloomingdales-250prep", Invision250_3,  MD5off]; 
  
  AccountList["ace-250prep"]          = ["ace-250prep", Invision250_3,  MD5off];
  AccountList["matt"]                 = ["matt", Invision250_3, MD5off];
  AccountList["agilence-prep"]      	= ["agilence-prep", Invision250_3,  MD5off];
  AccountList["agilence"]      	      = ["agilence", Invision250_3,  MD5off];
  AccountList["cablevision-demo"]     = ["cablevision-demo", Invision250_3,  MD5off];

// No installations needed from here down *********************
function ValidateCompany(compname) {
 
  var isanaccount=true;
  var testacct=false;
  var testacct240=false;
  compname = compname.toLowerCase();
  var fullcompname = compname;

  if (compname.indexOf(" ")>-1) {
    compname = compname.substr(0,compname.indexOf(" "));
    // alert("*"+compname+"*");
  }

  if (compname.substr(0,1)=="~") {
    alert("Development Site Selected. This version is not fully tested.");
    testacct=true;
    compname = compname.substr(1);
  };
  
  if (fullcompname.indexOf("/240")>-1) {
    alert("Development Site 2.40 Selected. This version is not fully tested.");
    testacct240=true;
  };
  
  if (AccountAliases[compname]) compname = AccountAliases[compname];	// is it an alias?
 
  if (AccountList[compname] == null) {	// if company not found, set to demo and warn
    alert("Not a Valid Company ID! Demo mode set");
    compname =  "demo";
    isanaccount=false;
    if (document.zLogon) document.zLogon.CompanyName.focus();	// focus on company
  }
  if (isanaccount==true) AccountValid = true;
  
  AccountSel = AccountList[compname][0];
  
  if (testacct) {
    AccountPath = xDev230Path;
  } else {
    if (testacct240) {
      AccountPath = AccountList[compname][1].replace(/APIS[0-9]{3}/gi, "APIS240");
    } else {
      AccountPath = AccountList[compname][1];
    };
  }
  MD5onoff = AccountList[compname][2];
  
  if (fullcompname.indexOf("/s1")>-1) {
    AccountPath = AccountPath.replace("select_server.asp", "setcompany.asp");
  }
  if (fullcompname.indexOf("/s2")>-1) {
    AccountPath = AccountPath.replace("select_server.asp", "setcompany.asp");
    AccountPath = AccountPath.replace("www1", "www2");
  }

  if (fullcompname.indexOf("/ns")>-1) {
    AccountPath = AccountPath.replace("https", "http");
  }
}
