document.write("<scr" + "ipt language=\"JavaScript\" type=\"text/javascript\" src=\"/css/js/s_code.js\"></scr" + "ipt>")

/* var _hbEC=0,_hbE=new Array;function _hbEvent(a,b){b=_hbE[_hbEC++]=new Object();b._N=a;b._C=0;return b;}
var hbx=_hbEvent("pv");hbx.vpc="HBX0103u";hbx.gn="ehg-autotrader.hitbox.com"; */
function writeHitBox(page,content) {
	/* For eStores we use already existing function call to call the SC one
		This is because otherwise we have to alter a lot of HTML files. */
    doSCtag(page, content, 'auto');
	s_code=s.t();
	if(s_code)document.write(s_code);
	return false;
	
/*hbx.acct="DM540626EMMD27EN3";
hbx.pn=page;
hbx.mlc=content;
hbx.pndef="title";
hbx.ctdef="full";
hbx.fv="";
hbx.lt="manual";
hbx.dlf="n";
hbx.dft="n";
hbx.elf="n";
hbx.seg="";
hbx.fnl="";
hbx.cmp="";
hbx.cmpn="";
hbx.dcmp="";
hbx.dcmpn="";
hbx.dcmpe="";
hbx.dcmpre="";
hbx.hra="";
hbx.hqsr="";
hbx.hqsp="";
hbx.hlt="";
hbx.hla="";
hbx.gp="";
hbx.gpn="";
hbx.hcn="";
hbx.hcv="";
hbx.cp="null";
hbx.cpd="";
hbx.ci="";
hbx.hc1="";
hbx.hc2="";
hbx.hc3="";
hbx.hc4="";
hbx.hrf="";
hbx.pec="";
document.write('<script language="javascript1.1" defer src="/css/js/hbx.js"><\/script>');*/
}

function remChars(str){
	if(str.charAt(0)=="/"){ str = str.substr(1); }
	strl=str.length-1;
	if(str.charAt(strl) == "/" || str.charAt(strl) == "+"){str = str.substring(0, strl); }
	return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '').replace(/\s+/g, '_').replace(/\+/g,"_").replace(/\//g,":").replace(/\&amp;/g,"&").toLowerCase();
}

function doSCtag(adtpn, adtmlc, adtlt) {
    //alert('scPageViewVars');
	var scpn = remChars(adtpn), scmlc = remChars(adtmlc);
	if(scmlc != "") {
		scpn = ":" + scpn;
	}
	//if(testsite) { scmlc = scmlc.replace(/test:/g,""); }
	scmlc = scmlc.substring(scmlc.indexOf(":") + 1);
	s.pageName = scmlc + scpn;
	mlc_parts = scmlc.split(":");
	s.channel = mlc_parts[0];
	//if(scLegacyVars.trader) { s.channel = scLegacyVars.trader; }
	s.prop1 = "";
	//if(scLegacyVars.group) {
	//	s.prop1 = s.channel + ":" + scLegacyVars.group;
	//} else if(mlc_parts[1]) {
	//	s.prop1 = s.channel + ":" + mlc_parts[1];
	//}
	s.prop2 = "";
	//if(scLegacyVars.classification) { s.prop2 = s.prop1 + ":" + scLegacyVars.classification; }
	s.prop3 = "";
	s.prop4 = "";
	s.hier1 = scmlc.replace(/\:/g,",");
	s.prop5 = "";
	s.prop6 = document.title.toLowerCase();
	s.prop7 = s.hier1.substring(s.hier1.lastIndexOf(","),"-1");
	s.prop8 = "";
	s.prop9 = "";
    s.prop10 = "";

	//s.prop11 = scLegacyVars.search_keyword;
	//s.prop12 = scLegacyVars.search_postcode;
	//s.prop13 = scLegacyVars.search_distance;
	//s.prop14 = scLegacyVars.search_price_start;
	//s.prop15 = scLegacyVars.search_price_end;

	//s.prop16 = scLegacyVars.place_ad_type;
	//s.prop17 = scLegacyVars.place_ad_postcode;
	//s.prop18 = scLegacyVars.place_ad_keyword;

	if(!s.prop11) { s.prop11 = s.getQueryParam('keywords'); }
	s.prop11 = s.prop11.toLowerCase();
	if(s.prop11) {
		s.eVar11 = s.prop11;
		var t_search = s.getValOnce(s.eVar11, 'ev1', 0);
		if(t_search) { s.events=s.apl(s.events, "event7", ",", 2); }
	}
}