
function showGoogleMap(hotel_id) {
	var id = hotel_id;
	var url = "http://";
	url += window.location.host;
	url += '/default/cityMap';
	url += '/hotel_id/' + hotel_id + '/' + Math.random();

	var div = document.createElement('div');
	div.setAttribute('id', 'intoMap');
	var mframe = document.createElement('iframe');
	mframe.setAttribute('src', url);
	mframe.setAttribute('width', '820px');
	mframe.setAttribute('height', '550px');
	mframe.setAttribute('id', 'dialog');
	mframe.setAttribute('padding', '0px');
	mframe.setAttribute('border-bottom', 'solid 1px #000000');
	mframe.setAttribute('margin-left', '-10px');
	mframe.setAttribute('scrolling', "no");
	mframe.setAttribute('frameborder', "0");
	div.appendChild(mframe);

	document.getElementById('goolemap' + id).appendChild(div);
	$("#intoMap").dialog({
		modal : true,
		height : 650,
		width : 850
	});
}

function showAllRoomType2nd(hotel_id, label, hotel_url) {

	// var selected_currency = 'HKD';
	var checkin = $('#checkin').val();
	var checkout = $('#checkout').val();
	var currencyBox = $('#currency option:selected').val();
	var currency = currencyBox.split(',');
	var currencyRate = currency[0];
	var currencyCode = currency[1];
	var show_currency = currencyCode;
	// alert(checkin +'/'+checkout);
	var str = "/hotels/";
	var sRegExInput = new RegExp(str, 'gi');
	var temp_str = hotel_url.replace(sRegExInput, '');
	temp_str = temp_str.replace(".html", '');

	var url = '/ajax/showAllRoomType2nd/';
	url += 'check_in/' + checkin + '/check_out/' + checkout;
	url += '/currency/' + show_currency;
	url += '/hotel_id/' + hotel_id + '/hotel_url/' + temp_str;
	// alert(label);
	if (label == "c") {

		url += "/htype/c" + '/allRoom/1/' + Math.random();

	} else {

		url += "/htype/e" + '/allRoom/1/' + Math.random();

	}
	$.ajax({
		url : url,

		// data: { hotel_id:hotel_id },
		success : function(data) {
			var div_frame = document.createElement('div');
			div_frame.setAttribute('id', 'intoRoom');
			var div = document.createElement('div');
			div.setAttribute('id', 'dialog');
			div.setAttribute('width', '850px');
			div.setAttribute('height', '400px');
			div_frame.appendChild(div);
			document.getElementById('showallroomtype' + hotel_id).appendChild(
					div_frame);
			$("#dialog").html(data);
			$("#intoRoom").dialog({
				modal : true,
				height : 400,
				width : 850
			});

		}
	});

}

