function makeAd(zone, fromDiv, toDiv) {
	//if ((zone == 21) || (zone == 22)) return;
	if ($.browser.msie) return;
	var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
	//if (!plugin) {
	//	$("#"+toDiv).html($("#"+toDiv+" noscript").eq(1).text())
	//	return;
	//}
	
	var scriptTag = makeAdScriptTag(zone);

	document.write(scriptTag);
	$("#"+fromDiv+" script").remove();
	$("#"+toDiv).append($("#"+fromDiv));	
}

function makeAdInline (zone) {
	var scriptTag = makeAdScriptTag(zone);
	document.write(scriptTag);
}

function makeAdScriptTag(zone) {
	//if ((zone == 21) || (zone == 22)) return '';
	var m3_r = Math.floor(Math.random()*99999999999);
	if (!document.MAX_used) document.MAX_used = ',';

	var m3_u = 'http://www.bigpicturebigsound.com/ads/openAds/www/delivery/ajs.php?zoneid='+zone;
	m3_u += '&amp;cb='+m3_r;
	//m3_u += '&amp;loc='+escape(window.location);
	if (document.MAX_used != ',') m3_u += "&amp;exclude=" + document.MAX_used;
	//if (document.referrer) m3_u += "&amp;referer=" + escape(document.referrer);
	if (document.context) m3_u += "&context=" + escape(document.context);
	if (document.mmm_fo) m3_u += "&amp;mmm_fo=1";
	
	return "<scr"+"ipt type='text/javascript' src='"+m3_u+"'></scr"+"ipt>";
}
