if (location.href.indexOf('_e.htm') >-1) { currentLang = 'e' }
else { currentLang = 'f' }

if (navigator.appName == "Netscape") 
	document.write("<link rel='StyleSheet' type='text/css' href='main_ns.css'>")
else
	document.write("<link rel='StyleSheet' type='text/css' href='main.css'>")

function lang(l) {
	var search = '_' + l + '.';
	var search2 = 'lang=' + l;
	if (l == 'e') { ol = 'f' } else { ol = 'e' }
	if (parent.location.href.indexOf(search) >-1) {
		parent.location.href = parent.location.href.substring(0,(parent.location.href.lastIndexOf(search)+1)) + ol + parent.location.href.substring(parent.location.href.lastIndexOf(search)+2,parent.location.href.length);
	} else {
		parent.location.href = parent.location.href.substring(0,(parent.location.href.lastIndexOf(search2)+5)) + ol + parent.location.href.substring(parent.location.href.lastIndexOf(search2)+6,parent.location.href.length);
	}
}
