You can detect the screen size via JavaScript and then document.write the banner code with the adequate size.