var isMindLeaders = true; // Set to false for CD/WEBI delivery
var trackScores=true; // for DynamicCD. Set to false to turn off cookie and txt file tracking of scores

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;

// Comment out the following line if you move course videos to a streaming server.
if (!isMindLeaders && location.href.toLowerCase().indexOf("video.htm") == -1) useStreamingServer=false;
//*******************************************************************************

// 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";

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();
}

// ************** Set BSV Host Streaming Server by Site ID ********************
function setStreamingServer()
{
	siteId=parent.getParm("siteid").toLowerCase();
	if (siteId=="" || typeof(bsvHostSites) == "undefined") return;
	for (i=1; i <= bsvHostSites.length; i++)
	{
		if (siteId==bsvHostSites[i]) streamingServer = bsvHostServers[i];
	}
}

var wasaTempMessage = "<font color='red'><b>In observance of the national Christmas and New Years Holidays, Technical Support is closing at 5:00 PM (EST) on Friday, December 22, 2006 and Friday, December 29, 2006. The company will be closed on Monday, December 25, 2006 and Monday, January 1, 2007. The company will resume normal business hours (8 AM - 8 PM EST) on Tuesday December 26, 2006 and Tuesday January 2, 2007.</b></font><br><br>";

//var wasaTempMessage = "";
