// ===== Set Up =========================================================
// Preload the images to be used with the form
// ======================================================================

var Pic = new Array

Pic[0] = '/imagesource/verzendbutton/button_0.gif'
Pic[1] = '/imagesource/verzendbutton/button_1.gif'

// ----------------------------------------------------------------------
// This section of code preloads the images you named in the Pic[] array
// above, so images will be ready as soon as the page opens.

var p = Pic.length
var preLoad = new Array()
var i = 0;
for (i = 0; i < p; i++){
     preLoad[i] = new Image()
     preLoad[i].src = Pic[i]
}

// ----------------------------------------------------------------------
// The next very short function, switchImage(whichImage,imageNumber),
// handles all image switching in response to mouseOver, mouseOut, and
// mouseDown events.
//
// The variable whichImage carries the *name* of the image to be
// switched (see the comments in the HTML below) -- in this case, either
// 'resetImage' or 'submitImage'.
//
// The variable imageNumber carries the number of the image to be called,
// as per the numbers in the Pic[] array up above.
//
// Read the HTML code comments below to see how to attach this function
// to the images. Note that it's actually hooked to <a href> tags around
// the images, rather than to the images themselves, since NS4 does not
// allow attaching events to images.

function switchImage(whichImage,imageNumber){
   document.images[whichImage].src = preLoad[imageNumber].src
}

function doSubmit()
{
   // optional -- but it gets the lines off the image in IE
   self.focus();
   document.contact.submit();
}

