function place_hints(id, html_id, direction, x_offset, y_offset, first) {
	var pos = findPos(document.getElementById(html_id));
	if ((pos[0] != 0 || pos[1] != 0) && readCookie('hintClosed-' + id) == null) {
		
		pos[0] = eval(pos[0]) + eval(x_offset);
		pos[1] = eval(pos[1]) + eval(y_offset);
		
		var id = 'hint-' + id;
		
		document.getElementById(id).style.top = pos[1] + 'px';
		document.getElementById(id).style.left = pos[0] + 'px';
		document.getElementById(id).style.display = 'block';
	} else {
		document.getElementById('hint-' + id).style.display = 'none';
	}
}

function close_hint(id) {
	document.getElementById('hint-' + id).style.display = 'none';
	createCookie('hintClosed-' + id, true, 7);
}

function show(id) {
	if (document.getElementById('ext_hint-' + id).style.display == 'none') {
		document.getElementById('arrow-' + id).src = 'http://www.simpload.com/images/arrows/up.png';
		document.getElementById('ext_hint-' + id).style.display = 'block';
		document.getElementById('hint-' + id).style.zIndex = 2;
		document.getElementById('main-' + id).style.backgroundColor = '#FEFAE2';
		document.getElementById('arrow_point-' + id).style.display = 'none';
	} else {
		document.getElementById('arrow-' + id).src = 'http://www.simpload.com/images/arrows/down.png';
		document.getElementById('ext_hint-' + id).style.display = 'none';
		document.getElementById('hint-' + id).style.zIndex = 0;
		document.getElementById('main-' + id).style.backgroundColor = '#FFF8CC';
		document.getElementById('arrow_point-' + id).style.display = 'table-cell';
	}
}