/* -----------------------------------------------------------------------------
					changeLanguage
--------------------------------------------------------------------------------

	Modified from the language script for the Wellness Site.

----------------------------------------------------------------------------- */

function changeLanguage() {


// Get the URL of the current document
var tempSTR = parent.location + "";
	    
// Search for the strings '_e.' and '_f.' in the URL.
var index_eng = tempSTR.indexOf("_e.");
var index_fr = tempSTR.indexOf("_f.");
	
// If '_f.' was not found or both were found but '_e.' came
// first then we are switching from English to French.

if (index_fr == -1 || (index_eng != -1 && index_eng < index.fr)) {

// Replace '_e.' with '_f.' in the URL.

tempSTR = tempSTR.replace("_e.", "_f.");
}

// Otherwise we are switching from French to English.

else { tempSTR = tempSTR.replace("_f.", "_e.");
}

// Change the URL of the document

location= tempSTR;

}
