function OnLoad()
{
	Validate();
	ValidateForm2();
}

function Validate()
{

	var allValid = true;
	if (!ValidateState(document.getElementById('Seminar'), document, true))
	{
		allValid = false;
	}
	if (!ValidateText(document.getElementById('firstname'), document, true))
	{
		allValid = false;
	}
	if (!ValidateText(document.getElementById('lastname'), document, true))
	{
		allValid = false;
	}
	if (!ValidateText(document.getElementById('partnername'), document, true))
	{
		allValid = false;
	}
	if (!ValidateEmail(document.getElementById('email'), document, true))
	{
		allValid = false;
	}
	if (!ValidatePhoneNumber(document.getElementById('htelephone'), document, true))
	{
		allValid = false;
	}
	if (!ValidateState(document.getElementById('SelectState'), document, true))
	{
		allValid = false;
	}
	if (allValid)
	{
		document.getElementById('submit').className = "SubmitJoin";
	}
	else
	{
		document.getElementById('submit').className = "SubmitOffJoin";
	}	
	document.getElementById('submit').disabled = !allValid;
}

function ValidateForm2()
{
	//alert(document.join2.Seminar2.value);

	var allValid = true;
	if (!ValidateState(document.getElementById('Seminar2'), document, true))
	{
		allValid = false;
	}
	if (!ValidateText(document.getElementById('firstname2'), document, true))
	{
		allValid = false;
	}
	if (!ValidateText(document.getElementById('lastname2'), document, true))
	{
		allValid = false;
	}
		if (!ValidateText(document.getElementById('partnername2'), document, true))
	{
		allValid = false;
	}
	if (!ValidateEmail(document.getElementById('email2'), document, true))
	{
		allValid = false;
	}
	if (!ValidatePhoneNumber(document.getElementById('htelephone2'), document, true))
	{
		allValid = false;
	}
	if (!ValidateState(document.getElementById('SelectState2'), document, true))
	{
		allValid = false;
	}
	if (allValid)
	{
		document.getElementById('submit2').className = "SubmitJoin";
	}
	else
	{
		document.getElementById('submit2').className = "SubmitOffJoin";
	}
	document.getElementById('submit2').disabled = !allValid;
}

function ValidateFormSF1()
{
	//alert(document.join1.SeminarSF1.value);

	var allValid = true;

	if (!ValidateState(document.getElementById('SeminarSF1'), document, true))
	{
		allValid = false;
	}
	if (allValid)
	{
		document.getElementById('submitSF1').className = "SubmitJoinSF1";
	}
	else
	{
		document.getElementById('submitSF1').className = "SubmitOffJoinSF1";
	}
	document.getElementById('submitSF1').disabled = !allValid;
}

function ValidateFormSF2()
{
	//alert(document.join1.SeminarSF1.value);

	var allValid = true;

	if (!ValidateState(document.getElementById('SeminarSF2'), document, true))
	{
		allValid = false;
	}
	if (allValid)
	{
		document.getElementById('submitSF2').className = "SubmitJoinSF2";
	}
	else
	{
		document.getElementById('submitSF2').className = "SubmitOffJoinSF2";
	}
	document.getElementById('submitSF2').disabled = !allValid;
}

function ValidateFormSF3()
{
	//alert(document.join1.SeminarSF1.value);

	var allValid = true;

	if (!ValidateState(document.getElementById('SeminarSF3'), document, true))
	{
		allValid = false;
	}
	if (allValid)
	{
		document.getElementById('submitSF3').className = "SubmitJoinSF3";
	}
	else
	{
		document.getElementById('submitSF3').className = "SubmitOffJoinSF3";
	}
	document.getElementById('submitSF3').disabled = !allValid;
}
