Javascript for escape