<!-- script to select a random image for submission authorisation 
var a = '<img src="images/enquiries/'
var b = '.gif" width="160" height="40" hspace="0" vspace="0" border="0">'

var imgSub = new Array() // sets img name
imgSub[0]="s1";
imgSub[1]="s2";
imgSub[2]="s3";
imgSub[3]="s4";
imgSub[4]="s5";
imgSub[5]="s6";
imgSub[6]="s7";
imgSub[7]="s8";
imgSub[8]="s9";
imgSub[9]="s10";

var imgChk = new Array() // syncs image code
imgChk[0]="SD86R2";
imgChk[1]="NV48Z9";
imgChk[2]="NU86G7";
imgChk[3]="KR39Y5";
imgChk[4]="VS47T6";
imgChk[5]="HT59P8";
imgChk[6]="x12GT5";
imgChk[7]="Ki8r3Y";
imgChk[8]="p9J62b";
imgChk[9]="5DLP2m";

var choice = 0;
var isub = ""; // holds image HTML
var ichk = ""; // holds image code


function selviz(){ // generates random number and writes relevant image to div
	choice=Math.round(Math.random()*(imgSub.length-1));
	isub = a + imgSub[choice] + b;
	ichk = imgChk[choice];
	document.getElementById('imgviz').innerHTML = isub;
}

function chkviz(){ // checks input field against displayed image code and submits or fails with message div popup
	c = imgChk[choice];
	d = document.getElementById('checkme').chkfld.value;
	if ( c == d){
		document.getElementById('checkme').chkfld.value = "";
    	//document.getElementById('enquiries').action = "scriptPage.php";	
		document.getElementById('enquiries').action = "http://www.beldigital.com/mailscript/formmail.cgi";	
		document.getElementById('enquiries').submit();
	}
	else {
	disable();
	document.getElementById('checkme').chkfld.value  = "";
	MM_showHideLayers('failinfo','','show');
	}
	selviz();		
}

function disable(){ // disables form buttons during authorisation div popup
var d = document.enquiries
d.submitme.disabled = true;
d.resetme.disabled = true;
}

function enable(){ // enables form buttons after authorisation div popup
var d = document.enquiries
d.submitme.disabled = false;
d.resetme.disabled = false;
}
//-->