You need to double-escape the quotes inside the string with \\\: once for the string itself and once for the inline JavaScript.
return '<div class="contactForm">'+
'<input type="text" name="contactName" onBlur="if (this.value == \\\"\\\") {this.value == \\\"Name\\\";}" onFocus="if ((this.value == \\\"\\\") || (this.value == \\\"Name\\\")) {this.value = \\\"\\\";};" value="Name" style="">'+
If you want to make it a bit more legible you can use single quotes that need to be escaped only once.
return '<div class="contactForm">'+
'<input type="text" name="contactName" onBlur="if (this.value == \'\') {this.value == \'Name\';}" onFocus="if ((this.value == \'\') || (this.value == \'Name\')) {this.value = \'\';};" value="Name" style="">'+