	/************************************************************************************************************************
	Function : validateUserDetails
	Params   : String
	Logic	 : If string contains only A-Z or a-z or 0-9 alpha-character then it will return true. Else it will return false.
	**************************************************************************************************************************/
	function validateUserDetails(){
		var sFirstName = document.forms['myForm'].elements['myForm:fname'];
			if(!alphaCharWithSpace(trimValue(sFirstName.value))){
				alert("Please Enter Valid Name.");
				sFirstName.focus();
				return false;
			}

		/*var sLastName = document.forms['myForm'].elements['myForm:lname'];
			if(!alphaCharWithoutSpace(sLastName.value)){
				alert("Please Enter Valid Last Name");
				sLastName.focus();
				return false;
			}*/
		
		var address1 = document.forms['myForm'].elements['myForm:address1'];
			if(trimValue(address1.value)==''){
			   alert('Please Enter Your Address.');
			   address1.focus();
			   return false;
			}
		
		var country = document.forms['myForm'].elements['myForm:country'];
			if(country.value==''){
				alert('Please Select Country.');
				country.focus();
				return false;
			}
		
		var state = document.forms['myForm'].elements['myForm:state'];
			if(state.value==''){
				alert('Please Select State.');
				state.focus();
				return false;
			}

		var city = document.forms['myForm'].elements['myForm:city'];
			if(city.value==''){
				alert('Please Select City.');
				city.focus();
				return false;
			}
		
		var pin = document.forms['myForm'].elements['myForm:zip'];
			if((!alphaNumericCharWithoutSpace(pin.value)) || pin.value.length<5 || pin.value.length>6){
					alert("Please Enter Valid Zip Code");
					pin.focus();
					return false;
			 }


		var dayPhone = document.forms['myForm'].elements['myForm:phoneNumber'];
			if(!numericCharWithoutSpace(dayPhone.value) || dayPhone.value.length < 10){
				alert("Please Enter Valid Telephone Number");
				dayPhone.focus();
				return false;
			}
	 
		var mobileNumber = document.forms['myForm'].elements['myForm:mobilephoneNumber'];
			if(!numericCharWithoutSpace(mobileNumber.value) || mobileNumber.value.length!=10){
				alert("Please Enter Valid Mobile Number");
				mobileNumber.focus();
				return false;
			}

		var sEmail = document.forms['myForm'].elements['myForm:emailId'];
			if(!checkEmail(sEmail.value)){
				alert("Please Enter Valid Email ID");
				sEmail.focus();
				return false;
			}
		
		var currency = document.forms['myForm'].elements['myForm:currency'];
			if(currency!=undefined && currency.value==''){
				alert('Please Select Currency.');
				currency.focus();
				return false;
			}
		var sysTime = new Date();
		var sysDate = sysTime.getDate();
		var sysMon = sysTime.getMonth();
		var sysYr = sysTime.getFullYear();
		
		var date = document.forms['myForm'].elements['myForm:date'];
			if(date!=undefined && date.value==''){
				alert('Please Select Date.');
				date.focus();
				return false;
			}

		var month = document.forms['myForm'].elements['myForm:month'];
			if(month!=undefined && month.value==''){
				alert('Please Select Month.');
				month.focus();
				return false;
			}

		var year = document.forms['myForm'].elements['myForm:year'];
			if(year!=undefined && year.value==''){
				alert('Please Select Year.');
				year.focus();
				return false;
			}else if(year.value > sysYr){
				alert('Please select valid Year.');
				year.focus();
				return false;
			 }else if(year.value == sysYr && month.value > (sysMon+1)){
				alert('Please select valid Month.');
				year.focus();
				return false;
			 }else if(date.value > sysDate && year.value == sysYr && month.value == (sysMon+1)){
				alert('Please select valid Date.');
				year.focus();
				return false;
			 }
		
		return true;
	}
	
	function isShippingAddressValid(){
		/*var sEmail = $('shipEmail').value;
		if(!checkEmail(sEmail)){
			alert("Please Enter Valid Email ID");
			$('shipEmail').focus();
			return false;
		}*/
		var name = $('shipFname').value;
		if(!alphaCharWithSpace(trimValue(name))){
			alert("Please Enter Valid Shipping Name.");
			$('shipFname').focus();
			return false;
		}
		var address1 = trimValue($('shipAddress1').value);
		if(address1==''){
			alert('Please Enter Your Shipping Address.');
			$('shipAddress1').focus();
			return false;
		}else if(address1.length > 100){
			alert('Shipping Address Must Have Less Than 100 Character.');
			$('shipAddress1').focus();
			return false;
		}	
		var cnt = $('shipCountryValue').value;
		countryCode = cnt;
		if(cnt==''){
			alert('Please Select Shipping Country.');
			$('shipCountryValue').focus();
			return false;
		}
	
		var st = $('shipStateValue').value;
		if(st==''){
			alert('Please Select Shipping State.');
			$('shipStateValue').focus();
			return false;
		}
	
		var ct = $('shipCityValue').value;
		if(ct==''){
			alert('Please Select Shipping City.');
			$('shipCityValue').focus();
			return false;
		}
		var name = $('shipOtherCity').value;
		if(name!='' && !alphaCharWithSpace(trimValue(name))){
			alert("Please Enter Valid Other Shipping City.");
			$('shipOtherCity').focus();
			return false;
		}

		var pin = $('shipZip').value;
		if((!alphaNumericCharWithoutSpace(pin)) || pin.length<5 || pin.length>6){
			alert("Please Enter Valid Shipping Zip Code.");
			$('shipZip').focus();
			return false;
		}
		var dayPhone =$('shipTelephoneNumber').value;
		if(!numericCharWithoutSpace(dayPhone) || dayPhone.length<2){
			alert('Please Enter Valid Telephone Number.');
			$('shipTelephoneNumber').focus();
			return false;
		}
		var mobile =$('shipMobileNumber').value;
		if(!numericCharWithoutSpace(mobile) || mobile.length<10){
			alert('Please Enter Valid Mobile Number.');
			$('shipMobileNumber').focus();
			return false;
		}
		return true;
	}
	function isBillingAddressValid(){
		var name = $('billFname').value;
		if(!alphaCharWithSpace(trimValue(name))){
			alert("Please Enter Valid Billing Name.");
			$('billFname').focus();
			return false;
		}
		var address1 = trimValue($('billAddress1').value);
		if(address1==''){
			alert('Please Enter Your Billing Address.');
			$('billAddress1').focus();
			return false;
		}else if(address1.length > 100){
			alert('Billinging Address Must Have Less Than 100 Character.');
			$('billAddress1').focus();
			return false;
			
		}	
		var cnt = $('billCountryValue').value;
		countryCode = cnt;
		if(cnt==''){
			alert('Please Select Billing Country.');
			$('billCountryValue').focus();
			return false;
		}
	
		var st = $('billStateValue').value;
		if(st==''){
			alert('Please Select Billing State.');
			$('billStateValue').focus();
			return false;
		}
	
		var ct = $('billCityValue').value;
		if(ct==''){
			alert('Please Select Billing City.');
			$('billCityValue').focus();
			return false;
		}
		
		var name = $('billOtherCity').value;
		if(name!='' && !alphaCharWithSpace(trimValue(name))){
			alert("Please Enter Valid Other Billing City.");
			$('billOtherCity').focus();
			return false;
		}

		var pin = $('billZip').value;
		if((!alphaNumericCharWithoutSpace(pin)) || pin.length<5 || pin.length>6){
			alert("Please Enter Valid Billing Zip Code.");
			$('billZip').focus();
	 		return false;
		}
		var dayPhone =$('billTelephoneNumber').value;
		if(!numericCharWithoutSpace(dayPhone) || dayPhone.length<2){
			alert('Please Enter Valid Telephone Number.');
			$('billTelephoneNumber').focus();
			return false;
		}
		var mobile =$('billMobileNumber').value;
		if(!numericCharWithoutSpace(mobile) || mobile.length<10){
			alert('Please Enter Valid Mobile Number.');
			$('billMobileNumber').focus();
			return false;
		}
		/*var sEmail = $('billEmail').value;
		if(!checkEmail(sEmail)){
			alert("Please Enter Valid Email ID");
			$('billEmail').focus();
			return false;
		}*/
		return true;
	}
