some usefull javascript code