// Common javascript document for imtrav online
// Global vars holding form controls
//
var XMLHTTP_UNINITIALIZED = 1;
var XMLHTTP_LOADING       = 2;
var XMLHTTP_LOADED        = 3;
var XMLHTTP_COMPLETED     = 4;
var boUtilUrl = location.protocol + "//" + location.host+ "/tucanonline/booking_utility.php";

// book Pre accommodation
// 030108 fixed a bug by Sunny - always showed "post-tour" when trying to add another pre-tour acc
// 040108 added by Sunny: Add a product from the View Booking screen
function bookAcc(frm, type, dateDiffType){
  	if (!frm) {return; }
	// check the existence of extra acc
	if (!checkAccExist(type)){
		return;			
	}
  	var btData = "";
  	var nights = 0;
  	var rType;
  	var actName = "";
  	if (type == 'pre') {
  	 	nights = frm.pre_ngts.value;
  	 	rType =  frm.pre_rmtype.value;
  	}else if (type == 'post') {
  	 	nights = frm.post_ngts.value;
  	 	rType =  frm.post_rmtype.value;
  	}
  	if (nights < 1) {
  		alert("Please select nights");
  		return ;
  	}
	switch (dateDiffType) {
		case 1:
			// Late booking on View Booking
			frm.submit();
			break;
		case 2:
			// Payment needed on View Booking
			frm.submit();
			break;
		default:
			if (dateDiffType == 3) {
				// No payment needed on View Booking
                		if (type == "pre") {
                        		actName = getAddAccPreActionName();
                		} else {
                        		actName = getAddAccPostActionName();
                		}
			} else {
				actName = getBookAccActionName();
			}
		        btData += "    <Action>\n";
		        btData += "      <ActionName>"+ actName +"</ActionName>\n";
		        btData += "      <BookingInfo>true</BookingInfo>\n";
		        btData += "      <PaymentInfo>true</PaymentInfo>\n";
		        btData += "      <ActionParams>\n";
		        btData +=  makeParam('type', type);
		        btData +=  makeParam('nights', nights);
		        btData +=  makeParam('rtype', rType);
			if (document.getElementById("hidBOSTAT")) {
				btData +=  makeParam('stat', document.getElementById("hidBOSTAT").value);
			}
		        btData += "      </ActionParams>\n";
		        btData += "    </Action>\n";
		        doEmbOperations(btData);
	}
}

/*
	Confirm more extra accommodation
        030108 fixed a bug by Sunny - always showed "post-tour" when trying to add another pre-tour acc
*/
function checkAccExist(type){
	var acc_cnt_id = type+"_acc_cnt";
	if (!document.getElementById(acc_cnt_id) || document.getElementById(acc_cnt_id).value*1 <= 0){
		return true;
	}
	var warnMsg = "You have already added ";
        warnMsg += (type == "pre" ? "pre-tour" : "post-tour");
        warnMsg += " accommodation to this booking. Are you sure you want to add it again?";
	var isOK = confirm(warnMsg);
	return isOK;
}

// set inner html image
function setAjaxImage(eId){
	var el = document.getElementById(eId);
	if (!el){ return; }
	el.innerHTML = "<img src='rsrc/green_rot.gif'>";
	showHide(eId, true);
}

// return book acc action name
// 
function getBookAccActionName(){
	return "book_acc";
}

// do embarque related operations
//
function doEmbOperations(opData){
  	if (opData.length < 1) {return; }
  	var data;
	data = "<?xml version='1.0' encoding='UTF-8'?>\n";
	data += "<BookingUtility>\n";
	data += "  <Actions>\n";
	data += opData;
	data += "  </Actions>\n";
	data += "</BookingUtility>\n";
	httpRequest(data);
}

//
// request http from js
//
function httpRequest(data){
  var async = true;
  try{
    var xmlhttp = XmlHttp.create();
    xmlhttp.open("POST", boUtilUrl, async);
    xmlhttp.setRequestHeader ("Content-type", "text/xml");
    xmlhttp.onreadystatechange = function (){onResponse(xmlhttp)};
    xmlhttp.send(data);
  }catch(ex){
    alert(ex);
  }
}

// parse response
// 040108 added by Sunny: Set the booking transaction status after the cancellation request is sent
// 040108 added by Sunny: Update the display after an accommodation is booked
function parseRes(actRes) {
	var status = getActionStatus(actRes);
	var actName = get_nodeval(actRes.getElementsByTagName('ActionName')[0]);
	showAjaxStat(actName, status);
	if (status == 'false') {
		return;
	}
	// itinerary box
	var itinBox = document.getElementById('itin_box');
	if (!itinBox && actName != getRemoveAccActionName() && actName != getAddAccPreActionName() && actName != getAddAccPostActionName()) {
		return;		
	}
	// set itinerary information
	if (actRes.getElementsByTagName('BookingInfo').length) {
		var itinInfo = get_nodeval(actRes.getElementsByTagName('BookingInfo')[0]);
                if (actName != getAddAccPreActionName() && actName != getAddAccPostActionName()) {
		        itinBox.innerHTML = itinInfo;
                } else {
                        // 040108 added by Sunny: Update the accommodation display
                        if (actName == getAddAccPreActionName()) {
				document.getElementById("acc_box_pre").innerHTML = itinInfo;
                        } else {
				document.getElementById("acc_box_post").innerHTML = itinInfo;
                        }
                }
	}
	// set payment info
	if (actRes.getElementsByTagName('PaymentInfo').length) {
		var payInfo = get_nodeval(actRes.getElementsByTagName('PaymentInfo')[0]);
                if (actName != getAddAccPreActionName() && actName != getAddAccPostActionName() && actName != getRemoveAccActionName()) {
		        updatePayBox(payInfo);
                } else {
                        // 040108 added by Sunny: Update the payment display for the added/removed accommodation
                        var totalAmnt = get_nodeval(actRes.getElementsByTagName('TotalAmount')[0]);
                        var balance = get_nodeval(actRes.getElementsByTagName('BalanceDue')[0]);
                        document.getElementById("totalAmnt").innerHTML = totalAmnt;
                        document.getElementById("balance").innerHTML = balance;
			// 170108 added by Sunny: Display "Pay balance" after adding acc to confirmed bookings
			if (document.getElementById("hidBOSTAT").value != "O" && (actName == getAddAccPreActionName() || actName == getAddAccPostActionName()) && !document.getElementById("trPayBalance")) {
				var aLink = document.createElement("a");
				aLink.setAttribute("href", "javascript: pay_balance();");
                        	var text = document.createTextNode("Pay balance");
                        	aLink.appendChild(text);
				var div = document.createElement("div");
				div.setAttribute("width", "100%");
				div.setAttribute("align", "right");
				div.setAttribute("id", "trPayBalance");
				div.appendChild(aLink);
				document.getElementById("balance").parentNode.parentNode.parentNode.parentNode.parentNode.appendChild(div);
			}
                }
	}
    // 040108 added by Sunny: Set the booking transaction status after the cancellation request is sent, for confirmed bookings
	// 160108 added by Sunny: Display the add acc section, for optional bookings
	if (actRes.getElementsByTagName('CanxBookingTransaction').length) {
        var tranNo = get_nodeval(actRes.getElementsByTagName('CanxBookingTransaction')[0]);
        var trRemoveAcc = document.getElementById("trRemoveAcc" + tranNo);
		//TODO: Check Firefox
		if (document.getElementById("hidBOSTAT").value == "O") {
			// option booking, display the add acc section and hide the removed acc
			var roomType = get_nodeval(actRes.getElementsByTagName('RoomType')[0]);	
			document.getElementById("trAddAcc" + roomType).style.display = "block";
			trRemoveAcc.parentNode.removeChild(trRemoveAcc.previousSibling.previousSibling);
			trRemoveAcc.parentNode.removeChild(trRemoveAcc.previousSibling);
			trRemoveAcc.parentNode.removeChild(trRemoveAcc);
		} else {
			// confirmed booking, set the booking tran status as canx request sent
            var td = document.createElement("td");
            td.setAttribute("colspan", 3);
            var text = document.createTextNode("* Your cancellation request for the accommodation has been sent.");
            td.appendChild(text);
            trRemoveAcc.replaceChild(td, trRemoveAcc.firstChild);
		}
    }
	if (actName == getCarbonActionName()) {
		// 131008 added by Sunny: Update the transaction number
		var tdCarbon = document.getElementById("carbon");
		var carbonHtml = tdCarbon.innerHTML;
		var tmp = carbonHtml.substr(carbonHtml.indexOf("this,") + 6);
		tmp = tmp.substr(0, tmp.indexOf(","));
		carbonHtml = carbonHtml.replace(tmp, "'" + get_nodeval(actRes.getElementsByTagName('TransactionNumber')[0]) + "'");
		tdCarbon.innerHTML = carbonHtml;
	}
}

// show ajax operation status
// 111207 added by Sunny: Grilla trek booking, booking cancellation request
// 030108 added by Sunny: Accommodation cancellation request
// 060108 added by Sunny: Add an accommodation
function showAjaxStat(actName, status){
	var ajxStatMsg = "We couldn\'t perform this particular operation. Please call our" + 
					"reservations. We apologize for any inconvenience caused by this.";
	if (actName == getBookAccActionName()){
		if (status =='true'){
			ajxStatMsg = "Accommodation has been added to your itinerary.";
		}
	}else if (actName == getNoAmazonActionName()){
		if (status == 'true'){
		    if (document.getElementById('amazon_y').checked){
			    ajxStatMsg = "You have chosen Amazon Jungle Excursion.";
		    }else if (document.getElementById('amazon_n').checked){
				ajxStatMsg = "No Jungle Excursion discount added to your booking.";
		    }
		}
	}else if (actName == getCanxLineActionName()){
		if (status == 'true'){
			ajxStatMsg = "Your selected item has been cancelled from your itinerary.";
		}
	}else if ( actName == getNoIncaActionName() || actName == getBexIncaActionName()){
		if (status == 'true'){
			ajxStatMsg = "Your itinerary has been updated for the choice of Inca Trek Trail options.";
		}
	}else if (actName == getGorillaActionName()) {
		if (status == 'true'){
			ajxStatMsg = "Your itinerary has been updated for the choice of the Gorilla Trek.";
		}
	}else if (actName == getNoCarbonActionName()) {
		if (status == 'true'){
			ajxStatMsg = "Your carbon offsetting has been removed from your itinerary.";
		}
	}else if (actName == getCarbonActionName()) {
		if (status == 'true'){
			ajxStatMsg = "Your carbon offsetting has been added to your itinerary.";
		}
	}else if (actName == getEBName()){
		if (status == 'true'){
		   if (document.getElementById('pay_now_y').checked){
		   	 ajxStatMsg = "Your early booking discount has been applied to your booking.";
		   }else{
			 ajxStatMsg = "Your early booking discount has been removed from your booking.";
		   }
		}	
	}else if(actName == getVCActionName()){
		if (status == 'true'){
			alert('Your password has been sent to your email address. \n'+
			'Please check your email and sign in using this password. \n'+
			'Alternatively, you may create a new profile to continue with your booking.');
		}else{
			alert('The email address you entered does not match any profile on record. \n'+
			'Please create a new profile to continue with your booking.');
		}
		return;
	}else if (actName == getEmailCanxActionName()) {
		if (status == 'true'){
			ajxStatMsg = "Your cancellation request has been sent.";
			document.getElementById("cancel_box").innerHTML = ajxStatMsg;
		}
	}else if (actName == getRemoveAccActionName()) {
		if (status == 'true'){
			if (document.getElementById("hidBOSTAT").value != "O") {
				ajxStatMsg = "Your cancellation request for the accommodation has been sent.";
			} else {
				ajxStatMsg = "The accommodation has been cancelled.";
			}
		}
	}else if (actName == getAddAccPreActionName() || actName == getAddAccPostActionName()) {
		if (status == 'true'){
			ajxStatMsg = "The accommodation has been added to your tour.";
		}
        }
	setInnerHtml('ajax_stat_cont', ajxStatMsg);
	showHide('ajax_stat_box', true);
	if (document.getElementById('itinBox')) {
		new Effect.Highlight(document.getElementById('itinBox'));
	}
	if (document.getElementById('pay_box')){
		new Effect.Highlight(document.getElementById('pay_box'));
	}
}

// set inner HTML
function setInnerHtml(eId, msg){
	if (msg == null || msg == ''){
		return;
	}
	var el = document.getElementById(eId);
	if (!el){ return;}
	el.innerHTML = msg;
	showHide(eId, true);
}

// update show payment box from pay information
//
function updatePayBox(payInfo) {
	//payment box
	var payBox = document.getElementById('pay_box');
	if (!payBox) { return; }

	// payinfo is empty
	if (payInfo.length == 0) { return; }
	payBox.innerHTML = payInfo;
}
// book bex inca excursion
//
function bookBexInca(chkEl) {
	if(!chkEl.checked) {return; }
	var incaData = bexIncaData();
    doEmbOperations(incaData);
}
// return book inca data
function bexIncaData(){
	var nAdults = 0;
	for (var i = 0; document.getElementById('inca_'+i); i++){
		if (document.getElementById('inca_'+i).checked){
			nAdults++;
		}
	}
	var actName = getBexIncaActionName();
	var incaData = '';
  	incaData += "    <Action>\n";
  	incaData += "      <ActionName>"+ actName +"</ActionName>\n";
	incaData += "      <BookingInfo>true</BookingInfo>\n";
	incaData += "      <PaymentInfo>true</PaymentInfo>\n";
  	incaData += "      <ActionParams>\n";
  	incaData +=  makeParam('paxa', nAdults);
  	incaData += "      </ActionParams>\n";
  	incaData += "    </Action>\n";
	return incaData;
}
// return book inca action name
function getBexIncaActionName(){
	return "book_bexinca";
}

// book gorilla excursion
// 111207 added by Sunny: Gorilla trek booking
function bookGorilla(chkEl) {
	if(!chkEl.checked) {return; }
	var data = gorillaData();
	doEmbOperations(data);
}
// return book gorilla data
// 111207 added by Sunny: Gorilla trek booking
function gorillaData(){
	var nAdults = 0;
	for (var i = 0; document.getElementById('gorilla_'+i); i++){
		if (document.getElementById('gorilla_'+i).checked){
			nAdults++;
		}
	}
	var actName = getGorillaActionName();
	var data = '';
	data += "    <Action>\n";
	data += "      <ActionName>"+ actName +"</ActionName>\n";
	data += "      <BookingInfo>true</BookingInfo>\n";
	data += "      <PaymentInfo>true</PaymentInfo>\n";
	data += "      <ActionParams>\n";
	data +=  makeParam('paxa', nAdults);
	data += "      </ActionParams>\n";
	data += "    </Action>\n";
	return data;
}
// return book gorilla action name
// 111207 added by Sunny: Gorilla trek booking
function getGorillaActionName(){
	return "book_gorilla";
}

// book no inca deduction
//
function bookNoInca(chkEl, incaCode) {
	if(!chkEl.checked) {return; }
	var incaData = noIncaData(incaCode);
    doEmbOperations(incaData);
}

// return no inca action name
function getNoIncaActionName(){
	return "book_noinca";
}

// return early booking discount
function getEBName(){
	return "book_ebdisc";
}

// return no inca data
function noIncaData(incaDed){
	var nAdults = 0;
	for (var i = 0; document.getElementById('overnight_'+i); i++){
		if (document.getElementById('overnight_'+i).checked && !document.getElementById('lares_'+i).checked &&
			!document.getElementById('inca_'+i).checked){
			nAdults++;
		}
	}
	var actName = getNoIncaActionName();
	var incaData = '';
  	incaData += "    <Action>\n";
  	incaData += "      <ActionName>"+ actName +"</ActionName>\n";
	incaData += "      <BookingInfo>true</BookingInfo>\n";
	incaData += "      <PaymentInfo>true</PaymentInfo>\n";
  	incaData += "      <ActionParams>\n";
  	incaData +=  makeParam('paxa', nAdults);
  	incaData +=  makeParam('item_code', incaDed);
  	incaData +=  makeConfParam();
  	incaData += "      </ActionParams>\n";
  	incaData += "    </Action>\n";
	return incaData;
}

//
// make param for whether the booking is going to be confirmed or not
function makeConfParam(){
	var payY = document.getElementById('pay_now_y'); 
	if (payY && payY.checked){
		return makeParam('confirm', document.getElementById('pay_now_y').value);
	}
	return ;
}

// book no Amazon deduction
//
function bookNoAmazon(chkEl) {
	if(!chkEl.checked) {return; }
	/*if (!confirm("Please confirm your jungle option choice")){
		chkEl.checked = false;
		return;
	}*/
	var amazonData = noAmazonData(chkEl.value);
    doEmbOperations(amazonData);
}

// return no amazon action name
function getNoAmazonActionName(){
	return "book_noamazon";
}

// return no Amazon data
function noAmazonData(amazonDed){
	var actName = getNoAmazonActionName();
	var amazonData = '';
  	amazonData += "    <Action>\n";
  	amazonData += "      <ActionName>"+ actName +"</ActionName>\n";
	amazonData += "      <BookingInfo>true</BookingInfo>\n";
	amazonData += "      <PaymentInfo>true</PaymentInfo>\n";
  	amazonData += "      <ActionParams>\n";
  	amazonData +=  makeParam('item_code', amazonDed);
  	amazonData +=  makeConfParam();
  	amazonData += "      </ActionParams>\n";
  	amazonData += "    </Action>\n";
	return amazonData;
}

// book early booking discount
//
function bookEBDisc(ebDisc, chkEl) {
	if(ebDisc == '') { return; }
	var ebDiscData = ebDiscountData(ebDisc);
    doEmbOperations(ebDiscData);
}

// return early booking discount data
function ebDiscountData(ebDisc){
	var actName =  getEBName();
	var ebDiscData = '';
  	ebDiscData += "    <Action>\n";
  	ebDiscData += "      <ActionName>"+ actName +"</ActionName>\n";
	ebDiscData += "      <BookingInfo>true</BookingInfo>\n";
	ebDiscData += "      <PaymentInfo>true</PaymentInfo>\n";
  	ebDiscData += "      <ActionParams>\n";
  	ebDiscData +=  makeParam('item_code', ebDisc);
  	ebDiscData +=  makeConfParam();
  	ebDiscData += "      </ActionParams>\n";
  	ebDiscData += "    </Action>\n";
	return ebDiscData;
}


// Update itinerary
//
function cancelItin(trans_no) {
	if(!trans_no || trans_no == '') {return; }
	var btData = canxReqData(trans_no, true);
    doEmbOperations(btData);
}

// return canx line action name
function getCanxLineActionName(){
  return "canx_lines";
}

function canxReqData(transCode,bInfo){
	var actName = getCanxLineActionName();
	var btData = '';
  	btData += "    <Action>\n";
  	btData += "      <ActionName>"+ actName +"</ActionName>\n";
  	if (bInfo) {
	  	btData += "      <BookingInfo>true</BookingInfo>\n";
	  	btData += "      <PaymentInfo>true</PaymentInfo>\n";
  	}
  	btData += "      <ActionParams>\n";
  	btData +=  makeParam('btcd', transCode);
  	btData += "      </ActionParams>\n";
  	btData += "    </Action>\n";
	return btData;
}

// validate a client
//
function validateClient(targetId){
	var email = document.getElementById(targetId);
	if (!email || email.value.trim() == ''){
		alert('Please enter your email address associated with this system');
		return false;
	}
	var actName = getVCActionName();
	var vcData = '';
  	vcData += "    <Action>\n";
  	vcData += "      <ActionName>"+ actName +"</ActionName>\n";
  	vcData += "      <ActionParams>\n";
  	vcData +=  makeParam('email', email.value);
  	vcData +=  makeParam('send_pass', true);
  	vcData += "      </ActionParams>\n";
  	vcData += "    </Action>\n";
  	doEmbOperations(vcData);

}

// get validate client action name
function getVCActionName(){
	return "validate_client";
}

// Send a cancellation request via email
// 141207 added by Sunny
function email_canx() {
	var frmCancel = document.frmCancel;
	if (!frmCancel.book_cond.checked) {
		alert("Please check the box to confirm that you have read and accept the booking conditions.");
		return;
	}
	var msg = "Are you sure that you would like to cancel the entire booking?\n\n";
	msg += "Click OK to continue the cancellation.\n";
	msg += "Click Cancel to discard.";
	if (!confirm(msg)) {
		return;
	}
	var data = emailCanxData();
	doEmbOperations(data);
}
// Return email cancellation data
// 141207 added by Sunny: Cancellation request
function emailCanxData(){
	var actName = getEmailCanxActionName();
	var data = '';
	data += "    <Action>\n";
	data += "      <ActionName>"+ actName +"</ActionName>\n";
	data += "      <BookingInfo>false</BookingInfo>\n";
	data += "      <PaymentInfo>false</PaymentInfo>\n";
	data += "    </Action>\n";
	return data;
}
// Return email cancellation action name
// 141207 added by Sunny: Cancellation request
function getEmailCanxActionName(){
	return "email_canx";
}

// Book the pre/post-tour accommodations on the View Booking screen
// 211207 added by Sunny
function add_acc(frm, type, dateDiffType) {
	bookAcc(frm, type, dateDiffType); 
}

// Remove the booked pre/post-tour accommodations on the View Booking screen
// 211207 added by Sunny
function remove_acc(trans_no, trans_desc, room_type, toConfirm) {
	if (toConfirm) {
		var msg = "Please note that the accommodation will not be cancelled immediately but only send a request to our reservations team.\n";
		msg += "Upon receiving your request, a reservations consultant will be in contact with you soon.\n\n";
		msg += "Are you sure that you want to cancel the accommodation?\n\n";
		msg += "Click OK to continue.\nClick Cancel to discard.";
	}
	if (!toConfirm || confirm(msg)) {
		if (!trans_no || trans_no == '') {
			return;
		}
		var btData = removeAccReqData(trans_no, trans_desc, room_type);
		doEmbOperations(btData);                
	}
}

// Return remove acc action name
// 030108 added by Sunny 
function getRemoveAccActionName(){
  return "remove_bt";
}

// Return add pre-tour acc action name
// 040108 added by Sunny
function getAddAccPreActionName(){
  return "add_bt_pre";
}

// Return add post-tour acc action name
// 040108 added by Sunny
function getAddAccPostActionName(){
  return "add_bt_post";
}

// Return remove acc request data
// 030108 added by Sunny
function removeAccReqData(transCode, transDesc, roomType){
	var actName = getRemoveAccActionName();
	var btData = '';
	btData += "    <Action>\n";
	btData += "      <ActionName>"+ actName +"</ActionName>\n";
	btData += "      <BookingInfo>false</BookingInfo>\n";
	btData += "      <PaymentInfo>true</PaymentInfo>\n";
	btData += "      <ActionParams>\n";
	btData +=  makeParam('btcd', transCode);
	btData +=  makeParam('bocd', document.getElementById("hidBOBOCD").value);
	btData +=  makeParam('stat', document.getElementById("hidBOSTAT").value);
	btData +=  makeParam('desc', transDesc);
	btData +=  makeParam('rtype', roomType);
	btData += "      </ActionParams>\n";
	btData += "    </Action>\n";
	return btData;
}

// Go to the balance payment page
// 060108 added by Sunny
function pay_balance() {
	location.href = "payment.php";        
}

// Make the payment
// 060108 added by Sunny
function doPayment(frm) {
	var errmsg = "";
	errmsg += validateCreditCard(frm);
	if (errmsg != "") {
		alert("Please correct the following errors to proceed:" + "\n" + errmsg);
	} else {
		frm.submit();
	}
}

// Book/Cancel carbon offsetting
// 101008 added by Sunny
function bookCarbon(chkEl, tranNo, productCode, adults) {
	var data = "";
	if (!chkEl.checked) {
		// Book carbon offsetting
		data = carbonData(false, productCode, adults);		
	} else {
		// Cancel carbon offsetting
		data = carbonData(true, tranNo);
	}
    doEmbOperations(data);
}

// Return carbon offsetting data
// 101008 added by Sunny
function carbonData(toCancel, code, adults) {
	if (toCancel) {
		// Cancel carbon offsetting
		var actName = getNoCarbonActionName();
	} else {
		// Book carbon offsetting
		var actName = getCarbonActionName();
	}	
	var data = "";
	data += "    <Action>\n";
	data += "      <ActionName>"+ actName +"</ActionName>\n";
	data += "      <BookingInfo>true</BookingInfo>\n";
	data += "      <PaymentInfo>true</PaymentInfo>\n";
	data += "      <ActionParams>\n";
	if (toCancel) {
		data += makeParam("btcd", code);
	} else {
		data += makeParam("cocd", code);
		data += makeParam("paxa", adults);
	}
	//data +=  makeConfParam();
	data += "      </ActionParams>\n";
	data += "    </Action>\n";
	return data;
}

// Return action name for cancelling carbon offsetting
// 101008 added by Sunny
function getNoCarbonActionName() {
	return "canx_carbon";
}

// Return action name for booking carbon offsetting
// 101008 added by Sunny
function getCarbonActionName() {
	return "book_carbon";
}

