var ddojpAd = function(){//Begin Class Definition
var ddojpAdWidth=728;
var ddojpAdHeight=90;
var ddojpAdSubType='';
var cvname="cv"+Math.random();
document.write('');
var tic=0;
var itv=125;
var cv = document.getElementById(cvname);
if(!cv.getContext) return;
var ctx = cv.getContext('2d');
var message="Powered by ddo.jp";
var showbegin=2200+Math.random()*1200;
var loop=function(){
//////
ctx.fillStyle = "#408040";
ctx.fillRect(0,0,cv.width,cv.height);
var bw=12;
var bh=8;
var gap = 3;
var nx=Math.floor((cv.width-gap)/(bw+gap));
var ny=Math.floor((cv.height-gap)/(bh+gap));
bw = (cv.width-gap*(nx+1))/nx;
bh = (cv.height-gap*(ny+1))/ny;
var ix, iy;
for(iy=0; iymessage.length)len=message.length;
var str=message.substring(0,len);
ctx.font=(ddojpAdHeight<=50)?"12pt 'Arial'":"20pt 'Gungsuh'";
var cur=(Math.floor(tic/itv/2)%2==0)?"_":"";
var strw=ctx.measureText(message+"_").width;
var strh=ctx.measureText("M").width;
x=cv.width/2-strw/2+(cv.width/cv.height>2?(cv.width-strw)/2*0.75:0);
y=cv.height/2+strh/2;
ctx.fillStyle = 'rgb(120,240,120)';
ctx.fillRect(x,y-strh,ctx.measureText(str+'_').width,strh*1.2);
ctx.fillStyle = 'rgb(0,20,0)';
ctx.fillText(str+cur,x,y);
setTimeout(loop,itv);
tic=tic+itv;
if(tic>30000) tic=0;
}
cv.addEventListener('click', cvOnClick, false);
function cvOnClick(e){
window.open('https://ddo.jp/','_blank');
}
loop();
}//End Class ddojpAd Definition
new ddojpAd;