function VH_RegistrationChecking()
{
	this.registrationValues = ['company_name','contact_name','contact_phone','contact_email','password','password2'];
	
	this.auth = function(form)
	{
		var returnValue = true;
		
		if ( !VH_Global.CheckFillEmail(document.getElementById('email')) ) returnValue = false;
		if ( !VH_Global.CheckFillField(document.getElementById('password')) ) returnValue = false;
		
		if ( returnValue )
		{
			form.submit();
			return true;
		}
		else
		{
			return false;
		}
	};
	
	
	this.next = function(form)
	{
		//this.registrationValues = ['company_name','contact_name','contact_phone','contact_email','password','password2'];
		var returnValue = true;
		
		if ( form.rules_agreed )
		{
			if ( form.rules_agreed.checked )
			{
				document.getElementById('rules_agreed-status').style.color='black';
			}
			else
			{
				document.getElementById('rules_agreed-status').style.color='red';
				returnValue = false;
			}
		}
		
		if ( !VH_Global.CheckFillField(document.getElementById('company_name')) ) returnValue = false;
		if ( !VH_Global.CheckFillName(document.getElementById('contact_name')) ) returnValue = false;
		if ( !VH_Global.CheckFillField(document.getElementById('contact_phone')) ) returnValue = false;
		if ( !VH_Global.CheckFillEmail(document.getElementById('contact_email')) ) returnValue = false;
		if ( !VH_Global.CheckDblPassword(document.getElementById('password'),document.getElementById('password2')) ) returnValue = false;
		if ( returnValue )
		{
			form.submit();
		}
	};
}


function VHotelAdminChecking(checkpassword)
{
	var registrationValues=['contact_name','contact_phone','contact_email','password','password2'];
	var returnValue=true;
	
	if(!VH_Global.CheckFillName(document.getElementById('contact_name')))returnValue=false;
	if(!VH_Global.CheckFillField(document.getElementById('contact_phone')))returnValue=false;
	
	if ( checkpassword )
	{
		if(!VH_Global.CheckFillEmail(document.getElementById('contact_email')))returnValue=false;
		if (!VH_Global.CheckDblPassword(document.getElementById('password'),document.getElementById('password2')))
		{
			returnValue=false;
		}
	}
	
	return returnValue;
}