completely rewritten for IE compatibility
Title updated for demo