function Help()
{
    this.vyskaObrazku = 11;
    this.sirkaObrazku = 11;
    this.sirkaFramu = "";
    this.casovac = "";
    this.idFrame = "";
    this.vymazany = "";

    this.Show = function (AobjektVolajici,AidFrame){
                                 
                        this.vymazany ="2";
                        clearTimeout(this.casovac);
                        this.idFrame = AidFrame;

                        el=document.getElementById(AidFrame);

                        if(el != null)
                        {
                            //el.style.top = (this.findPosY(AobjektVolajici))+ AobjektVolajici.offsetHeight +8 + 'px';
                            el.style.display ="block";
                            //Effect.Appear(AidFrame, { duration: 0.7 });
                            //el.style.display='block';

                            //Zjisteni sirky framu
                            this.sirkaFramu = el.style.width;
                            this.sirkaFramu = this.sirkaFramu.replace('px','');
                            this.sirkaFramu = parseFloat(this.sirkaFramu);
                               
                            //el.style.left = this.findPosX(AobjektVolajici); //+ AobjektVolajici.offsetWidth + 'px';
                            
                        }

                }

    this.Hide = function()
                {
                    if (this.idFrame != "")
                    {
                        el=document.getElementById(this.idFrame);
                        if (el != null)
                            el.style.display = 'none';
                    }
                }

    this.MouseOut = function()
                    {
                        if(this.vymazany != "1")
                            this.casovac = setTimeout("oHelp.Hide()", 0);
                    }

    this.FrameMouseOn = function()
                    {
                        this.vymazany = "1";
                        clearTimeout(this.casovac);
                    }

    this.FrameMouseOut = function()
                    {
                        if(this.vymazany != "2")
                            this.casovac = setTimeout("oHelp.Hide()", 0);
                    }

    this.findPosX = function(obj)
    {             
        var cycle = 0;
        var curleft = 0;
        if (obj.offsetParent)
        {
            while (obj.offsetParent)
            {         
                if (cycle>0) {return curleft;}
                curleft += obj.offsetLeft
                obj = obj.offsetParent;
                cycle++;
            }
        }
        else if (obj.x)
            curleft += obj.x;
        return curleft;
    }

    this.findPosY = function(obj)
    {
        var curtop = 0;
        if (obj.offsetParent)
        {
            while (obj.offsetParent)
            {
                curtop += obj.offsetTop
                obj = obj.offsetParent;
            }
        }
        else if (obj.y)
            curtop += obj.y;
        return curtop;
    }
}

oHelp = new Help();


function showError(e){
    alert(e);
}
