Abu Sa'id (may Allah be pleased with him) said that the Prophet (peace and blessings be upon him) said: "When you see a funeral, stand up; and whoever follows it should not sit until it is set down."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 6872