﻿function SubmitDetail() {

	if (document.frmCheckout2.txtFirstname.value == '')	{ 
		alert('Please Enter Your First Name.');
		document.frmCheckout2.txtFirstname.focus
		return false;
	}
	
	if (document.frmCheckout2.txtLastname.value == '') { 
		alert('Please Enter Your Last Name.');
		document.frmCheckout2.txtLastname.focus
		return false;
	}
	
	if (document.frmCheckout2.txtEmail.value == '') { 
		alert('Please Enter Your Email Address.');
		document.frmCheckout2.txtFirstname.focus
		return false;
	}
	
	if (document.frmCheckout2.txtAddress.value == '') { 
		alert('Please Enter Your Delivery Address.');
		document.frmCheckout2.txtAddress.focus
		return false;
	}
	
	if (document.frmCheckout2.txtSuburb.value == '') { 
		alert('Please Enter Suburb Details.');
		document.frmCheckout2.txtSuburb.focus
		return false;
	}
	
	if (document.frmCheckout2.txtPostCode.value == ''){ 
		alert('Please Enter Post Code Details.');
		document.frmCheckout2.txtPostCode.focus
		return false;
	}
	
	if (document.frmCheckout2.txtPhone.value == '')	{ 
		alert('Please Enter Daytime Contact Phone Details.');
		document.frmCheckout2.txtPhone.focus
		return false;
	}
	
	if (document.frmCheckout2.txtMobile.value == '') { 
		alert('Please Enter Mobile Details.');
		document.frmCheckout2.txtMobile.focus
		return false;
	}
	
	return true;
}


function cancelorder(){
	if (confirm('Are You Sure You Wish to Cancel This Order? This will remove all items from your shopping bag.')){	
		window.navigate('./checkout.asp?action=CancelOrder');
	}
	return true;
}

function checkout(f){	
	f.Proceed_To_Checkout.value =1;
	return true;
}

function removeAll(f){
	if (confirm('Are You Sure You wish to Remove all items from your shopping bag?'))
		f.FORM_ACTION.value = 'REMOVE_ALL';
	else
		f.FORM_ACTION.value = 'UPDATE_ALL';
	return true;
}
