Event.observe(window, 'load', function() {

$('useremail').value = 'Your email address';
$('username').value = 'Your name';

Event.observe('username', 'focus', StartTyping);
Event.observe('useremail', 'focus', StartTyping);
Event.observe('submit', 'click', SubmitData);





function StartTyping(event){
	$(this).value = null;
	$(this).style.color = 'black';
}


function ShowThanks(){

	Effect.BlindDown('thanks', {duration:0.5})
}

function SubmitData(event){
if (($('enthusiast').checked == true) || ($('industry').checked == true)){
  new Ajax.Request('writeemails.php', {
  method: 'post',
  parameters: {username:$F('username'), useremail:$F('useremail'), enthusiast:$F('enthusiast'), industry:$F('industry'), indie:$F('indie'), pop:$F('pop'), alternative:$F('alternative'), rockmetal:$F('rockmetal'),punk: $F('punk'),electronic: $F('electronic'), hiphop:$F('hiphop'), country:$F('country') }
  });
  Effect.BlindUp('submit', {duration:0.5})
 ShowThanks();
}
else {
	alert("Please choose a reason!");
}
}






});