<script type = "text/javascript"> <!-- var numbers; numbers = window.prompt ( "Enter four digits to decrypt: ", "0" ); var char1 = (numbers.charAt(0)); var char2 = (numbers.charAt(1)); var char3 = (numbers.charAt(2)); var char4 = (numbers.charAt(3)); var first = parseInt( char1, 10 ); var second = parseInt( char2, 10 ); var third = parseInt( char3, 10 ); var fourth = parseInt( char4, 10 ); if (first < 7 ) first = (first + 10) - 7; else first = first - 7; if (second < 7 ) second = (second + 10) - 7; else second = second - 7; if (third < 7 ) third = (third + 10) - 7; else third = third - 7; if (fourth < 7 ) fourth = (fourth + 10) - 7; else fourth = fourth - 7; document.write( char1 + char2 + char3 + char4 + ": will decrypt to: " ); document.write( "" + third + "" + fourth + "" + first + "" + second + "" ); //--> </script> </head> <body> <p>Reload page to run the script again</p> </body> </html> </div> </div> </td> </tr> </table> </body> </html>