function calculatePaint()

{
room_width = Number(document.paintForm.roomw.value);
room_length = Number(document.paintForm.rooml.value);
ceiling_height = Number(document.paintForm.ceilingh.value);

door_width = document.paintForm.doorw.value;
door_height = document.paintForm.doorh.value;
num_doors = document.paintForm.doornum.value;

window_width = document.paintForm.windoww.value;
window_height = document.paintForm.windowh.value;
num_windows = document.paintForm.windownum.value;


wall_area = (room_width + room_length) * 2;
total1_area = wall_area * ceiling_height;

door_area = door_width * door_height;
total_door_area = door_area * num_doors;

window_area = window_width * window_height;
total_window_area = window_area * num_windows;

total_space = total_door_area + total_window_area;


total2_area = total1_area - total_space;
document.paintForm.total2.value = total2_area;


give_cans = total2_area / 350;
document.paintForm.givecans.value = give_cans.toFixed(2);

}
