﻿/*


	Custom JS for player registration page
	(uses JQuery library - ensure it is loaded first)


*/
$(document).ready(function()
{
	//Focus first form element
	$("#ctl00_cphMainBody_tblRegistrationForm").find("input:first").focus();
	
});

function SetPlayerImage(ImagePath)
{
	$("#ctl00_cphMainBody_txtPlayerImage").val(ImagePath);
}

function ClientValidateContactDetails(source, arguments) {
	//Should enter at least one of mobile, home or work phone


	var Mobile = jQuery.trim($("#ctl00_cphMainBody_txtPlyrMobilePhone").val());
	var Home = jQuery.trim($("#ctl00_cphMainBody_txtPlyrHomePhone").val());
	var Work = jQuery.trim($("#ctl00_cphMainBody_txtPlyrWorkPhone").val());

	if (Mobile == "" && Home == "" && Work == "") {
		arguments.IsValid = false;
	}
	else
	{
		arguments.IsValid = true;
	}
	
}

