<!-----


//********** Starts of Form Check Script *********

function chkForm()
{
	var path = document.FrmFeedback;
	var companyName = document.FrmFeedback.companyName;
	var product = document.FrmFeedback.product;
	var name = document.FrmFeedback.name;
	var designation = document.FrmFeedback.designation;
	var email = document.FrmFeedback.email;
	var phone = document.FrmFeedback.phone;
	var fax = document.FrmFeedback.fax;
	var address = document.FrmFeedback.address;




	if (companyName.value == '')
	{
		alert('Please Enter Compnay Name');
		companyName.className='inputBoxError';
		companyName.focus();
		return;
	}



	if (product.value == '')
	{
		alert('Please specify Product/Service related with your Feedback');
		product.className='inputBoxError';
		product.focus();
		return;
	}




	if (name.value == '')
	{
		alert('Please Enter Your Name');
		name.className='inputBoxError';
		name.focus();
		return;
	}

	chkValidChars = name.value.toLowerCase();
	if ( !isCharsInBag(chkValidChars, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ -'" ))
	{
		alert("Invalid Name! Please do not use any Numeric or Special Characters" );
		name.className='inputBoxError';
		name.select();
		return;
	}



	if (designation.value != '')
	{

		chkValidChars = designation.value.toLowerCase();
		if ( !isCharsInBag(chkValidChars, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ -'" ))
		{
			alert("Invalid Entry! Please do not use any Numeric or Special Characters in Designation Field" );
			designation.className='inputBoxError';
			designation.select();
			return;
		}

	}		




	if (email.value == '')
	{
		alert('Please Enter Your Email');
		email.className='inputBoxError';
		email.focus();
		return;
	}

	if (email.value != '')
	{

		var testresults
		var str=email.value
		var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
		if (filter.test(str)){}

		else
		{
			alert("Invalid Email! Please enter valid Email Address")
			email.className='inputBoxError';
			email.select();
			return;
		}


	}



	if (phone.value == '')
	{
		alert('Please Enter Your Contact Number');
		phone.className='inputBoxError';
		phone.focus();
		return;
	}




	if (address.value == '')
	{
		alert('Please Enter Your Contact Information');
		address.className='inputBoxError';
		address.focus();
		return;
	}



	path.action = '../mail/feedbackmail.asp';
	path.submit();

}


function isCharsInBag (s, bag)
{
	var i;
	// Search through string's characters one by one.
	// If character is in bag, append to returnString.

	for (i = 0; i < s.length; i++)
	{
		// Check that current character isn't whitespace.
		var c = s.charAt(i);
		if (bag.indexOf(c) == -1) return false;
	}

	return true;
}



function dateFunc()
{
	theDate = new Date();
	theDay = theDate.getDate();
	theMonth = theDate.getMonth() + 1;
	theYear = theDate.getFullYear();
	dateObj = (theDay + "/" +theMonth + "/" +theYear);
	document.FrmFeedback.date.value= dateObj;
}



function chkDisable()
{

	var radioOthers = document.FrmFeedback.aboutKalsoft;
	var otherSpecification = document.FrmFeedback.otherSpecification;

	if (radioOthers[5].checked == true)
	{
		otherSpecification.disabled = false;
	}

	else
	{
		otherSpecification.disabled = true;
	}
}


//********** Ends of Form Check Script *********



//----->

