var zones = new Array()	;

//racing-bazar.hu
//---------------

//top728: ctl00_ctl00_phOpenXZone1
var zone = new Object();zones.push(zone);zone.clientId = "phOpenXZone1";zone.ads = new Array();
zone.ads.push(new Object({ flashfile: "http://banner2.racing.hu/xenon.hu/xenon768.swf", width: 728, height: 90, flashvars: { alink1: "http://www.xenon.hu", atar1: "_blank"} }));
//zone.ads.push(new Object({ image: "http://cdn.simpleadserver.org/banners2/fulltuning.hu/banner_728x90.jpeg", link:"http://fulltuning.hu"}));

//top468
//var zone = new Object();zones.push(zone);zone.clientId = "apTop468";zone.ads = new Array();
//zone.ads.push(new Object({ flashfile: "http://banner2.racing.hu/carcoor/carcoor_468x60.swf", width: 468, height: 60}));
//zone.ads.push(new Object({ flashfile: "http://cdn.simpleadserver.org/banners2/carcoor/carcoor13_468x60px.swf", width: 468, height: 60}));
//zone.ads.push(new Object({ image: "http://cdn.simpleadserver.org/banners2/carcoor/hasznalt_auto_468x60.jpg", link:"http://carcoor.hu"}));


//jbox fixfelso 1.
//var zone = new Object();zones.push(zone);zone.clientId = "apJBOXFixFelso1";zone.ads = new Array();
//zone.ads.push(new Object({ flashfile: "http://cdn.simpleadserver.org/banners2/extrem_drifting_120x240.swf", width: 120, height: 240}));


//jbox fixfelso 2.
var zone = new Object();zones.push(zone);zone.clientId = "apJBOXFixFelso2";zone.ads = new Array();
zone.ads.push(new Object({ flashfile: "http://banner2.racing.hu/xenon.hu/xenon_hu_260x260.swf", width: 260, height: 260}));
//zone.ads.push(new Object({ image: "http://banner2.racing.hu/20100820_salakmotor.jpg"}));

//jbox fixfelso 3.
//var zone = new Object();zones.push(zone);zone.clientId = "ContentPlaceHolder1_apJBOXFixFelso3";zone.ads = new Array();
//zone.ads.push(new Object({ image: "http://banner2.racing.hu/kacsandi/kacsandi_120x240.jpg", link:"http://www.rallyeevkonyv.hu/main.php?site=rendeles"}));
//zone.ads.push(new Object({ image: "http://banner2.racing.hu/kacsandi/kacsandi2_120x240.jpg", link:"http://www.rallyeevkonyv.hu/main.php?site=rendeles"}));


//list728: AdPlace1
var zone = new Object();zones.push(zone);zone.clientId = "AdPlace1";zone.ads = new Array();
//zone.ads.push(new Object({ flashfile: "http://banner2.racing.hu/cardesigntuning/cardesigntuning_728x90_cdt3l.swf", width: 728, height: 90 }));
zone.ads.push(new Object({ image: "http://cdn.simpleadserver.org/banners2/racingautoalkatresz_728x90.gif", link:"http://www.karosszeria-webshop.hu"}));


//szerszampiac.hu
//---------------

//jbox1: ctl00_ctl00_ContentPlaceHolder1_apSZPJBox1
var zone = new Object();
zones.push(zone);
zone.clientId = "ctl00_ctl00_ContentPlaceHolder1_apSZPJBox1";
zone.ads = new Array();
zone.ads.push(new Object({ flashfile: "http://banner2.racing.hu/nincsmail.hu/nincsmail_400x300.swf", width: 200, height: 300 }));


function adServerPutBanner() {

    for (var i = 0; i < zones.length; i++) {
        var zone = zones[i];
        if (zone.clientId) {
            var dom = document.getElementById(zone.clientId);
            if (dom) {
                //kirakjuk valameket
                var chance = (new Date()) % zone.ads.length;
                var ad = zone.ads[chance];
                if (ad.flashfile) {
                    swfobject.embedSWF(ad.flashfile, zone.clientId, ad.width, ad.height, "9.0.0", "expressInstall.swf", ad.flashvars, "allowscriptaccess:always");
                }
				else if (ad.image && ad.link)
				{
					document.getElementById(zone.clientId).innerHTML = '<a href="'+ad.link+'" target="_blank"><img src="'+ad.image+'" border="0"/></a>';
				}
				else if (ad.image)
				{
					document.getElementById(zone.clientId).innerHTML = '<img src="'+ad.image+'" border="0"/>';
				}
            }
        }
    }

}
