function formatYourPhone(field) { if (field.value.length == 0) { field.value = 'your phone'; var temp = 1; } if (field.value == 'your phone') { if (temp != 1) { field.value=''; } } } function formatYourName(field) { if (field.value.length == 0) { field.value = 'your name'; var temp = 1; } if (field.value == 'your name') { if (temp != 1) { field.value=''; } } }