function checkMsgs() {	
	var url = '/ajax/webim/check/';
	var vars = '';	
	var ajax = new Ajax.Request(url, {method: 'post', parameters:vars, onComplete: displayTips});
}

function displayTips(response){
	//var json = response.responseText.evalJSON();
	var result = response.responseText;
	if(result > 0){
		//$("tip_layer").innerHTML = '<a onclick="openIm('+json.uid+');"><span><img src="/image/new/main/tb20.gif" width="20" height="20" /></span><span><strong>新消息('+json.num+')</strong></span></a>';
		$("tip_layer").innerHTML = '<a href="/zone/webimnew/index/100/100/3"><span><img src="/image/new/main/tb20.gif" width="20" height="20" /></span><span><strong>新消息('+result+')</strong></span></a>';
	}else{
		$("tip_layer").innerHTML = '<span><img src="/image/new/main/tb201.gif" width="20" height="20" /></span><span>新消息(0)</span>';
	}
}

function openIm(uid){
	window.location.href='/zone/webimnew/index//'+uid+'/1.html#post_send';
}
