function showAd(ImageUrl, ImageName, iWidth, iHeight)
{
	var str, pos;
	var strScript ;
	
	var strUrl ;
	strUrl = ImageName ;
	if(! ImageName)  strUrl = ImageUrl ;

	str = /.swf/;
	pos = strUrl.search(str);
	if (pos==-1)
	{
		/*document.write("<img src=\'", strUrl, "\' border=0>");*/
		strScript = '<img src="' + strUrl +  '" height=' + iHeight + ' width=' + iWidth + ' border=0>' ;
	}
	else
	{
		/*document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0\" height=",  iHeight, " width=", iWidth,">\n<param name=movie value=\'", strUrl,"\'>\n<param name=quality value=high>\n\n</object>");*/
		strScript  = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ' ;
		strScript += ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" \n' ;
		strScript += ' height=' +  iHeight +  ' width=' + iWidth + '> \n' ;
		strScript += '<param name=movie value="' + strUrl + '"> \n';
		strScript += '<param name=quality value=high>\n\n';
		strScript += '<param name=wmode value=opaque />\n\n';
		
		strScript += '<EMBED src="' + strUrl + '" quality=high WIDTH=' + iWidth + ' HEIGHT=' + iHeight ;
		strScript += ' TYPE="application/x-shockwave-flash" ' ;
		strScript += ' wmode="opaque" ' ;
		strScript += ' PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED> \n' ;
		
		strScript += '</object>' ;
	}
	
	document.write(strScript);
}	