
//*******************************************************************************'
//for switching back and forth between languages
//requires javascript/toolbox/format/replacechar.js

function changeLanguage(elementObj)
{
	//change the current href of the link to the current document
	elementObj.href = document.location;
	var intRootIndex = 0; //as Integer
	
	//if the current document contains the string "/en/", it is an English document, change it to français
	if(elementObj.href.toLowerCase().indexOf("/en/") > 0)
	{
		elementObj.href = replaceChar(elementObj.href, "/en/", "/fr/")
		
		//find the position in the string where /fr/ ends
		intRootIndex = elementObj.href.indexOf("/fr/") - (-4)
		



		//************************************************************************************
		//until all pages are converted into francais, redirect to the french down page
		elementObj.href = elementObj.href.substring(0, intRootIndex) + "down.html"
		//************************************************************************************
		//after the french side is complete, remove these lines.




	}
	else //it is a français document, change it to english
	{
		elementObj.href = replaceChar(elementObj.href, "/fr/", "/en/")
		
		//find the position in the string where /en/ ends
		intRootIndex = elementObj.href.indexOf("/en/") - (-4)
	}
}

//-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -'
//syntax version
function changelanguage(elementObj) //as String
{
	return changeLanguage(elementObj)
}

//-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -'
//syntax version
function ChangeLanguage(elementObj) //as String
{
	return changeLanguage(elementObj)
}