/*
 * Script to launch "secure" email-adresses 
 *  (C) 2006 Bernhard Schaffer
 *  BASED ON A SCRIPT of J.Kolbitsch: 
 *  (C) 2005 Josef Kolbitsch, josef.kolbitsch[AT]kolbitsch.org.
 *      The source code may be reused freely. The copyright, however,
 *      must not be removed.
 */

/* Launch email with removed NOSPAM*/

function NOSPAMEMAIL(address) {
	if (address.length > 0) {
	    var decodedAddress = "";
	    var indexOfATchar = address.indexOf("NOSPAM");

    	if (indexOfATchar > 0) {
		decodedAddress = "mailto:" + address.substr(0, indexOfATchar) + address.substr(indexOfATchar + 6);

		location.href=decodedAddress;
	    }
		else {
		decodedAddress = "mailto:" + address;
		location.href=decodedAddress;
		}
	}
	return
}
