function Cursor( place, size )
{
    var cursor = document.createElement("SPAN");
    var symbol = document.createTextNode("_");
    var isVisible = true;
    cursor.appendChild( symbol ); 
    place.appendChild( cursor );  
    cursor.style.color = "white";
    try  { cursor.style.fontSize = place.currentStyle.fontSize; }
        catch( e ) { cursor.style.fontSize = window.getComputedStyle(place, "").fontSize; }
    cursor.style.height = size.Height();
    cursor.style.width  = size.Width();
    cursor.style.left = 0;
    cursor.style.top  = 0;
    var timer;
 
    this.moveBy   = function ( shiftX, shiftY )
                    {
                        cursor.style.left = parseInt( parseInt( cursor.style.left ) + 
                                            size.Width() * shiftX );
                        cursor.style.top = parseInt( parseInt( cursor.style.top )  +
                                            size.Height() * shiftY );
                    }
                    
    this.moveTo   = function ( X, Y )
                    {
                        cursor.style.left = parseInt( size.Width() * X );
                        cursor.style.top  = parseInt( size.Height() * Y );
                    }
    
    this.hide     = function ()
                    {
                        if ( timer )
                            clearInterval( timer );
                        symbol.replaceData(0,1," ");                           
                        timer = false;
                    }
    
    this.show     = function ()
                    {
                        symbol.replaceData(0,1,"_");  
                        if ( !timer )
                            timer = setInterval( blinking, 600 );
                    }

    this.visible  = function ()
                    {
                        symbol.replaceData(0,1,"_");
                    }
    
    function blinking()
    {
        if ( isVisible )
        {
            symbol.replaceData(0,1," ");
            isVisible = false;
        }
        else
        {
            symbol.replaceData(0,1,"_");
            isVisible = true;
        }        
    }
}
