window.addEvent('domready',function() {
		if ($('Form_VoteForm')) {
			$('Form_VoteForm_name').addEvent('focus', function() {
				if ($('Form_VoteForm_name').getProperty('value').substring(0,6) == 'Please') { 
					$('Form_VoteForm_name').value = '';
					$('Form_VoteForm_name').setProperty('class','');
				}
			});
			
			$('Form_VoteForm_name').addEvent('blur', function() {
				if ($('Form_VoteForm_name').getProperty('value').substring(0,6) == '') { 
					$('Form_VoteForm_name').setProperty('class','error');
					$('Form_VoteForm_name').value = 'Please fill out your name';
				}
			});
			
			$('Form_VoteForm_country').addEvent('focus', function() {
				if ($('Form_VoteForm_country').getProperty('value').substring(0,6) == 'Please') { 
					$('Form_VoteForm_country').value = '';
					$('Form_VoteForm_country').setProperty('class','');
				}
			});
			
			$('Form_VoteForm_country').addEvent('blur', function() {
				if ($('Form_VoteForm_country').getProperty('value').substring(0,6) == '') { 
					$('Form_VoteForm_country').setProperty('class','error');
					$('Form_VoteForm_country').value = 'Please fill out your country';
				}
			});
			
			$('Form_VoteForm_message').addEvent('focus', function() {
				if ($('Form_VoteForm_message').getProperty('value').substring(0,6) == 'Please') { 
					$('Form_VoteForm_message').value = '';
					
				}
			});
		}
});


		 function validate() {
			 	bValid = false;
				if ($('Form_VoteForm_name').getProperty('value').substring(0,6) == 'Please') {
					$('Form_VoteForm_name').value = 'Please enter your name.';
					alert('Please enter your name');
					bValid = false;
				} else {
					bValid = true;
				}
				
				if ($('Form_VoteForm_country').getProperty('value').substring(0,6) == 'Please') { 
					$('Form_VoteForm_country').value = 'Please enter your country.';
					alert('Please enter your country');
					bValid = false;
				} else {
					bValid = true;
				}
				
				if ($('Form_VoteForm_message').getProperty('value').substring(0,6) == 'Please') { 
					$('Form_VoteForm_message').value = '';
				}
				
				if (bValid == true) {
					$('Form_VoteForm').submit();
				}
		 }