function calcPaintRoof()
{
	//validate fields
	var areaValue = parseInt(document.getElementById('txt_roof_area').value);
	if (isNaN(areaValue)) {alert('Please enter an integer for area'); return;}
	
	var roof_type;
	
	switch(document.getElementById('cbo_roof_type').value)
	{
		case "rough_tile":
			roof_type = 5;
			break;
		case "smooth_tile":
			roof_type = 6;
			break;
		case "galvanized_roof":
			roof_type = 6;
			break;
	}
	
	var roof_pitch;
	
	switch(document.getElementById('cbo_roof_pitch').value)
	{
		case "high_pitch":
			roof_pitch = 0.3;
			break;
		case "low_pitch":
			roof_pitch = 0.2;
			break;
	}
	
	var totPaint = (areaValue + (areaValue * roof_pitch)) / roof_type * 2;
	totPaint = Math.ceil(totPaint);
	document.getElementById('txt_roof_paintreq').value = totPaint;
}
