if(document.createStyleSheet) {
	document.createStyleSheet('http://www.jamgolf.com/uk/banners/JamMiniLister.css');
} else {
	var styles = "@import url('http://www.jamgolf.com/uk/banners/JamMiniLister.css');";
	var newSS=document.createElement('link');
	newSS.rel='stylesheet';
	newSS.href='data:text/css,'+escape(styles);
	document.getElementsByTagName("head")[0].appendChild(newSS);
}
//var Jam_xmlHttpBanner;
var Jam_Banner_ML=document.getElementById('Jam_Banner_ML');
var Jam_Banner_ML_Body = document.getElementById('Jam_Banner_ML_Body');
var Jam_Banner_ML_Foot = document.getElementById('Jam_Banner_ML_Foot');

function Jam_Banner_ML_Call(totalWidth, totalHeight, width, height, query) {
	var url="http://www.jamgolf.com/uk/banners/JamMiniLister.php";
	var params="totalWidth="+totalWidth+"&totalHeight="+totalHeight;
	params=params+"&width="+width+"&height="+height;
	params=params+"&location="+window.location.href;
	params=params+"&src=JamMiniLister";
	if (query!=null) params=params+"&"+query;
	params=params+"&sid="+Math.random();
	var importScript=document.getElementById('Jam_Banner_ML_Import');
	if (importScript!=null) {
		document.getElementsByTagName("head")[0].removeChild(importScript);
	}
	var fileref=document.createElement('script');
	fileref.setAttribute("type","text/javascript");
	fileref.setAttribute("id","Jam_Banner_ML_Import");
	fileref.setAttribute("src", url+'?'+params);
	if (typeof fileref!="undefined") document.getElementsByTagName("head")[0].appendChild(fileref);
}
function LetsJamIt_ML(width, height, query) {
	var bodyHeight=(height-24);
	var footer='';
	var target='';
	if (query!=null) {
		if (query.indexOf('newwindow')>-1) {
			target=' target="_blank"';
		}
		if (query.indexOf('seller')>-1) {
			var sellerCode=query.substr(query.indexOf('seller=')+7);
			sellerCode=sellerCode.substr(0, sellerCode.indexOf('&'));
			sellerName=sellerCode.replace(/-/g, ' ');
			footer='<div id="Jam_Banner_ML_Foot">being sold by <a href="http://www.jamgolf.com/uk/retailers/'+sellerCode+'"'+target+'>'+sellerName+'</a></div>';
			bodyHeight-=18;
		}
	}
	if (Jam_Banner_ML==null) {
		document.write('<div id="Jam_Banner_ML" style="width: '+width+'px; height: '+height+'px;"><div id="Jam_Banner_ML_Head"><div><a href="http://www.jamgolf.com/uk/"'+target+'>JamGolf listings</a></div></div><div id="Jam_Banner_ML_Body" style="height: '+bodyHeight+'px;"></div>'+footer+'</div>');
		Jam_Banner_ML=document.getElementById('Jam_Banner_ML');
		Jam_Banner_ML_Body=document.getElementById('Jam_Banner_ML_Body');
		Jam_Banner_ML_Foot=document.getElementById('Jam_Banner_ML_Foot');
	}
	Jam_Banner_ML_Body.innerHTML='<div class="preload"><img src="http://www.jamgolf.com/images/jamwidget.jpg" alt="JamGolf" /><br /><img src="http://www.jamgolf.com/images/bannerloader.gif" alt="loading..." /><p>Loading...</p></div>';
	Jam_Banner_ML_Call(width, height, width, bodyHeight, query);
}