Skip to content

Instantly share code, notes, and snippets.

@iamnoah
Created September 9, 2011 00:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iamnoah/1205147 to your computer and use it in GitHub Desktop.
Save iamnoah/1205147 to your computer and use it in GitHub Desktop.
ad code for writeCapture issue #34
document.write('<!-- Copyright 2008 DoubleClick, a division of Google Inc. All rights reserved. -->\r\n<!-- Code auto-generated on Wed Aug 17 00:56:46 EDT 2011 -->\r\n<script src=\"http://s0.2mdn.net/879366/flashwrite_1_2.js\"><\/script>');document.write('\r\n');
function DCFlash(id,pVM){
var swf = "http://s0.2mdn.net/1540282/Tribeca_Snow_300x250.swf";
var gif = "http://s0.2mdn.net/1540282/Tribeca_Snow_300x250.jpg";
var minV = 8;
var FWH = ' width="300" height="250" ';
var url = escape("http://ad.au.doubleclick.net/6k%3Bh%3Dv8/3b7c/3/0/%2a/m%3B245013661%3B0-0%3B0%3B69607616%3B4307-300/250%3B43590106/43607893/1%3Bu%3Dpos%3D1%2Cpagetype%3Dindex%3B%7Eaopt%3D0/ff/27/ff%3B%7Efdr%3D244965911%3B0-0%3B2%3B28037886%3B4307-300/250%3B43590502/43608289/1%3Bu%3Dpos%3D1%2Cpagetype%3Dindex%3B%7Eokv%3D%3Bsec1%3Dtest%3Btile%3D3%3Bpos%3D1%3B%3Bsz%3D300x250%3Bkw%3Dnews%2Cworld%2Casia%3Bk%3Dv%3Bu%3Dpos%3D1%2Cpagetype%3Dindex%3B%7Eaopt%3D2/1/27/2%3B%7Esscs%3D%3fhttp://subaru.com.au/tribeca?utm_source=display&utm_medium=display&utm_campaign=brand_tribeca");
var fscUrl = url;
var fscUrlClickTagFound = false;
var wmode = "opaque";
var bg = "";
var dcallowscriptaccess = "never";
var openWindow = "false";
var winW = 0;
var winH = 0;
var winL = 0;
var winT = 0;
var moviePath=swf.substring(0,swf.lastIndexOf("/"));
var sm=new Array();
var defaultCtVal = escape("http://ad.au.doubleclick.net/6k%3Bh%3Dv8/3b7c/3/0/%2a/m%3B245013661%3B0-0%3B0%3B69607616%3B4307-300/250%3B43590106/43607893/1%3Bu%3Dpos%3D1%2Cpagetype%3Dindex%3B%7Eaopt%3D0/ff/27/ff%3B%7Efdr%3D244965911%3B0-0%3B2%3B28037886%3B4307-300/250%3B43590502/43608289/1%3Bu%3Dpos%3D1%2Cpagetype%3Dindex%3B%7Eokv%3D%3Bsec1%3Dtest%3Btile%3D3%3Bpos%3D1%3B%3Bsz%3D300x250%3Bkw%3Dnews%2Cworld%2Casia%3Bk%3Dv%3Bu%3Dpos%3D1%2Cpagetype%3Dindex%3B%7Eaopt%3D2/1/27/2%3B%7Esscs%3D%3fhttp://subaru.com.au/tribeca?utm_source=display&utm_medium=display&utm_campaign=brand_tribeca");
var ctp=new Array();
var ctv=new Array();
ctp[0] = "clickTag";
ctv[0] = "";
var fv='"moviePath='+moviePath+'/'+'&moviepath='+moviePath+'/';
for(i=1;i<sm.length;i++){if(sm[i]!=""){fv+="&submovie"+i+"="+escape(sm[i]);}}
for(var ctIndex = 0; ctIndex < ctp.length; ctIndex++) {
var ctParam = ctp[ctIndex];
var ctVal = ctv[ctIndex];
if(ctVal != null && typeof(ctVal) == 'string') {
if(ctVal == "") {
ctVal = defaultCtVal;
}
else {
ctVal = escape("http://ad.au.doubleclick.net/6k%3Bh%3Dv8/3b7c/3/0/%2a/m%3B245013661%3B0-0%3B0%3B69607616%3B4307-300/250%3B43590106/43607893/1%3Bu%3Dpos%3D1%2Cpagetype%3Dindex%3B%7Eaopt%3D0/ff/27/ff%3B%7Efdr%3D244965911%3B0-0%3B2%3B28037886%3B4307-300/250%3B43590502/43608289/1%3Bu%3Dpos%3D1%2Cpagetype%3Dindex%3B%7Eokv%3D%3Bsec1%3Dtest%3Btile%3D3%3Bpos%3D1%3B%3Bsz%3D300x250%3Bkw%3Dnews%2Cworld%2Casia%3Bk%3Dv%3Bu%3Dpos%3D1%2Cpagetype%3Dindex%3B%7Eaopt%3D2/1/27/2%3B%7Esscs%3D%3f" + ctVal);
}
if(ctParam.toLowerCase() == "clicktag") {
fscUrl = ctVal;
fscUrlClickTagFound = true;
}
else if(!fscUrlClickTagFound) {
fscUrl = ctVal;
}
fv += "&" + ctParam + "=" + ctVal;
}
}
fv+='"';
var bgo=(bg=="")?"":'<param name="bgcolor" value="#'+bg+'">';
var bge=(bg=="")?"":' bgcolor="#'+bg+'"';
function FSWin(){if((openWindow=="false")&&(id=="DCF0"))alert('openWindow is wrong.');
var dcw = 800;
var dch = 600;
// IE
if(!window.innerWidth)
{
// strict mode
if(!(document.documentElement.clientWidth == 0))
{
dcw = document.documentElement.clientWidth;
dch = document.documentElement.clientHeight;
}
// quirks mode
else if(document.body)
{
dcw = document.body.clientWidth;
dch = document.body.clientHeight;
}
}
// w3c
else
{
dcw = window.innerWidth;
dch = window.innerHeight;
}
if(openWindow=="center"){winL=Math.floor((dcw-winW)/2);winT=Math.floor((dch-winH)/2);}window.open(unescape(fscUrl),id,"width="+winW+",height="+winH+",top="+winT+",left="+winL+",status=no,toolbar=no,menubar=no,location=no");}this.FSWin = FSWin;
ua=navigator.userAgent;
if(minV<=pVM&&(openWindow=="false"||(ua.indexOf("Mac")<0&&ua.indexOf("Opera")<0))){
var adcode='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" id="'+id+'"'+FWH+'>'+
'<param name="movie" value="'+swf+'"><param name="flashvars" value='+fv+'><param name="quality" value="high"><param name="wmode" value="'+wmode+'"><param name="base" value="'+swf.substring(0,swf.lastIndexOf("/"))+'"><PARAM NAME="AllowScriptAccess" VALUE="'+dcallowscriptaccess+'">'+bgo+
'<embed src="'+swf+'" flashvars='+fv+bge+FWH+' type="application/x-shockwave-flash" quality="high" swliveconnect="true" wmode="'+wmode+'" name="'+id+'" base="'+swf.substring(0,swf.lastIndexOf("/"))+'" AllowScriptAccess="'+dcallowscriptaccess+'"></embed></object>';
if(('j'!="j")&&(typeof dclkFlashWrite!="undefined")){dclkFlashWrite(adcode);}else{document.write(adcode);}
}else{
document.write('<a target="_blank" href="'+unescape(url)+'"><img src="'+gif+'"'+FWH+'border="0" alt="Advertisement" galleryimg="no"></a>');
}}
var pVM=0;var DCid=(isNaN("245013661"))?"DCF2":"DCF245013661";
if(navigator.plugins && navigator.mimeTypes.length){
var x=navigator.plugins["Shockwave Flash"];if(x && x.description){var pVF=x.description;var y=pVF.indexOf("Flash ")+6;pVM=pVF.substring(y,pVF.indexOf(".",y));}}
else if (window.ActiveXObject && window.execScript){
window.execScript('on error resume next\npVM=2\ndo\npVM=pVM+1\nset swControl = CreateObject("ShockwaveFlash.ShockwaveFlash."&pVM)\nloop while Err = 0\nOn Error Resume Next\npVM=pVM-1\nSub '+DCid+'_FSCommand(ByVal command, ByVal args)\nCall '+DCid+'_DoFSCommand(command, args)\nEnd Sub\n',"VBScript");}
eval("function "+DCid+"_DoFSCommand(c,a){if(c=='openWindow')o"+DCid+".FSWin();}o"+DCid+"=new DCFlash('"+DCid+"',pVM);");
//-->
document.write('\r\n<noscript><a target=\"_blank\" href=\"http://ad.au.doubleclick.net/6k%3Bh%3Dv8/3b7c/3/0/%2a/m%3B245013661%3B0-0%3B0%3B69607616%3B4307-300/250%3B43590106/43607893/1%3Bu%3Dpos%3D1%2Cpagetype%3Dindex%3B%7Eaopt%3D0/ff/27/ff%3B%7Efdr%3D244965911%3B0-0%3B2%3B28037886%3B4307-300/250%3B43590502/43608289/1%3Bu%3Dpos%3D1%2Cpagetype%3Dindex%3B%7Eokv%3D%3Bsec1%3Dtest%3Btile%3D3%3Bpos%3D1%3B%3Bsz%3D300x250%3Bkw%3Dnews%2Cworld%2Casia%3Bk%3Dv%3Bu%3Dpos%3D1%2Cpagetype%3Dindex%3B%7Eaopt%3D2/1/27/2%3B%7Esscs%3D%3fhttp://subaru.com.au/tribeca?utm_source=display&utm_medium=display&utm_campaign=brand_tribeca\"><img src=\"http://s0.2mdn.net/1540282/Tribeca_Snow_300x250.jpg\" width=\"300\" height=\"250\" border=\"0\" alt=\"Advertisement\" galleryimg=\"no\"></a></noscript>\r\n');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment