/* 
 * Contact Form Javascript Fallbacks
 * Author: Frank Stallone & Michael Fernandez
 *
 */
 
// I can haz placeholder attribute?

function elementSupportsAttribute(element,attribute) {
	var test = document.createElement(element);
	if (attribute) {
		return true;
	} else {
		return false;
	}
}

// No placeholder attribute fallback

if  (!elementSupportsAttribute('input','placeholder')) {
	// Fallback here
}

// No autofocus attribute fallback, get id#Name and focus

if  (!elementSupportsAttribute('input','autofocus')) {
	// Fallback here
	document.getElementById('Name').focus();
}

// No required attribute fallback

if (!elementSupportAttribute('input','required')) {
	// Fallback here 
}

// No pattern attribute fallback

if (!elementSupportAttribute('input','pattern')) {
	// Fallback here 
}
