
/*
* Sets the Mail address, to prevent from bots
*/

// printMailTo('futura','info','info','ch','ch','futura')

/*function printMailTo(a, b, c, d, w, z) {
	var f, g;
	f = "<a href=\"mailto:" + b + "@" + a + "." + d + "\">abcd</a>";
	if(!c) {g = z + "@" + b + "." + d;} else{if ((!w && !z)||(!w || !z)) {g = c;} else {g = c + "@" + z + "." + w;}}
	document.write(f.replace("abcd",g));
}*/

function libparseMail_unCryptMail(mail, shift) {
	var n = 0;
	var r = "";
	for(var i = 0; i < mail.length; i++) { 
		n = mail.charCodeAt(i); 
		if(n >= 8364) {
			n = 128;
		}
		r += String.fromCharCode(n - (shift)); 
	}
	return r;
}

function libparseMail_cryptMailTo(mail, shift) {
	location.href = libparseMail_unCryptMail(mail, shift);
}

function libparseMail_printCryptMail(mail, shift) {
	document.write(libparseMail_unCryptMail(mail, shift).replace(/@/, "(at)"));
}

