var protocol = "http:";
if(window.location.protocol)
{
  protocol = window.location.protocol;
}
if(pv_lang == 0)
{
  var pv_ad = protocol+'//ads.smartshoppingads.de/ad/?';
}
else if(pv_lang == 1)
{
  var pv_ad = protocol+'//ads.smartshoppingads.co.uk/ad/?';
}
else
{
  var pv_ad = protocol+'//ads.smartshoppingads.de/ad/?';
}

function pv_url(k,v) { if (v) { pv_ad += k + '=' + escape(v) + '&'; } }

function pv() {

	var w = window;
	var r = Math.round(Math.random() * 1000);
    var format = w.pv_format.split("x");
    var pv_width = format[0];
    var pv_height = format[1];
    var pv_loc = String(document.location);
    pv_loc = pv_loc.substring(0, 256);
    var pv_ref = String(document.referrer);
    pv_ref = pv_ref.substring(0, 256);

	pv_url('w', pv_width);
	pv_url('h', pv_height);
	pv_url('r', r);
    pv_url('sc', w.pv_code);
    pv_url('ch',w.pv_channel);
    pv_url('dt',w.pv_tab);
    pv_url('ns',w.pv_no_search);
    pv_url('b',w.pv_border);
    pv_url('bg',w.pv_bg);
    pv_url('l',w.pv_link);
    pv_url('t',w.pv_text);
    pv_url('kw',w.pv_keyword);
    pv_url('ci',w.pv_category);
    pv_url('ru', pv_loc);
    pv_url('rf', pv_ref);
    pv_url('lang', w.pv_lang);
    pv_url('ctu', w.pv_clicktracker);

	document.write('<ifr'+'ame src="'+pv_ad+'" name="pv_'+r+'" width="'+pv_width+'" height="'+pv_height+'" marginwidth="0" marginheight="0" vspace="0" hspace="0" frameborder="0" scrolling="no"></ifr'+'ame>');
}

pv();