Added a javascript which deduces the frame of a td item