var flashTargetVersion=7;
var flashVersion=0;
var MSDetect="false";

if (navigator.plugins && navigator.plugins.length)
{	var p=navigator.plugins["Shockwave Flash"];
	var d=p.description;
	if(d) flashVersion=d.charAt(d.indexOf('.')-2)+d.charAt(d.indexOf('.')-1);
}
else
	flashVersion=flashTargetVersion; /*temporal hook*/
/*
	MSDetect = "true";

vbw=document.write;
vbw('<SCRIPT LANGUAGE="VBScript">');
//vbw('on error resume next');
vbw('If MSDetect = "true" Then');
vbw('	If Not(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & flashTargetVersion))) Then');
vbw('		flashVersion=-1');
vbw('	Else');
vbw('		flashVersion=flashTargetVersion');
vbw('	End If');
vbw('End If');
vbw('</SCRIPT>');
*/

loadFlash=function(id,src,img,width,height,transparent)
{	var p=navigator.platform.toLowerCase();
	var code='';
	if((flashVersion*1)>=flashTargetVersion)
	{	if(img&&((p.indexOf('win')!=-1)||(p.indexOf('mac')!=-1)))
			code='<embed src="'+src+'" quality="high"  width="'+width+'" height="'+height+'"  wmode="'+transparent+'" swLiveConnect=true id="'+id+'" name="'+id+'" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
		else
			code='<img src="'+img+'" />'
	}
	else
	{	code='<br /><br /><br /><br /><br /><br />To view correctly this page you need newer flash player!<br />';
		code+='Your flash player is version:'+flashVersion+', required version:'+flashTargetVersion+'<br />';
		code+='<a href="http://www.macromedia.com/go/getflashplayer" target="_blank">Get Flash Player!</a>';
	}
	document.write(code);
}

