Playing with some javascript ideas