var spy_div=null;
var spy_showDiv=null;
var spy_overDiv=null;
var spy_timer=null;

function spy_popupDiv(e)
{
	e||(e=window.event);
    var x=e.clientX;
    var y=e.clientY;
    spy_timer=setTimeout("spy_showSMenu("+x+","+y+")",600);
}

function spy_showSMenu(x,y)
{
	
	if(document.body.clientWidth && document.body.clientWidth-x<180)
        x=x-180;
    else
        x=x+15;

    if(document.body.clientHeight && document.body.clientHeight-y<100)
        y=y-100;

    if(document.body.scrollLeft)
        x=x+document.body.scrollLeft;

    if(document.body.scrollTop)
        y=y+document.body.scrollTop;
	
	 if(is_nn4)
    {
        spy_div.left=x;
        spy_div.top=y;
    }
    else if(is_ie)
    {
        spy_div.style.pixelLeft=x;
        spy_div.style.pixelTop=y;
    }
    else
    {
        spy_div.style.left=x+"px";
        spy_div.style.top=y+"px";
    }
    spy_div.style.visibility="visible";
    spy_showDiv=1;
	spy_div.onmouseover=function()
    {
        spy_overDiv=1;
    }

    spy_div.onmouseout=function()
    {
        spy_overDiv=0;
        setTimeout('spy_closeSMenu()',100);
    }
	
}

function spy_hideDiv ()
{
    if(spy_timer)
    {
        clearTimeout(spy_timer);
        spy_timer=null;
    }

    if(spy_showDiv=="1")
    {
        spy_overDiv=0;
        setTimeout('spy_closeSMenu()',100);
    }
}

function spy_closeSMenu()
{
    if (spy_overDiv == "0")
    {
        spy_div.style.visibility="hidden";
        spy_showDiv=0;
    }
}
