// JavaScript Document

function isEmpty(formElement, message) {
	formElement.value = trim(formElement.value);
	
	_isEmpty = false;
	if (formElement.value == '') {
		_isEmpty = true;
		alert(message);
		formElement.focus();
	}
	
	return _isEmpty;
}


function checkShippingAndPaymentInfo()
{
	with (window.document.cardform) {
		if (t.value == ' No Stock') {
			alert('You cannot select unavailable stock');
		t.focus();
		return false;
		
		}else if (quantity.value == '') {
			alert('Select Quantity');
		quantity.focus();
		return false;
		
		}else if (qt.value < quantity.value) {
			alert('Your quantity selection exceeds available stock. Please reduce quantity');
		quantity.focus();
		quantity.select();
		return false;
		/*
		}else if (email.value == '' || email.value.indexOf('@',0)==-1 || email.value.indexOf('.',0)==-1) {
			alert('Enter a valid E mail address');
		email.focus();
		email.select()
		return false;
		
		}else if (passwd.value.length < 3) {
			alert('Password must be between 3 and 32 charcters long ');
		passwd.focus();
		return false;
		
		
		
		}else if (passwd.value == '') {
			alert('Enter Password');
		passwd.focus();
		return false;
		
		
		}else if (window.document.memsign.passwd.value != window.document.memsign.passwd2.value) {
			alert('Confirm Your pasword correctly');
		window.document.memsign.passwd2.focus();
		window.document.memsign.passwd2.select();
		return false;
		
		
		
*/
 

		
		} else {
			return true;
		}
	}
}



