if(typeof window.showAdvert != 'function') {
document.write('<scr'+'ipt type="text/ja'+'vascr'+'ipt" src="http://www.autotrader.co.uk/common/ldacptr.js"><\/scr'+'ipt>');
} 

var setchkAct = 0;
function calltheadvertmpu(chkAct){

if(setchkAct!="1"){
	
	var esmputar=document.getElementById("esmputar");
	var esmputarformfooter=document.getElementById("esmputarformfooter");
	var carsOuterContainer=document.getElementById("carsOuterContainer");
		
		// if not the search landing page
		if ((esmputar)&&(loadMPU==1)&&(setmpuTopRight) ){
		esmputar.src = "";			
		esmputar.src=setmpuTopRight;
		// Display iframes
		setTimeout("showAdvert('Middle1')", 0);
		}
		else {setTimeout("calltheadvertmpu(1)", 1500);}
		
		if ((esmputar)&&(loadMPU==1)&&(setmpu)&&(!$("topResultsRightMPU")) ){
			
			esmputar.src = "";			
		esmputar.src=setmpu;
		// Display iframes
		setTimeout("showAdvert('Middle1')", 0);
			
		}			
		
		else {setTimeout("calltheadvertmpu(1)", 1500);}
		
		if ((esmputarformfooter)&&(setmpu)){
		//loads iframe in search footer
		esmputarformfooter.src = "";			
		esmputarformfooter.src=setmpu;
		setchkAct=chkAct;
		// Display iframes
		setTimeout("showAdvert('Middle2')", 0);
		}
		else {setTimeout("calltheadvertmpu(1)", 1500);}
		
}

}

function checktheforce(set){
document.write('<div id="ATDad-Middle1-parent" style="display:none!important;"><iframe id="esmputar" name="esmputar" src="" width="300" height="250" frameborder="0" scrolling="no" allowtransparency="true" style="overflow-x:hidden;"></iframe></div>');
if(set=="1"){calltheadvertmpu(1);
}

}