/*
	Javascript del portale keul.it - Caricamento dei tooltips di boxover via Javascript
	by Keul - Ago 2006
*/

// Caricamento dei tips all'avvio della pagina
function loadTips() {
	// tips = getElementsByClassName(document, "*", "tips");
	tips = $('.tips')
	for (var i=0;i<tips.length;i++) tryLoadTipFor(tips[i].id);
}

// Tenta di impostare il tip per un elemento
function tryLoadTipFor(id) {
	if (id==null) return; 
	e = $('#'+id);
	if (e.length>0) {
		data = window[id];
		if (data==null) return;
		e.attr('title', tips_base.replace("$1",data[0]).replace("$2",data[1]));
		if (data.length>2)
			e.title += " "+data[2];
	}
}