<HTML> <HEAD> <TITLE>JavaScript Combination Access Protection</TITLE> <!-- Cut-N-Paste JavaScript from ISN Toolbox Copyright 1996, Infohiway Server Network. Restricted use is hereby granted (both personal and commercial use OK so long as this code is not *directly* sold), providing this notice is buried somewhere deep in your HTML document. A link to http://www.infohiway.com is always appreciated, but is absolutely and positively not necessary. :-) --> <SCRIPT LANGUAGE="JavaScript"> <!--Hide JavaScript from Java-Impaired Browsers var deO = 0.1232656874742081854; var de1 = 0.5555555555555555802; var de2 = ""; var de3 = 81; var de4 = ""; var de5 = 0; var de6 = 0; var de7 = "abcdefghijklmnopqrstuvwxyz"; var ctr = 0; function prtComb() { srand(); de8 = ""; de8 += rand; de9 = de8.substring(3,12); de12 = de7.substring(8,9) + de7.substring(13,14) + de7.substring(3,4) de12 += de7.substring(4,5) + de7.substring(23,24) + "." document.write("<TABLE BORDER=3><TR><TD COLSPAN=3 ALIGN=CENTER>" + "<FONT COLOR='blue'><B>Dealer Price List<BR>Combination Lock" + "<BR>(Combination changes every time)</B></FONT></TD></TR><TR>"); for (var i = 0; i < 9; i++) { de0 = eval(de9.substring(i,i + 1)); de0 = ((de0 * 3) - 2) if (de0 < 0) { de0 = 0; } de2 += de7.substring(de0,(de0 + 1)); document.write("<TD ALIGN=CENTER><FONT SIZE = 5><B>" + de7.substring(de0,(de0 + 1)) + "</B></FONT></TD>"); if (i == 2 || i == 5) { document.write("</TR><TR>"); } } document.write("</TR></TABLE><P><FORM NAME='isnform'><INPUT " + "TYPE='text' NAME='cmb' SIZE=9><BR><INPUT TYPE='button' " + "NAME='btn' VALUE='Type Combination, then Click Here' " + "onClick='confirmBox();'></FORM><P>"); // Hack to correct floating point/binary conversion problem var de10 = 0.0000000001; de10 += Math.abs(Math.asin(deO)); de5 += (de1 * Math.sqrt(de3)); var de11 = ""; de11 += de10; de11 = de11.substring(2,(de5 + 2)); for (var i = 0; i < de5; i++) { de6 = eval(de11.substring(i,(i + 1))) - 1; de4 += de2.substring(de6,(de6 + 1)); } } function srand() { // adapted from Stefan Koch's "Introduction to JavaScript" with thanks. today = new Date(); rand = Math.abs(Math.sin(today.getTime())); } function confirmBox() { if (document.isnform.cmb.value != de4) { ctr ++; if (ctr > 2) { alert("I'm sorry. That one's incorrect, too. You're outa here."); location.href = "jv_main.html"; } else { alert("I'm sorry. That is incorrect combination number " + ctr + ". Try again"); } } else { if (confirm("That is the correct Combination. Click OK to proceed to...")) { //location.href = de12 + "htm"; alert("Unmark the above line(in the code) if you use this for 'real'") } } } // --> </SCRIPT> </HEAD> <BODY BGCOLOR="white"> <!--Your page goes here and this script to paint to screen is placed where you want it to appear in your document. --> <SCRIPT LANGUAGE="JavaScript"> <!-- Hide from JavaScript-Impaired Browsers prtComb(); document.write("<B>The combination for the lock above is now " + de4 + ".</B>"); // End hiding --> </SCRIPT> <P> <TABLE WIDTH=486 BORDER="0"> <TR><TD><HR NOSHADE></TD></TR> <TR><TD><B>Here's How the Combination Lock Works:</B> <P>The combination is a pattern rather than a fixed, unchanging password. The letters to be typed change every time the screen is loaded. (Hit your Reload button to verify this) For this example, the pattern is a "T". But it can be set to any "pattern" you wish. The combination can be seen as 12358 (in that order) in the table below:<P></TD></TR> </TABLE> <TABLE BORDER=3> <TR><TD COLSPAN=3 ALIGN=CENTER><FONT SIZE=4><B>Pattern for Combination<BR>Above Shown in Red</B></FONT></TD></TR> <TR> <TD ALIGN=CENTER><FONT COLOR="red" SIZE=4><B>1</B></FONT></TD> <TD ALIGN=CENTER><FONT COLOR="red" SIZE=4><B>2</B></FONT></TD> <TD ALIGN=CENTER><FONT COLOR="red" SIZE=4><B>3</B></FONT></TD></TR> <TR> <TD ALIGN=CENTER><FONT COLOR="blue" SIZE=4><B>4</B></FONT></TD> <TD ALIGN=CENTER><FONT COLOR="red" SIZE=4><B>5</B></FONT></TD> <TD ALIGN=CENTER><FONT COLOR="blue" SIZE=4><B>6</B></FONT></TD></TR> <TR> <TD ALIGN=CENTER><FONT COLOR="blue" SIZE=4><B>7</B></FONT></TD> <TD ALIGN=CENTER><FONT COLOR="red" SIZE=4><B>8</B></FONT></TD> <TD ALIGN=CENTER><FONT COLOR="blue" SIZE=4><B>9</B></FONT></TD></TR> </TABLE> <p> <b>Caution:</b> This will not work on Win3.x machines at present. <hr>

1998 Copyright (C) Next Step All Rights Reserved