function checkaccountupdate(){
	if($('#yourname').val()==''||$('#yourposition').val()==''){
		$('tr.hiddenrow').css('display','table-row');
		
		alert('Please enter your name and position to confirm these changes.');
		
		return false;
	}else{
		return confirm('Are you sure you wish to send these changes to your account?');
	}
}

function checkNamedFields(strFieldName){
	var result=false;
	
	$('input.optiongridinput').each(function(){
		if($(this).val()!=''){
			result=true;
		}
	});
	
	if(!result){
		alert('Please enter the quantity you wish to purchase into the box(es) provided.');
	}
	return result;
}


function validatequantity(minqty,form) {

	//do we have a min qty? - if not, just submit
	if(minqty!='') {
	
		//does qty field exist?
		if(document.getElementById('quantity')) {
		
			//make sure qty is not empty and not a number (this is the user hopefully pressing delete)
			if(document.getElementById('quantity').value!=''&&!isNaN(document.getElementById('quantity').value)) {
				
				//is the qty greater or equal to min qty? - yes - submit, no - set to min qty
				if(parseInt(document.getElementById('quantity').value)>=parseInt(minqty)) {
					//form.submit();
				} else {
					document.getElementById('quantity').value=minqty;
				}
				
			} else {
				//document.getElementById('quantity').value=minqty;
			}
		}
		
	} else {
	
		//form.submit();
		
	}
}
