
function init () {

	var tds = document.getElementById('chats').getElementsByTagName('td');
	for (var i = 0, td; (td = tds[i]); i++) {
		if (!td.getAttribute('room')) { continue; }
		td.onmouseover = function (e) { this.className += ' hover'; }
		td.onmouseout = function (e) { this.className = this.className.replace(/\s+hover/, ''); }
		td.onclick = function (e) {
			window.location = this.getElementsByTagName('a')[0].href;
		}
	}

}

