changed javascript layout