var allowSubmit	= false;

function checkPass (pass1, pass2)
{
	if (pass1 != pass2)
	{
		allowSubmit	= false;
		$('#invalidPassword').css ('display', 'block');
	}
	else
	{
		allowSubmit	= true;
		$('#invalidPassword').css ('display', 'none');
	}
}

function appendHotels (amount)
{
	$('#hotels_div').empty ();
	
	var i;
	for (i = 0; i < amount; i++)
	{
		appendHotel (i + 1);
	}
}
function appendHotelsEn (amount)
{
	$('#hotels_div').empty ();
	
	var i;
	for (i = 0; i < amount; i++)
	{
		appendHotelEn (i + 1);
	}
}

function appendHotel (currentHotel)
{
	var response	= $.ajax ({url: 'backend/genHotelForm.php?current=' + currentHotel, async: false}).responseText;

	$('#hotels_div').append (response);
}
 
function appendHotelEn (currentHotel)
{
	var response	= $.ajax ({url: 'backend/genHotelForm.en.php?current=' + currentHotel, async: false}).responseText;

	$('#hotels_div').append (response);
}

		
		function showPlaatsFields (this_value)
		{
			if (this_value >= 1)
				{
			$('#_regio').hide ();
			$('#_plaatsnaam').hide ();
				}
				else
				{
			
			$('#_regio').show ();
			$('#_plaatsnaam').show ();
				}
		}

function doLoad ()
{
	if (document.getElementById('amount_of_hotels') != null)
	{
		document.getElementById('amount_of_hotels').value = 1;
		appendHotels (1);
	}
}

