A small custom encryption / decryption script
This is a simple variant of the caesar-cipher, namely a vigenere-cipher with the fixed key 'EH'.  Any variant of these ciphers is considered a toy-grade cipher that is trivially crackable if the attacker has gathered enough ciphertext to analyze the letter frequencies.  There is no way to make this class of ciphers secure, except to allow an insanely long and random key to be used, in which case it becomes a one-time pad.

If, despite acknowledging that it cannot be made secure, you still wanted to try to make some improvements to this code as a learning exercise, you could…


Allow the key to be specified as a parameter rather than hard-coded as alternating between +4 and +7
Eliminate the text variable
Write var ASCII = text[i].charCodeAt(0); as var unicode = message.charCodeAt(i);
Avoid repeated string concatenation with encrypted += s;;.  Since strings in JavaScript are immutable, you are actually creating a new string and copying the entire old string each time you want to append one character.  Instead, you should use Array.join():

var encrypted = new Array(message.length);
for (var i = 0; i &lt; message.length; i++) {
    …
    encrypted[i] = …;
}
return encrypted.join('');