if (typeof(document.getElementById('bantop_span'))!='undefined') {
	var screen_width=document.body.clientWidth;
	if (screen_width<900) screen_width=900; else if (screen_width>1650) screen_width=1650;
	function put_img(url) {if (url!='') new Image().src=url;}

	document.getElementById('bantop_span').innerHTML='<div class="TONAV"><iframe src="http://sticker.yadro.ru/ad/'+(screen_width-50)+'x90.html?place=8&adv-click=http://affinity4you.ru/cgi-bin/adv.fcgi%3fclick%3d1018136" frameborder=0 vspace=0 hspace=0 width=100% height=90 marginwidth=0 marginheight=0 allowtransparency="true" scrolling=no></iframe></div>';
	put_img('');
	put_img('http://affinity4you.ru/cgi-bin/adv.fcgi?view=1018136');

}

if (typeof(document.getElementById('banprofile_span'))!='undefined') {
	function put_img(url) {if (url!='') new Image().src=url;}
var UNDEF = "undefined";
var OBJECT = "object";
var SHOCKWAVE_FLASH = "Shockwave Flash";
var SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash";
var FLASH_MIME_TYPE = "application/x-shockwave-flash";
var EXPRESS_INSTALL_ID = "SWFObjectExprInst";

var win = window;
var doc = document;
var nav = navigator;

function pv(){
	var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
		playerVersion = [0,0,0],
		d = null;
	if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
		d = nav.plugins[SHOCKWAVE_FLASH].description;
		if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) {
			d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
			playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
			playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
			playerVersion[2] = /r/.test(d) ? parseInt(d.replace(/^.*r(.*)$/, "$1"), 10) : 0;
		}
	}
	else if (typeof win.ActiveXObject != UNDEF) {
		var a = null, fp6Crash = false;
		try {
			a = new ActiveXObject(SHOCKWAVE_FLASH_AX + ".7");
		}
		catch(e) {
			try {
				a = new ActiveXObject(SHOCKWAVE_FLASH_AX + ".6");
				playerVersion = [6,0,21];
				a.AllowScriptAccess = "always";
			}
			catch(e) {
				if (playerVersion[0] == 6) {
					fp6Crash = true;
				}
			}
			if (!fp6Crash) {
				try {
					a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
				}
				catch(e) {}
			}
		}
		if (!fp6Crash && a) {
			try {
				d = a.GetVariable("$version");
				if (d) {
					d = d.split(" ")[1].split(",");
					playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
				}
			}
			catch(e) {}
		}
	}
	return playerVersion;
}
function pv_check(a,b,c){
	var pver = pv();
	if (!a) return (pver[0]>=3)?1:0;
	if (pver[0]>a) return 1; else if (pver[0]<a) return 0;
	if (pver[1]>b) return 1; else if (pver[1]<b) return 0;
	if (pver[2]>c) return 1; else if (pver[2]<c) return 0;
	return 1;
}


	if (pv_check(0,0,0)) {
		var swfFLSize='width=240 height=400';
		var swfFLClickTag=escape('http://affinity4you.ru/cgi-bin/adv.fcgi?click=1018137&url=http://www.mmslove.ru/');
		var swfFLLocation='http://www.liveinternet.ru/publ/00blog/02240400/021M&M/mms.swf?clickTAG='+swfFLClickTag;
		document.getElementById('banprofile_span').innerHTML='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" '+swfFLSize+' align="middle"><param name="allowScriptAccess" value="never">'+
		'<param name="movie" value="'+swfFLLocation+'">'+
		'<param name="menu" value="false"><param name="quality" value="high"><param name="wmode" value="opaque"><param name="bgcolor" value="#ffffff">'+
		'<embed src="'+swfFLLocation+'" menu="false" quality="high" wmode="transparent" bgcolor="#ffffff" '+swfFLSize+' align="middle" allowScriptAccess="never" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';
		put_img('');
		put_img('http://affinity4you.ru/cgi-bin/adv.fcgi?view=1018137');
	} else {
		document.getElementById('banprofile_span').innerHTML='<a href="http://affinity4you.ru/cgi-bin/adv.fcgi?click=1018137&url=http://www.mmslove.ru/" target=_blank><img src="http://www.liveinternet.ru/publ/00blog/02240400/021M&M/240x400.jpg" width=240 height=400 border=0 /></a>';
		put_img('');
		put_img('http://affinity4you.ru/cgi-bin/adv.fcgi?view=1018137');
	}

}
