var ShockMode = 0; function fireBannerAd (url,flashURL,imageURL,width,height,flashVer,forceMask,useFSCommand) { var mask = 'http://brian/Test/themask.swf'; if (flashURL) { createTheFlash (url,imageURL,flashURL,width,height,flashVer,mask,forceMask,useFSCommand); } else { createTheImage (url,imageURL,width,height); } } function CAShowFlash(flashVer) { // From: http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_13893 (ShockMode) method var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0); var isMac = (navigator.userAgent.indexOf("Mac") != -1); var isIE = (navigator.userAgent.indexOf("MSIE") != -1); if (plugin && !isMac && parseInt(plugin.description.substring(plugin.description.indexOf(".")-1)) >= flashVer){ ShockMode = 1; } else if(isIE) { //This is for the IE/ActiveX flash issue document.write(' \n'); document.write('on error resume next \n'); document.write('ShockMode = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.'+flashVer+'")))\n'); document.write(' \n'); } return ShockMode; } function createTheFlash (url,image,swf,width,height,flashVer,mask,forceMask,useFSCommand) { if ( CAShowFlash(flashVer) ){ var flashName = 'CAFlash' + Math.round(Math.random() * 100012); //Javascript to handle click document.write(' \n'); document.write('function '+flashName+'_DoFSCommand(command, args){'); document.write(' alert(command);') document.write(" if (command == 'CACLICK') {"); document.write(" window.open('"+url+"','_blank');"); document.write(" } "); document.write('}'); document.write(' \n'); var isIE = (navigator.userAgent.indexOf("MSIE") != -1); if (isIE) { //This is for the IE/ActiveX flash issue document.write(' \n'); document.write('on error resume next \n'); document.write('Sub '+flashName+'_FSCommand(ByVal command, ByVal args)\n'); document.write(' call '+flashName+'_DoFSCommand(command, args)\n'); document.write('end sub\n'); document.write(' \n'); } //Write the actual object document.write(''); if (forceMask) document.write(' '); else document.write(' '); document.write(' '); document.write(' '); if (forceMask) document.write(' '); document.write(''); document.write('<a href="'+url+'" target="_blank">'); document.write('<img src='+image+' width='+width+' height='+height+' border=0></a>'); document.write(''); document.write(''); document.write(''); } else { createTheImage (url,image,width,height); } } function createTheImage (url,image,width,height) { document.write(''); document.write(''); } document.write('');