function addLockBanner(aff_id, banner_id, campaign_id, banner_src, target, width, height, bonus_code, landing_page)
{
	var ie = document.all;
	var protocol = 'http' + ((document.location.protocol == 'https:') ? 's' : '');
	var cdn = 'http://lockpoker.cachefly.net/casino/banners';
	var src = cdn + banner_src;

	if(landing_page == 1) {
		var url = 'http://www.lockcasino.com' + target + '/' + aff_id + '/' + banner_id + '/' + campaign_id;
	} else {
		var url = 'http://www.lockcasino.com/a/' + aff_id + '/' + banner_id + '/' + campaign_id + '/' + ((target != '/') ? target : '' );
	}
	var vars = 'clickTag=' + url;
	
	if(bonus_code) {
		vars += '&code=' + bonus_code;
	}

	var html = '<object width="' + width + '" height="' + height + '"';

	if (!ie) {
		html += ' data="' + src + '" type="application/x-shockwave-flash"';
	} else {
		html += ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
		html += ' codebase="' + protocol + '://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"';
	}
	html += '>';

	html += ' <param name="movie" value="' + src + '" />';
	html += ' <param name="menu" value="false" />';
	html += ' <param name="wmode" value="opaque" />';
	html += ' <param name="bgcolor" value="#000000" />';
	html += ' <param name="flashvars" value="' + vars + '" />';
	html += ' <param name="allowScriptAccess" value="always" />';

	if(ie) {
		html += '<embed src="' + src + '" width="' + width + '" height="' + height + '" menu="false" quality="high" bgcolor="#000000" wmode="opaque" allowscriptaccess="always" flashvars="' + vars + '" type="application/x-shockwave-flash" pluginspage="' + protocol + '://www.macromedia.com/go/getflashplayer" />';
	}
	html += ' </object>';

	document.write( html );
}