function AD(_placementID, _sizeID)
{
    this.networkID = 665; //Morningstar
    this.placementID = _placementID;
    this.sizeID = _sizeID;
}

var ADDictionary = new Dictionary();

ADDictionary.add( 'HomepageSkyescraper', new AD('2086189', '154') );//Homepage Skyescraper 160x600
ADDictionary.add( 'HomepageTop', new AD('2086190', '225') );//Homepage Top 728x60
ADDictionary.add( 'HomepageMPU', new AD('2086188', '170') );//Homepage MPU 300x250

ADDictionary.add( 'topADSmallDefault', new AD('2451462', '1653') );//Additional banner next to leaderboard 195x90

ADDictionary.add( 'FundQuickrankTop', new AD('2086190', '225') );//Tools Fund Quickrank Top 728x90
ADDictionary.add( 'FundQuickrankRight', new AD('2086189', '154') );//Tools Fund Quickrank Right 160x600

ADDictionary.add( 'FundScreenerTop', new AD('2086190', '225') );//Tools Fund Screener Top 728x90
ADDictionary.add( 'FundScreenerRight', new AD('2086189', '154') );//Tools Fund Screener Right 160x600

ADDictionary.add( 'EquitiesTop', new AD('2086190', '225') );//Equities Top 728x90
ADDictionary.add( 'EquitiesRight', new AD('2086189', '154') );//Equities Right 160x600

ADDictionary.add( 'HelpTop', new AD('2086190', '225') );//Help Top 728x90
ADDictionary.add('HelpRight', new AD('2086189', '154')); //Help Right 160x600

ADDictionary.add('ToolsFundOverviewTop', new AD('2086190', '225')); //Tools Fund Overview Top 728x90
ADDictionary.add('ToolsFundOverviewRight', new AD('2086189', '154')); //Tools Fund Overview Right 160x600
ADDictionary.add('ToolsFundOverviewMPU', new AD('2086188', '170')); //Tools Fund Overview MPU 300x250

function WebAdsWriteTag(width, height, placementID)
{
    var currentAD;
    currentAD = ADDictionary.getVal(placementID);    
    
    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');
}