var Ads = {};
Ads.DfpKey = "pukel";
Ads.LegacyAdTagPrefix = "www.easyliving.co.uk/";
Ads.LegacyPositionMapping = new Array();
Ads.LegacyPositionMapping["Bottom1"] = { Size:"300x250", Tile:"3" }; // MPU
Ads.LegacyPositionMapping["Position1"] = { Size:"143x130", Tile:"20", Position:"1" }; // Promo button
Ads.LegacyPositionMapping["Position2"] = { Size:"143x130", Tile:"30", Position:"2" }; // Promo button
Ads.LegacyPositionMapping["Right"] = { Size:"120x600,160x600", Tile:"2" }; // Sky
Ads.LegacyPositionMapping["Top"] = { Size:"468x60,728x90", Tile:"1", IsInterstitial:true }; // Leaderboard/Banner
Ads.RandomNumber = Math.random() * 10000000000000000;
Ads.SiteID = "uk.n5574.easyliving";
Ads.getKeyValue = function()
{
	var value;
	switch (OAS_sitepage.substring(Ads.LegacyAdTagPrefix.length))
	{
		case "beauty_features":
			value = "btyhealth/features";
			break;
		case "beauty_shoots":
			value = "btyhealth/shoots";
			break;
		case "beauty_splash":
			value = "btyhealth/secsplash";
			break;
		case "beauty_spy":
			value = "btyhealth/beautyspy";
			break;
		case "truth_or_scare":
			value = "btyhealth/truthorscare";
			break;
		case "vote":
			value = "btyhealth/onourminds";
			break;
		case "blog":
			value = "blogs/default";
			break;
		case "community":
			value = "community/bepart";
			break;
		case "EL_Email_Registration":
			value = "community/emailsignup";
			break;
		case "registration/index":
			value = "community/registration";
			break;
		case "competition":
			value = "competitions/default";
			break;
		case "contactus":
			value = "contactus/default";
			break;
		case "directory":
			value = "directory/default";
			break;
		case "emotional_features":
			value = "emointel/features";
			break;
		case "emotional_splash":
			value = "emointel/splash";
			break;
		case "fashion_features":
			value = "fashion/shopping";
			break;
		case "fashion_shoots":
			value = "fashion/shoots";
			break;
		case "fashion_splash":
			value = "fashion/secsplash";
			break;
		case "food_features":
			value = "foodent/features";
			break;
		case "food_splash":
			value = "foodent/secsplash";
			break;
		case "easylivingtv":
			value = "foodent/videos";
			break;
		case "recipes":
			value = "foodent/recipes";
			break;
		case "homelife_features":
			value = "homelife/features";
			break;
		case "homelife_interiors":
			value = "homelife/interiors";
			break;
		case "homelife_shoots":
			value = "homelife/shoots";
			break;
		case "homelife_splash":
			value = "homelife/secsplash";
			break;
		case "homelife_travel":
			value = "homelife/travel";
			break;
		case "magazine":
			value = "magazine/default";
			break;
		case "my_life_in_books":
			value = "reallife/mylifeinbooks";
			break;
		case "real_life_features":
			value = "reallife/features";
			break;
		case "real_life_splash":
			value = "reallife/secsplash";
			break;
		case "practical_guides":
			value = "testedselected/guides";
			break;
		case "tested_selected_splash":
			value = "testedselected/default";
			break;
		case "daily":
			value = "trythisbuythis/default";
			break;
		default:
			value = "hp/splash";
			break;
	}
	return Ads.DfpKey + "=" + value;
};
Ads.getZone = function()
{
	switch (OAS_sitepage.substring(Ads.LegacyAdTagPrefix.length))
	{
		case "beauty_features":
		case "beauty_shoots":
		case "beauty_splash":
		case "beauty_spy":
		case "truth_or_scare":
		case "vote":
			return "beautyandhealth";
		case "blog":
			return "blogs";
			break;
		case "community":
		case "EL_Email_Registration":
		case "registration/index":
			return "community";
		case "competition":
			return "competitions";
		case "contactus":
			return "contactus";
		case "directory":
			return "directory";
		case "emotional_features":
		case "emotional_splash":
			return "emotionalintelligence";
		case "fashion_features":
		case "fashion_shoots":
		case "fashion_splash":
			return "fashion";
		case "food_features":
		case "food_splash":
		case "easylivingtv":
		case "recipes":
			return "foodandentertaining";
		case "homelife_features":
		case "homelife_interiors":
		case "homelife_shoots":
		case "homelife_splash":
		case "homelife_travel":
			return "homelife";
		case "magazine":
			return "magazine";
		case "my_life_in_books":
		case "real_life_features":
		case "real_life_splash":
			return "reallife";
		case "practical_guides":
		case "tested_selected_splash":
			return "testedandselected";
		case "daily":
			return "trythisbuythis";
		default:
			return "homepage";
	}
};
function OAS_AD(position)
{
	var sz = Ads.LegacyPositionMapping[position] != null ? Ads.LegacyPositionMapping[position].Size : "";
	if (sz.length == 0)
	{
		return;
	}
	var pos = Ads.LegacyPositionMapping[position] != null && Ads.LegacyPositionMapping[position].Position != null ? "pos=" + Ads.LegacyPositionMapping[position].Position + ";" : "";
	var tile = Ads.LegacyPositionMapping[position] != null ? Ads.LegacyPositionMapping[position].Tile : "0";
	var interstitial = Ads.LegacyPositionMapping[position] != null && Ads.LegacyPositionMapping[position].IsInterstitial ? "dcopt=ist;" : "";
	var zone = Ads.getZone();
	var keyValue = Ads.getKeyValue();
	document.write("<" + "script src=\"http://ad.uk.doubleclick.net/adj/" + Ads.SiteID + "/" + zone + ";" + keyValue + ";sz=" + sz + ";tile=" + tile + ";" + interstitial + pos + "ord=" + Ads.RandomNumber + "?\" type=\"text/javascript\"><\/script>");
};