/*
Supermodel Email Encode/Decode Functions
*/

function smEmailSend( email ) {
	email = email.substring( 4 );
	email = email.substring( 0, email.length - 4 );
	location = "mailto:" + smEmailDecode( email );
	return false;
}

function smEmailMouseOver( email ) {
    email = email.substring( 4 );
	email = email.substring( 0, email.length - 4 );
	window.status = "Send an email to " + smEmailDecode( email );
	return true;
}

function smEmailMouseOut() {
    window.status = "";
    return true;
}

var smEmailCoding = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMabcdefghijklmnopqrstuvwxyzabcdefghijklm';

function smEmailDecode( value ) {
	var text = "";
	for (var i=0;i<value.length;i++) {
		character = value.charAt(i);
		position = smEmailCoding.indexOf(character);
		if (position > -1)
		character = smEmailCoding.charAt(position + 13);
		text += character;
	}
	return text;
}
