function openPartyChat() {

	if (isLogged) {
		openVideoChatWindow('', userId);
	} else {
		window.location.href='/user/members/login.php?msg=Please+login+first!';
		return false;
	}
}

function openPrivateChat(memberName) {
	if (isLogged) {
		if (1 > 0 || isPremium || isSuperPremium) {
			openMessengerWindow(userName, memberName, userId);
		} else {
			window.location.href='/payment/payment.php';
		}
	} else {
		window.location.href='/payment/payment.php';
	}
}


function openReadyPrivateChat(memberName, roomID) {
        if (isLogged) {
		if (isPremium || isSuperPremium) {
			win=window.open('/user/members/privatechat/privatechat.php?member_name='+memberName+'&room='+roomID,'PRIVATECHAT'+memberName+'PRIVATECHAT','width=460,height=530,menubar=no,scrollbars=no');
	                win.focus();
		} else {
			win=window.open('/payment/payment.php');
	                win.focus();
		}
        } else {
                win = window.open('/user/members/login.php?msg=Please+login+first!');
                win.focus();
        }
}


function confirmPrivateChatRequest(memberName, roomID)
{
	if (confirm("Member " + memberName + " has requested a private chat.\nDo you accept? You can disable this notification from My Settings!")) {
		eval("openReadyPrivateChat('" + memberName + "', '" + roomID + "');");
	}
}
