function reservationDayTip($roomkey,$colDate,$uniqueId,$sRoomName,$sRoomDescription,$theDisplaydate,$isThedateSpecial,$str_tariffBaseOn,$str_price,$sHotDeal,$str_numavail,$sSpecialDetail,$minStay,$sExtraAdult,$sExtraChild){
	var popup;
	var dataInfo = new Object();
	if(typeof(dataInfo)=='object'){
		popup  = '<div class="popup"><h2>'+$sRoomName+': '+$theDisplaydate+'</h2>';
		if( parseInt($isThedateSpecial,10)==1){
			popup += '<p><span class="title">Special Rate ('+$str_tariffBaseOn+'):</span> NZ'+$str_price+'</p>';
		}else{
			popup += '<p><span class="title">Tariff ('+$str_tariffBaseOn+' persons): </span> NZ'+$str_price+'</p>';//tariff base on
		}
		if( parseInt($sExtraAdult,10) > 0 ){
			popup += '<p><span class="title"> Extra Adult: </span>  NZ$'+$sExtraAdult+' </p>';//extra adult
		}
		
		if( parseInt($sExtraChild,10) > 0 ){
			popup += '<p><span class="title"> Extra Child: </span>  NZ$'+$sExtraChild+' </p>';//extra child
		}
		popup += '<p><span class="title"> Room Available: </span> '+$str_numavail+'</p>';//room available
		if( $sSpecialDetail != ''){
			popup += '<p class="desc"><span class="title"> Detail:</span> '+html_entity_decode($sSpecialDetail)+'</p>';
		}
		
		if( parseInt($minStay,10)>1){
			popup += '<p class="desc"><span class="title"> Minimum Stay:</span> '+$minStay+' consecutive nights  </p>';
		}
		//popup += '<p class="desc"><span class="title"> Detail: </span>'+html_entity_decode(dataInfo.room_description)+'</p>';//room description
		popup += '<p class="hotspace"></p></div>';
		
		var hotdeal = $.trim($sHotDeal);
		if( hotdeal ){
			popup += '<div class="popup-hot"><div class="hoticon"></div><h2>Hot Deals</h2><p>'+html_entity_decode(hotdeal)+'</p></div>';
		}
	}
	
	$('#room_'+$roomkey+'_'+$colDate+'_'+$uniqueId).qtip({
		content: popup,
		show: 'mouseover',
		hide: 'mouseout',
		position: {
			corner: {
				target: 'mouse'
			},
			target: 'mouse',
			adjust: { 
				screen: true,
				mouse: true
			}
		},
		style: { 
			width: 324,
			padding: 0,
			background: '#6FA442',
			color: 'black',
			textAlign: 'left',
			border: {
				width: 0,
				radius: 5,
				color: '#6FA442'
			},
			tip: true,
			name: 'dark' // Inherit the rest of the attributes from the preset dark style
		}
	});
}


function reservationAvailabilityDayTip($sRoomName,$sRoomDescription,$theDisplaydate,$isThedateSpecial,$str_tariffBaseOn,$str_price,$sHotDeal,$str_numavail,$sSpecialDetail,$minStay,$sExtraAdult,$sExtraChild){
	var popup;
	var dataInfo = new Object();
	if(typeof(dataInfo)=='object'){
		popup  = '<div class="popup"><h2>'+$sRoomName+': '+$theDisplaydate+'</h2>';
		if( parseInt($isThedateSpecial,10)==1){
			popup += '<p><span class="title">Special Rate ('+$str_tariffBaseOn+'):</span> NZ'+$str_price+'</p>';
		}else{
			popup += '<p><span class="title">Tariff ('+$str_tariffBaseOn+' persons): </span> NZ'+$str_price+'</p>';//tariff base on
		}
		if( parseInt($sExtraAdult,10) > 0 ){
			popup += '<p><span class="title"> Extra Adult: </span>  NZ$'+$sExtraAdult+' </p>';//extra adult
		}
		
		if( parseInt($sExtraChild,10) > 0 ){
			popup += '<p><span class="title"> Extra Child: </span>  NZ$'+$sExtraChild+' </p>';//extra child
		}
		popup += '<p><span class="title"> Room Available: </span> '+$str_numavail+'</p>';//room available
		if( $sSpecialDetail != '' && $sSpecialDetail !=null){
			popup += '<p class="desc"><span class="title"> Detail:</span> '+$sSpecialDetail.replace('&amp;nbsp;',' ')+'</p>';
		}
		
		if( parseInt($minStay,10)>1){
			popup += '<p class="desc"><span class="title"> Minimum Stay:</span> '+$minStay+' consecutive nights  </p>';
		}
		//popup += '<p class="desc"><span class="title"> Detail: </span>'+html_entity_decode(dataInfo.room_description)+'</p>';//room description
		popup += '<p class="hotspace"></p></div>';
		
		var hotdeal = $.trim($sHotDeal);
		if( hotdeal ){
			popup += '<div class="popup-hot"><div class="hoticon"></div><h2>Hot Deals</h2><p>'+hotdeal.replace('&amp;nbsp;',' ')+'</p></div>';
		}
	}
	return popup;
}

function reservationAvailabilityRoomNameTip($listingtitle, $listing_add,$descriptionString,$photoSrc,$iRating,$isAAMember,$qualRating,$listing_tariff){

	var dataInfo = new Object();
	var popup = '';
	if(typeof(dataInfo)=='object'){
		if(parseInt($iRating,10)> 0){
			popup += '<div class="ratingpopup"><p>Rating '+$iRating+'</p></div>';
		}
		if($photoSrc){
			popup += '<div class="popimage"><img src="'+$photoSrc+'" width="95" height="64" /></div>';
		}
		popup += '<div class="left top-details">';
		popup += '<h2>'+$listingtitle+'</h2><address class="availability_address">'+html_entity_decode($listing_add)+'</address>';
		
		if($listing_tariff){
			popup += $listing_tariff;
		}
		
		popup += '</div>';
		if($qualRating){
			popup +='<div class="availability_qualmark"><img src="../images/ratings/Qualmark/'+$qualRating+'" width="20" height="20"/></div>';
		}
		
		if( $descriptionString ){
			popup += '<div class="desctext"><p class="desc"><span class="title"> Detail: </span>'+html_entity_decode($descriptionString)+'</p></div>';
		}		
	}
	return popup;
}

function reservationRoomNameTip($roomkey,$roomnameinalttext,$sRoomDescription,$max_guests,$numberOfBedRooms,$strBeddingConfiguration){

	var dataInfo = new Object();
	var popup;
	if(typeof(dataInfo)=='object'){
		popup  = '<div class="popup"><h2>'+$roomnameinalttext+'</h2>';
		popup += '<div class="desc">';
		popup += '<p><span class="title">Max Guests: </span> '+$max_guests+' </p>';//extra adult
		popup += '<p><span class="title">No. Bedroom/s: </span> '+$numberOfBedRooms+' </p>';//extra adult
		popup += '<div class="room_bedding_conf"><p><span class="title">Bedding Configuration: </span>'+$strBeddingConfiguration+'</p></div> ';//extra adult
		popup += '<p class="desc"><span class="title"> Detail: </span>'+html_entity_decode($sRoomDescription)+'</p>';
		popup += '</div>';
	}
	
	$('#room_'+$roomkey).qtip({
		content:popup,
		show: 'mouseover',
		hide: 'mouseout',
		position: {
			corner: {
				target: 'mouse'
			},
			target: 'mouse',
			adjust: { 
				screen: true,
				mouse: true
			}
		},
		style: { 
			width: 330,
			padding: 0,
			background: '#6FA442',
			color: 'black',
			textAlign: 'left',
			border: {
				width: 0,
				radius: 5,
				color: '#6FA442'
			},
			tip: true,
			name: 'dark' // Inherit the rest of the attributes from the preset dark style
   		}
	});
}
