
function MailTo(coded,attr,txt) 
{
	cipher = "aZbYcXdWeVfUgThSiRjQkPlOmNnMoLpKqJrIsHtGuFvEwDxCyBzA1234567890"
	shift=coded.length
	link=""
	for (i=0; i<coded.length; i++){
		if (cipher.indexOf(coded.charAt(i))==-1){
			ltr=coded.charAt(i)
			link+=(ltr)
		} else {     
			ltr = (cipher.indexOf(coded.charAt(i))-shift+cipher.length) % cipher.length
			link+=(cipher.charAt(ltr))
		}				
    }
    //document.write(link)
    document.write("<a href='mailto:"+link+"' "+attr+" class='lien'>"+txt+"</a>")
}


function MailTo2(coded,attr1,attr2,txt) 
{
	cipher = "aZbYcXdWeVfUgThSiRjQkPlOmNnMoLpKqJrIsHtGuFvEwDxCyBzA1234567890"
	shift=coded.length
	link=""
	for (i=0; i<coded.length; i++){
		if (cipher.indexOf(coded.charAt(i))==-1){
			ltr=coded.charAt(i)
			link+=(ltr)
		} else {     
			ltr = (cipher.indexOf(coded.charAt(i))-shift+cipher.length) % cipher.length
			link+=(cipher.charAt(ltr))
		}				
    }
    //document.write(link)
    document.write("<a href='mailto:"+link+attr1+"' "+attr2+" class='lien'>"+txt+"</a>")
}


function CodeMail(address) {
	var coded = ""
	address = address.toLowerCase()
	cipher = "aZbYcXdWeVfUgThSiRjQkPlOmNnMoLpKqJrIsHtGuFvEwDxCyBzA1234567890"
	shift = address.length
	for (j=0; j<address.length; j++) {
		if (cipher.indexOf(address.charAt(j)) == -1 ) {
			chr = address.charAt(j)
			coded += address.charAt(j)
		} else {
			chr = (cipher.indexOf(address.charAt(j)) + shift) % cipher.length
			coded += cipher.charAt(chr)
		}
	}
	document.write(coded);
}


function MailToWebmaster2(attr1,attr2,txt) {
	// Mail avec webmaster
	// MailTo2("gtq3pcdtb@x3tbic-cdberdebt.r73",attr1,attr2,txt);
	
	// Mail de kevin en attendant 
	//MailTo2("z.rp9t11t@x3tbic-cdberdebt.r73",attr1,attr2,txt);
	
	// Mail avec contact
	MailTo2("q53coqc@w1sahb-bcadqcdas.q51",attr1,attr2,txt);
	
}

 //var X;
 //X=CodeMail("mail a coder");
 //MailTo(X,X);
