var flashTargetVersion=8;
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('.')-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)
{	var p=navigator.platform.toLowerCase();
	var code='';
	if(flashVersion>=flashTargetVersion)
	{	if(img&&((p.indexOf('win')!=-1)||(p.indexOf('mac')!=-1)))
		{	code='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="'+id+'" width="'+width+'" height="'+height+'" align="middle">';
			code+='<param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="/'+src+'" /><param name="quality" value="high" /><param name="wmode" value="transparent" />';
			code+='<embed src="/'+src+'" quality="high" wmode="transparent" width="'+width+'" height="'+height+'" swLiveConnect=true id="'+id+'" name="'+id+'" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
			code+='</object>';
		}
		else code='<img src="'+img+'" />'
	}
	else
	{	code='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);
}

/* email rewriting */
function eml(cls,a,b,c){document.write('<a href="mailto:'+a+'@'+b+'.'+c+'" class="'+cls+'" onfocus="this.blur()">'+a+'@'+b+'.'+c+'</a>');}