function AD(_placementID, _sizeID)
{
    this.networkID = 665; //Morningstar
    this.placementID = _placementID;
    this.sizeID = _sizeID;
}

var ADDictionary = new Dictionary();

ADDictionary.add('Leaderboard', new AD('2086179', '225'));  //Leaderboard 728x90
ADDictionary.add('MPU', new AD('2086180', '170'));  //MPU 300x250
ADDictionary.add('Skyescraper', new AD('2086181', '154'));  // Skyescraper 160x600


function WebAdsWriteTag(width, height, placementID) {
    var currentAD = null;

    if (width == '160') {
        currentAD = ADDictionary.getVal('Skyescraper');
    }
    else if (width == '300') {
        currentAD = ADDictionary.getVal('MPU');
    }
    else if (width == '728') {
        currentAD = ADDictionary.getVal('Leaderboard');
    }

    if (!currentAD) {
        return;
    }

    if (window.adgroupid == undefined) {
        window.adgroupid = Math.round(Math.random() * 1000);
    }

    document.write('<scr' + 'ipt language="javascript1.1" src="http://adserver.adtech.de/addyn|3.0|' + currentAD.networkID + '|' + currentAD.placementID + '|0|' + currentAD.sizeID + '|ADTECH;loc=100;target=_blank;key=key1+key2+key3+key4;grp=' + window.adgroupid + ';misc=' + new Date().getTime() + '"></scri' + 'pt>');
}

function WebAdsWriteTagSponsor(width, height, placementID, key1, key2)
{
    // ignore the keys for now on non-uk sites
    WebAdsWriteTag(width, height, placementID);
}

function WebQTSponsorTag(fundId, companyId){}

function WebAdsBottomTag()
{
    //WebAdsWriteTag('728', '90', 'BottomLeaderboard');
}

function WebAdsBottomRightButtonTag(width, height, placementKey) {
    WebAdsWriteTag(width, height, placementKey);
}
