var isMindLeaders = true; // Set to false for CD/WEBI delivery

var rootDir = "/dpec";
var rootDirSalsa = "/salsa";
var scriptsDirectory = rootDir + "/scripts/";
var scriptsDirectorySalsa = rootDirSalsa + "/scripts/";
var sharedDirectory = rootDir + "/shared/";
var coursesDirectory = rootDir + "/courses/";
var customCoursesDirectory = rootDir + "/customcourses/";
var salsaCoursesDirectory = rootDirSalsa + "/series/";
var siteCustomDirectory = rootDir + "/custom/sites/";

//************************** Video Server Setup ****************************
// Streaming server for inhouse production
var inhouseStreamingServer = "mms://trix/";
inhouseVideoCourses="";
// Use the following line to play video courses over a local network; otherwise, comment out.
// var localCoursePath="file://netname/subdirs/dpec/courses/";
var streamingServer = "mms://rm.mindleaders.com/";
var useStreamingServer=isMindLeaders;
//*******************************************************************************

// Reset values for internal servers
if (location.host == 'rubino') 	isMindLeaders = false;
var inhouseHosts="rubino,courses.rubino.com,preview.mindleaders.com,underscore";
if (inhouseHosts.indexOf(location.host) > -1)
{
	customCoursesDirectory = rootDir + "/courses/";
	var courseReviewJs = sharedDirectory + "js/course_review.js";
	document.write("<SCRIPT Language=\"Javascript\" SRC=\"" + courseReviewJs + "\"></S" + "CRIPT>");
}

var mlomTech = "JAVA";

// set fullPath for use on www.mindleaders.com only
var fullPath="";
if (location.host=="www.mindleaders.com") fullPath="http://courses.mindleaders.com";
if (location.host=="www.it-training.com") fullPath="http://courses.it-training.com";
if (location.host=="www.get-training.com") fullPath="http://courses.get-training.com";

localizationCode="";
localizedSharedDirectory=sharedDirectory;
if (typeof(parent.coursewareHandler) != "undefined" && parent.coursewareHandler.localizationCode !="")
{
	localizedSharedDirectory= rootDir + "/shared_" + parent.coursewareHandler.localizationCode + "/";
}
else
{
	// For Accessible SA and Qeval: set localization code based on window opener
	if (self.name.indexOf("acc_question_window") != -1 || self.name.indexOf("qComments") !=-1) localizationCode=window.opener.localizationCode;
		else localizationCode=getParm("loc");
	if (localizationCode !="") localizedSharedDirectory= rootDir + "/shared_" + localizationCode + "/";
}
var resourseStringJs = fullPath + localizedSharedDirectory + "js/resource_strings.js";
document.write("<SCRIPT Language=\"Javascript\" SRC=\"" + resourseStringJs + "\"></S" + "CRIPT>");

// include special_cases.js
var specialCasesJs = fullPath + sharedDirectory + "js/special_cases.js";
document.write("<SCRIPT Language=\"Javascript\" SRC=\"" + specialCasesJs + "\"></S" + "CRIPT>");

function getCoursesDirectory(courseID)
{
	if (courseID != null && courseID.substr(0,2) == "c_")
		return customCoursesDirectory;
	else
		return coursesDirectory;
}

// This is needed here to get loc parm for popup pages, since site.js is loaded before mlclientpage
function getParm(parm)
{
	if (location.search=="") return "";
	var parmList = "&" + location.search.substring(1, location.search.length) + "&";
	var re = new RegExp("&" + parm + "=([^&]*)&","i");
	var foundArray = re.exec(parmList);
	if (foundArray == null) return "";
	return foundArray[1].toLowerCase();
}

//var wasaTempMessage = "<font color='red'><b>In observance of the National Christmas and New Years Holidays, Technical Support is closing at 6:00 PM (EST) on Thursday, December 23rd and Friday, December 31st. Technical Support will be closed on Friday, December 24th and Monday January 3rd.  Technical Support will resume normal business hours (8 AM - 8 PM EST) on Monday, December 27th and Tuesday, January 4th. We wish you a very happy holiday season.</b></font><br><br>"
var wasaTempMessage = "";
