http://crosti.ru/pattern/433505/ ПО ССЫЛКЕ СХЕМА!!!!! А ЭТО УЖЕ ГОТОВАЯ РАБОТА. АВТОР РАБОТЫ ИРИНА КОТЕНКО.