// JavaScript Document




function validateVoting(){
	var error = '';
	error += validateArtist();
	error += awardCategory();
	error += countryCode();
	error += phoneNumber();
	
		if(error != ''){
		alert(error);
		
		return false;
		}
}






function validateArtist(){
	var error = '';
	var artiste_or_group = document.getElementById('artiste_or_group');
	artiste_or_group.style.backgroundColor = '';
	
	if(artiste_or_group.value == 'Artiste/Group'){
		error += '* Please provide Artiste/Group name.\n';
		artiste_or_group.style.backgroundColor = '';
	}
	
	return error;
	
}



function awardCategory(){
	var error = '';
	var award_category_id = document.getElementById('award_category_id');
	award_category_id.style.backgroundColor = '';
	
	if(award_category_id.value == ''){
		error += '* Please provide Award Category name.\n';
		award_category_id.style.backgroundColor = '';
	}
	
	return error;
	
}



function countryCode(){
	var error = '';
	var country_code = document.getElementById('country_code');
	country_code.style.backgroundColor = '';
	
	if(country_code.value == ''){
		error += '* Please provide country code.\n';
		country_code.style.backgroundColor = '';
	}
	
	return error;
	
}

function phoneNumber(){
	var error = '';
	var phone_number = document.getElementById('phone_number');
	phone_number.style.backgroundColor = '';
	
	if(phone_number.value == 'Phone Number'){
		error += '* Please provide Phone Number.\n';
		phone_number.style.backgroundColor = '';
	}
	
	return error;
	
}
