modified ad rectangle interno function for mobile