function myTimer()
{     
    
    var State ="";
    this.Ontick  = "";
    
     this.Onticked = function() {}
    
    this.Start = function()
    {        
        State = "run";
        setTimeout("mytimer.Run("+this.Onticked+")",1000) 
    }
    
    this.Stop = function()
    {
        State = "stop";
    }
    
    this.Run = function (onticked)
    {              
        onticked();
        
        if (State == "run")
            setTimeout("mytimer.Run("+onticked+")",1000) 
     }
}

