function isFlashVer(iFlashVer)
	{
		bname=navigator.appName
		if (bname.indexOf("Netscape")!=-1) 
			return isPluginNN("Shockwave Flash",iFlashVer);
		else if (bname.indexOf("Microsoft")!=-1)
			return isPluginIE("ShockwaveFlash",iFlashVer);
		else return (0);
	}
function isPluginNN(szName,iReqVer)
	{
		var iVer=0;
		if(navigator.plugins[szName])
			iVer=parseInt(navigator.plugins[szName].description.replace(/[\D]*/,''));
		return ((iVer-iReqVer<0)?0:1);
	}
function isPluginIE(szName,iReqVer)
	{
			var szPlug=szName+"."+szName+"."+iReqVer;
			var szAgent=navigator.userAgent.toLowerCase();
				if(parseFloat(szAgent.replace(/[\w\W]*\smsie\s/,''))>=5) 
				return execJS('try{return new ActiveXObject("'+szPlug+'");}catch(e){return false}');
			else return execVB('bRet=IsObject(CreateObject("'+szPlug+'"))','bRet');
	}
function execVB(vb,rc)
	{
		execScript("On error resume next:"+vb,"VBScript");return window[rc];
	}
function execJS(js)
	{
		var func=new Function(js);return func();
	}
function GetFlashHTML(iVer,iWidth,iHeight,szSrc,szLink)
	{
		var szMSIE=szSrc+"?ClickURL="+szLink;
		var szNS=szMSIE;
		var szHTML="<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://active.macromedia.com/flash2/cabs/swflash.cab#version="+iVer+",0,0,0\" width=\""+iWidth+"\" height=\""+iHeight+"\" id=\"X10Movie\"\>";
		szHTML+="<param name=\"movie\" value=\""+szMSIE+"\"\><param name=\"quality\" value=\"autohigh\"\><param name=\"bgcolor\" value=\"#FFFFFF\"\>";
		szHTML+="<embed src=\""+szNS+"\"  name=\"X10Movie\" swLiveConnect=\"TRUE\" width=\""+iWidth+"\" height=\""+iHeight+"\" quality=\"autohigh\" bgcolor=\"#FFFFFF\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\"\></embed\>";
		szHTML+="</object\>";
		document.write(szHTML);
		}
function GetBannerHTML(iWidth,iHeight,szSrc,szLink)
	{
		var szHref=szLink;
		var szHTML="<a href=\""+szHref+"\" target=\"_blank\"><img border=\"0\" src=\""+szSrc+"\" height=\""+iHeight+"\" width=\""+iWidth+" \" hspace=\"0\" vspace=\"0\"></a>";
		document.write(szHTML);
	}
function GetGraphic(iReqVer,iWidth,iHeight,iFlash,iGif,iLink)
	{
		if(isFlashVer(iReqVer)) GetFlashHTML(iReqVer,iWidth,iHeight,iFlash,iLink);
		else GetBannerHTML(iWidth,iHeight,iGif,iLink);
	}
