function loginUserBeforeChat() {
    secure_async_call( function(user){
    	location.reload(true);
    } );
}

var time=3000;

function showChatInviteBubble(cid){
	var mess_div=document.getElementById('cust-supp');
	if (mess_div) {
		mess_div.style.display='block';	
	}
}





function getOfflineGreetMsgToMe(hotel) {
	return hotel + "目前不在电脑旁，但是您的消息已经发给他了。请耐心等待回复。";
}


function getGreetMsgToMe(chatName) {
	return "您好，我是" + chatName + "，我可以回答您关于我们的“0” 佣金预订网络的问题。";  
}


/* user got on line */
function userInitialChatStatus(uid) {
	showChatInviteBubble(uid);
}

function onLoggedInElsewhere() {
}

function userChatStatusChanged(uid, status) {
	if (status == "online") {
		playSound("On.aif");
		showChatInviteBubble(uid);
	} else {
		playSound("Off.aif");
	}
}

function chatPaneButtonClicked(button, buddy) {
	if (button == 'reserve') {
		NewWindow("/travel/hotel/ReserveHotel?id=" + chatIdToHotelId(buddy), "rsv" + buddy, 600,600);
	}
}


