var hint_box=null;
var get_cursor_pos;
var is_mouseover=false;
function is_ie()
{
	if(navigator.userAgent.indexOf('MSIE')!=-1) return true; else return false;
}
function prepare_hint_box()
{
	hint_box=document.getElementById('hint_box');
	if(is_ie()) get_cursor_pos=cursor_IE; else get_cursor_pos=get_cursor;
	hint_box.style.display='block';
	hint_box.style.left=0;
	hint_box.style.top=0;
}
function cursor_IE(e)
{
	var cursor=new Array();
	cursor['x']=e.clientX+document.documentElement.scrollLeft;cursor['y']=e.clientY+document.documentElement.scrollTop;
	return cursor;
}
function get_cursor(e)
{
	var cursor=new Array();
	cursor['x']=e.pageX;cursor['y']=e.pageY;
	return cursor;
}
function show_hint(e,html_code)
{
	cursor=get_cursor(e);
	if(cursor['x']+hint_box.offsetWidth+5>document.documentElement.offsetWidth)
	{
		hint_box.style.left=cursor['x']-5-hint_box.offsetWidth+'px';
		hint_box.style.top=cursor['y']+5+'px';
	}
	else
	{
		hint_box.style.left=cursor['x']+5+'px';
		hint_box.style.top=cursor['y']+5+'px';
	}
	if(!is_mouseover && !is_ie())
	{
		hint_box.style.opacity=0;
		increase_opacity('hint_box',0.05);
	}
	hint_box.style.visibility='visible';
	html_code=html_code.split('^');
	hint_box.innerHTML='<span class="name">'+html_code[0]+'</span><span>Gönderen:'+html_code[1]+'</span><span>Görüntüleme:'+html_code[2]+'</span><span>Yorumlar:'+html_code[3]+'</span>';
	try	{e.target.onmouseout=hide_hint;}catch(er){e.srcElement.onmouseout=hide_hint;}
	is_mouseover=true;
}
function hide_hint()
{
	is_mouseover=false;
	hint_box.innerHTML='';
	hint_box.style.visibility='hidden';
}
function increase_opacity(object_id,amount)
{
	if(parseFloat(document.getElementById(object_id).style.opacity)+amount>=0.7)
	{
		document.getElementById(object_id).style.opacity=0.7;
	}
	else
	{
		document.getElementById(object_id).style.opacity=parseFloat(document.getElementById(object_id).style.opacity)+amount;
		setTimeout('increase_opacity(\''+object_id+'\','+amount+')',5);
	}
}