﻿var emailSubscription = document.getElementById('emailSubscription')

// If javascript is enabled, set the example text
if (emailSubscription) {
	setExampleText()
}

// When the input element recieves focus this function will be called	
function clearExampleText() {
	if (emailSubscription.value == "Enter an email address") {
		emailSubscription.value="";
		emailSubscription.style.color="black";
	}
}

// Sets the example text
function setExampleText() {
	emailSubscription.value="Enter an email address";
	emailSubscription.style.color="gray";			
}

//When the input element loses focus and has no value, this function will be called
function replaceExampleText() {
	if (emailSubscription.value == "") {
		setExampleText();
	}
}
