function bannerCreater(opt){
div = document.createElement('div'),
words = '0123456789qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM',
max_position = words.length - 1,
for(i = 0; i < 10; ++i) {
position = Math.floor (Math.random() * max_position);
result = result + words.substring(position, position + 1);
} else if (link == null) {
console.error('Не указана ссылка, баннер не будет создан.');
} else if (img == null) {
console.error('Не указана ссылка на изображение, баннер не будет создан.');
} else if (title == null) {
} else if (target == null) {
} else if (attach == null) {
console.error('Не указан id элемента, в который будет встроен баннер, баннер не будет создан.');
} else if (logging == null){
div.setAttribute('id',idgen);
div.setAttribute('style','width:'+w+'px !important;height:'+h+'px !important;background-image:url(\''+img+'\') !important;background-repeat:repeat repeat !important;background-position:center center !important;cursor:pointer !important;');
div.setAttribute('title',title);
div.setAttribute('onclick', 'window.open(\''+link+'\', \''+target+'\')',0);
document.getElementById(attach).appendChild(div);
console.log('Успешно создан баннер для сайта '+link+' с ID: '+idgen+', размерами '+w+'x'+h+'px в блоке '+attach+'.');
link: 'http://coffeebreak.rusff.ru/',
img: 'http://savepic.net/5248295.png',
title: 'Ролевой Каталог CoffeeBreak',