function addNextServiceField() {
	var countFields = jQuery('#fCountServiceFields').val();
	countFields++;
	jQuery('#fCountServiceFields').attr('value',countFields);
	var content = '<tr id="serviceFields-row-'+countFields+'"><td><input type="text" value="" name="fStartDate'+countFields+'" class="short2" /></td><td><input type="text" value="" name="fDepartTime'+countFields+'" class="short2" /></td><td><input type="text" value="" name="fStartTime'+countFields+'" class="short2" /></td><td><input type="text" value="" name="fStopTime'+countFields+'" class="short2" /></td><td><input type="text" value="" name="fReturnTime'+countFields+'" class="short2" /></td><td><input type="text" value="" name="fWorkHours'+countFields+'" class="short2" /></td></tr>';
	jQuery('#removePreviousServiceFieldButton').show();
	jQuery('#serviceFields').append(content);
}


function removePreviousServiceField() {
	var countFields = jQuery('#fCountServiceFields').val();
	jQuery('#serviceFields-row-'+countFields).remove();
	countFields--;
	if(countFields == 1)
		jQuery('#removePreviousServiceFieldButton').hide();
	jQuery('#fCountServiceFields').attr('value',countFields);
}

function addNextPartsField() {
	var countFields = jQuery('#fCountPartsFields').val();
	countFields++;
	jQuery('#fCountPartsFields').attr('value',countFields);
	var content = '<tr id="partsFields-row-'+countFields+'"><td><input type="text" value="" name="Qty'+countFields+'" class="short3" /></td><td><input type="text" value="" name="Vendor'+countFields+'" class="short3" /></td><td><input type="text" value="" name="PartNumber'+countFields+'" class="short3" /></td><td><input type="text" value="" name="fDescription'+countFields+'" class="short3" /></td><td><input type="text" value="" name="fSnFromCustomer'+countFields+'" class="short3" /></td><td><input type="text" value="" name="fSnToCustomer'+countFields+'" class="short3" /></td><td><input type="text" value="" name="fTotalPrice'+countFields+'" class="short3" /></td></tr>';
	jQuery('#removePreviousPartsFieldButton').show();
	jQuery('#partsFields').append(content);
}


function removePreviousPartseField() {
	var countFields = jQuery('#fCountPartsFields').val();
	jQuery('#partsFields-row-'+countFields).remove();
	countFields--;
	if(countFields == 1)
		jQuery('#removePreviousPartsFieldButton').hide();
	jQuery('#fCountPartsFields').attr('value',countFields);
}