function write_newmodulegen_version() {
	var version = "$Revision: 1.3 $";
	document.write(version.replace(/[\$|:]/g, ""));
}

// fonctions internes
function clearModJS() {
 var modJS = document.getElementById('modJS');
 modJS.innerHTML = "";
 modJS.parentNode.style.display = "none";
}

function getListValue(el) {
 return el.options[el.selectedIndex].value;
}
function createJSModule() {
 var pos = getListValue(document.getElementById('pos'));
 var modPos = getListValue(document.getElementById('modPos'));
 var  modCod = document.getElementById('modCod').value;
 var  modTit = document.getElementById('modTit').value;
 var tmp = document.getElementById('tmp');
 var modJS = document.getElementById('modJS');
 var modFullCode = document.getElementById('modFullCode');
 modNum = modTit.replace(/\W/g, "");
 modTit = modTit.replace(/\\/g, "\\\\");
 modCod = modCod.replace(/[\r|\n|\f|\t|\v]/g, "");
 modCod = modCod.replace(/\\/g, "\\\\");
modCod = modCod.replace(/&/g, "&amp;");
var str = Array();
var text2slice = ""+modCod.replace(/\"/g, "\\\"");
text2slice = text2slice.replace(/</g, "<\"\<br>+\"");
/*var i;
for(i=0; i<text2slice.length; )
	switch(text2slice[i+49]) {
		case"\\":
		str.push(("\""+text2slice.substr(i, 51)+"\""));
		i+=51;
		break;
		case "<":
		str.push(("\""+text2slice.substr(i, 48)+"\""));
		i+=48;
		break;
		default:
		str.push(("\""+text2slice.substr(i, 50)+"\""));
		i+=50;
	}

for(i=0;i < str.length;i++) {
str[i] =str[i].replace(/</g, "&lt;") ;
str[i] = str[i].replace(/>/g, "&gt;");
}
*/

if (tmp.textContent)
 tmp.textContent = str; 
else tmp.innerText = str;
 modJS.innerHTML += "// Identifiant CSS du module: #"+modNum+"<br/>"
 +"placeModule(\""+modPos+"\","
 +pos+" , Module(\"<b>"+modNum+"</b>\", \""+modTit+"\", <br/>"
 +"\""+text2slice +"\""+
 "));<br/>";
 modFullCode.style.display = "block"
}
