//AUTHOR : Mr.Nitin Patil, Web Developer, Zweck Solutions
//DESCRIPTION : Contains generic functions required to make the form validation

	var regXName = new RegExp("^[A-Za-z]")
	var regXPhone = new RegExp("^[(+0-9)]")
	var regXMobile = new RegExp("^[+0-9]")
	var regXFax = new RegExp("^[+0-9]")
	var emailStr = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/

//----------------------------------------------------------------------------------------------------------
	function CheckIsNAN(fieldComponent, txtTitle)
	{
		if(isNAN(fieldComponent.value))
		{
			alert("Please Fill the Numbers only " + txtTitle)
			fieldComponent.value = ""
			fieldComponent.focus()
			return false
		}
	}
//----------------------------------------------------------------------------------------------------------
	function msgDisplay(fieldComponent, txtTitle)
	{
		alert("Please Fill " + txtTitle)
		fieldComponent.value = ""
		fieldComponent.focus()
		return false
	}
//----------------------------------------------------------------------------------------------------------
	function blankCheck(fieldComponent, txtTitle){
		if(fieldComponent.value==""){
			msgDisplay(fieldComponent, txtTitle)
			return false
 		}else{
			return true
		}
	}
//----------------------------------------------------------------------------------------------------------
	//function nameCheck(name){
	//	if(name.search(/^\w+(b?|\w*)/)==-1){
	//		return false
	//	}else{
	//		return true
	//	}
	//}
//----------------------------------------------------------------------------------------------------------
	function nameCheck(fieldComponent, txtTitle){
		if(fieldComponent.value.match(regXName)){
			return true
		}else{
			msgDisplay(fieldComponent, txtTitle)
			return false
		}
	}
//----------------------------------------------------------------------------------------------------------
	function emailCheck(fieldComponent, txtTitle){
		if(fieldComponent.value.search(emailStr)== -1){
			msgDisplay(fieldComponent, txtTitle)
			return false
		}else{
			return true
		}
	}
//----------------------------------------------------------------------------------------------------------
	//function phoneCheck(phone){	
	//	if(isNaN(phone)){
	//		return false
	//	}else{
	//		return true
	//	}
	//}
//----------------------------------------------------------------------------------------------------------
	function phoneCheck(fieldComponent, txtTitle){	
		if(fieldComponent.value.match(regXPhone)){
			return true
		}else{
			msgDisplay(fieldComponent, txtTitle)
			return false
		}
	}
//----------------------------------------------------------------------------------------------------------
	function mobileCheck(fieldComponent, txtTitle){	
		if(fieldComponent.value.match(regXMobile)){
			return true
		}else{
			msgDisplay(fieldComponent, txtTitle)
			return false
		}
	}	
//----------------------------------------------------------------------------------------------------------
	function faxCheck(fieldComponent, txtTitle){	
		if(fieldComponent.value.match(regXFax)){
			return true
		}else{
			msgDisplay(fieldComponent, txtTitle)
			return false
		}
	}	
//----------------------------------------------------------------------------------------------------------
	function cityCheck(fieldComponent, txtTitle){
		if(fieldComponent.value.search(/^\w+/)==-1){
			msgDisplay(fieldComponent, txtTitle)
			return false
		}else{
			return true
		}
	}
//----------------------------------------------------------------------------------------------------------
	
