function confirmation(link){
    var a = confirm('Kas olete kindel et soovite elemendi kustutada?');
    if (a==true) document.location.href=link;
}
var tempX = 0;
var tempY = 0;

// parameters for Hint window
var offsetX = 15;
var offsetY = -30;
var n=false;
var ie=false;
//

if (document.layers) {n=1;ie=0;}
if (document.all) {n=0;ie=1;}
if (n==1) document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = getMouseXY;

function init() {
	if (n) { hintstyle = document.blockDiv; hintblock = document.blockDiv;}
	if (ie) { hintstyle = blockDiv.style; hintblock = blockDiv;}
}

function hideHint(){
	document.getElementById("blockDiv").style.display='none';
}

function showHint(SHtext){
var scroll_x,scroll_y;
	if (self.pageYOffset) // all except Explorer
	{
		scroll_x = document.body.scrollLeft;
		scroll_y = document.body.scrollTop;
	}
	else if (document.documentElement && document.documentElement.scrollTop)
	// Explorer 6 Strict
	{
		scroll_x = document.documentElement.scrollLeft;
		scroll_y = document.documentElement.scrollTop;
	}
	else if (document.body) // all other Explorers
	{
		scroll_x = document.body.scrollLeft;
		scroll_y = document.body.scrollTop;
	}
	document.getElementById("blockDiv").style.left=scroll_x+tempX+offsetX+"px";
	document.getElementById("blockDiv").style.top=scroll_y+tempY+offsetY+"px";
	document.getElementById("blockDiv").style.display='block';
	document.getElementById("blockDiv").innerHTML="<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td><img src=\"img/alt_left.gif\" width=\"9\" height=\"25\" alt=\"\"></td><td align=\"left\" valign=\"top\"\"><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td colspan=\"2\" style=\"background-color: #5E5D4F\"><img src=\"img/tyhi.gif\" height=\"1\" width=\"1\" alt=\"\"></td></tr><tr><td style=\"background-color: #F4F2D4;\"><img src=\"img/tyhi.gif\" height=\"19\" width=\"1\" alt=\"\"></td><td style=\"background-color: #F4F2D4; padding: 1px 3px 0px 0px\">"+SHtext+"</td></tr><tr><td colspan=\"2\" style=\"background-color: #5E5D4F;\"><img src=\"img/tyhi.gif\" height=\"1\" width=\"1\" alt=\"\"></td></tr></table></td><td valign=\"top\"><img src=\"img/alt_right.gif\" width=\"3\" height=\"21\" alt=\"\"></td></tr></table>";
}

function getMouseXY(e) {
	if (!e) var e = window.event;
	if (e.pageX || e.pageY)
	{
		tempX = e.pageX;
		tempY = e.pageY;
	}
	else if (e.clientX || e.clientY)
	{
		tempX = e.clientX + document.body.scrollLeft;
		tempY = e.clientY + document.body.scrollTop;
	}  
  if (tempX < 0){tempX = 0;}
  if (tempY < 0){tempY = 0;}  
  return true
}
