function checkAttractionSearch(fId) {
	var e = '';
	if(!fId.resort.value){e+=' - Please select a destination\n'}
	if(e){
		alert('The following errors occurred.\n\n'+e);
		return false;
	}else{
		return true;
	}
}

function checkAttractionPricing(fId,startdate,PAX) {
	if(checkFormValidateAttrib('input') == false){
		return false;
	}
	if(checkFormFieldSelectedIndex("title", "Please select a title for all passengers!") == false){
		return false;
	}
	if(checkFormFieldValue("firstname", "- Firstname -", "Please enter a first name for all passengers!") == false){
		return false;
	}
	if(checkFormFieldValue("surname", "- Surname -", "Please enter a surname for all passengers!") == false){
		return false;
	}
	if(checkAgeDOBMatch(parseInt(PAX),''+startdate+'') == false){
		return false;
	}else{
		return true;
	}
}

function ChangeAttractionsResultPrice(id, sCode, sSymbol) {
	var spanTotalPrice = document.getElementById('idTotalPrice_'+id);
	var spanAvgPrice = document.getElementById('idAvgPrice_'+id);
	var iTotalPrice = 0;
	var iNumPax = 0;
	var sForm = document.forms[id];
	if(sForm.seats_adult) {
		iNumPax+=parseFloat(sForm.seats_adult.value);
		for(x=0;x<parseFloat(sForm.seats_adult.value);x++) {
			iTotalPrice+=parseFloat(sForm.price_adult.value);
		}
	}
	if(sForm.seats_child) {
		iNumPax+=parseFloat(sForm.seats_child.value);
		for(x=0;x<parseFloat(sForm.seats_child.value);x++) {
			iTotalPrice+=parseFloat(sForm.price_child.value);
		}
	}
	if(sForm.seats_infant) {
		iNumPax+=parseFloat(sForm.seats_infant.value);
		for(x=0;x<parseFloat(sForm.seats_infant.value);x++) {
			iTotalPrice+=parseFloat(sForm.price_infant.value);
		}
	}
	var sTotalPrice = formatCurrency(iTotalPrice,true);
	var sPricePerPax = formatCurrency((iTotalPrice / iNumPax),true);
	if(sSymbol) {
		sTotalPrice = sSymbol + sTotalPrice;
		sPricePerPax = sSymbol + sPricePerPax;
	}else{
		sTotalPrice += ' ' + sCode;
		sPricePerPax += ' ' + sCode;
	}
	if(spanTotalPrice) {
		spanTotalPrice.innerHTML = sTotalPrice;
	}
	if(spanAvgPrice) {
		spanAvgPrice.innerHTML = sPricePerPax;	
	}
}

function AttractionDescription(fId, sPosition) {
	if(document.getElementById('AttractionDescFull_'+sPosition).style.display=='none') {
		document.getElementById('AttractionDescFull_'+sPosition).style.display='';
		document.getElementById('AttractionDescShort_'+sPosition).style.display='none';
		fId.innerHTML = fId.innerHTML.replace('Click here to show full','Click here to show short');
	}else{
		document.getElementById('AttractionDescFull_'+sPosition).style.display='none';
		document.getElementById('AttractionDescShort_'+sPosition).style.display='';
		fId.innerHTML = fId.innerHTML.replace('Click here to show short','Click here to show full');
	}
}
