function Timer() {
    this.id = null;
    this.init = function() {
    	this.id = null;
    };

    this.createTimer = function(callback){
    	if (this.id == null){
    		this.id = setTimeout ( callback, 500 );
    	}else{
    		clearTimeout(this.id);
    		this.id = setTimeout ( callback, 500 );
    	}
    }
}

var Timer = new Timer();

