function usersChoicesScript(){
setTimeout("doNow()",1)
//FixedLinks
}

function doNow(){
	$('.oneImg:eq(0)').after('<h1 class="oneImgH1">'+$('#FixedLinks li.selected').text()+'</h1>')
	$('.oneImgH1:gt(0)').remove()


$('#choices_content #links li:nth-child(3n):not(#choices_content ul#links.conditionsA2Z li)').after('<hr style="clear:both;border:none;border-bottom:dotted 1px #ccc;height:0">')
	}
	
$(document).ready(function() {

$('form.webform').submit(function(){
formSubmit=true;
errVal="";
	$(this).find('*:[name]').each(function(){
		if($(this).attr('name').indexOf('_TR_')!==-1 || $(this).attr('name').indexOf('_ER_')!==-1 || $(this).attr('name').indexOf('_NR_')!==-1){
			//	empty value
			if($(this).val()=='') {
				errVal+=$(this).attr('name').replace(/_TR_/gi,'').replace(/_ER_/gi,'').replace(/_NR_/gi,'').replace(/_/gi,' ')+' :\ncannot be blank\n\n';
				formSubmit=false;
				return;
				}
			//	not a number
			if($(this).attr('name').indexOf('_NR_')!==-1) {
				if($(this).val().match(/^\d+$/)==null){
					errVal+=$(this).attr('name').replace(/_NR_/gi,'').replace(/_/gi,' ')+' :\nnumbers only permitted (no blank space)\n\n';
					formSubmit=false;
					return;
					}
				}
			//	invalid email 
			if($(this).attr('name').indexOf('_ER_')!==-1){
				var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
				if(re.test($(this).val())==false){
					errVal+=$(this).attr('name').replace(/_ER_/gi,'').replace(/_/gi,' ')+' :\nemail address is invalid\n\n';
					formSubmit=false;
					return;
					}
				}
			}
		})
	//alert('I AM WORKING ON THIS');
	if(formSubmit){
		$(this).attr('action','/webedit/process.php')
		}else{
			alert('ERROR - Please complete this form correctly\n\n\Note:\n\n'+errVal);
			//alert('ERROR - Please complete this form correctly\n\n\NOTE:\nCheck you have entered any required information \nCheck that any email address entered is valid\nCheck that any numerical values are valid');
			return false;
			}
	})		

 });	
