
var urls = { 
			"dev.investissementsrenaissance.ca" : "dev.renaissanceinvestments.ca",
			"dev.renaissanceinvestments.ca" : "dev.investissementsrenaissance.ca",
			"www.investissementsrenaissance.ca" : "www.renaissanceinvestments.ca",
			"www.renaissanceinvestments.ca" : "www.investissementsrenaissance.ca",
			"uat.investissementsrenaissance.ca" : "uat.renaissanceinvestments.ca",
			"uat.renaissanceinvestments.ca" : "uat.investissementsrenaissance.ca",
			"uat3.investissementsrenaissance.ca" : "uat3.renaissanceinvestments.ca",
			"uat3.renaissanceinvestments.ca" : "uat3.investissementsrenaissance.ca",
			"en" : "fr",
			"fr" : "en",
			"investor" : "investisseur",
			"investisseur" : "investor",
			"sitemap" : "carte-du-site",
			"carte-du-site" : "sitemap",
			"portfolio" : "portefeuille",
			"portefeuille" : "portfolio",
			"about-us" : "a-propos-de-nous",
			"a-propos-de-nous" : "about-us",
			"products" : "produits",
			"produits" : "products",
			"prices" : "prix",
			"prix" : "prices",
			"performance" : "rendements",
			"rendements" : "performance",
			"portfolio-managers" : "gestionnaire-de-portfeuilles",
			"gestionnaire-de-portfeuilles" : "portfolio-managers",
			"news" : "nouvelles",
			"nouvelles" : "news",
			"merger" : "fusion",
			"fusion" : "merger",
			"media" : "medias",
			"medias" : "media",
			"reporting-governance" : "rapport-gouvernance",
			"rapport-gouvernance" : "reporting-governance",
			"proxy-voting" :"vote-par-procuration",
			"vote-par-procuration" : "proxy-voting",
			"governance" : "gouvernance",
			"gouvernance" : "governance",
			"learning-centre" : "centre-dapprentissage",
			"centre-dapprentissage" : "learning-centre",
			"product-types" :"gamme-de-produit",
			"gamme-de-produit" : "product-types",
			"account-types" : "type-de-comptes",
			"type-de-comptes" : "account-types",
			"investment-options" : "options-dinvestissement",
			"options-dinvestissement" : "investment-options",
			"investor-tips" : "conseil-a-linvestisseur",
			"conseil-a-linvestisseur" : "investor-tips",
			"glossary" : "glossaire",
			"glossaire" : "glossary",
			"calendar" : "calendrier",
			"calendrier" : "calendar",
			"advisor-tools" : "outils",
			"outils" : "advisor-tools",
			"forms" : "formulaires",
			"formulaires" : "forms",
			"contact-us" : "nous-joindre",
			"nous-joindre" : "contact-us"};

function changeLang() {
	url = window.document.location.toString();
	spliturl = url.split("?");
	url = spliturl[0];
	oldparts = url.split("/");
	newparts = url.split("/");
	replacement = " ";
	for (x=0;x<oldparts.length;x++) {
		if (replacement = urls[oldparts[x]]) {
			oldparts[x] = replacement;
		}
		newparts[x] = oldparts[x];
	}
	newurl = "";
	for (x=0;x<newparts.length -1;x++) {
		newurl += newparts[x];
		newurl += "/";
	}
	newurl += newparts[newparts.length-1];
	if (newurl.indexOf("error") > 0) {
		newurl = newurl.substring(0, newurl.indexOf("error"));
	}
	window.location.href = newurl;
}


function showAll() {
if (document.getElementById("specificationCol1")) {
	show("specification");
}
if (document.getElementById("managerCol1")) {
	show("manager");
}
//if (document.getElementById("portfolioCol1")) {
//	show("portfolio");
//}
if (document.getElementById("performanceCol1")) {
	show("performance");
}
if (document.getElementById("holdingsCol1")) {
	show("holdings");
}
document.getElementById("all").href="javascript:hideAll();";
document.getElementById("all").innerHTML = "Fermer tout<img src='/images/btn_close.gif' id='allButton' class='showHideButton' border='0' />";
document.getElementById("all").parentNode.parentNode.style.backgroundColor = "#c1ccd8";
}

function hideAll() {
if (document.getElementById("specificationCol1")) {
	hide("specification");
}
if (document.getElementById("managerCol1")) {
	hide("manager");
}
//if (document.getElementById("portfolioCol1")) {
//	hide("portfolio");
//}
if (document.getElementById("performanceCol1")) {
	hide("performance");
}
if (document.getElementById("holdingsCol1")) {
	hide("holdings");
}
document.getElementById("all").href="javascript:showAll();";
document.getElementById("all").innerHTML = "Ouvrir tout<img src='/images/btn_open.gif' id='allButton' class='showHideButton' border='0' />";
document.getElementById("all").parentNode.parentNode.style.backgroundColor = "#e0e5eb";
}

function show(el) {
	var showElem = el;
	button = showElem + "Button";
	col1 = showElem + "Col1";
	col2 = showElem + "Col2";
	slink = showElem + "Link";
	document.getElementById(col1).style.display = "block";
	document.getElementById(col2).style.display = "block";
	document.getElementById(button).src = "/images/btn_close.gif";
	document.getElementById(slink).href = "javascript:hide('" + showElem + "');";
	document.getElementById(slink).parentNode.parentNode.style.backgroundColor = "#c1ccd8";
}
function hide(el) {
	var showElem = el;
	button = showElem + "Button";
	col1 = showElem + "Col1";
	col2 = showElem + "Col2";
	slink = showElem + "Link";
	document.getElementById(col1).style.display = "none";
	document.getElementById(col2).style.display = "none";
	document.getElementById(button).src = "/images/btn_open.gif";
	document.getElementById(slink).href = "javascript:show('" + showElem + "');";
	document.getElementById(slink).parentNode.parentNode.style.backgroundColor = "#e0e5eb";
}

function showElement(el) {
	var showElem = el;
	button = showElem + "Button";
	slink = showElem + "Link2";
	slink1 = showElem + "Link1";
	document.getElementById(showElem).style.display = "block";
	document.getElementById(button).src = "/images/btn_close.gif";
	document.getElementById(slink1).href = 'javascript:hideElement("' + showElem + '");';
	document.getElementById(slink).href = 'javascript:hideElement("' + showElem + '");';
	document.getElementById(slink1).parentNode.style.backgroundColor = "#c1ccd8";
	el = null;
}

function hideElement(el) {
	var showElem = el;
	button = showElem + "Button";
	slink = showElem + "Link2";
	slink1 = showElem + "Link1";
	document.getElementById(showElem).style.display = "none";
	document.getElementById(button).src = "/images/btn_open.gif";
	document.getElementById(slink1).href = 'javascript:showElement("' + showElem + '");';
	document.getElementById(slink).href = 'javascript:showElement("' + showElem + '");';
	document.getElementById(slink1).parentNode.style.backgroundColor = "#e0e5eb";
	el = null;
}

function toggleMenu(section){
	if (document.getElementById(section + "div").style.display == "block") {	
		document.getElementById(section + "div").style.display = "none";
		document.getElementById(section + "Button").src = "/images/btn_open.gif";
		
	} else if (document.getElementById(section + "div").style.display == "none"){
		document.getElementById(section + "div").style.display = "block";
		document.getElementById(section + "Button").src = "/images/btn_close.gif";
	}	
}

window.onload = function error() {
	if (document.URL.indexOf("error") > 0) {
		alert(unescape(document.URL.substring(document.URL.indexOf("error") + 6, document.URL.length)));
	}
}

