// code..js
// encrypt mail address
// By robert@attac.be 27/05/02
// FreeWare, Open Content

function decode(adr) {
email="";
	for (i=adr.length-1;i>-1;i--) {
//		ch=adr[i];
		ch=adr.substring(i,i+1);
		if (ch=="*") {ch="@"}
		if (ch=="!") {ch="?"}
		if (ch=="#") {ch="&"}
		email=email.concat(ch);
		}
}

function m2decode(adr){
	decode(adr)
	document.location="mailto:"+email;
}

function l2decode(adr){
	decode(adr)
	document.write(email);
}

// pas de : # $
function encode(adr) {
email="";

	for (i=adr.length-1;i>-1;i--) {
		ch=adr.substring(i,i+1);
		if (ch=="@") {ch="*"}
		if (ch=="?") {ch="!"}
		if (ch=="&") {ch="#"}
		email=email.concat(ch);
		}
//return email;
document.write(email);
}


