<kadu:top>
	<script>
		function messageStatusChanged(messageid, status)
		\{
			if (status == StatusDelivered)
				document.getElementById("confirm_"+messageid).style.opacity = "1.0";
			if (status == StatusWontDeliver)
				document.getElementById("confirm_"+messageid).style.opacity = "0.1";
		\}
		function contactActivityChanged( state, message, name )
		\{
			if( state == StateComposing )
				document.getElementById("composing").style.display = "block";
			else
				document.getElementById("composing").style.display = "none";
		\}
	</script>
	<div id="composing" style="display:none; position:fixed; z-index:1; top:0px; right:0px; cursor:default; -webkit-user-select:none;" onclick="this.style.display=\'none\';">
		<div style="position:relative; top:2px; right:2px; padding:3px 8px; -webkit-border-radius:10px; background:rgba(255,255,255,0.7);">
			<img id="composingicon" src="@{kadu_icons/composing:svg}" alt="" style="max-width:32px; max-height:32px; vertical-align:middle;">
		</div>
	</div>
</kadu:top>

<div[ id="confirm_#{messageId}"] style="margin: 0 9px 9px 9px;">
	<div style="margin-top:9px;">
	<kadu:header>
		<span style="font-size: 9pt;background: #{backgroundColor};color: #{fontColor};padding: 2px 6px 0 6px;border-top: 1px solid #{nickColor};border-left: 1px solid #{nickColor};border-right: 1px solid #{nickColor};margin-left: 10px;">%a</span>
		<span style="font-size:9pt;background:#eee;color:#222;padding:2px 6px 0 6px;border:1px solid #999;border-bottom:none;margin-left: 3px;">%u</span>
		<span style="font-size: 9pt;float:right;background:#eee;color:#222;padding:2px 6px 0 6px;border:1px solid #999;border-bottom:none;margin-right:10px;margin-top:-3px;">[#{sendDate}/]#{receivedDate}</span>
	</kadu:header>
	<div style="font-size: 9pt;background: #{backgroundColor};color:#{fontColor};padding: 5px 10px 4px 10px;border: 1px solid #{nickColor};">#{message}</div>
	</div>
</div>
<script>
	if ("#{messageId}" != "")
	\{
		document.getElementById("confirm_#{messageId}").style.opacity = "0.4";
		messageStatusChanged("#{messageId}", #{messageStatus});
	\}
</script>
