function Check_quantity1()

{

	var val = document.frm1.quantity1.value;



	if(isNaN(parseInt(val))) {



		alert('Please input digit with quantity!');



		return false;

	}



	else {

	

		document.frm1.quantity.value = val;

		document.frm1.submit();

	}

}



function Check_quantity2()

{

	var val = document.frm1.quantity2.value;



	if(isNaN(parseInt(val))) {



		alert('Please input digit with quantity!');



		return false;

	}

	

	else {

	

		document.frm1.quantity.value = val;

		document.frm1.submit();

	}

}



function Check_Reviews() {

	

	var msg = document.frmReviews.text.value;

	var rate = document.getElementsByName('rating');

	var rating = "";
	
	var verification = document.frmReviews.verification_review.value;//09-03-20 added by sky

	

	if(msg.length < 25 || msg.length > 2000) {

		alert('Error: Review text must be greater than 25 and less than 2000 characters!');

		return false;

	}

	

	for(var i=0;i<rate.length;i++) {

		if(rate[i].checked) {

			rating = rate[i].value;

		}

	}

	

	if(!rating) {

		alert('Error: Please select a review rating!');

		return false;

	}

	//-------------------------------------------------------
	//09-03-20 added by sky
	//-------------------------------------------------------
	if(!verification) {
		alert('Error: Please input verification code!');
		return false;
	}
	//-------------------------------------------------------

	alert('Thanks for your review. Submit successfully!');

	return true;

}