var movie_flash_ver = 6;
var swf_file = 'http://liveinternet.ru/click?http://weather.aport.ru/templates/swf/weather.swf';
function PrintWeatherState(timeofday,clouds,precip,animation) {
	if(animation) {
		var swf_w = '130';
		var swf_h = '68';
	}
	else {
		var swf_w = '65';
		var swf_h = '34';
	}
	clouds++; // For swf format
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+swf_w+'" height="'+swf_h+'">\n');
	document.write('<param name="flashvars" value="timeofday='+timeofday+'&clouds='+clouds+'&precip='+precip+'&animation='+animation+'">\n');
	document.write('<param name="quality" value="high">\n');
	document.write('<param name="movie" value="'+swf_file+'">\n');
	document.write('<embed src="'+swf_file+'" quality="high" width="'+swf_w+'" height="'+swf_h+'" flashvars="timeofday='+timeofday+'&clouds='+clouds+'&precip='+precip+'&animation='+animation+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">\n');
	document.write('</object>\n');
}

var br_opera7 = (window.opera && document.readyState) ? true : false;
var is_flash = false;
var flash_ver = 0;

// Detect flash plugin
if (navigator.plugins && navigator.plugins.length) {
	flash_plugin = navigator.plugins["Shockwave Flash"];
	if (flash_plugin) {
		is_flash = true;
		if (flash_plugin.description) {
			flash_desc = flash_plugin.description;
			flash_ver = flash_desc.charAt(flash_desc.indexOf('.')-1);
		}
	}
	else is_flash = false;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE") >= 0 && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('For i = 2 to 10\n');
	document.write('If Not(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & i))) Then\n');
	document.write('Else\n');
	document.write('is_flash = true\n');
	document.write('flash_ver = i\n');
	document.write('End If\n');
	document.write('Next\n');
	document.write('</script\>\n');
}
