var banServerFile = 'http://adp.adview.pl/ad/';
var banServerJS = 'http://ad.adview.pl/';



var banViewedXxByPoz = ''; 
var xxyEcom = '';

function putBan(typR){
	var typ=typR;
	if (typR==481) typ=48;
	
	var isRotType = false;
	if (typeof banRotXxByPoz != "undefined") {
                if (typeof banRotXxByPoz[typ] != "undefined") {
                        isRotType = true;
                }
        }
	
	if (!isRotType) {
		
		if (typeof banXxByPoz[typ] != "undefined"){
			document.write('<scr'+'ipt type="text/javascript" src="'+banServerFile+'GetBanFile?bxx='+banXxByPoz[typ]+'"><\/script>');
			banViewedXxByPoz+=banXxByPoz[typ]+',';
		} else if(typR==48) {
			document.write('<div class="bb2" align="right"><a class="bb48r" href="http://serwisy.gazeta.pl/linki/0,52960.html" >+ dodaj swoją reklamę </a></div>');
		}
	} else {
	            if (getBanObj("banP" + typ)) getBanObj("banP" + typ).style.display="block";  

                document.write('<div id="rot' + banXxByPoz[typ] + '"></div>'); 
                document.write('<div id="rotBottom' + banXxByPoz[typ] + '" style="text-align:right; margin-bottom:5px; "><img src="http://bi.gazeta.pl/i/reklama/rot/strzalki_napis.gif" style="border:0;vertical-align:middle;padding-right:5px;"/><a href="javascript:backBan(' + typ + ');"><img src="http://bi.gazeta.pl/i/reklama/rot/strzalki_left.gif" style="border:0;vertical-align:middle;"/></a><a href="javascript:forwardBan(' + typ + ')"><img src="http://bi.gazeta.pl/i/reklama/rot/strzalki_right.gif" style="border:0;vertical-align:middle;"/></a></div>');
                if (banXxByPoz[typ]){
                        banViewedXxByPoz+=banXxByPoz[typ]+',';
                }
                drawBanner(typ);
                startRotate(typ); 
	}
}


function countBan(dx){

	if (banViewedXxByPoz!=''){
		document.write('<scr'+'ipt type="text/javascript" src="'+banServer+'CountBan?dx='+dx+'&bxx='+banViewedXxByPoz+'&banKey='+banKey+'&xxyEcom='+xxyEcom+'"><\/script>');
	}
}
function getBanObj(obj) {
if (document.all) return eval('document.all.'+obj); else if (document.getElementById) return eval("document.getElementById('"+obj+"')"); 
}

function banDoIt(txt) { 
eval(unescape(eval(txt))); 
	// eval(unescape(txt)); 
}

if (typeof banRotXxByPoz != "undefined") {
    document.write('<scr'+'ipt type="text/javascript" src="'+banServerJS+'info/ban/silnikRot.js"><\/script>');
}