//validate and submit the form
function submitForm(frm) {
//validate contact details
	
	if (typeof (Common_HotelRegForm_StreetAdd) == "undefined")
		Common_HotelRegForm_StreetAdd = "Please enter your Street Address."
		
	if (isEmpty(frm.StreetAddress, "", Common_HotelRegForm_StreetAdd)) return	
	if (typeof (Common_HotelRegForm_PostCode) == "undefined")
		Common_HotelRegForm_PostCode = "Please enter your Post Code."
		
	if (isEmpty(frm.PostCode, "", Common_HotelRegForm_PostCode)) return
	if (typeof (Common_HotelRegForm_HotelName) == "undefined")
		Common_HotelRegForm_HotelName = "Please enter your Hotel/Property Name."
		
	if (isEmpty(frm.HotelName, "", Common_HotelRegForm_HotelName)) return	
	if (typeof (Common_HotelRegForm_UseEngChar) == "undefined")
		Common_HotelRegForm_UseEngChar = "Please use English characters only."
		
	if (charCheck(frm.HotelName, Common_HotelRegForm_UseEngChar)) return
	if (typeof (Common_HotelRegForm_NumOfRooms) == "undefined")
		Common_HotelRegForm_NumOfRooms = "Please enter your Number of Rooms."
		
	if (isEmpty(frm.NoRooms, "", Common_HotelRegForm_NumOfRooms)) return
	if (notNumber(frm.NoRooms.value)) {
		if (typeof (Common_HotelRegForm_VldNumOfRooms) == "undefined")
			Common_HotelRegForm_VldNumOfRooms = "Please enter a valid number for the Number of Rooms."
			
		alert(Common_HotelRegForm_VldNumOfRooms)
		frm.NoRooms.focus()
		return
	}
	if (frm.form.value == 0){	//hotelclub form
		if (frm.NoRooms.value < 30) {
			if (typeof (Common_HotelRegForm_NumOfRoomsLess) == "undefined")
				Common_HotelRegForm_NumOfRoomsLess = "The number of rooms is less then the accepted minimum for this site (30). If you still wish to submit your property, please go to our last minute site - www.ratestogo.com. See top of this form for details."
				
			alert(Common_HotelRegForm_NumOfRoomsLess)
			frm.NoRooms.focus()
			return	
		}
	}
//Manager contact details
	if (typeof (Common_HotelRegForm_MngName) == "undefined")
		Common_HotelRegForm_MngName = "Please enter your Manager Contact Name."
		
	if (isEmpty(frm.ContactName, "", Common_HotelRegForm_MngName)) return	
	if (typeof (Common_HotelRegForm_MngEmail) == "undefined")
		Common_HotelRegForm_MngEmail = "Please enter your Manager Contact Email."
		
	if (isEmpty(frm.ContactEmail, "", Common_HotelRegForm_MngEmail)) return	
	if (typeof (Common_HotelRegForm_MngNotEmail) == "undefined")
		Common_HotelRegForm_MngNotEmail = "The Manager E-mail Address you entered is not a valid e-mail address."
		
	if (notEmail(frm.ContactEmail, "", Common_HotelRegForm_MngNotEmail)) return	
//Reservations contact details	
	if (typeof (Common_HotelRegForm_ResName) == "undefined")
		Common_HotelRegForm_ResName = "Please enter your Reservations Contact Name."
		
	if (isEmpty(frm.rContactName, "", Common_HotelRegForm_ResName)) return	
	if (typeof (Common_HotelRegForm_ResFax) == "undefined")
		Common_HotelRegForm_ResFax = "Please enter your Reservations Contact Fax."
		
	if (isEmpty(frm.rContactFax, "", Common_HotelRegForm_ResFax)) return	
	if (typeof (Common_HotelRegForm_ResEmail) == "undefined")
		Common_HotelRegForm_ResEmail = "Please enter your Reservations Contact Email."
		
	if (isEmpty(frm.rContactEmail, "", Common_HotelRegForm_ResEmail)) return	
	if (typeof (Common_HotelRegForm_ResNotEmail) == "undefined")
		Common_HotelRegForm_ResNotEmail = "The Reservations E-mail Address you entered is not a valid e-mail address."
		
	if (notEmail(frm.rContactEmail, "", Common_HotelRegForm_ResNotEmail)) return	
//Sales & Marketing contact details
	if (typeof (Common_HotelRegForm_SalesName) == "undefined")
		Common_HotelRegForm_SalesName = "Please enter your Sales/Marketing Contact Name."
		
	if (isEmpty(frm.sContactName, "", Common_HotelRegForm_SalesName)) return	
	if (typeof (Common_HotelRegForm_SalesEmail) == "undefined")
		Common_HotelRegForm_SalesEmail = "Please enter your Sales/Marketing Contact Email."
		
	if (isEmpty(frm.sContactEmail, "", Common_HotelRegForm_SalesEmail)) return	
	if (typeof (Common_HotelRegForm_SalesNotEmail) == "undefined")
		Common_HotelRegForm_SalesNotEmail = "The Sales/Marketing E-mail Address you entered is not a valid e-mail address."
		
	if (notEmail(frm.sContactEmail, "", Common_HotelRegForm_SalesNotEmail)) return	
//Accounts contact details	
	if (typeof (Common_HotelRegForm_AccName) == "undefined")
		Common_HotelRegForm_AccName = "Please enter your Accounts Contact Name."
		
	if (isEmpty(frm.aContactName, "", Common_HotelRegForm_AccName)) return	
	if (typeof (Common_HotelRegForm_AccEmail) == "undefined")
		Common_HotelRegForm_AccEmail = "Please enter your Accounts Contact Email."
		
	if (isEmpty(frm.aContactEmail, "", Common_HotelRegForm_AccEmail)) return	
	if (typeof (Common_HotelRegForm_AccNotEmail) == "undefined")
		Common_HotelRegForm_AccNotEmail = "The Accounts E-mail Address you entered is not a valid e-mail address."
		
	if (notEmail(frm.aContactEmail, "", Common_HotelRegForm_AccNotEmail)) return

	if (typeof (Common_HotelRegForm_LimitMsg) == "undefined")
		Common_HotelRegForm_LimitMsg = "Please limit your message to 200 characters. You have used " + frm.msg.value.length + " characters."
		
	if (invalLength(frm.msg, "", 200, Common_HotelRegForm_LimitMsg)) { return
	
		frm.msg.focus()
		return
		}

// Submit form
frm.submit()		
}