function swf_insert(filename,w,h) { 

		var oeTags = '<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="' + w + '" height="' + h + '" id="intro_blue" align="middle">'
		+ '<param name="allowScriptAccess" value="sameDomain" />'
		+ '<param name="movie" value="' + filename + '" /><param name="quality" value="high" /><param name="scale" value="noscale" /><param name="bgcolor" value="#000000" /><embed src="' + filename + '" quality="high" scale="noscale" bgcolor="#000000" width="' + w + '" height="' + h + '" name="xxx" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'
		+ '</object>';

		majorVersion=8;
		minorVersion=8;
		installinfo='<div style="margin-top: 100px; text-align: center;"><a href="https://www.macromedia.com/go/getflashplayer" target="_blank" style="font-family: Tahoma; color: #555; text-decoration: none; font-size: 11px;"><img src="images/no_flash.jpg" alt="pobierz Flash Playera" border="0" /></a>'
		if(navigator.product=='Gecko' || navigator.userAgent.indexOf('Opera')!=-1) {
		 if(plugin=navigator.plugins["Shockwave Flash"]) {
		  if(majorVersion > parseInt(plugin.description.substr(plugin.description.indexOf(".")-2, 2))
		  || minorVersion > parseInt(plugin.description.substr(plugin.description.length-2)) )
			document.write(installinfo);  // pobieranie flasha
		  else document.write(oeTags);
		 } else {
			document.write(installinfo);  // pobieranie flasha 
		 }
		}
		else document.write(oeTags);
		//-->
}

function do_tasks() {
	advAJAX.get({
		url : 'scripts/tasks.php?opt=tasks&task=do_tasks',
		onSuccess : function(obj) {
			json = eval('(' + obj.responseText + ')');
			for(i=0; i<json.length; i++) {
				advAJAX.get({url : 'CMSmanager/' + json[i].short_desc});
				advAJAX.get({url : 'scripts/tasks.php?opt=tasks&task=update_tasks&ids[]='+json[i].id});
			}
		}
	});
}