function getLetterCount(strValue, strLetter){
	var intCount = -1;
	var intPos = 0;
	while (intPos != -1){
		intCount ++;
		intPos = strValue.indexOf(strLetter, intPos+1);
	}
	return intCount+1;
}
function getSearchRows(strValue, strLetter){
	var intCount = -1;
	var intPos = 0;
	var intPrevPos;
	do {
		intCount ++;
		intPrevPos = intPos;
		intPos = strValue.indexOf(strLetter, intPos+1);
		if (intPrevPos != 0)
			intPrevPos =+ 1;
		strRow = strValue.substr((intPrevPos+1)-1, (intPos-intPrevPos)-1);
		alert(intPos+'-'+intPrevPos+'-'+'->'+strRow+'<-');
	} while (intPos != -1)
	return intCount+1;
}
function checkSearchForm(obj){
    var d = obj;
	if(isEmpty(d.Parts.value))return alertF("At least one item must be filled.", d.Parts);
	var strData = d.Parts.value;
	var intLines = getLetterCount(d.Parts.value,'\n');
	if (intLines > 20)return alertF("Please reduce the number of the rows.", d.Parts);
    return true;
}

