<!-- Begin
var chk = '';
chk=Math.floor(9*Math.random()+1) + Math.floor(9*Math.random()*10) + Math.floor(9*Math.random()*100);

// create an array of image file names                      
var imgs = new Array ( "images/num0.gif", "images/num1.gif", "images/num2.gif", "images/num3.gif", "images/num4.gif", "images/num5.gif", "images/num6.gif", "images/num7.gif", "images/num8.gif", "images/num9.gif" );

// preload all the images

var preload = new Array();                             

for( var i = 1; i < imgs.length; i++ )
{                                            
  preload[i] = new Image();           
  preload[i].src = imgs[i];                                     
}

function RGen() {
chk = '';
num= new Array(4);
for (i=0; i<4; i++) {
num[i]=Math.floor(9*Math.random()+1);
if (num[1]==num[0]) {
while (num[1]==num[0]) {
num[1]=Math.floor(9*Math.random()+1);
   }
}
if (num[2]==num[1] || num[2]==num[0]) {
while (num[2]==num[1] || num[2]==num[0]) {
num[2]=Math.floor(9*Math.random()+1);
   }
}
if (num[3]==num[2] || num[3]==num[1] || num[3]==num[0]) {
while (num[3]==num[2] || num[3]==num[1] || num[3]==num[0]) {
num[3]=Math.floor(9*Math.random()+1);
   }
}
chk = chk + (num[i]);
}
// document.images.pic?.src=imgs[];
w = chk.charAt(0);
x = chk.charAt(1);
y = chk.charAt(2);
z = chk.charAt(3);
  document.images.pic1.src = imgs[w];
  document.images.pic2.src = imgs[x];
  document.images.pic3.src = imgs[y];
  document.images.pic4.src = imgs[z];

}
 
function noChk() {
mt=document.form.QCode.value;
et=document.form.SUB_ADDR.value;
if (mt.match(chk) && et.match("@"))
{
document.form.action = "http://www.thebook.com/cgi-bin/thebook/mail.pl"; 
return true; }
else
 {
alert("I'm sorry. Your Input Code and your Email address must be complete before I can submit this form for processing.");
document.form.SUB_ADDR.focus();
return false;
}

}
 
// End -->

 
