var SignUp =
{
	text: null,
	init: function()
	{
		SignUp.text = $F('suemail');
		Event.observe($('suemail'), 'focus', SignUp.clear);
		Event.observe($('suemail'), 'blur', SignUp.replace);
		Event.observe($('h-signup'), 'submit', SignUp.submit);
	},

	clear: function(event)
	{
		if ($F(this) == SignUp.text)
			this.clear();
	},

	replace: function(event)
	{
		//	If its an empty box, clear it.
		if (!this.present())
		{
			this.value = SignUp.text;
			$('suvemail').value = '';
		}
	},

	submit: function(event)
	{
		//	Not quiet ready to go yet.
		if (!$('suemail').present() || $F('suemail') == SignUp.text)
		{
			Event.stop(event);
			alert('Please Fill In Your email');
			$('suemail').focus();
		}
		//	Email is in box, don't check if its valid, cause the contact form will handle that
		else
		{
			if (!$('suvemail').present())
				$('suvemail').value = $F('suemail');
		}
	}
};

Event.observe(window, 'load', SignUp.init);
