function validate() {	

	var rtrStatus = true;

	var ErrMsg = 'You left out the following fields:                           ';

	var ErrFName = 'First Name';

	var ErrLName = 'Last Name';

	var ErrBusi1 = 'Business 1';

	var ErrBusi2 = 'Business 2';

	var ErrEmail = 'Email';

	var strEmptyFields = '';

	var thisDoc = document.form1;	

	if (thisDoc.firstname.value.length == 0) {strEmptyFields = strEmptyFields + ' ' + ErrFName + '\n'};

	if (thisDoc.lastname.value.length == 0) {strEmptyFields = strEmptyFields + ' ' + ErrLName + '\n'};

	if (thisDoc.user_email.value.length == 0) {strEmptyFields = strEmptyFields + ' ' + ErrEmail + '\n'};

	if (thisDoc.havebusiness.value.length == 0) {strEmptyFields = strEmptyFields + ' ' + ErrBusi1 + '\n'};

	if (thisDoc.havebusiness2.value.length == 0) {strEmptyFields = strEmptyFields + ' ' + ErrBusi2 + '\n'};



	if (strEmptyFields.length > 0){

		window.alert(ErrMsg + '\n\n' + strEmptyFields)

		rtrStatus = false;

	}else{

		setField(thisDoc);

		rtrStatus = true;

	}



	return rtrStatus;

}



function setField(object){

	var thisDoc = object;

	//Energy Recovery Wheel (Air-to-Air Type) Selections

	if (thisDoc.hp.value.length == 0) {thisDoc.hp.value="-"};

	if (thisDoc.occupation.value.length == 0) {thisDoc.occupation.value="-"};

	if (thisDoc.when.value.length == 0) {thisDoc.when.value="-"};

	if (thisDoc.where.value.length == 0) {thisDoc.where.value="-"};

	if (thisDoc.amount.value.length == 0) {thisDoc.amount.value="-"};



	//set hidden field

	thisDoc.email.value=thisDoc.user_email.value;

	thisDoc.realname.value=thisDoc.firstname.value;

	thisDoc.recipients.value="info@jukebox.com.my,rae.cheah@aseansources.com";

}








