function encryptMail(strValue, intKey)
{
	strValue = strValue.replace('@', '|');
	
	var strEncryptSet = "a b c d e f g h i j k l m n o p q r s t u v w x y z - 1 2 3 4 5 6 7 8 9 0 _ . |";
	var arrEncryptSet = strEncryptSet.split(' ');
	var intEncryptSet = arrEncryptSet.length;
	
	strResult = "";
	var intValue = strValue.length;
	for(i=0; i<intValue; i++){
		var intEncryptKey = d2s_array_search(strValue.substring(i, (i+1)), arrEncryptSet);
		intEncryptKey = intEncryptKey + intKey;
		
		if(intEncryptKey >= intEncryptSet){
			intEncryptKey = intEncryptKey - intEncryptSet;
		}else{
			if(intEncryptKey < 0)
				intEncryptKey = intEncryptSet + intEncryptKey;
		}
		
		strResult += arrEncryptSet[intEncryptKey];
	}
	
	return strResult;
}

function decryptMail(strValue, intKey)
{
	var strEncryptSet = "a b c d e f g h i j k l m n o p q r s t u v w x y z - 1 2 3 4 5 6 7 8 9 0 _ . |";
	var arrEncryptSet = strEncryptSet.split(' ');
	var intEncryptSet = arrEncryptSet.length;
	
	strResult = "";
	var intValue = strValue.length;
	for(i=0; i<intValue; i++){
		var intEncryptKey = d2s_array_search(strValue.substring(i, (i+1)), arrEncryptSet);
		
		intEncryptKey = intEncryptKey - intKey;
		
		if(intEncryptKey >= intEncryptSet){
			intEncryptKey = intEncryptKey - intEncryptSet;
		}else{
			if(intEncryptKey < 0)
				intEncryptKey = intEncryptSet + intEncryptKey;
		}
		
		strResult += arrEncryptSet[intEncryptKey];
	}
	
	strResult = strResult.replace('|', '@');
	
	return strResult;
}

function d2s_array_search(needle, haystack)
{
	var intHaystack = haystack.length;
	for(var i=0; i<intHaystack; i++){
		if(haystack[i] == needle){
			return i;
		}
	}
	return false;
}