function switchLang(){
	var newURL="";
	if(document.location.href.indexOf("/english/")>-1 || document.location.href.indexOf("_e.")>-1){/*is elgish*/
		newURL=my_replace(document.location.href,"/english/","/fr/");
	}else{/*is french*/
		newURL=my_replace(document.location.href,"/fr/","/english/");
	}
	document.location.href=newURL;
}
function my_replace(string,text,by) {
// Replaces text with by in string
    var strLength = string.length, txtLength = text.length;
    if ((strLength == 0) || (txtLength == 0)) return string;

    var i = string.indexOf(text);
    if ((!i) && (text != string.substring(0,txtLength))) return string;
    if (i == -1) return string;

    var newstr = string.substring(0,i) + by;

    if (i+txtLength < strLength)
        newstr += my_replace(string.substring(i+txtLength,strLength),text,by);

    return newstr;
}
