// eMail Obfuscator Script 2.1 by Tim Williams - freeware

// Modified by Andrew Tay in 2005. Now it works externally and you can pass it a
// string to display as link text. If you leave the argument blank, it automatically
// displays the e-mail address as link text.

function infocypher(chosenlinktext) {

	coded = "FJPKNXD@LFRJG.PDF"
	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))
			}				
 		}
			
	if (chosenlinktext == null) {
		document.write("<a href='mailto:"+link+"' title='send an e-mail'>"+link+"</a>")
		}
	else {
		document.write("<a href='mailto:"+link+"' title='send an e-mail'>"+chosenlinktext+"</a>")
		}
		
	}	
