
var curobj='idG1';
var curid;
var TimeOut = 400;
var closeTimer;

function changephoto(foto){
	document.getElementById("bigfoto").src = foto;
}

function showTooltips(id) {

	var obj = 'idG' + id;

	mcancelclosetime();

	if(curid == '') {
		curobj = 'idG' + id;
	}
		document.getElementById(curobj).style.display = 'none';
		document.getElementById(obj).style.display = 'block';
		curid = id;

	curobj = 'idG' + curid;

}

function hideTooltip() {

	closeTimer = window.setTimeout(tclose, 600);

}

function mcancelclosetime() {
	if(closeTimer) {
		window.clearTimeout(closeTimer);
		closeTimer = null;
	}
}

function tclose() {
	document.getElementById(curobj).style.display = 'none';
}

document.onclick = tclose;


