	function myRegister()
	{
		if(myform.FirstName.value =="" || myform.FirstName.length > 50)
		{
			alert("Please enter your first name.");
			document.myform.FirstName.focus();
		}
		else if(myform.LastName.value =="" || myform.LastName.length > 50)
		{
			alert("Please enter your last name.");
			document.myform.LastName.focus();
		}
		else if(myform.Address.value =="" || myform.Address.length > 100)
		{
			alert("Please enter your address.");
			document.myform.Address.focus();
		}
		else if(myform.City.value =="" || myform.City.length > 50)
		{
			alert("Please enter your city.");
			document.myform.City.focus();
		}
		else if(myform.State.value =="BLANKSELECTED")
		{
			alert("Please select your state.");
			document.myform.State.focus();
		}
		else if(myform.ZipCode.value =="" || myform.ZipCode.length > 20)
		{
			alert("Please enter your zip code.");
			document.myform.ZipCode.focus();
		}
		else
		{
			var myPos = 0;
			var myEmail = myform.Email.value;
			var myAt = myEmail.indexOf('@');	
			var myDot = myEmail.lastIndexOf('.');

			if(myAt==-1 || myAt > myDot)
			{
				alert("Please enter your valid e-mail.");
				document.myform.Email.focus();
			}
			
			else if((myform.DayPhone.value =="" || myform.DayPhone.length > 20) && (myform.NightPhone.value =="" || myform.NigthPhone.length > 20))
			{
				alert("Please enter your contact phone.");
				document.myform.DayPhone.focus();
			}
			else if(myform.Details.value =="")
			{
				alert("Please enter details.");
				document.myform.Details.focus();
			}
			else
			{
				myform.submit();
			}
		}
	}
	
	
	function myForgotPassword()
	{
		var myPos = 0;
		var myEmail = myform.Email.value;
		var myAt = myEmail.indexOf('@');	
		var myDot = myEmail.lastIndexOf('.');

		if(myAt==-1 || myAt > myDot)
		{
			alert("Please enter your valid e-mail.");
			document.myform.Email.focus();
		}
		else
		{
			myform.submit();
		}
	}
	
	function ContactUS()
	{
		if(myform.Details.value =="")
		{
			alert("Please enter details.");
			document.myform.Details.focus();
		}
		else
		{
			myform.submit();
		}
	}
	
	function myChangeAddress()
	{
		if(myform.Address.value =="" || myform.Address.length > 100)
		{
			alert("Please enter your address.");
			document.myform.Address.focus();
		}
		else if(myform.City.value =="" || myform.City.length > 50)
		{
			alert("Please enter your city.");
			document.myform.City.focus();
		}
		else if(myform.State.value =="BLANKSELECTED")
		{
			alert("Please select your state.");
			document.myform.State.focus();
		}
		else if(myform.ZipCode.value =="" || myform.ZipCode.length > 20)
		{
			alert("Please enter your zip code.");
			document.myform.ZipCode.focus();
		}			
		else if((myform.DayPhone.value =="" || myform.DayPhone.length > 20) && (myform.NightPhone.value =="" || myform.NigthPhone.length > 20))
		{
			alert("Please enter your contact phone.");
			document.myform.DayPhone.focus();
		}
		else
		{
			myform.submit();
		}
	}
	
	
	function myChangePassword()
	{
		var oldpassword = myform.OldPassword.value;
		var newpassword = myform.NewPassword.value;
		var confirmnewpassword = myform.ConfirmNewPassword.value;
		
		if(oldpassword=="")
		{
			alert("Enter your old password.");
			myform.OldPassword.focus();
		}
		else if(newpassword.length < 5)
		{
			alert("Enter your new password minimum of 5 characters.");
			myform.NewPassword.focus();
		}
		else if(newpassword != confirmnewpassword)
		{
			alert("Your new password is not matched.");
			myform.NewPassword.focus();
		}
		else
		{
			myform.submit();
		}
	}
	
	
	
										
	function myGrantSeminarRegistration()
	{
		if(myform.FirstName.value =="" || myform.FirstName.length > 50)
		{
			alert("Please enter your first name.");
			document.myform.FirstName.focus();
		}
		else if(myform.LastName.value =="" || myform.LastName.length > 50)
		{
			alert("Please enter your last name.");
			document.myform.LastName.focus();
		}
		else if(myform.CompanyName.value =="" || myform.CompanyName.length > 100)
		{
			alert("Please enter your company name.");
			document.myform.CompanyName.focus();
		}
		else if(myform.Title.value =="" || myform.Title.length > 100)
		{
			alert("Please enter your job title.");
			document.myform.Title.focus();
		}
		
		else if(myform.Address.value =="" || myform.Address.length > 100)
		{
			alert("Please enter your address.");
			document.myform.Address.focus();
		}
		else if(myform.City.value =="" || myform.City.length > 50)
		{
			alert("Please enter your city.");
			document.myform.City.focus();
		}
		else if(myform.State.value =="BLANKSELECTED")
		{
			alert("Please select your state.");
			document.myform.State.focus();
		}
		else if(myform.ZipCode.value =="" || myform.ZipCode.length > 20)
		{
			alert("Please enter your zip code.");
			document.myform.ZipCode.focus();
		}
		else if(myform.CompanyPhone.value =="" || myform.CompanyPhone.length > 20)
		{
			alert("Please enter your company phone.");
			document.myform.CompanyPhone.focus();
		}
		else
		{
			var myPos = 0;
			var myEmail = myform.Email.value;
			var myAt = myEmail.indexOf('@');	
			var myDot = myEmail.lastIndexOf('.');

			if(myAt==-1 || myAt > myDot)
			{
				alert("Please enter your valid e-mail.");
				document.myform.Email.focus();
			}
			else
			{
				myform.submit();
			}
		}
	}
	
	
	function myFormatMask(myString,myControl,myPosition,myLength,myMask)
	{   
		var Pos = myPosition.split(',');
		for (var x = 0; x <= Pos.length; x++)
		{
			for (var y = 0; y <= myString.length; y++)
			{
		 		if (y == Pos[x])
		 		{
		  			if (myString.substring(y, y+1) != myMask)
		  			{
		   				if (event.keyCode != 8)
		   				{
		   				    myString = myString.substring(0,y) + myMask + myString.substring(y,myString.length);
	       				}
		  			}
		 		}
			}
	 	}
		myControl.value = myString
	}
	
	


	

	



	
