// javascript file
// automated the change language function in menu portion of site

// v1 ( fr = en )    **** IMPORTANT ****
// DOCUMENT NAMES CANNOT HAVE UNDERSCORES "_" OTHER THAN FOR SPECIFYING LANGUAGE SUFFIX
// example: filename_en.php or filename_fr.php 
// Documents without translations MUST NOT USE UNDERSCORES.

//lang = current.substr(pos+1,2)
// v2 (Multilingual) *par Sylvain Aubé* 

function changeLang(choix){
	/* alert(choix);*/
	var current
	current = parent.location.href
	pos = current.indexOf("_")
	lang = current.substr(pos+0,3)
	newp = current.replace(lang,choix)
	parent.location.href = newp

}

// Filtre espagnol (pseudocode)
// filtre 1
// - if lang=es
// - list of available es documents
// - if not in the list, generic es error
// - dont break, continue to next part
//   filtre 2
// - if href ne se termine pas par fr ou en (si vide) : traduction non disponible
// 