/**********************************************************************************************

		Copyright (C) 2004 Cognos Incorporated. All Rights Reserved.
		Cognos (R) is a trademark of Cognos Incorporated.
		
 **********************************************************************************************/

// These are the languages that are supported by Cognos Connection documentation
// var sSupportedLangs = " en fr ja de ";
// var sDefaultLang = "en";
	
// Launches help window
function startHelp(sLocale, bIsAdminMode, sContext)
{
	// base documentation path
	var sHelpPath = "../documentation/";
	
	// Use the first two letters of the locale string to construct the path to the localized help folder.  Make sure they are converted to lowercase.
	// var sLang = sLocale.substring(0,2);
	var sLang = sLocale;
	sLang = sLang.toLowerCase();
	
	// If the current language is not on the list of supported languages then default to the default language
	// if ( sSupportedLangs.indexOf(" " + sLang + " ") < 0)
		// sLang = sDefaultLang;
	
	var sBook = "ug_";					
	sBook += bIsAdminMode ? "cra" : "cc";
	sBook += (sContext == "") ? "_a.html" : ".html?helpid=" + sContext;
	
	var sURL = sHelpPath + sLang + "/" + sBook;	
	var sFeatures = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=680,height=500";
	
	windowHelp = window.open(sURL, "helpWindow", sFeatures);
	windowHelp.focus();
}

// Quick Tour
function qt(sLocale)
{
	// Use the first two letters of the locale string to construct the path to the localized tour folder.  Make sure they are converted to lowercase.
	// var sLang = sLocale.substring(0,2);
	var sLang = sLocale;
	sLang = sLang.toLowerCase();	
	
	// If the current language is not on the list of supported languages then default to the default language
	// if ( sSupportedLangs.indexOf(" " + sLang + " ") < 0)
		// sLang = sDefaultLang;
	
	var sURL = "../documentation/" + sLang + "/tours/crntours.html";
	var sFeatures = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=680,height=400";
	
	tourWindow = window.open(sURL, "tourWindow", sFeatures);
	tourWindow.focus();
}
