// create dynamic positions
if (screen.width>1000 && screen.width<1152)
{
OAS_listpos+=",x07";
}
if (screen.width>=1152)
{
OAS_listpos+=",x08";
}


// Overlay Ad Manager V2.0 to run with OAS tags
// keep cookie alive for 1 month not required
var nextmonth = new Date()
nextmonth.setMonth(nextmonth.getMonth()+1);
var allcookies = document.cookie;
if(!allcookies) {
	document.cookie="c4ADcontrol=0; expires=" + nextmonth.toGMTString() + "; path=/; ";
} else {
	c4ADcookie = allcookies.indexOf("c4ADcontrol=");
	if(c4ADcookie==-1){
		document.cookie="c4ADcontrol=0; expires=" + nextmonth.toGMTString() + "; path=/; ";;
	}
	if(c4ADcookie!=-1){
	c4AdStringStart = c4ADcookie + 12;
	e = allcookies.indexOf(";", c4AdStringStart);
	c4ADcookie = allcookies.substring(c4AdStringStart,((e!=-1)?e:allcookies.length));
	
	increments  = Number(c4ADcookie);
	if(c4ADcookie!=1 || c4ADcookie!=0 || c4ADcookie!=3 ) {
	c4ADcookie=0;
	}
	if(increments==0) {
		//set position
		if(OAS_listpos!="") {
		OAS_listpos+=",Middle";
		} else {
		OAS_listpos+="Middle";
		}
		increments=2;
	} else if(increments!=0) {
		increments--;
	}
	document.cookie="c4ADcontrol="+increments+"; expires=" + nextmonth.toGMTString() + "; path=/; ";
	}
	//alert(document.cookie)
}

//AD Control centre
appendListPos("Bottom");
appendListPos("Middle1");
appendListPos("Middle2");
appendListPos("Left");
appendListPos("Left1");
appendListPos("Left2");
appendListPos("Left3");
appendListPos("Right");
appendListPos("x01");
appendListPos("x02");
appendListPos("x03");
appendListPos("x04");
appendListPos("x05");
appendListPos("x06");
appendListPos("x09");
//appendListPos("x10");
appendListPos("x11");
appendListPos("x14");
appendListPos("x15");
OAS_listpos+=",x10";
// added by JP
oas_c4urlmatch = /(\w+):\/\/([\w\-.]+)\/?(\S*)/;
oas_c4result = document.location.href.match(oas_c4urlmatch);
oas_c4Path = (oas_c4result[3].indexOf("//")!=-1)?oas_c4result[3].replace(/\/\//g,"/"):oas_c4result[3];
if(typeof oas_c4Path != "undefined") {
if(oas_c4Path.match(/^programmes/) || oas_c4Path.match(/^:9090\/programmes/)) {
OAS_listpos+=",Top1"
}
}
OAS_sitepage = OAS_sitepage.replace("#","/");