Dragon Ball Fusion Generator (2023)

Dragon Ball Fusion Generator (1)

<!––

(Video) WHO ARE YOU PEOPLE?! The Most HORRIFYING Fusions YET!! | Dragon Ball Fusion Generator

Pokemon Fusion 2

Dragon Ball Fusion Generator (2)

Dragon Ball Fusion Generator (3)

Dragon Ball Fusion Generator (4)

Dragon Ball Fusion Generator (5)

(Video) DRAGON BALL FUSION GENERATOR | Goku And Zeno Play

Dragon Ball Fusion Generator (6)

Dragon Ball Fusion Generator (7)

Dragon Ball Fusion Generator (8)

Dragon Ball Fusion Generator (9)Dragon Ball Fusion Generator (10)

Dragon Ball Fusion Generator (11)

(Video) Dragon Ball Fusion Generator Hack - How to use all features 100% Free

Konva Image Resize Demo Konva Image Resize Demo

Dragon Ball Fusion Generator (12)Dragon Ball Fusion Generator (13)

Dragon Ball Fusion Generator (14)

Dragon Ball Fusion Generator (15)Dragon Ball Fusion Generator (16)Dragon Ball Fusion Generator (17)Dragon Ball Fusion Generator (18)Dragon Ball Fusion Generator (19)Dragon Ball Fusion Generator (20)Dragon Ball Fusion Generator (21)Dragon Ball Fusion Generator (22)

Dragon Ball Fusion Generator (23)Dragon Ball Fusion Generator (24)Dragon Ball Fusion Generator (25)

Dragon Ball Fusion Generator (26)Dragon Ball Fusion Generator (27)Dragon Ball Fusion Generator (28)Dragon Ball Fusion Generator (29)

(Video) All Best Dragon Ball FUSIONS Compilation 2 - Dragon Ball Super Xenoverse

Dragon Ball Fusion Generator (30)

Dragon Ball Fusion Generator (31)

Dragon Ball Fusion Generator (32)Dragon Ball Fusion Generator (33)Dragon Ball Fusion Generator (34)Dragon Ball Fusion Generator (35)Dragon Ball Fusion Generator (36)Dragon Ball Fusion Generator (37)


'; $thumbx2=$pkm[$PKMNum1][7]*$pkm[$PKMNum1][6]; $thumby2=$pkm[$PKMNum1][8]*$pkm[$PKMNum1][6];$thumbx2=$thumbx2*0.75; $thumby2=$thumby2*0.75;$thumbx2=$thumbx2/$pkm[$PKMNum1][6]; $thumby2=$thumby2/$pkm[$PKMNum1][6];$thumbx2-=20*0.75; $thumby2-=20*0.75/2;echo '

(Video) Dragon Ball Fusion Generator | R&R UPDATE | MasakoX

';*///////////////////////////////////////////////////////////////////////////////var canvas_tt = document.getElementById('canvas_BackR'); canvas_tt.width = (res_2*zoomval); canvas_tt.height = (res_3*zoomval); var canvas_tt = document.getElementById('canvas_BackY'); canvas_tt.width = (res_2*zoomval); canvas_tt.height = (res_3*zoomval); var canvas_tt = document.getElementById('canvas_BackB'); canvas_tt.width = (res_2*zoomval); canvas_tt.height = (res_3*zoomval); var canvas_tt = document.getElementById('canvas_BackShadow'); canvas_tt.width = (res_2*zoomval); canvas_tt.height = (res_3*zoomval); var canvas_tt = document.getElementById('canvas_BackG'); canvas_tt.width = (res_2*zoomval); canvas_tt.height = (res_3*zoomval); var canvas_tt = document.getElementById('canvas_BackLeftovers'); canvas_tt.width = (res_2*zoomval); canvas_tt.height = (res_3*zoomval); var canvas_tt = document.getElementById('canvas_FrontR'); canvas_tt.width = (res_2*zoomval); canvas_tt.height = (res_3*zoomval); var canvas_tt = document.getElementById('canvas_FrontY'); canvas_tt.width = (res_2*zoomval); canvas_tt.height = (res_3*zoomval); var canvas_tt = document.getElementById('canvas_FrontB'); canvas_tt.width = (res_2*zoomval); canvas_tt.height = (res_3*zoomval); var canvas_tt = document.getElementById('canvas_FrontShadow'); canvas_tt.width = (res_2*zoomval); canvas_tt.height = (res_3*zoomval); var canvas_tt = document.getElementById('canvas_FrontG'); canvas_tt.width = (res_2*zoomval); canvas_tt.height = (res_3*zoomval); var canvas_tt = document.getElementById('canvas_FrontP'); canvas_tt.width = (res_2*zoomval); canvas_tt.height = (res_3*zoomval); var canvas_tt = document.getElementById('canvas_FrontLeftovers'); canvas_tt.width = (res_2*zoomval); canvas_tt.height = (res_3*zoomval); var canvas_tt = document.getElementById('canvas_MainR'); canvas_tt.width = (res_2*zoomval); canvas_tt.height = (res_3*zoomval); var canvas_tt = document.getElementById('canvas_MainY'); canvas_tt.width = (res_2*zoomval); canvas_tt.height = (res_3*zoomval); var canvas_tt = document.getElementById('canvas_MainB'); canvas_tt.width = (res_2*zoomval); canvas_tt.height = (res_3*zoomval); var canvas_tt = document.getElementById('canvas_MainShadow'); canvas_tt.width = (res_2*zoomval); canvas_tt.height = (res_3*zoomval); var canvas_tt = document.getElementById('canvas_MainG'); canvas_tt.width = (res_2*zoomval); canvas_tt.height = (res_3*zoomval); var canvas_tt = document.getElementById('canvas_MainP'); canvas_tt.width = (res_2*zoomval); canvas_tt.height = (res_3*zoomval); var canvas_tt = document.getElementById('canvas_MainLeftovers'); canvas_tt.width = (res_2*zoomval); canvas_tt.height = (res_3*zoomval); //var canvas_tt = document.getElementById('canvas_MainGShadow'); canvas_tt.width = (res_2*zoomval); canvas_tt.height = (res_3*zoomval); var canvas_tt = document.getElementById('canvas_Eyes'); canvas_tt.width = (res_2*zoomval); canvas_tt.height = (res_3*zoomval); var canvas_tt = document.getElementById('canvas_EyesR'); canvas_tt.width = (res_2*zoomval); canvas_tt.height = (res_3*zoomval); var canvas_tt = document.getElementById('canvas_EyesY'); canvas_tt.width = (res_2*zoomval); canvas_tt.height = (res_3*zoomval); var canvas_tt = document.getElementById('canvas_EyesB'); canvas_tt.width = (res_2*zoomval); canvas_tt.height = (res_3*zoomval); var canvas_tt = document.getElementById('canvas_EyesShadow'); canvas_tt.width = (res_2*zoomval); canvas_tt.height = (res_3*zoomval); var canvas_tt = document.getElementById('canvas_EyesG'); canvas_tt.width = (res_2*zoomval); canvas_tt.height = (res_3*zoomval); var canvas_tt = document.getElementById('canvas_EyesP'); canvas_tt.width = (res_2*zoomval); canvas_tt.height = (res_3*zoomval); var canvas_tt = document.getElementById('canvas_EyesLeftovers'); canvas_tt.width = (res_2*zoomval); canvas_tt.height = (res_3*zoomval); // var canvas_tt = document.getElementById('canvas_EyesGShadow'); canvas_tt.width = (res_2*zoomval); canvas_tt.height = (res_3*zoomval); /* var canvas_tt = document.getElementById('canvas_FullHairP'); canvas_tt.width = (hes[2]*zoomval); canvas_tt.height = (hes[3]*zoomval); var canvas_tt = document.getElementById('canvas_FullHairB'); canvas_tt.width = (hes[2]*zoomval); canvas_tt.height = (hes[3]*zoomval); var canvas_tt = document.getElementById('canvas_FullHairG'); canvas_tt.width = (hes[2]*zoomval); canvas_tt.height = (hes[3]*zoomval); var canvas_tt = document.getElementById('canvas_FullHairR'); canvas_tt.width = (hes[2]*zoomval); canvas_tt.height = (hes[3]*zoomval); var canvas_tt = document.getElementById('canvas_FullHairY'); canvas_tt.width = (hes[2]*zoomval); canvas_tt.height = (hes[3]*zoomval); var canvas_tt = document.getElementById('canvas_FullHairLeftovers'); canvas_tt.width = (hes[2]*zoomval); canvas_tt.height = (hes[3]*zoomval); var canvas_tt = document.getElementById('canvas_FullHairShadow'); canvas_tt.width = (hes[2]*zoomval); canvas_tt.height = (hes[3]*zoomval); var canvas_tt = document.getElementById('canvas_FullBackHairP'); canvas_tt.width = (hes[2]*zoomval); canvas_tt.height = (hes[3]*zoomval); var canvas_tt = document.getElementById('canvas_FullBackHairB'); canvas_tt.width = (hes[2]*zoomval); canvas_tt.height = (hes[3]*zoomval); var canvas_tt = document.getElementById('canvas_FullBackHairG'); canvas_tt.width = (hes[2]*zoomval); canvas_tt.height = (hes[3]*zoomval); var canvas_tt = document.getElementById('canvas_FullBackHairR'); canvas_tt.width = (hes[2]*zoomval); canvas_tt.height = (hes[3]*zoomval); var canvas_tt = document.getElementById('canvas_FullBackHairY'); canvas_tt.width = (hes[2]*zoomval); canvas_tt.height = (hes[3]*zoomval); var canvas_tt = document.getElementById('canvas_FullBackHairLeftovers'); canvas_tt.width = (hes[2]*zoomval); canvas_tt.height = (hes[3]*zoomval); var canvas_tt = document.getElementById('canvas_FullBackHairShadow'); canvas_tt.width = (hes[2]*zoomval); canvas_tt.height = (hes[3]*zoomval); */ var canvas_tt = document.getElementById('canvas_BackG'); canvas_tt.width = (res_2*zoomval); canvas_tt.height = (res_3*zoomval); var canvas_tt = document.getElementById('canvas_BackShadow'); canvas_tt.width = (res_2*zoomval); canvas_tt.height = (res_3*zoomval); ////////////////////////////////////////////////if(Ex1Type=="Sunglasses"){Ex1Crop_x=res_0; Ex1Crop_y=res_1;Ex1_x=tt_posx*zoomval; Ex1_y=tt_posy*zoomval;document.getElementById("canvas_Extra1").style.left=Ex1_x+"px"; document.getElementById("canvas_Extra1").style.top=Ex1_y+"px";var canvas_tt = document.getElementById("canvas_Extra1"); canvas_tt.width = (res_2*zoomval); canvas_tt.height = (res_3*zoomval); }if(Ex1Type=="Cat"){Ex1Crop_x=res_0; Ex1Crop_y=res_1;Ex1_x=tt_posx*zoomval; Ex1_y=tt_posy*zoomval;document.getElementById("canvas_Extra1").style.left=Ex1_x+"px"; document.getElementById("canvas_Extra1").style.top=Ex1_y+"px";var canvas_tt = document.getElementById("canvas_Extra1"); canvas_tt.width = (res_2*zoomval); canvas_tt.height = (res_3*zoomval); } x128x=0; x128y=0; x128w=0; x256x=0; x256y=0; x256w=0; newp1=eval(p1)+1; newp2=eval(p2)+1;sqlheadstr=sqlheadstr.split("@"); sqlbody2str=sqlbody2str.split("@"); //p2x128x=eval(sqlheadstr[0])+eval(sqlheadstr[4]);//headX[newp2];x128y=eval(sqlheadstr[1])+eval(sqlheadstr[5]);//headY[newp2];x128w=eval(sqlheadstr[2])+eval(sqlheadstr[6]);//headSize[newp2];x128h=eval(sqlheadstr[3])+eval(sqlheadstr[7]);//headH[newp2];x256x=eval(sqlbody2str[0])+eval(sqlbody2str[4]);//bodyX[newp1];x256y=eval(sqlbody2str[1])+eval(sqlbody2str[5]);//bodyY[newp1];x256w=eval(sqlbody2str[2])+eval(sqlbody2str[6]);//bodySize[newp1];x256h=eval(sqlbody2str[3])+eval(sqlbody2str[7]);//bodyH[newp1];//alert("demoHeadX="+demoHeadX+" demoHeadY="+demoHeadY+ "demoSize="+demoSize);///POSITION EDITS FOR CAPS//////////////////////////////////////////////////////if(p1==p2){ // sqlhead2str=sqlhead2str.split("@"); x128x=eval(sqlbody2str[0])+eval(sqlbody2str[4]);//headX[newp2];x128y=eval(sqlbody2str[1])+eval(sqlbody2str[5]);//headY[newp2];x128w=eval(sqlbody2str[2])+eval(sqlbody2str[6]);//headSize[newp2];x128h=eval(sqlbody2str[3])+eval(sqlbody2str[7]);//headH[newp2];}var sizeCalc=x256w/x128w;var demoSize = 256*sizeCalc;var demoHeadX = 0-x128x*sizeCalc; var demoHeadY = 0-x128y*sizeCalc; //demoHeadY+=pos_p2[1];hwidth=demoSize; hheight=demoSize;newoffsetx2=demoHeadX+x256x; newoffsety2=demoHeadY+x256y;//alert(x128h);//document.getElementById("Bshade").src="masks/1_0002_Circle2.png";//document.getElementById("Hshade").src="masks/199_0000_Circle1.png";//document.getElementById("Bshade").src="sprites/DMBody_1_MainLeftovers.png";//document.getElementById("Hshade").src="sprites/DMHead_199_MainLeftovers.png";////NEW offset///////////////////////////////////////////////*var Nhead1=Nx256w;//HEADvar Nhead2=Nx128w;var Ntemp1 = 1/Nhead1;Ntemp1=Ntemp1*Nhead2;var Noffsetx2 = Nx256x*Ntemp1; var Noffsety2 = Nx256y*Ntemp1; //HEADvar Noffsetx1=Nx128x;var Noffsety1=Nx128y; var Ntweak=Noffsetx1-Noffsetx2; Nnewoffsetx=-Noffsetx2;Nnewoffsety=-Noffsety2;var Nnewoffsetx2=Nnewoffsetx;var Nnewoffsety2=Nnewoffsety;Nnewoffsetx+=Noffsetx1;Nnewoffsety+=Noffsety1;*////////////////////////////////////////////////////////////////////var head1=x256w;//HEADvar head2=x128w;var temp1 = 1/head1;temp1=temp1*head2;//alert("here"+temp1);var offsetx2 = x256x*temp1; var offsety2 = x256y*temp1; //HEADvar offsetx1=x128x;var offsety1=x128y; //alert("offsetx1"+(offsetx1*temp1));//alert("offsetx2"+(offsetx2*temp1));var tweak=offsetx1-offsetx2; newoffsetx=-offsetx2;newoffsety=-offsety2;newoffsetx+=offsetx1;newoffsety+=offsety1;//newoffsetx=0;;//newoffsety=0;;//////////////////////////////////////////////////////////////////////////////////var hes_0=hes[0]; var hes_1=hes[1]; var hes_2=hes[2]; var hes_3=hes[3];hes_0=hes_0-4; hes_1=hes_1-4; hes_2=hes_2+8; hes_3=hes_3+8;//newoffsetx2-=(hes_0*temp1);//newoffsety2-=(hes_1*temp1);//newoffsety2+=;var teppx=hes_2;//(newoffsetx*zoomval);var teppy=hes_3;//(newoffsety*zoomval);teppx=teppx;//(newoffsetx*zoomval);teppy=teppy;//(newoffsety*zoomval);//HEADvar offsetx1=x256x;var offsety1=x256y; var tweak=offsetx1-offsetx2;//POS////////tt_posx=0;tt_posy=0;//tt_posx=-offsetx2;//tt_posy=-offsety2;var nnx=x256x+(hes_0-x128x);var nny=x256y+(hes_1-x128y);tt_posx=0;//alert("Trall"+(eval(x256x)-hes_0));tt_posy=-(eval(x128y)-hes_1)*temp1;tt_posx=-(eval(x128x)-hes_0)*temp1;//tt_posx+=((hes[2])*temp1)*zoomval;//tt_posy+=((hes[3])*temp1)*zoomval;tt_posx+=offsetx1;tt_posy+=offsety1;tt_posy=eval(tt_posy); tt_posx=eval(tt_posx);//tt_posx=tt_posx*zoomval; tt_posy=tt_posy*zoomval;//tt_posy+=hes[1]*zoomval;///////////// //var img_FullHairShadow = document.getElementById('canvas_FullHairShadow');//alert("img_FullHairShadow.width="+img_FullHairShadow.width);var width = img_FullBackHairShadow.width*temp1;var height = img_FullBackHairShadow.height*temp1;//alert("img_FullHairShadow.width="+img_FullHairShadow.width); // var canvas_tt = document.getElementById('canvas_FullHairShadow'); canvas_tt.width = (hes[2]*temp1)*zoomval; canvas_tt.height = (hes[3]*temp1)*zoomval; //alert(width);width=Math.floor(width);height=Math.floor(height);/*hwidth=width;hheight=height; *///alert("(set part)left="+document.getElementById("canvas_FullHairShadow").style.left);var hfar1=x128y+(x256h*temp1);var hfar2=x128y+(x128h);/*//alert(hfar1);//alert(hfar2);if(hfar1>hfar2){var hfar3=hfar1-hfar2;//alert("Over limit by="+hfar3);//newoffsety2-=hfar3;//alert("Over limit 1="+tt_posy);tt_posy-=(hfar3*zoomval);//alert("Over limit 2="+tt_posy);//yoffset-=2;}*///IF SAME MONSTERtt_posx=0;//x256x*temp1;tt_posy=0;//x128y*temp1;//alert("zoomval"+zoomval);document.getElementById("canvas_FullHairP").style.left=(tt_posx*zoomval)+"px"; document.getElementById("canvas_FullHairShadow").style.top=(tt_posy*zoomval)+"px";document.getElementById("canvas_FullHairB").style.left=(tt_posx*zoomval)+"px"; document.getElementById("canvas_FullHairShadow").style.top=(tt_posy*zoomval)+"px";document.getElementById("canvas_FullHairB").style.left=(tt_posx*zoomval)+"px"; document.getElementById("canvas_FullHairShadow").style.top=(tt_posy*zoomval)+"px";document.getElementById("canvas_FullHairG").style.left=(tt_posx*zoomval)+"px"; document.getElementById("canvas_FullHairShadow").style.top=(tt_posy*zoomval)+"px";document.getElementById("canvas_FullHairR").style.left=(tt_posx*zoomval)+"px"; document.getElementById("canvas_FullHairShadow").style.top=(tt_posy*zoomval)+"px";document.getElementById("canvas_FullHairY").style.left=(tt_posx*zoomval)+"px"; document.getElementById("canvas_FullHairShadow").style.top=(tt_posy*zoomval)+"px";document.getElementById("canvas_FullHairLeftovers").style.left=(tt_posx*zoomval)+"px"; document.getElementById("canvas_FullHairShadow").style.top=(tt_posy*zoomval)+"px";document.getElementById("canvas_FullHairShadow").style.left=(tt_posx*zoomval)+"px"; document.getElementById("canvas_FullHairShadow").style.top=(tt_posy*zoomval)+"px";document.getElementById("canvas_FullBackHairP").style.left=(tt_posx*zoomval)+"px"; document.getElementById("canvas_FullHairShadow").style.top=(tt_posy*zoomval)+"px";document.getElementById("canvas_FullBackHairB").style.left=(tt_posx*zoomval)+"px"; document.getElementById("canvas_FullHairShadow").style.top=(tt_posy*zoomval)+"px";document.getElementById("canvas_FullBackHairG").style.left=(tt_posx*zoomval)+"px"; document.getElementById("canvas_FullHairShadow").style.top=(tt_posy*zoomval)+"px";document.getElementById("canvas_FullBackHairR").style.left=(tt_posx*zoomval)+"px"; document.getElementById("canvas_FullHairShadow").style.top=(tt_posy*zoomval)+"px";document.getElementById("canvas_FullBackHairY").style.left=(tt_posx*zoomval)+"px"; document.getElementById("canvas_FullHairShadow").style.top=(tt_posy*zoomval)+"px";document.getElementById("canvas_FullBackHairLeftovers").style.left=(tt_posx*zoomval)+"px"; document.getElementById("canvas_FullHairShadow").style.top=(tt_posy*zoomval)+"px";document.getElementById("canvas_FullBackHairShadow").style.left=(tt_posx*zoomval)+"px"; document.getElementById("canvas_FullHairShadow").style.top=(tt_posy*zoomval)+"px";/*//document.getElementById("canvas_FullHairP").style.left=newoffsetx+"px"; document.getElementById("canvas_FullHairP").style.top=newoffsety+"px";//document.getElementById("canvas_FullHairShadow").style.left=teppx+"px"; document.getElementById("canvas_FullHairShadow").style.top=teppy+"px"; //document.getElementById('canvas_FullHairShadow').style.zIndex = 80;var canvas_tt = document.getElementById("canvas_FullHairP"); canvas_tt.width = (teppx*temp1)*zoomval; canvas_tt.height = (teppy*temp1)*zoomval; var canvas_tt = document.getElementById("canvas_FullHairB"); canvas_tt.width = (teppx*temp1)*zoomval; canvas_tt.height = (teppy*temp1)*zoomval; var canvas_tt = document.getElementById("canvas_FullHairB"); canvas_tt.width = (teppx*temp1)*zoomval; canvas_tt.height = (teppy*temp1)*zoomval; var canvas_tt = document.getElementById("canvas_FullHairG"); canvas_tt.width = (teppx*temp1)*zoomval; canvas_tt.height = (teppy*temp1)*zoomval; var canvas_tt = document.getElementById("canvas_FullHairR"); canvas_tt.width = (teppx*temp1)*zoomval; canvas_tt.height = (teppy*temp1)*zoomval; var canvas_tt = document.getElementById("canvas_FullHairY"); canvas_tt.width = (teppx*temp1)*zoomval; canvas_tt.height = (teppy*temp1)*zoomval; var canvas_tt = document.getElementById("canvas_FullHairLeftovers"); canvas_tt.width = (teppx*temp1)*zoomval; canvas_tt.height = (teppy*temp1)*zoomval; var canvas_tt = document.getElementById("canvas_FullHairShadow"); canvas_tt.width = (teppx*temp1)*zoomval; canvas_tt.height = (teppy*temp1)*zoomval; var canvas_tt = document.getElementById("canvas_FullBackHairP"); canvas_tt.width = (teppx*temp1)*zoomval; canvas_tt.height = (teppy*temp1)*zoomval; var canvas_tt = document.getElementById("canvas_FullBackHairB"); canvas_tt.width = (teppx*temp1)*zoomval; canvas_tt.height = (teppy*temp1)*zoomval; var canvas_tt = document.getElementById("canvas_FullBackHairB"); canvas_tt.width = (teppx*temp1)*zoomval; canvas_tt.height = (teppy*temp1)*zoomval; var canvas_tt = document.getElementById("canvas_FullBackHairG"); canvas_tt.width = (teppx*temp1)*zoomval; canvas_tt.height = (teppy*temp1)*zoomval; var canvas_tt = document.getElementById("canvas_FullBackHairR"); canvas_tt.width = (teppx*temp1)*zoomval; canvas_tt.height = (teppy*temp1)*zoomval; var canvas_tt = document.getElementById("canvas_FullBackHairY"); canvas_tt.width = (teppx*temp1)*zoomval; canvas_tt.height = (teppy*temp1)*zoomval; var canvas_tt = document.getElementById("canvas_FullBackHairLeftovers"); canvas_tt.width = (teppx*temp1)*zoomval; canvas_tt.height = (teppy*temp1)*zoomval; var canvas_tt = document.getElementById("canvas_FullBackHairShadow"); canvas_tt.width = (teppx*temp1)*zoomval; canvas_tt.height = (teppy*temp1)*zoomval; */ //var canvas_tt = document.getElementById('canvas_FullHairP'); canvas_tt.width = teppx; canvas_tt.height = teppy; //alert("tem"+offsetx1);//alert("(set part)left="+document.getElementById("canvas_FullHairShadow").style.left);/*document.getElementById('box1').style.height=teppy;document.getElementById('box1').style.width=teppx;document.getElementById('box1').style.left=offsetx2;document.getElementById('box1').style.top=offsety2;*/////////////////////////////////////////////////////////////////////////////////////document.getElementById("Hshade").style.top=newoffsety+"px"; ; //document.getElementById("Hshade").style.left=newoffsetx+"px"; ; //var img2 = document.getElementById('Bshade'); //or however you get a handle to the IMGvar width2 = img_MainLeftovers.width;var height2 = img_MainLeftovers.height;width2=Math.floor(width2);height2=Math.floor(height2);var originx=(width2/2);var originy=(height2/2);bwidth = img_MainLeftovers.width;bheight = img_MainLeftovers.height;//alert("zoomval="+zoomval);/*if(img_MainLeftovers.width>img_MainLeftovers.height){zoomval=(100/img_MainLeftovers.width);}else{zoomval=(100/img_MainLeftovers.height);}alert("zoomval="+zoomval);*////WING POS/////////////////////////////////////////////////////////////////////////////////WINGS 18,19,20,21/////WINGS//////////////////////////////////////////////////////var sqltemp=sqlwingstr.split("@"); var adjCrop=[];adjCrop[0]=eval(sqltemp[0])+eval(sqltemp[3]);adjCrop[1]=eval(sqltemp[1])+eval(sqltemp[4]);adjCrop[2]=eval(sqltemp[2])+eval(sqltemp[5]);var x128x=adjCrop[0];var x128y=adjCrop[1];var x128w=adjCrop[2];var sqltemp=sqlwing2str.split("@"); var adjCrop=[];adjCrop[0]=eval(sqltemp[0])+eval(sqltemp[3]);adjCrop[1]=eval(sqltemp[1])+eval(sqltemp[4]);adjCrop[2]=eval(sqltemp[2])+eval(sqltemp[5]);var x256x=adjCrop[0];var x256y=adjCrop[1];var x256w=adjCrop[2];if(newp2==32){x128x=255; x128y=255; x128w=255; x256x=255; x256y=255; x256w=255;}//FIX if w/h is 0 to fix browser error//////FIX if w/h is 0 to fix browser error////if(x256w==0){x256w=1;}if(x128w==0){x128w=1;}if(x256h==0){x256h=1;}if(x128h==0){x128h=1;}///////////////////////////////////////////var head1=x256w;//HEADvar head2=x128w;var temp1 = 1/head1;temp1=temp1*head2;var Wx = x128w;var Wy = x256w;var Wpercent = Wx/Wy;var Wnew_width = Wpercent * 100; // change 2 to # of decimalsvar Wnew_width=Wnew_width/100; Wxsize=Wnew_width*256; Wysize=Wnew_width*256;var Woffsetx2 = x256x*temp1; var Woffsety2 = x256y*temp1; //HEADvar Woffsetx1=x128x;var Woffsety1=x128y; var tweak=Woffsetx1-Woffsetx2; Wxoffset=0; Wyoffset=0; Wxoffset=-Woffsetx2;Wyoffset=-Woffsety2;Wxoffset+=Woffsetx1;Wyoffset+=Woffsety1;//var tes_0=tes[0]; var tes_1=tes[1]; var tes_2=tes[2]; var tes_3=tes[3];//tes_0=tes_0-4; tes_1=tes_1-4; tes_2=tes_2+8; tes_3=tes_3+8;wes_posx=((wes_0*temp1));wes_posy=((wes_1*temp1));wes_posx2=Wxoffset+(wes_0*temp1);wes_posy2=Wyoffset+(wes_1*temp1);//wes_posx=wes_posx2;//wes_posy=Wyoffset+((wes_1*temp1)+Wnew_width/2); //EDITvar cal_wes2 = (wes_2*temp1)*zoomval;if(cal_wes2<1){cal_wes2=1;}var cal_wes3 = (wes_3*temp1)*zoomval;if(cal_wes3<1){cal_wes3=1;}var canvas_tt = document.getElementById("canvas_WingsP"); canvas_tt.width = cal_wes2; canvas_tt.height = cal_wes3; canvas_tt.style.left=(wes_posx2*zoomval)+"px"; canvas_tt.style.top=(wes_posy2*zoomval)+"px";var canvas_tt = document.getElementById("canvas_WingsB"); canvas_tt.width = cal_wes2; canvas_tt.height = cal_wes3; canvas_tt.style.left=(wes_posx2*zoomval)+"px"; canvas_tt.style.top=(wes_posy2*zoomval)+"px";var canvas_tt = document.getElementById("canvas_WingsG"); canvas_tt.width = cal_wes2; canvas_tt.height = cal_wes3; canvas_tt.style.left=(wes_posx2*zoomval)+"px"; canvas_tt.style.top=(wes_posy2*zoomval)+"px";var canvas_tt = document.getElementById("canvas_WingsR"); canvas_tt.width = cal_wes2; canvas_tt.height = cal_wes3; canvas_tt.style.left=(wes_posx2*zoomval)+"px"; canvas_tt.style.top=(wes_posy2*zoomval)+"px";var canvas_tt = document.getElementById("canvas_WingsY"); canvas_tt.width = cal_wes2; canvas_tt.height = cal_wes3; canvas_tt.style.left=(wes_posx2*zoomval)+"px"; canvas_tt.style.top=(wes_posy2*zoomval)+"px";var canvas_tt = document.getElementById("canvas_WingsLeftovers"); canvas_tt.width = cal_wes2; canvas_tt.height = cal_wes3; canvas_tt.style.left=(wes_posx2*zoomval)+"px"; canvas_tt.style.top=(wes_posy2*zoomval)+"px";var canvas_tt = document.getElementById("canvas_WingsShadow"); canvas_tt.width = cal_wes2; canvas_tt.height = cal_wes3; canvas_tt.style.left=(wes_posx2*zoomval)+"px"; canvas_tt.style.top=(wes_posy2*zoomval)+"px";if(Ex1Type=="WhisHalo"){ Ex1Crop_x=wes_posx;Ex1Crop_y=wes_posy;Ex1OffsetY=(cal_wes3/4);Ex1Crop_y+=Ex1OffsetYvar canvas_tt = document.getElementById("canvas_Extra1"); canvas_tt.width = cal_wes2; canvas_tt.height = cal_wes3 ; Ex1_imgW=Wxsize;Ex1_imgH=Wysize;//var canvas_tt = document.getElementById("canvas_Extra1"); canvas_tt.width = Wxsize; canvas_tt.height = Wysize ; canvas_tt.style.left=(wes_posx2*zoomval)+"px"; canvas_tt.style.top=((wes_posy2+Ex1OffsetY)*zoomval)+"px";}////////////////////////////TAIL POS///////////////////////////////////////////////////////////TAIL//////////////////////////////////////////////////////var sqltemp=sqltailstr.split("@"); var adjCrop=[];adjCrop[0]=eval(sqltemp[0])+eval(sqltemp[3]);adjCrop[1]=eval(sqltemp[1])+eval(sqltemp[4]);adjCrop[2]=eval(sqltemp[2])+eval(sqltemp[5]);var x128x=adjCrop[0];var x128y=adjCrop[1];var x128w=adjCrop[2];var sqltemp=sqltail2str.split("@"); var adjCrop=[];adjCrop[0]=eval(sqltemp[0])+eval(sqltemp[3]);adjCrop[1]=eval(sqltemp[1])+eval(sqltemp[4]);adjCrop[2]=eval(sqltemp[2])+eval(sqltemp[5]);var x256x=adjCrop[0];var x256y=adjCrop[1];var x256w=adjCrop[2];//FIX if w/h is 0 to fix browser error////if(x256w==0){x256w=1;}if(x128w==0){x128w=1;}if(x256h==0){x256h=1;}if(x128h==0){x128h=1;}///////////////////////////////////////////var head1=x256w;//HEADvar head2=x128w;var temp1 = 1/head1;temp1=temp1*head2;var Tx = x128w;var Ty = x256w;var Tpercent = Tx/Ty;var Tnew_width = Tpercent * 100; // change 2 to # of decimalsvar Tnew_width=Tnew_width/100; Txsize=Tnew_width*256; Tysize=Tnew_width*256;var Toffsetx2 = x256x*temp1; var Toffsety2 = x256y*temp1; //HEADvar Toffsetx1=x128x;var Toffsety1=x128y; var tweak=Toffsetx1-Toffsetx2; Txoffset=0; Tyoffset=0; Txoffset=-Toffsetx2;Tyoffset=-Toffsety2;Txoffset+=Toffsetx1;Tyoffset+=Toffsety1;//var tes_0=tes[0]; var tes_1=tes[1]; var tes_2=tes[2]; var tes_3=tes[3];//tes_0=tes_0-4; tes_1=tes_1-4; tes_2=tes_2+8; tes_3=tes_3+8;tes_posx=((tes_0*temp1));tes_posy=((tes_1*temp1));tes_posx2=Txoffset+(tes_0*temp1);tes_posy2=Tyoffset+(tes_1*temp1);var cal_tes2 = (tes_2*temp1)*zoomval;if(cal_tes2<1){cal_tes2=1;}var cal_tes3 = (tes_3*temp1)*zoomval;if(cal_tes3<1){cal_tes3=1;}var canvas_tt = document.getElementById("canvas_TailsP"); canvas_tt.width = cal_tes2; canvas_tt.height = cal_tes3; canvas_tt.style.left=(tes_posx2*zoomval)+"px"; canvas_tt.style.top=(tes_posy2*zoomval)+"px";var canvas_tt = document.getElementById("canvas_TailsB"); canvas_tt.width = cal_tes2; canvas_tt.height = cal_tes3; canvas_tt.style.left=(tes_posx2*zoomval)+"px"; canvas_tt.style.top=(tes_posy2*zoomval)+"px";var canvas_tt = document.getElementById("canvas_TailsG"); canvas_tt.width = cal_tes2; canvas_tt.height = cal_tes3; canvas_tt.style.left=(tes_posx2*zoomval)+"px"; canvas_tt.style.top=(tes_posy2*zoomval)+"px";var canvas_tt = document.getElementById("canvas_TailsR"); canvas_tt.width = cal_tes2; canvas_tt.height = cal_tes3; canvas_tt.style.left=(tes_posx2*zoomval)+"px"; canvas_tt.style.top=(tes_posy2*zoomval)+"px";var canvas_tt = document.getElementById("canvas_TailsY"); canvas_tt.width = cal_tes2; canvas_tt.height = cal_tes3; canvas_tt.style.left=(tes_posx2*zoomval)+"px"; canvas_tt.style.top=(tes_posy2*zoomval)+"px";var canvas_tt = document.getElementById("canvas_TailsLeftovers"); canvas_tt.width = cal_tes2; canvas_tt.height = cal_tes3; canvas_tt.style.left=(tes_posx2*zoomval)+"px"; canvas_tt.style.top=(tes_posy2*zoomval)+"px";var canvas_tt = document.getElementById("canvas_TailsShadow"); canvas_tt.width = cal_tes2; canvas_tt.height = cal_tes3; canvas_tt.style.left=(tes_posx2*zoomval)+"px"; canvas_tt.style.top=(tes_posy2*zoomval)+"px";//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////Capes POS///////////////////////////////////////////////////////////Capes//////////////////////////////////////////////////////var sqltemp=sqlcapestr.split("@"); var adjCrop=[];adjCrop[0]=eval(sqltemp[0])+eval(sqltemp[4]);adjCrop[1]=eval(sqltemp[1])+eval(sqltemp[5]);adjCrop[2]=eval(sqltemp[2])+eval(sqltemp[6]);adjCrop[3]=eval(sqltemp[3])+eval(sqltemp[7]);var x128x=adjCrop[0];var x128y=adjCrop[1];var x128w=adjCrop[2];var x128h=adjCrop[3];var sqltemp=sqlcape2str.split("@"); var adjCrop=[];adjCrop[0]=eval(sqltemp[0])+eval(sqltemp[4]);adjCrop[1]=eval(sqltemp[1])+eval(sqltemp[5]);adjCrop[2]=eval(sqltemp[2])+eval(sqltemp[6]);adjCrop[3]=eval(sqltemp[3])+eval(sqltemp[7]);var x256x=adjCrop[0];var x256y=adjCrop[1];var x256w=adjCrop[2];var x256h=adjCrop[3];//FIX if w/h is 0 to fix browser error////if(x256w==0){x256w=1;}if(x128w==0){x128w=1;}if(x256h==0){x256h=1;}if(x128h==0){x128h=1;}//alert("x128w="+x128w);//alert("x256w="+x256w);var head1=x256w;//HEADvar head2=x128w;var temp1 = 1/head1;temp1=temp1*head2;//alert("here"+temp1);var Cx = x128w;var Cy = x256w;var Cpercent = Cx/Cy;var Cnew_width = Cpercent * 100; // change 2 to # of decimalsvar Cnew_width=Cnew_width/100;var hhead1=x256h;//HEADvar hhead2=x128h;var htemp1 = 1/hhead1;htemp1=htemp1*hhead2;var hCx = x128h;var hCy = x256h;var hCpercent = hCx/hCy;var hCnew_width = hCpercent * 100; // change 2 to # of decimalsvar hCnew_width=hCnew_width/100; Cxsize=Cnew_width*256; Cysize=hCnew_width*256;var Coffsetx2 = x256x*temp1; var Coffsety2 = x256y*htemp1; //HEADvar Coffsetx1=x128x;var Coffsety1=x128y; var tweak=Coffsetx1-Coffsetx2; Cxoffset=0; Cyoffset=0; Cxoffset=-Coffsetx2;Cyoffset=-Coffsety2;Cxoffset+=Coffsetx1;Cyoffset+=Coffsety1;ces_posx=((ces_0*temp1));;ces_posy=((ces_1*htemp1));;ces_posx2=Cxoffset+(ces_0*temp1);ces_posy2=Cyoffset+(ces_1*htemp1);var cal_ces2 = (ces_2*temp1)*zoomval;if(cal_ces2<1){cal_ces2=1;}var cal_ces3 = (ces_3*htemp1)*zoomval;if(cal_ces3<1){cal_ces3=1;}var canvas_tt = document.getElementById("canvas_CapesP"); canvas_tt.width = cal_ces2; canvas_tt.height = cal_ces3; canvas_tt.style.left=(ces_posx2*zoomval)+"px"; canvas_tt.style.top=(ces_posy2*zoomval)+"px";var canvas_tt = document.getElementById("canvas_CapesB"); canvas_tt.width = cal_ces2; canvas_tt.height = cal_ces3; canvas_tt.style.left=(ces_posx2*zoomval)+"px"; canvas_tt.style.top=(ces_posy2*zoomval)+"px";var canvas_tt = document.getElementById("canvas_CapesG"); canvas_tt.width = cal_ces2; canvas_tt.height = cal_ces3; canvas_tt.style.left=(ces_posx2*zoomval)+"px"; canvas_tt.style.top=(ces_posy2*zoomval)+"px";var canvas_tt = document.getElementById("canvas_CapesR"); canvas_tt.width = cal_ces2; canvas_tt.height = cal_ces3; canvas_tt.style.left=(ces_posx2*zoomval)+"px"; canvas_tt.style.top=(ces_posy2*zoomval)+"px";var canvas_tt = document.getElementById("canvas_CapesY"); canvas_tt.width = cal_ces2; canvas_tt.height = cal_ces3; canvas_tt.style.left=(ces_posx2*zoomval)+"px"; canvas_tt.style.top=(ces_posy2*zoomval)+"px";var canvas_tt = document.getElementById("canvas_CapesLeftovers"); canvas_tt.width = cal_ces2; canvas_tt.height = cal_ces3; canvas_tt.style.left=(ces_posx2*zoomval)+"px"; canvas_tt.style.top=(ces_posy2*zoomval)+"px";var canvas_tt = document.getElementById("canvas_CapesShadow"); canvas_tt.width = cal_ces2; canvas_tt.height = cal_ces3; canvas_tt.style.left=(ces_posx2*zoomval)+"px"; canvas_tt.style.top=(ces_posy2*zoomval)+"px";//alert(canvas_tt.width);//alert(canvas_tt.height);//t_width=t_width*global.cape[global.pokearg2,0]; t_width=t_width*2;//t_height=t_height*global.cape[global.pokearg2,3]; t_height=t_height*1.5;img_SSJ2Lightning.src = "BLANK.png";if(ss==2){img_SSJ2Lightning.src = "ssjimgs/sprSSJ2Lightning_0.png";} //Lightningif(ss==3){img_SSJ2Lightning.src = "ssjimgs/sprSSJ3Lightning_0.png";} //Lightningif(ss==4){img_SSJ2Lightning.src = "ssjimgs/sprSSJGLightning_0.png";} //Lightningif(ss==5){img_SSJ2Lightning.src = "ssjimgs/sprSSJ3Lightning_0.png";} //Lightningif(ss==6){img_SSJ2Lightning.src = "ssjimgs/sprSSJBLightning_0.png";} //Lightningif(ss==7){img_SSJ2Lightning.src = "ssjimgs/sprSSJRLightning_0.png";} //Lightning if(ss==8){img_SSJ2Lightning.src = "ssjimgs/UIEffect.png";} //Lightning if(ss==9){img_SSJ2Lightning.src = "ssjimgs/UIMEffect3.png";} //Lightning if(ss==10){img_SSJ2Lightning.src = "ssjimgs/SSJBELightning2.png";} //Lightning if(ss==11){img_SSJ2Lightning.src = "ssjimgs/SSJ5Lightning2.png";} //Lightning if(ss==12){img_SSJ2Lightning.src = "ssjimgs/LSSEffect2.png";} //Lightning SSLxoffset=x128x;SSLyoffset=x128y;SSLxsize=x128w;SSLysize=x128h;if(ss==8 || ss==9 || ss==10 || ss==11){SSLxoffset=SSLxoffset-((x128w/2));SSLyoffset=SSLyoffset-((x128h/2));SSLxsize=SSLxsize+(x128w);SSLysize=SSLysize+(x128h/2);}else{SSLxoffset=SSLxoffset-((x128w/2));SSLyoffset=SSLyoffset-((x128h/2));SSLxsize=SSLxsize+(x128w);SSLysize=SSLysize+(x128h/2);}KKLxoffset=x128x;KKLyoffset=x128y;KKLxsize=x128w;KKLysize=x128h;KKLxoffset=KKLxoffset-((x128w/3));KKLyoffset=KKLyoffset-((x128h/2));KKLxsize=KKLxsize+(x128w/1.7);KKLysize=KKLysize+(x128h/1.7);KK2Lxoffset=x128x;KK2Lyoffset=x128y;KK2Lxsize=x128w;KK2Lysize=x128h;KK2Lxoffset=(x128x/2)+(x128w/1.7);KK2Lyoffset=x128y+(x128h);KK2Lxsize=KK2Lxsize+(x128w*7);KK2Lysize=KK2Lysize+(x128h*5);if(ss==0 || ss==8){ if(p2==197-1){rainbowHairVar=1;}else{rainbowHairVar=0;} if(rainbowHairVar==1){setInterval(function () {rainbowHair();}, 5500); console.log("================RAINBOW HAIR ON!");}}//alert("CapesPosX="+Cxoffset);//("CapesPosY="+Cyoffset);//alert("CapesPosW="+Cxsize);//alert("Test"+Txoffset);///////////////////////////////////////////////////////MUSTACHE//////////////////////////////////////////////////////var sqltemp=sqltashstr.split("@"); var adjCrop=[];adjCrop[0]=eval(sqltemp[0])+eval(sqltemp[2]);adjCrop[1]=eval(sqltemp[1])+eval(sqltemp[3]);var x128x=adjCrop[0]; var x128y=adjCrop[1];; sqltemp=sqltailstr.split("@"); adjCrop=[];adjCrop[0]=eval(sqltemp[0])+eval(sqltemp[3]);adjCrop[1]=eval(sqltemp[1])+eval(sqltemp[4]);adjCrop[2]=eval(sqltemp[2])+eval(sqltemp[5]);var x128w=adjCrop[2];//varTailSize[newp1]; sqltemp=sqltash2str.split("@"); adjCrop=[];adjCrop[0]=eval(sqltemp[0])+eval(sqltemp[2]);adjCrop[1]=eval(sqltemp[1])+eval(sqltemp[3]);var x256x=adjCrop[0]; var x256y=adjCrop[1]; sqltemp=sqltail2str.split("@"); adjCrop=[];adjCrop[0]=eval(sqltemp[0])+eval(sqltemp[3]);adjCrop[1]=eval(sqltemp[1])+eval(sqltemp[4]);adjCrop[2]=eval(sqltemp[2])+eval(sqltemp[5]);var x256w=adjCrop[2];//FIX if w/h is 0 to fix browser error////if(x256w<=0){x256w=1;}if(x128w<=0){x128w=1;}if(x256h<=0){x256h=1;}if(x128h<=0){x128h=1;}///////////////////////////////////////////var head1=x256w;//HEADvar head2=x128w;//if(head2

head1){head2=head2-head1; head2=head2/2; head2=head2+head1;}var temp1 = 1/head1;temp1=temp1*head2;//Adjust to reduce the size changes of the tashif(temp1<1){var tepva=1-temp1; temp1+=(tepva/2);}if(temp1>1){var tepva=temp1-1; temp1-=(tepva/2);}var Mx = x128w;var My = x256w;var Mpercent = Mx/My;if(Mpercent<1){var tepva=1-Mpercent; Mpercent+=(tepva/2);}if(Mpercent>1){var tepva=Mpercent-1; Mpercent-=(tepva/2);}var Mnew_width = Mpercent * 100; // change 2 to # of decimalsvar Mnew_width=Mnew_width/100; Mxsize=Mnew_width*256; Mysize=Mnew_width*256;var Moffsetx2 = x256x*temp1; var Moffsety2 = x256y*temp1; //HEADvar Moffsetx1=x128x;var Moffsety1=x128y; var tweak=Moffsetx1-Moffsetx2; Mxoffset=0; Myoffset=0; Mxoffset=-Moffsetx2;Myoffset=-Moffsety2;Mxoffset+=Moffsetx1;Myoffset+=Moffsety1;mes_posx=((mes[0]*temp1));;mes_posy=((mes[1]*temp1));;mes_posx2=Mxoffset+(mes[0]*temp1);mes_posy2=Myoffset+(mes[1]*temp1);var canvas_tt = document.getElementById("canvas_MustashP"); canvas_tt.width = (mes[2]*temp1)*zoomval; canvas_tt.height = (mes[3]*temp1)*zoomval; canvas_tt.style.left=(mes_posx2*zoomval)+"px"; canvas_tt.style.top=(mes_posy2*zoomval)+"px";var canvas_tt = document.getElementById("canvas_MustashB"); canvas_tt.width = (mes[2]*temp1)*zoomval; canvas_tt.height = (mes[3]*temp1)*zoomval; canvas_tt.style.left=(mes_posx2*zoomval)+"px"; canvas_tt.style.top=(mes_posy2*zoomval)+"px";var canvas_tt = document.getElementById("canvas_MustashG"); canvas_tt.width = (mes[2]*temp1)*zoomval; canvas_tt.height = (mes[3]*temp1)*zoomval; canvas_tt.style.left=(mes_posx2*zoomval)+"px"; canvas_tt.style.top=(mes_posy2*zoomval)+"px";var canvas_tt = document.getElementById("canvas_MustashR"); canvas_tt.width = (mes[2]*temp1)*zoomval; canvas_tt.height = (mes[3]*temp1)*zoomval; canvas_tt.style.left=(mes_posx2*zoomval)+"px"; canvas_tt.style.top=(mes_posy2*zoomval)+"px";var canvas_tt = document.getElementById("canvas_MustashY"); canvas_tt.width = (mes[2]*temp1)*zoomval; canvas_tt.height = (mes[3]*temp1)*zoomval; canvas_tt.style.left=(mes_posx2*zoomval)+"px"; canvas_tt.style.top=(mes_posy2*zoomval)+"px";var canvas_tt = document.getElementById("canvas_MustashLeftovers"); canvas_tt.width = (mes[2]*temp1)*zoomval; canvas_tt.height = (mes[3]*temp1)*zoomval; canvas_tt.style.left=(mes_posx2*zoomval)+"px"; canvas_tt.style.top=(mes_posy2*zoomval)+"px";var canvas_tt = document.getElementById("canvas_MustashShadow"); canvas_tt.width = (mes[2]*temp1)*zoomval; canvas_tt.height = (mes[3]*temp1)*zoomval; canvas_tt.style.left=(mes_posx2*zoomval)+"px"; canvas_tt.style.top=(mes_posy2*zoomval)+"px";///////////////////////////////////////////var colpal = sqlcolorp2.split("@");var colpal2 = sqlcolorp1.split("@");var c_main="255,19,252";//0var c_belly="1,231,23";//1var c_shell="0,52,246";//2var c_color="246,197,0";//3var c_xcolor="240,0,0";//4var c_eyecolor="240,0,0";//4var m_main2=""; var m_main=colpal[0]; if(c_main==colpal[0] || m_main=="0,0,0"){m_main=colpal2[0]; }var m_belly=colpal[1]; if(c_belly==colpal[1] || m_belly=="0,0,0"){m_belly=colpal2[1]; }var m_shell=colpal[3]; if(c_shell==colpal[3] || m_shell=="0,0,0"){m_shell=colpal2[3]; }var m_color=colpal[2]; if(c_color==colpal[2] || m_color=="0,0,0"){m_color=colpal2[2]; }var m_xcolor=colpal[4]; if(c_xcolor==colpal[4] || m_xcolor=="0,0,0"){m_xcolor=colpal2[4]; }var m_eyecolor=colpal[5]; if(c_eyecolor==colpal[5] || m_eyecolor=="0,0,0"){m_eyecolor=colpal2[5]; }m_main2=colpal2[0];var spcolor1=0;if(ss==5 && p2==153){m_main="56,56,56"; c1="rgb(56,56,56)"; spcolor1=1;}if(ss==5 && p2==138){m_main="56,56,56"; c1="rgb(56,56,56)"; spcolor1=1;}if(ss==5 && p2==101){m_main="56,56,56"; c1="rgb(56,56,56)"; spcolor1=1;}if(ss==5 && p2==102){m_main="56,56,56"; c1="rgb(56,56,56)"; spcolor1=1;}if(ss==5 && p2==137){m_main="56,56,56"; c1="rgb(56,56,56)"; spcolor1=1;}if(p2==102 && p2==102){m_main="56,56,56"; c1="rgb(56,56,56)"; spcolor1=1;}//SONIC//if(ss==1 && p2==177){m_main="255,255,113"; c1="rgb(255,255,113)"; spcolor1=1;}if(ss==2 && p2==177){m_main="255,255,113"; c1="rgb(255,255,113)"; spcolor1=1;}if(ss==3 && p2==177){m_main="255,255,113"; c1="rgb(255,255,113)"; spcolor1=1;}if(ss==4 && p2==177){m_main="251,38,87"; c1="rgb(251,38,87)"; spcolor1=1;}if(ss==6 && p2==177){m_main="148,230,231"; c1="rgb(148,230,231)"; spcolor1=1;}if(ss==7 && p2==177){m_main="253,199,210"; c1="rgb(253,199,210)"; spcolor1=1;}//DragonballManif(p2==176){m_main=colpal[0]; m_belly=colpal[0]; } // make hair and G color the color of the DBMan$(".palette1").show();$(".palette2").show();$(".palette3").show();$(".palette4").show();$(".palette5").show();$(".palette1 .sp-preview").show();$(".palette2 .sp-preview").show();$(".palette3 .sp-preview").show();$(".palette4 .sp-preview").show();$(".palette5 .sp-preview").show();if(c_main==m_main || m_main=="0,0,0"){$(".palette1").hide(); $(".palette1 .sp-preview").hide();}if(c_belly==m_belly || m_belly=="0,0,0"){$(".palette2").hide(); $(".palette2 .sp-preview").hide();}if(c_shell==m_shell || m_shell=="0,0,0"){$(".palette3").hide(); $(".palette3 .sp-preview").hide();}if(c_color==m_color || m_color=="0,0,0"){$(".palette4").hide(); $(".palette4 .sp-preview").hide();}if(c_xcolor==m_xcolor || m_xcolor=="0,0,0"){$(".palette5").hide(); $(".palette5 .sp-preview").hide();}//alert("keep_main"+keep_main);m_main='rgb('+m_main+')';m_belly='rgb('+m_belly+')';m_shell='rgb('+m_shell+')';m_color='rgb('+m_color+')';m_xcolor='rgb('+m_xcolor+')';default_main=m_main;default_belly=m_belly;default_shell=m_shell;default_color=m_colordefault_xcolor=m_xcolor;freshfusion=1;if(keepColor==1){m_main=keep_main; m_belly=keep_belly; m_shell=keep_shell; m_color=keep_color; m_xcolor=keep_xcolor;}else{ //CLEAR STICKER ACCESSORY CANVAS ctn = count-1;while(ctn>=0) {if(arrayGroup[ctn].getY()<=505){arrayGroup[ctn].destroy();}ctn-=1; } layer.draw(); var canvasFG = document.getElementById('canvas_StampsF'); var ctxFG = canvasFG.getContext("2d"); ctxFG.clearRect(0, 0, 1000, 1000); var canvasBG = document.getElementById('canvas_StampsB'); var ctxBG = canvasBG.getContext("2d"); ctxBG.clearRect(0, 0, 1000, 1000);}//console.log("ss="+ss+" p2="+p2+" newp2="+newp2+" m_main="+m_main);if(c1!=0 && c1!="" ){m_main=c1;}if(c2!=0 && c2!=""){m_belly=c2;}if(c3!=0 && c3!=""){m_shell=c3;}if(c4!=0 && c4!=""){m_color=c4;}if(c5!=0 && c5!=""){m_xcolor=c5;}//console.log("ss="+ss+" p2="+p2+" newp2="+newp2+" m_main="+m_main);if(ss==1 && p2==160){m_main="255,229,13"; spcolor1=1; m_main='rgb('+m_main+')';;}if(ss==2 && p2==160){m_main="255,229,13"; spcolor1=1; m_main='rgb('+m_main+')';}if(ss==3 && p2==160){m_main="255,229,13"; spcolor1=1; m_main='rgb('+m_main+')';}if(ss==4 && p2==160){m_main="251,38,87"; spcolor1=1; m_main='rgb('+m_main+')';}if(ss==6 && p2==160){m_main="80,198,216"; spcolor1=1; m_main='rgb('+m_main+')';}if(ss==7 && p2==160){m_main="241,147,169"; spcolor1=1; m_main='rgb('+m_main+')';}if(ss==8 && p2==160){m_main="241,147,169"; spcolor1=1; m_main='rgb('+m_main+')';}if(ss==9 && p2==160){m_main="241,147,169"; spcolor1=1; m_main='rgb('+m_main+')';}if(ss==10 && p2==160){m_main="80,198,216"; spcolor1=1; m_main='rgb('+m_main+')';}if(ss==11 && p2==160){m_main="223,225,225"; spcolor1=1; m_main='rgb('+m_main+')';}if(m_main=="" || m_main=="rgb()"){m_main=keep_main; m_main='rgb('+m_main2+')';}var main_typecol="color";var belly_typecol="color";var shell_typecol="color";var color_typecol="color";var xcolor_typecol="color";var main_col=''+m_main+'';var belly_col=''+m_belly+'';var shell_col=''+m_shell+'';var color_col=''+m_color+'';var xcolor_col=''+m_xcolor+'';c1=main_col; c2=belly_col; c3=shell_col; c4=color_col; c5=xcolor_col;if (c1!=0 && c1!="" && c1.match(".jpg") == ".jpg"){main_typecol="image"; main_col=c1;}if (c2!=0 && c2!="" && c2.match(".jpg") == ".jpg"){belly_typecol="image"; belly_col=c2;}if (c3!=0 && c3!="" && c3.match(".jpg") == ".jpg"){shell_typecol="image"; shell_col=c3;}if (c4!=0 && c4!="" && c4.match(".jpg") == ".jpg"){color_typecol="image"; color_col=c4;}if (c5!=0 && c5!="" && c5.match(".jpg") == ".jpg"){xcolor_typecol="image"; xcolor_col=c5;} setTimeout(function(){ LoadImgAndFinish3(p1var,p2var,urls,m_main,m_belly,m_shell,m_color,m_xcolor,m_eyecolor,main_col,belly_col,shell_col,color_col,xcolor_col,main_typecol,belly_typecol,shell_typecol,color_typecol,xcolor_typecol)}, 200);}, 100); //Used to give time for the img_MainLeftovers. cus is is used in position checking}function LoadImgAndFinish3(p1var,p2var,urls,m_main,m_belly,m_shell,m_color,m_xcolor,m_eyecolor,main_col,belly_col,shell_col,color_col,xcolor_col,main_typecol,belly_typecol,shell_typecol,color_typecol,xcolor_typecol){draw_TailsP(main_col,main_typecol);draw_TailsG(belly_col,belly_typecol);draw_TailsB(shell_col,shell_typecol);draw_TailsY(color_col,color_typecol);draw_TailsR(xcolor_col,xcolor_typecol);draw_TailsShadow(); draw_TailsLeftovers();draw_WingsP(main_col,main_typecol);draw_WingsG(belly_col,belly_typecol);draw_WingsB(shell_col,shell_typecol);draw_WingsY(color_col,color_typecol);draw_WingsR(xcolor_col,xcolor_typecol);draw_WingsShadow(); draw_WingsLeftovers();draw_CapesP(main_col,main_typecol);draw_CapesG(belly_col,belly_typecol);draw_CapesB(shell_col,shell_typecol);draw_CapesY(color_col,color_typecol);draw_CapesR(xcolor_col,xcolor_typecol);draw_CapesShadow(); draw_CapesLeftovers();/*draw_FullBackHairP(main_col,main_typecol);draw_FullBackHairG(belly_col,belly_typecol);draw_FullBackHairB(shell_col,shell_typecol);draw_FullBackHairY(color_col,color_typecol);draw_FullBackHairR(xcolor_col,xcolor_typecol);draw_FullBackHairShadow(); draw_FullBackHairLeftovers();draw_FullHairP(main_col,main_typecol);draw_FullHairG(belly_col,belly_typecol);draw_FullHairB(shell_col,shell_typecol);draw_FullHairY(color_col,color_typecol);draw_FullHairR(xcolor_col,xcolor_typecol);draw_FullHairShadow(); draw_FullHairLeftovers();*/draw_MainP(main_col,main_typecol);draw_BackG(belly_col,belly_typecol);draw_BackB(shell_col,shell_typecol);draw_BackY(color_col,color_typecol);draw_BackR(xcolor_col,xcolor_typecol);draw_BackShadow(); draw_BackLeftovers(); draw_MainG(belly_col,belly_typecol);draw_MainB(shell_col,shell_typecol);draw_MainY(color_col,color_typecol);draw_MainR(xcolor_col,xcolor_typecol);draw_Eyes('rgb('+m_eyecolor+')',"color");draw_EyesG(belly_col,belly_typecol);draw_EyesP(main_col,main_typecol);draw_EyesB(shell_col,shell_typecol);draw_EyesY(color_col,color_typecol);draw_EyesR(xcolor_col,xcolor_typecol);draw_EyesShadow(); draw_EyesLeftovers(); draw_FrontG(belly_col,belly_typecol);draw_FrontP(main_col,main_typecol);draw_FrontB(shell_col,shell_typecol);draw_FrontY(color_col,color_typecol);draw_FrontR(xcolor_col,xcolor_typecol);draw_FrontShadow(); draw_FrontLeftovers(); draw_MainShadow(); draw_BackShadow();//draw_MainGShadow();draw_MainLeftovers();draw_MustashP(main_col,main_typecol);draw_MustashG(belly_col,belly_typecol);draw_MustashB(shell_col,shell_typecol);draw_MustashY(color_col,color_typecol);draw_MustashR(xcolor_col,xcolor_typecol);draw_MustashShadow(); draw_MustashLeftovers(); draw_SSJ2Lightning(); draw_KaiokenEffect(); draw_Extra1(); draw_FullBackHairP(main_col,main_typecol);draw_FullBackHairG(belly_col,belly_typecol);draw_FullBackHairB(shell_col,shell_typecol);draw_FullBackHairY(color_col,color_typecol);draw_FullBackHairR(xcolor_col,xcolor_typecol);draw_FullBackHairShadow(); draw_FullBackHairLeftovers();if(IsBald==1){draw_FullHairP(main_col,main_typecol);draw_FullHairG(belly_col,belly_typecol);draw_FullHairB(shell_col,shell_typecol);draw_FullHairY(color_col,color_typecol);draw_FullHairR(xcolor_col,xcolor_typecol);draw_FullHairShadow(); draw_FullHairLeftovers();}/////////////////////////////////////////////////////////////////console.log("draw all ran"); setTimeout(function() {console.time('LoadNewFusion');document.getElementById('TEffectsTable').style.display = 'none'; },6000); $("#custom").spectrum("set", 'rgb('+m_main+')'); $("#custom2").spectrum("set", 'rgb('+m_belly+')'); $("#custom3").spectrum("set", 'rgb('+m_shell+')'); $("#custom4").spectrum("set", 'rgb('+m_color+')'); $("#custom5").spectrum("set", 'rgb('+m_xcolor+')'); setTimeout(function(){ LoadImgAndFinish4(p1var,p2var,urls,m_main,m_belly,m_shell,m_color,m_xcolor,m_eyecolor,main_col,belly_col,shell_col,color_col,xcolor_col,main_typecol,belly_typecol,shell_typecol,color_typecol,xcolor_typecol)}, 200);}function LoadImgAndFinish4(p1var,p2var,urls,m_main,m_belly,m_shell,m_color,m_xcolor,m_eyecolor,main_col,belly_col,shell_col,color_col,xcolor_col,main_typecol,belly_typecol,shell_typecol,color_typecol,xcolor_typecol){ /////////////////////////////////////////////////////////////////////////////////////START////Create Thumbnail///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////ccc var combined0 = document.getElementById("combined0");var ctx0 = combined0.getContext("2d");/*ResetImage();resizetest(50,255);*/combined0.width = 100;combined0.height = 120; ctx0.imageSmoothingEnabled= false; ctx0.mozImageSmoothingEnabled = false; ctx0.globalCompositeOperation = "source-over"; var xoff=document.getElementById("canvas_FullHairShadow").style.left;var yoff=document.getElementById("canvas_FullHairShadow").style.top; xoff= xoff.replace(/px/g, "");xoff=parseFloat(xoff);var xoff2= xoff;yoff= yoff.replace(/px/g, "");yoff=parseFloat(yoff);yoff-=200;var yoff2= yoff;var xoff2=document.getElementById("canvas_MainG").style.left;var yoff2=document.getElementById("canvas_MainG").style.top;ctx0.clearRect(0, 0, 1000, 1000);ctx0.drawImage(canvas_BackR, xoff2, yoff2);ctx0.drawImage(canvas_BackY, xoff2, yoff2);ctx0.drawImage(canvas_BackB, xoff2, yoff2);ctx0.drawImage(canvas_BackShadow, xoff2, yoff2);ctx0.drawImage(canvas_BackG, xoff2, yoff2);ctx0.drawImage(canvas_BackLeftovers, xoff2, yoff2);ctx0.drawImage(canvas_MainR, xoff2, yoff2);ctx0.drawImage(canvas_MainY, xoff2, yoff2);ctx0.drawImage(canvas_MainB, xoff2, yoff2);ctx0.drawImage(canvas_MainShadow, xoff2, yoff2);ctx0.drawImage(canvas_MainG, xoff2, yoff2);ctx0.drawImage(canvas_MainLeftovers, xoff2, yoff2);ctx0.drawImage(canvas_MainP, xoff2, yoff2);//ctx0.drawImage(canvas_MainGShadow, xoff2, yoff2);ctx0.drawImage(canvas_Eyes, xoff2, yoff2);ctx0.drawImage(canvas_FrontR, xoff2, yoff2);ctx0.drawImage(canvas_FrontY, xoff2, yoff2);ctx0.drawImage(canvas_FrontB, xoff2, yoff2);ctx0.drawImage(canvas_FrontShadow, xoff2, yoff2);ctx0.drawImage(canvas_FrontG, xoff2, yoff2);ctx0.drawImage(canvas_FrontLeftovers, xoff2, yoff2);ctx0.drawImage(canvas_FrontP, xoff2, yoff2);ctx0.drawImage(canvas_EyesR, xoff2, yoff2);ctx0.drawImage(canvas_EyesY, xoff2, yoff2);ctx0.drawImage(canvas_EyesB, xoff2, yoff2);ctx0.drawImage(canvas_EyesShadow, xoff2, yoff2);ctx0.drawImage(canvas_EyesG, xoff2, yoff2);ctx0.drawImage(canvas_EyesLeftovers, xoff2, yoff2);ctx0.drawImage(canvas_EyesP, xoff2, yoff2);if(IsBald==1){ctx0.drawImage(canvas_FullHairP, xoff, yoff);ctx0.drawImage(canvas_FullHairG, xoff, yoff);ctx0.drawImage(canvas_FullHairB, xoff, yoff);ctx0.drawImage(canvas_FullHairR, xoff, yoff);ctx0.drawImage(canvas_FullHairY, xoff, yoff);ctx0.drawImage(canvas_FullHairShadow, xoff, yoff);ctx0.drawImage(canvas_FullHairLeftovers, xoff, yoff);}ctx0.drawImage(canvas_FullBackHairP, xoff, yoff);ctx0.drawImage(canvas_FullBackHairG, xoff, yoff);ctx0.drawImage(canvas_FullBackHairB, xoff, yoff);ctx0.drawImage(canvas_FullBackHairR, xoff, yoff);ctx0.drawImage(canvas_FullBackHairY, xoff, yoff);ctx0.drawImage(canvas_FullBackHairShadow, xoff, yoff);ctx0.drawImage(canvas_FullBackHairLeftovers, xoff, yoff);ctx0.drawImage(canvas_BackG, xoff2, yoff2);ctx0.drawImage(canvas_BackShadow, xoff2, yoff2);var tempofx=Wxoffset*zoomval;//alert("newoffsetx="+tempofx);//tempofx=parseInt(tempofx, 10);//alert("newoffsetx="+tempofx);tempofx=xoff2;//alert("newoffsetx="+tempofx);var tempofy=Wyoffset*zoomval;tempofy=yoff2;var tailoffx_2=document.getElementById("canvas_TailsShadow").style.left;var tailoffy_2=document.getElementById("canvas_TailsShadow").style.top;tailoffx_2=tailoffx_2.replace(/px/g, "");tailoffy_2=tailoffy_2.replace(/px/g, "");tailoffy_2-=200;var wingoffx_2=document.getElementById("canvas_WingsShadow").style.left;var wingoffy_2=document.getElementById("canvas_WingsShadow").style.top;wingoffx_2=wingoffx_2.replace(/px/g, "");wingoffy_2=wingoffy_2.replace(/px/g, "");wingoffy_2-=200;var capeoffx_2=document.getElementById("canvas_CapesShadow").style.left;var capeoffy_2=document.getElementById("canvas_CapesShadow").style.top;capeoffx_2=capeoffx_2.replace(/px/g, "");capeoffy_2=capeoffy_2.replace(/px/g, "");capeoffy_2-=200;var mustashoffx_2=document.getElementById("canvas_MustashShadow").style.left;var mustashoffy_2=document.getElementById("canvas_MustashShadow").style.top;mustashoffx_2=mustashoffx_2.replace(/px/g, "");mustashoffy_2=mustashoffy_2.replace(/px/g, "");mustashoffy_2-=200;/*ctx0.drawImage(canvas_TailsP, tailoffx_2, tailoffy_2);ctx0.drawImage(canvas_TailsB, tailoffx_2, tailoffy_2);ctx0.drawImage(canvas_TailsG, tailoffx_2, tailoffy_2);ctx0.drawImage(canvas_TailsR, tailoffx_2, tailoffy_2);ctx0.drawImage(canvas_TailsY, tailoffx_2, tailoffy_2);ctx0.drawImage(canvas_TailsLeftovers, tailoffx_2, tailoffy_2);ctx0.drawImage(canvas_TailsShadow, tailoffx_2, tailoffy_2);*///alert(canvas_CapesP.width);//alert(canvas_CapesP.height);/*ctx0.drawImage(canvas_CapesP, capeoffx_2, capeoffy_2);ctx0.drawImage(canvas_CapesB, capeoffx_2, capeoffy_2);ctx0.drawImage(canvas_CapesG, capeoffx_2, capeoffy_2);ctx0.drawImage(canvas_CapesR, capeoffx_2, capeoffy_2);ctx0.drawImage(canvas_CapesY, capeoffx_2, capeoffy_2);ctx0.drawImage(canvas_CapesShadow, capeoffx_2, capeoffy_2);ctx0.drawImage(canvas_CapesLeftovers, capeoffx_2, capeoffy_2);ctx0.drawImage(canvas_WingsP, wingoffx_2, wingoffy_2);ctx0.drawImage(canvas_WingsB, wingoffx_2, wingoffy_2);ctx0.drawImage(canvas_WingsG, wingoffx_2, wingoffy_2);ctx0.drawImage(canvas_WingsR, wingoffx_2, wingoffy_2);ctx0.drawImage(canvas_WingsY, wingoffx_2, wingoffy_2);ctx0.drawImage(canvas_WingsShadow, wingoffx_2, wingoffy_2);ctx0.drawImage(canvas_WingsLeftovers, wingoffx_2, wingoffy_2);ctx0.drawImage(canvas_Mustash, mustashoffx_2, mustashoffy_2);ctx0.drawImage(canvas_MustashShadow, mustashoffx_2, mustashoffy_2);*/ var dataURL = combined0.toDataURL("image/png"); // setTimeout(function(){uploadimg(dataURL)},3000);document.getElementById("image4").src = combined0.toDataURL();ctx0.clearRect(0, 0, 1000, 1000);/////////////////////////////////////////////////////////////////////////////////////END////Create Thumbnail/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////THIS stops it from turning the chracters into a black box error./*if(BGNum==0){changeBG1();}if(BGNum==1){changeBG1();}if(BGNum==2){changeBG2();}if(BGNum==3){changeBG3();}if(BGNum==4){changeBG4();}if(BGNum==5){changeBG5();}if(BGNum==6){changeBG6();}if(BGNum==7){changeBG7();}if(BGNum==8){changeBG8();}if(BGNum==9){changeBG9();}if(BGNum==10){changeBG10();}if(BGNum==11){changeBG11();}if(BGNum==12){changeBG12();}if(BGNum==13){changeBG13();}if(BGNum==14){changeBG14();}if(BGNum==15){changeBG15();}if(BGNum==16){changeBG16();}if(BGNum==17){changeBG17();}if(BGNum==18){changeBG18();}if(BGNum==19){changeBG19();}if(BGNum==20){changeBG20();}if(BGNum==21){changeBG21();}if(BGNum==22){changeBG22();}if(BGNum==23){changeBG23();}if(BGNum==24){changeBG24();}if(BGNum==25){changeBG25();}if(BGNum==26){changeBG26();}if(BGNum==27){changeBG27();}if(BGNum==28){changeBG28();}if(BGNum==29){changeBG29();}if(BGNum==30){changeBG30();}if(BGNum==31){changeBG31();}if(BGNum==32){changeBG32();}*/getPermaLink();//console.log("firstload="+firstload);if(firstload==0){//console.log("firstload Go="+firstload);if(VIPstatus!="Y"){setTimeout(function() {ShowUnlock();}, 4000);}} //alert("repeat check");console.timeEnd('LoadNewFusion');//setTimeout(function() { ResetImage(); resizetest(256,456);}, 100)console.log("starting save all!!!");//setTimeout(function() { console.log("save all ran not first load"); ResetImage(); resizetest(256,456); saveall();}, 500); setTimeout(function () {changeBG1(); }, 2000); // setTimeout(function () {ResetImage(); }, 500); //setTimeout(function () {resizetest(256,456); }, 600); if(ss==0) { document.getElementById("canvas_RFh_GKSSJ").style.display = 'none';document.getElementById("canvas_RFh_GKSSJPre").style.display = 'none'; document.getElementById("canvas_RFh_G5SSJ").style.display = 'none';document.getElementById("canvas_RFh_G5SSJPre").style.display = 'none';document.getElementById("canvas_redPreSSJ").style.display = 'none'; } setTimeout(function () {if(document.getElementById("canvas_EyesShadow").style.top>=400){changeBG1(); console.log("fixing Postion X1");} setTimeout(function () { if(document.getElementById("canvas_EyesShadow").style.top>=400){changeBG1(); console.log("fixing Postion X2");} }, 10000); setTimeout(function () { if(document.getElementById("canvas_EyesShadow").style.top>=400){changeBG1(); console.log("fixing Postion X3"); alert("An error occurred! please report it to us via twitter if this error persists. Thank you!");} }, 10000); }, 10000); }function stringGen(len) { var text = ""; var charset = "abcdefghijklmnopqrstuvwxyz0123456789"; for (var i = 0; i < len; i++) text += charset.charAt(Math.floor(Math.random() * charset.length)); return text;}function ShareIt(type){/* var activecheck01=document.getElementById("CharSelectDiv").style.opacity; if(activecheck01!=1){return;} //alert("ShareIt() Start!");var data = new FormData();//var data01 = "116X39X0";var pcode=p2+"X"+p1+"X"+ss+"";var data01 = stringGen(10);//getUrlVars()["url"];;var fname=data01;var txt = "";txt=txt+"\<\?php include '../../slayout.php';\?\>";//txt=txt+"\n\n";//txt=txt+'\n \n';//txt=txt+'\n\n';//txt=txt+"\n\n";txt=txt+"\n\n";txt=txt+"\n\n";txt=txt+'

\n';var pngorjpg;if(BGNum==1){pngorjpg=".png";}else{pngorjpg=".jpg";}txt=txt+"Dragon Ball Fusion Generator (38)\n";txt=txt+'

\n';txt=txt+'\n';data.append("data" , txt);data.append("fname" , fname);var xhr = (window.XMLHttpRequest) ? new XMLHttpRequest() : new activeXObject("Microsoft.XMLhttp");xhr.open( 'post', 'upload_share.php?ver=6.5', true );xhr.send(data);//if(BGNum!=1)//{ DownloadIt(data01);//}if(type=="fb"){setTimeout(function(){facebook(data01,pngorjpg)},1000);}if(type=="tw"){setTimeout(function(){twitter(data01,pngorjpg)},1000);}if(type=="tb"){setTimeout(function(){tumblr(data01,pngorjpg)},1000);}if(type=="pn"){setTimeout(function(){pinterest(data01,pngorjpg)},1000);}*/}function facebook(datastr,pngorjpg){var win = window.open("https://www.facebook.com/sharer.php?u=https://japeal.com/wordpress/wp-content/themes/total/DBFG/share/p/"+datastr+".php");setTimeout(function(){win.location.href="https://www.facebook.com/sharer.php?u=https://japeal.com/wordpress/wp-content/themes/total/DBFG/share/p/"+datastr+".php";},3000);return false;}function twitter(datastr,pngorjpg){var win = window.open("https://twitter.com/share?url=https://japeal.com/wordpress/wp-content/themes/total/DBFG/share/p/"+datastr+".php");setTimeout(function(){win.location.href="https://twitter.com/share?url=https://japeal.com/wordpress/wp-content/themes/total/DBFG/share/p/"+datastr+".php";},3000);return false;}function tumblr(datastr,pngorjpg){var win = window.open("https://www.tumblr.com/share/link?url=https://japeal.com/wordpress/wp-content/themes/total/DBFG/share/p/"+datastr+".php");setTimeout(function(){win.location.href="https://www.tumblr.com/share/link?url=https://japeal.com/wordpress/wp-content/themes/total/DBFG/share/p/"+datastr+".php";},3000);//console.log("datastr+pngorjpg="+datastr+pngorjpg);return false;}function pinterest(datastr,pngorjpg){var win = window.open("https://pinterest.com/pin/create/button/?url=https://japeal.com/wordpress/wp-content/themes/total/DBFG/share/p/"+datastr+".php");setTimeout(function(){win.location.href="https://pinterest.com/pin/create/button/?url=https://japeal.com/wordpress/wp-content/themes/total/DBFG/share/p/"+datastr+".php";},3000);return false;}window.onload = drawtex;function drawtex() {var c = document.getElementById("myCanvas");var ctx = c.getContext("2d");ctx.clearRect(0, 0, c.width, c.height); var img = document.getElementById("lamp")tex_croc = ctx.createPattern(img, "repeat");ctx.rect(0, 0, 150, 100);ctx.fillStyle = tex_croc;ctx.fill();}function getPermaLink() { var text1 = document.getElementById('permalink').textContent;// Encode the Stringvar encodedString = Base64.encode("p1="+p1+"@p2="+p2+"@ss="+ss+"@c1="+c1+"@c2="+c2+"@c3="+c3+"@c4="+c4+"@c5="+c5+"");var random_efc_code = Base64.encode("p1=-1@p2=-1@ss=0"); //console.log("random_efc_code="+random_efc_code);//console.log(encodedString); // Outputs: "SGVsbG8gV29ybGQh"//console.log("p1="+p1+"@p2="+p2+"@ss="+ss+"@c1="+c1+"@c2="+c2+"@c3="+c3+"@c4="+c4+"@c5="+c5+""); // Outputs: "SGVsbG8gV29ybGQh" document.getElementById('permalink').value="https://japeal.com/dbfg?efc="+encodedString;efc_code=encodedString;keep_main=c1; keep_belly=c2; keep_shell=c3; keep_color=c4; keep_xcolor=c5;}function change_bg_color(val) { document.getElementById('canvas_MainR').getContext('2d').fillStyle = val; document.getElementById('canvas_MainY').getContext('2d').fillStyle = val; document.getElementById('canvas_MainB').getContext('2d').fillStyle = val; document.getElementById('canvas_MainShadow').getContext('2d').fillStyle = val; document.getElementById('canvas_MainG').getContext('2d').fillStyle = val; // document.getElementById('canvas_MainGShadow').getContext('2d').fillStyle = val; document.getElementById('canvas_BackR').getContext('2d').fillStyle = val; document.getElementById('canvas_BackY').getContext('2d').fillStyle = val; document.getElementById('canvas_BackB').getContext('2d').fillStyle = val;document.getElementById('canvas_BackLeftovers').getContext('2d').fillStyle = val; document.getElementById('canvas_BackShadow').getContext('2d').fillStyle = val; document.getElementById('canvas_BackG').getContext('2d').fillStyle = val; document.getElementById('canvas_Eyes').getContext('2d').fillStyle = val; document.getElementById('canvas_EyesR').getContext('2d').fillStyle = val; document.getElementById('canvas_EyesY').getContext('2d').fillStyle = val; document.getElementById('canvas_EyesB').getContext('2d').fillStyle = val; document.getElementById('canvas_EyesShadow').getContext('2d').fillStyle = val; document.getElementById('canvas_EyesG').getContext('2d').fillStyle = val; document.getElementById('canvas_EyesShadow').getContext('2d').fillStyle = val; document.getElementById('canvas_EyesP').getContext('2d').fillStyle = val; document.getElementById('canvas_FrontR').getContext('2d').fillStyle = val; document.getElementById('canvas_FrontY').getContext('2d').fillStyle = val; document.getElementById('canvas_FrontB').getContext('2d').fillStyle = val; document.getElementById('canvas_FrontShadow').getContext('2d').fillStyle = val; document.getElementById('canvas_FrontG').getContext('2d').fillStyle = val; document.getElementById('canvas_FrontShadow').getContext('2d').fillStyle = val; document.getElementById('canvas_FrontP').getContext('2d').fillStyle = val; document.getElementById('canvas_FullHairP').getContext('2d').fillStyle = val; document.getElementById('canvas_FullHairB').getContext('2d').fillStyle = val; document.getElementById('canvas_FullHairG').getContext('2d').fillStyle = val; document.getElementById('canvas_FullHairR').getContext('2d').fillStyle = val; document.getElementById('canvas_FullHairY').getContext('2d').fillStyle = val; document.getElementById('canvas_FullHairShadow').getContext('2d').fillStyle = val; document.getElementById('canvas_FullHairLeftovers').getContext('2d').fillStyle = val; document.getElementById('canvas_FullBackHairP').getContext('2d').fillStyle = val; document.getElementById('canvas_FullBackHairB').getContext('2d').fillStyle = val; document.getElementById('canvas_FullBackHairG').getContext('2d').fillStyle = val; document.getElementById('canvas_FullBackHairR').getContext('2d').fillStyle = val; document.getElementById('canvas_FullBackHairY').getContext('2d').fillStyle = val; document.getElementById('canvas_FullBackHairShadow').getContext('2d').fillStyle = val; document.getElementById('canvas_FullBackHairLeftovers').getContext('2d').fillStyle = val; document.getElementById('canvas_BackG').getContext('2d').fillStyle = val; document.getElementById('canvas_BackShadow').getContext('2d').fillStyle = val; document.getElementById('canvas_WingsP').getContext('2d').fillStyle = val; document.getElementById('canvas_WingsB').getContext('2d').fillStyle = val; document.getElementById('canvas_WingsG').getContext('2d').fillStyle = val; document.getElementById('canvas_WingsR').getContext('2d').fillStyle = val; document.getElementById('canvas_WingsY').getContext('2d').fillStyle = val; document.getElementById('canvas_WingsLeftovers').getContext('2d').fillStyle = val; document.getElementById('canvas_WingsShadow').getContext('2d').fillStyle = val;document.getElementById('canvas_CapesP').getContext('2d').fillStyle = val; document.getElementById('canvas_CapesB').getContext('2d').fillStyle = val; document.getElementById('canvas_CapesG').getContext('2d').fillStyle = val; document.getElementById('canvas_CapesR').getContext('2d').fillStyle = val; document.getElementById('canvas_CapesY').getContext('2d').fillStyle = val; document.getElementById('canvas_CapesLeftovers').getContext('2d').fillStyle = val; document.getElementById('canvas_CapesShadow').getContext('2d').fillStyle = val; document.getElementById('canvas_TailsP').getContext('2d').fillStyle = val; document.getElementById('canvas_TailsB').getContext('2d').fillStyle = val; document.getElementById('canvas_TailsG').getContext('2d').fillStyle = val; document.getElementById('canvas_TailsR').getContext('2d').fillStyle = val; document.getElementById('canvas_TailsY').getContext('2d').fillStyle = val; document.getElementById('canvas_TailsLeftovers').getContext('2d').fillStyle = val; document.getElementById('canvas_TailsShadow').getContext('2d').fillStyle = val;document.getElementById('canvas_MustashP').getContext('2d').fillStyle = val; document.getElementById('canvas_MustashB').getContext('2d').fillStyle = val; document.getElementById('canvas_MustashG').getContext('2d').fillStyle = val; document.getElementById('canvas_MustashR').getContext('2d').fillStyle = val; document.getElementById('canvas_MustashY').getContext('2d').fillStyle = val; document.getElementById('canvas_MustashLeftovers').getContext('2d').fillStyle = val; document.getElementById('canvas_MustashShadow').getContext('2d').fillStyle = val; document.getElementById('canvas_SSJ2Lightning').getContext('2d').fillStyle = val; document.getElementById('canvas_KaiokenEffect').getContext('2d').fillStyle = val; document.getElementById('canvas_Extra1').getContext('2d').fillStyle = val;} function ResetImage(){///alert("ResetImage Started");document.getElementById('pkmbattle').style.display = 'none'; context_MainR.clearRect(0, 0, 800,800);context_MainY.clearRect(0, 0, 800,800);context_MainB.clearRect(0, 0, 800,800);context_MainShadow.clearRect(0, 0, 800,800);context_MainG.clearRect(0, 0, 800,800);context_MainLeftovers.clearRect(0, 0, 800,800);context_MainP.clearRect(0, 0, 800,800);//context_MainGShadow.clearRect(0, 0, 800,800);context_BackR.clearRect(0, 0, 800,800);context_BackY.clearRect(0, 0, 800,800);context_BackB.clearRect(0, 0, 800,800);context_BackShadow.clearRect(0, 0, 800,800);context_BackG.clearRect(0, 0, 800,800);context_BackLeftovers.clearRect(0, 0, 800,800);context_Eyes.clearRect(0, 0, 800,800);context_EyesR.clearRect(0, 0, 800,800);context_EyesY.clearRect(0, 0, 800,800);context_EyesB.clearRect(0, 0, 800,800);context_EyesShadow.clearRect(0, 0, 800,800);context_EyesG.clearRect(0, 0, 800,800);context_EyesLeftovers.clearRect(0, 0, 800,800);context_EyesP.clearRect(0, 0, 800,800);context_FrontR.clearRect(0, 0, 800,800);context_FrontY.clearRect(0, 0, 800,800);context_FrontB.clearRect(0, 0, 800,800);context_FrontShadow.clearRect(0, 0, 800,800);context_FrontG.clearRect(0, 0, 800,800);context_FrontLeftovers.clearRect(0, 0, 800,800);context_FrontP.clearRect(0, 0, 800,800);context_FullHairP.clearRect(0, 0, 800,800);context_FullHairG.clearRect(0, 0, 800,800);context_FullHairB.clearRect(0, 0, 800,800);context_FullHairR.clearRect(0, 0, 800,800);context_FullHairY.clearRect(0, 0, 800,800);context_FullHairLeftovers.clearRect(0, 0, 800,800);context_FullHairShadow.clearRect(0, 0, 800,800);context_FullBackHairP.clearRect(0, 0, 800,800);context_FullBackHairG.clearRect(0, 0, 800,800);context_FullBackHairB.clearRect(0, 0, 800,800);context_FullBackHairR.clearRect(0, 0, 800,800);context_FullBackHairY.clearRect(0, 0, 800,800);context_FullBackHairLeftovers.clearRect(0, 0, 800,800);context_FullBackHairShadow.clearRect(0, 0, 800,800);context_BackG.clearRect(0, 0, 800,800);context_BackShadow.clearRect(0, 0, 800,800);context_TailsP.clearRect(0, 0, 800,800);context_TailsB.clearRect(0, 0, 800,800);context_TailsG.clearRect(0, 0, 800,800);context_TailsR.clearRect(0, 0, 800,800);context_TailsY.clearRect(0, 0, 800,800);context_TailsLeftovers.clearRect(0, 0, 800,800);context_TailsShadow.clearRect(0, 0, 800,800);context_CapesP.clearRect(0, 0, 800,800);context_CapesB.clearRect(0, 0, 800,800);context_CapesG.clearRect(0, 0, 800,800);context_CapesR.clearRect(0, 0, 800,800);context_CapesY.clearRect(0, 0, 800,800);context_CapesLeftovers.clearRect(0, 0, 800,800);context_CapesShadow.clearRect(0, 0, 800,800);context_WingsP.clearRect(0, 0, 800,800);context_WingsB.clearRect(0, 0, 800,800);context_WingsG.clearRect(0, 0, 800,800);context_WingsR.clearRect(0, 0, 800,800);context_WingsY.clearRect(0, 0, 800,800);context_WingsLeftovers.clearRect(0, 0, 800,800);context_WingsShadow.clearRect(0, 0, 800,800);context_MustashP.clearRect(0, 0, 800,800);context_MustashB.clearRect(0, 0, 800,800);context_MustashG.clearRect(0, 0, 800,800);context_MustashR.clearRect(0, 0, 800,800);context_MustashY.clearRect(0, 0, 800,800);context_MustashLeftovers.clearRect(0, 0, 800,800);context_MustashShadow.clearRect(0, 0, 800,800);context_SSJ2Lightning.clearRect(0, 0, 800,800);context_KaiokenEffect.clearRect(0, 0, 800,800);context_Extra1.clearRect(0, 0, 800,800); draw_MainR('repos',""); draw_MainY('repos',""); draw_MainB('repos',""); draw_MainShadow(); draw_MainG('repos',"");// draw_MainGShadow(); draw_MainP('repos',""); draw_MainLeftovers(); draw_Eyes('repos',""); draw_EyesR('repos',""); draw_EyesY('repos',""); draw_EyesB('repos',""); draw_EyesShadow(); draw_EyesG('repos',""); draw_EyesLeftovers(); draw_EyesP('repos',""); draw_FrontR('repos',""); draw_FrontY('repos',""); draw_FrontB('repos',""); draw_FrontShadow(); draw_FrontG('repos',""); draw_FrontLeftovers(); draw_FrontP('repos',""); draw_FullHairP('repos',""); draw_FullHairB('repos',""); draw_FullHairG('repos',""); draw_FullHairR('repos',""); draw_FullHairY('repos',""); draw_FullHairShadow(); draw_FullHairLeftovers(); draw_FullBackHairP('repos',""); draw_FullBackHairB('repos',""); draw_FullBackHairG('repos',""); draw_FullBackHairR('repos',""); draw_FullBackHairY('repos',""); draw_FullBackHairShadow(); draw_FullBackHairLeftovers(); draw_TailsP('repos',""); draw_TailsB('repos',""); draw_TailsG('repos',""); draw_TailsR('repos',""); draw_TailsY('repos',""); draw_TailsShadow(); draw_TailsLeftovers(); draw_WingsP('repos',""); draw_WingsB('repos',""); draw_WingsG('repos',""); draw_WingsR('repos',""); draw_WingsY('repos',""); draw_WingsShadow(); draw_WingsLeftovers(); draw_CapesP('repos',""); draw_CapesB('repos',""); draw_CapesG('repos',""); draw_CapesR('repos',""); draw_CapesY('repos',""); draw_CapesShadow(); draw_CapesLeftovers(); //draw_Mustash('repos',""); draw_MustashP('repos',""); draw_MustashB('repos',""); draw_MustashG('repos',""); draw_MustashR('repos',""); draw_MustashY('repos',""); draw_MustashShadow(); draw_MustashLeftovers(); draw_SSJ2Lightning(); draw_KaiokenEffect(); draw_BackR('repos',""); draw_BackY('repos',""); draw_BackB('repos',""); draw_BackG('repos',""); draw_BackShadow(); draw_BackLeftovers(); draw_Extra1(); CheckForBlanks(); }function resizetest(xoff,yoff) { ///alert("resizetest started"); var xoffchar=xoff; var yoffchar=yoff; var xoff=256; var yoff=456; var xoff2=xoff-((img_MainLeftovers.width*zoomval)/2); var yoff2=yoff-((img_MainLeftovers.height*zoomval)/2); var xoff3=xoff2+(res_0*zoomval); var yoff3=yoff2+(res_1*zoomval);document.getElementById("canvas_MainLeftovers").style.left=xoff3+"px"; document.getElementById("canvas_MainLeftovers").style.top=yoff3+"px"; document.getElementById("canvas_MainP").style.left=xoff3+"px"; document.getElementById("canvas_MainP").style.top=yoff3+"px"; document.getElementById("canvas_MainR").style.left=xoff3+"px"; document.getElementById("canvas_MainR").style.top=yoff3+"px"; document.getElementById("canvas_MainY").style.left=xoff3+"px"; document.getElementById("canvas_MainY").style.top=yoff3+"px"; document.getElementById("canvas_MainB").style.left=xoff3+"px"; document.getElementById("canvas_MainB").style.top=yoff3+"px"; document.getElementById("canvas_MainShadow").style.left=xoff3+"px"; document.getElementById("canvas_MainShadow").style.top=yoff3+"px"; document.getElementById("canvas_MainG").style.left=xoff3+"px"; document.getElementById("canvas_MainG").style.top=yoff3+"px"; //document.getElementById("canvas_MainGShadow").style.left=xoff3+"px"; document.getElementById("canvas_MainGShadow").style.top=yoff3+"px"; document.getElementById("canvas_FrontLeftovers").style.left=xoff3+"px"; document.getElementById("canvas_FrontLeftovers").style.top=yoff3+"px"; document.getElementById("canvas_FrontP").style.left=xoff3+"px"; document.getElementById("canvas_FrontP").style.top=yoff3+"px"; document.getElementById("canvas_FrontR").style.left=xoff3+"px"; document.getElementById("canvas_FrontR").style.top=yoff3+"px"; document.getElementById("canvas_FrontY").style.left=xoff3+"px"; document.getElementById("canvas_FrontY").style.top=yoff3+"px"; document.getElementById("canvas_FrontB").style.left=xoff3+"px"; document.getElementById("canvas_FrontB").style.top=yoff3+"px"; document.getElementById("canvas_FrontShadow").style.left=xoff3+"px"; document.getElementById("canvas_FrontShadow").style.top=yoff3+"px"; document.getElementById("canvas_FrontG").style.left=xoff3+"px"; document.getElementById("canvas_FrontG").style.top=yoff3+"px"; document.getElementById("canvas_BackLeftovers").style.left=xoff3+"px"; document.getElementById("canvas_BackLeftovers").style.top=yoff3+"px"; document.getElementById("canvas_BackR").style.left=xoff3+"px"; document.getElementById("canvas_BackR").style.top=yoff3+"px"; document.getElementById("canvas_BackY").style.left=xoff3+"px"; document.getElementById("canvas_BackY").style.top=yoff3+"px"; document.getElementById("canvas_BackB").style.left=xoff3+"px"; document.getElementById("canvas_BackB").style.top=yoff3+"px"; document.getElementById("canvas_BackG").style.left=xoff3+"px"; document.getElementById("canvas_BackG").style.top=yoff3+"px"; document.getElementById("canvas_BackShadow").style.left=xoff3+"px"; document.getElementById("canvas_BackShadow").style.top=yoff3+"px";document.getElementById("canvas_Eyes").style.left=xoff3+"px"; document.getElementById("canvas_Eyes").style.top=yoff3+"px"; document.getElementById("canvas_EyesLeftovers").style.left=xoff3+"px"; document.getElementById("canvas_EyesLeftovers").style.top=yoff3+"px"; document.getElementById("canvas_EyesP").style.left=xoff3+"px"; document.getElementById("canvas_EyesP").style.top=yoff3+"px"; document.getElementById("canvas_EyesR").style.left=xoff3+"px"; document.getElementById("canvas_EyesR").style.top=yoff3+"px"; document.getElementById("canvas_EyesY").style.left=xoff3+"px"; document.getElementById("canvas_EyesY").style.top=yoff3+"px"; document.getElementById("canvas_EyesB").style.left=xoff3+"px"; document.getElementById("canvas_EyesB").style.top=yoff3+"px"; document.getElementById("canvas_EyesShadow").style.left=xoff3+"px"; document.getElementById("canvas_EyesShadow").style.top=yoff3+"px"; document.getElementById("canvas_EyesG").style.left=xoff3+"px"; document.getElementById("canvas_EyesG").style.top=yoff3+"px"; if(Ex1Type=="Sunglasses"){tempofx=xoff2; tempofy=yoff2;var extra1offx= Ex1Crop_x*zoomval; var extra1offy= Ex1Crop_y*zoomval;extra1offx+=tempofx; extra1offy+=tempofy;document.getElementById("canvas_Extra1").style.left=extra1offx+"px"; document.getElementById("canvas_Extra1").style.top=extra1offy+"px";}if(Ex1Type=="Cat"){tempofx=xoff2; tempofy=yoff2;var extra1offx= Ex1Crop_x*zoomval; var extra1offy= Ex1Crop_y*zoomval;extra1offx+=tempofx; extra1offy+=tempofy;document.getElementById("canvas_Extra1").style.left=extra1offx+"px"; document.getElementById("canvas_Extra1").style.top=extra1offy+"px";}var temphrx=(tt_posx*zoomval);var temphry=(tt_posy*zoomval);temphrx+=xoff2;temphry+=yoff2;document.getElementById("canvas_FullHairP").style.left=temphrx+"px"; document.getElementById("canvas_FullHairP").style.top=temphry+"px";document.getElementById("canvas_FullHairB").style.left=temphrx+"px"; document.getElementById("canvas_FullHairB").style.top=temphry+"px";document.getElementById("canvas_FullHairG").style.left=temphrx+"px"; document.getElementById("canvas_FullHairG").style.top=temphry+"px";document.getElementById("canvas_FullHairR").style.left=temphrx+"px"; document.getElementById("canvas_FullHairR").style.top=temphry+"px";document.getElementById("canvas_FullHairY").style.left=temphrx+"px"; document.getElementById("canvas_FullHairY").style.top=temphry+"px";document.getElementById("canvas_FullHairLeftovers").style.left=temphrx+"px"; document.getElementById("canvas_FullHairLeftovers").style.top=temphry+"px";document.getElementById("canvas_FullHairShadow").style.left=temphrx+"px"; document.getElementById("canvas_FullHairShadow").style.top=temphry+"px";document.getElementById("canvas_FullBackHairP").style.left=temphrx+"px"; document.getElementById("canvas_FullBackHairP").style.top=temphry+"px";document.getElementById("canvas_FullBackHairB").style.left=temphrx+"px"; document.getElementById("canvas_FullBackHairB").style.top=temphry+"px";document.getElementById("canvas_FullBackHairG").style.left=temphrx+"px"; document.getElementById("canvas_FullBackHairG").style.top=temphry+"px";document.getElementById("canvas_FullBackHairR").style.left=temphrx+"px"; document.getElementById("canvas_FullBackHairR").style.top=temphry+"px";document.getElementById("canvas_FullBackHairY").style.left=temphrx+"px"; document.getElementById("canvas_FullBackHairY").style.top=temphry+"px";document.getElementById("canvas_FullBackHairLeftovers").style.left=temphrx+"px"; document.getElementById("canvas_FullBackHairLeftovers").style.top=temphry+"px";document.getElementById("canvas_FullBackHairShadow").style.left=temphrx+"px"; document.getElementById("canvas_FullBackHairShadow").style.top=temphry+"px";var tempofx=Wxoffset*zoomval;//alert("newoffsetx="+tempofx);//tempofx=parseInt(tempofx, 10);//alert("newoffsetx="+tempofx);tempofx=xoff2;//alert("newoffsetx="+tempofx);var tempofy=Wyoffset*zoomval;tempofy=yoff2;//alert("tes_posx ast this point()="+tes_posx2);var tailoffx= tes_posx2*zoomval;var tailoffy= tes_posy2*zoomval;tailoffx+=tempofx;tailoffy+=tempofy;var wingoffx= wes_posx2*zoomval;var wingoffy= wes_posy2*zoomval;wingoffx+=tempofx;wingoffy+=tempofy;var capeoffx= ces_posx2*zoomval;var capeoffy= ces_posy2*zoomval;capeoffx+=tempofx;capeoffy+=tempofy;var mustashoffx= mes_posx2*zoomval;var mustashoffy= mes_posy2*zoomval;mustashoffx+=tempofx;mustashoffy+=tempofy;document.getElementById("canvas_CapesP").style.left=capeoffx+"px"; document.getElementById("canvas_CapesP").style.top=capeoffy+"px";document.getElementById("canvas_CapesB").style.left=capeoffx+"px"; document.getElementById("canvas_CapesB").style.top=capeoffy+"px";document.getElementById("canvas_CapesG").style.left=capeoffx+"px"; document.getElementById("canvas_CapesG").style.top=capeoffy+"px";document.getElementById("canvas_CapesR").style.left=capeoffx+"px"; document.getElementById("canvas_CapesR").style.top=capeoffy+"px";document.getElementById("canvas_CapesY").style.left=capeoffx+"px"; document.getElementById("canvas_CapesY").style.top=capeoffy+"px";document.getElementById("canvas_CapesLeftovers").style.left=capeoffx+"px"; document.getElementById("canvas_CapesLeftovers").style.top=capeoffy+"px";document.getElementById("canvas_CapesShadow").style.left=capeoffx+"px"; document.getElementById("canvas_CapesShadow").style.top=capeoffy+"px";document.getElementById("canvas_WingsP").style.left=wingoffx+"px"; document.getElementById("canvas_WingsP").style.top=wingoffy+"px";document.getElementById("canvas_WingsB").style.left=wingoffx+"px"; document.getElementById("canvas_WingsB").style.top=wingoffy+"px";document.getElementById("canvas_WingsG").style.left=wingoffx+"px"; document.getElementById("canvas_WingsG").style.top=wingoffy+"px";document.getElementById("canvas_WingsR").style.left=wingoffx+"px"; document.getElementById("canvas_WingsR").style.top=wingoffy+"px";document.getElementById("canvas_WingsY").style.left=wingoffx+"px"; document.getElementById("canvas_WingsY").style.top=wingoffy+"px";document.getElementById("canvas_WingsLeftovers").style.left=wingoffx+"px"; document.getElementById("canvas_WingsLeftovers").style.top=wingoffy+"px";document.getElementById("canvas_WingsShadow").style.left=wingoffx+"px"; document.getElementById("canvas_WingsShadow").style.top=wingoffy+"px";document.getElementById("canvas_TailsP").style.left=tailoffx+"px"; document.getElementById("canvas_TailsP").style.top=tailoffy+"px";document.getElementById("canvas_TailsB").style.left=tailoffx+"px"; document.getElementById("canvas_TailsB").style.top=tailoffy+"px";document.getElementById("canvas_TailsG").style.left=tailoffx+"px"; document.getElementById("canvas_TailsG").style.top=tailoffy+"px";document.getElementById("canvas_TailsR").style.left=tailoffx+"px"; document.getElementById("canvas_TailsR").style.top=tailoffy+"px";document.getElementById("canvas_TailsY").style.left=tailoffx+"px"; document.getElementById("canvas_TailsY").style.top=tailoffy+"px";document.getElementById("canvas_TailsLeftovers").style.left=tailoffx+"px"; document.getElementById("canvas_TailsLeftovers").style.top=tailoffy+"px";document.getElementById("canvas_TailsShadow").style.left=tailoffx+"px"; document.getElementById("canvas_TailsShadow").style.top=tailoffy+"px";document.getElementById("canvas_MustashP").style.left=mustashoffx+"px"; document.getElementById("canvas_MustashP").style.top=mustashoffy+"px";document.getElementById("canvas_MustashB").style.left=mustashoffx+"px"; document.getElementById("canvas_MustashB").style.top=mustashoffy+"px";document.getElementById("canvas_MustashG").style.left=mustashoffx+"px"; document.getElementById("canvas_MustashG").style.top=mustashoffy+"px";document.getElementById("canvas_MustashR").style.left=mustashoffx+"px"; document.getElementById("canvas_MustashR").style.top=mustashoffy+"px";document.getElementById("canvas_MustashY").style.left=mustashoffx+"px"; document.getElementById("canvas_MustashY").style.top=mustashoffy+"px";document.getElementById("canvas_MustashLeftovers").style.left=mustashoffx+"px"; document.getElementById("canvas_MustashLeftovers").style.top=mustashoffy+"px";document.getElementById("canvas_MustashShadow").style.left=mustashoffx+"px"; document.getElementById("canvas_MustashShadow").style.top=mustashoffy+"px";document.getElementById("canvas_SSJ2Lightning").style.left=tempofx+"px"; document.getElementById("canvas_SSJ2Lightning").style.top=tempofy+"px";document.getElementById("canvas_KaiokenEffect").style.left=tempofx+"px"; document.getElementById("canvas_KaiokenEffect").style.top=tempofy+"px";if(Ex1Type=="WhisHalo"){ document.getElementById("canvas_Extra1").style.left=wingoffx+"px"; document.getElementById("canvas_Extra1").style.top=wingoffy+(Ex1OffsetY*zoomval)+"px";}/*var xoff2=xoff2-200; var yoff2=yoff2-200; var xoff3=xoff2+(hes[0]*zoomval); var yoff3=yoff2+(hes[1]*zoomval); ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////var x128x=varWingX[newp1];var x128y=varWingY[newp1];;var x128w=varWingSize[newp1];if(BGNum==6){xoffchar=80; yoffchar=400;} var char_xoff2=xoffchar-(x128x*zoomvalchar); var char_yoff2=yoffchar-(x128y*zoomvalchar); char_xoff2-=((x128w*zoomvalchar)/2); char_yoff2-=((x128w*zoomvalchar)/2);//document.getElementById("LoadC1").style.left=char_xoff2+"px"; document.getElementById("LoadC1").style.top=char_yoff2+"px"; */ } function CheckForBlanks() { ///alert("CheckForBlanks Started"); //alert("FILE SIZE = "+width353); // alert("img_MainR.naturalWidth ="+img_MainR.naturalWidth ); var c=0;var show_R=0;var show_Y=0;var show_G=0;var show_B=0;var show_P=0; if(img_MainR.naturalWidth <= 10){context_MainR.clearRect(0, 0, canvas.width, canvas.height);}else{show_R=1;}if(img_MainY.naturalWidth <= 10){context_MainY.clearRect(0, 0, canvas.width, canvas.height);}else{show_Y=1;}if(img_MainB.naturalWidth <= 10){context_MainB.clearRect(0, 0, canvas.width, canvas.height);}else{show_B=1;}if(img_MainShadow.naturalWidth <= 10){context_MainShadow.clearRect(0, 0, canvas.width, canvas.height);}if(img_MainP.naturalWidth <= 10){context_MainP.clearRect(0, 0, canvas.width, canvas.height);}else{show_P=1;}if(img_MainG.naturalWidth <= 10){context_MainG.clearRect(0, 0, canvas.width, canvas.height);}else{show_G=1;}if(img_MainLeftovers.naturalWidth <= 10){context_MainLeftovers.clearRect(0, 0, canvas.width, canvas.height);}if(img_Eyes.naturalWidth <= 10){context_Eyes.clearRect(0, 0, canvas.width, canvas.height);}if(img_EyesR.naturalWidth <= 10){context_EyesR.clearRect(0, 0, canvas.width, canvas.height);}else{show_R=1;}if(img_EyesY.naturalWidth <= 10){context_EyesY.clearRect(0, 0, canvas.width, canvas.height);}else{show_Y=1;}if(img_EyesB.naturalWidth <= 10){context_EyesB.clearRect(0, 0, canvas.width, canvas.height);}else{show_B=1;}if(img_EyesShadow.naturalWidth <= 10){context_EyesShadow.clearRect(0, 0, canvas.width, canvas.height);}if(img_EyesG.naturalWidth <= 10){context_EyesG.clearRect(0, 0, canvas.width, canvas.height);}else{show_G=1;}if(img_EyesP.naturalWidth <= 10){context_EyesP.clearRect(0, 0, canvas.width, canvas.height);}else{show_P=1;}if(img_EyesLeftovers.naturalWidth <= 10){context_EyesLeftovers.clearRect(0, 0, canvas.width, canvas.height);}if(img_FrontR.naturalWidth <= 10){context_FrontR.clearRect(0, 0, canvas.width, canvas.height);}else{show_R=1;}if(img_FrontY.naturalWidth <= 10){context_FrontY.clearRect(0, 0, canvas.width, canvas.height);}else{show_Y=1;}if(img_FrontB.naturalWidth <= 10){context_FrontB.clearRect(0, 0, canvas.width, canvas.height);}else{show_B=1;}if(img_FrontShadow.naturalWidth <= 10){context_FrontShadow.clearRect(0, 0, canvas.width, canvas.height);}if(img_FrontG.naturalWidth <= 10){context_FrontG.clearRect(0, 0, canvas.width, canvas.height);}else{show_G=1;}if(img_FrontP.naturalWidth <= 10){context_FrontP.clearRect(0, 0, canvas.width, canvas.height);}else{show_P=1;}if(img_FrontLeftovers.naturalWidth <= 10){context_FrontLeftovers.clearRect(0, 0, canvas.width, canvas.height);}if(img_BackR.naturalWidth <= 10){context_BackR.clearRect(0, 0, canvas.width, canvas.height);}else{show_R=1;}if(img_BackY.naturalWidth <= 10){context_BackY.clearRect(0, 0, canvas.width, canvas.height);}else{show_Y=1;}if(img_BackB.naturalWidth <= 10){context_BackB.clearRect(0, 0, canvas.width, canvas.height);}else{show_B=1;}if(img_BackG.naturalWidth <= 10){context_BackG.clearRect(0, 0, canvas.width, canvas.height);}else{show_G=1;}if(img_BackShadow.naturalWidth <= 10){context_BackShadow.clearRect(0, 0, canvas.width, canvas.height);}if(img_BackLeftovers.naturalWidth <= 10){context_BackLeftovers.clearRect(0, 0, canvas.width, canvas.height);}//HAIR//////////////////////////////////if(img_FullHairP.naturalWidth <= 10){context_FullHairP.clearRect(0, 0, canvas.width, canvas.height);}else{show_P=1;}if(img_FullHairG.naturalWidth <= 10){context_FullHairG.clearRect(0, 0, canvas.width, canvas.height);}else{show_G=1;}if(img_FullHairB.naturalWidth <= 10){context_FullHairB.clearRect(0, 0, canvas.width, canvas.height);}else{show_B=1;}if(img_FullHairR.naturalWidth <= 10){context_FullHairR.clearRect(0, 0, canvas.width, canvas.height);}else{show_R=1;}if(img_FullHairY.naturalWidth <= 10){context_FullHairY.clearRect(0, 0, canvas.width, canvas.height);}else{show_Y=1;}if(img_FullHairLeftovers.naturalWidth <= 10){context_FullHairLeftovers.clearRect(0, 0, canvas.width, canvas.height);}if(img_FullHairShadow.naturalWidth <= 10){context_FullHairShadow.clearRect(0, 0, canvas.width, canvas.height);}if(IsBald==0){context_FullHairP.clearRect(0, 0, 800, 800);context_FullHairG.clearRect(0, 0, 8000, 800);context_FullHairB.clearRect(0, 0, 800, 800);context_FullHairR.clearRect(0, 0, 800, 800);context_FullHairY.clearRect(0, 0, 800, 800);context_FullHairLeftovers.clearRect(0, 0, 800, 800);context_FullHairShadow.clearRect(0, 0, 800, 800);}if(img_FullBackHairP.naturalWidth <= 10){context_FullBackHairP.clearRect(0, 0, canvas.width, canvas.height);}else{show_P=1;}if(img_FullBackHairG.naturalWidth <= 10){context_FullBackHairG.clearRect(0, 0, canvas.width, canvas.height);}else{show_G=1;}if(img_FullBackHairB.naturalWidth <= 10){context_FullBackHairB.clearRect(0, 0, canvas.width, canvas.height);}else{show_B=1;}if(img_FullBackHairR.naturalWidth <= 10){context_FullBackHairR.clearRect(0, 0, canvas.width, canvas.height);}else{show_R=1;}if(img_FullBackHairY.naturalWidth <= 10){context_FullBackHairY.clearRect(0, 0, canvas.width, canvas.height);}else{show_Y=1;}if(img_FullBackHairLeftovers.naturalWidth <= 10){context_FullBackHairLeftovers.clearRect(0, 0, canvas.width, canvas.height);}if(img_FullBackHairShadow.naturalWidth <= 10){context_FullBackHairShadow.clearRect(0, 0, canvas.width, canvas.height);}if(img_BackG.naturalWidth <= 10){context_BackG.clearRect(0, 0, canvas.width, canvas.height);}else{show_G=1;}if(img_BackShadow.naturalWidth <= 10){context_BackShadow.clearRect(0, 0, canvas.width, canvas.height);}if(img_CapesP.naturalWidth <= 10){context_CapesP.clearRect(0, 0, canvas.width, canvas.height);}else{show_P=1;}if(img_CapesG.naturalWidth <= 10){context_CapesG.clearRect(0, 0, canvas.width, canvas.height);}else{show_G=1;}if(img_CapesB.naturalWidth <= 10){context_CapesB.clearRect(0, 0, canvas.width, canvas.height);}else{show_B=1;}if(img_CapesR.naturalWidth <= 10){context_CapesR.clearRect(0, 0, canvas.width, canvas.height);}else{show_R=1;}if(img_CapesY.naturalWidth <= 10){context_CapesY.clearRect(0, 0, canvas.width, canvas.height);}else{show_Y=1;}if(img_CapesLeftovers.naturalWidth <= 10){context_CapesLeftovers.clearRect(0, 0, canvas.width, canvas.height);}if(img_CapesShadow.naturalWidth <= 10){context_CapesShadow.clearRect(0, 0, canvas.width, canvas.height);}if(img_WingsP.naturalWidth <= 10){context_WingsP.clearRect(0, 0, canvas.width, canvas.height);}else{show_P=1;}if(img_WingsG.naturalWidth <= 10){context_WingsG.clearRect(0, 0, canvas.width, canvas.height);}else{show_G=1;}if(img_WingsB.naturalWidth <= 10){context_WingsB.clearRect(0, 0, canvas.width, canvas.height);}else{show_B=1;}if(img_WingsR.naturalWidth <= 10){context_WingsR.clearRect(0, 0, canvas.width, canvas.height);}else{show_R=1;}if(img_WingsY.naturalWidth <= 10){context_WingsY.clearRect(0, 0, canvas.width, canvas.height);}else{show_Y=1;}if(img_WingsLeftovers.naturalWidth <= 10){context_WingsLeftovers.clearRect(0, 0, canvas.width, canvas.height);}if(img_WingsShadow.naturalWidth <= 10){context_WingsShadow.clearRect(0, 0, canvas.width, canvas.height);}if(img_TailsP.naturalWidth <= 10){context_TailsP.clearRect(0, 0, canvas.width, canvas.height);}else{show_P=1;}if(img_TailsG.naturalWidth <= 10){context_TailsG.clearRect(0, 0, canvas.width, canvas.height);}else{show_G=1;}if(img_TailsB.naturalWidth <= 10){context_TailsB.clearRect(0, 0, canvas.width, canvas.height);}else{show_B=1;}if(img_TailsR.naturalWidth <= 10){context_TailsR.clearRect(0, 0, canvas.width, canvas.height);}else{show_R=1;}if(img_TailsY.naturalWidth <= 10){context_TailsY.clearRect(0, 0, canvas.width, canvas.height);}else{show_Y=1;}if(img_TailsLeftovers.naturalWidth <= 10){context_TailsLeftovers.clearRect(0, 0, canvas.width, canvas.height);}if(img_TailsShadow.naturalWidth <= 10){context_TailsShadow.clearRect(0, 0, canvas.width, canvas.height);}if(img_MustashP.naturalWidth <= 10){context_MustashP.clearRect(0, 0, canvas.width, canvas.height);}else{show_P=1;}if(img_MustashG.naturalWidth <= 10){context_MustashG.clearRect(0, 0, canvas.width, canvas.height);}else{show_G=1;}if(img_MustashB.naturalWidth <= 10){context_MustashB.clearRect(0, 0, canvas.width, canvas.height);}else{show_B=1;}if(img_MustashR.naturalWidth <= 10){context_MustashR.clearRect(0, 0, canvas.width, canvas.height);}else{show_R=1;}if(img_MustashY.naturalWidth <= 10){context_MustashY.clearRect(0, 0, canvas.width, canvas.height);}else{show_Y=1;}if(img_MustashLeftovers.naturalWidth <= 10){context_MustashLeftovers.clearRect(0, 0, canvas.width, canvas.height);}if(img_MustashShadow.naturalWidth <= 10){context_MustashShadow.clearRect(0, 0, canvas.width, canvas.height);}//if(img_MainGShadow.naturalWidth <= 10){context_MainGShadow.clearRect(0, 0, canvas.width, canvas.height);}//IF SUPERBOY REMOVE OTHER FRONT PARTS SO LEFTOVER FRONT PART IS TRANSPARENTif(p1==162){context_FrontR.clearRect(0, 0, canvas.width, canvas.height);context_FrontY.clearRect(0, 0, canvas.width, canvas.height);context_FrontB.clearRect(0, 0, canvas.width, canvas.height);context_FrontShadow.clearRect(0, 0, canvas.width, canvas.height);context_FrontG.clearRect(0, 0, canvas.width, canvas.height);context_FrontP.clearRect(0, 0, canvas.width, canvas.height);//context_FrontLeftovers.clearRect(0, 0, canvas.width, canvas.height);}if(p1==203 && p2==203){context_MustashP.clearRect(0, 0, 800, 800);context_MustashG.clearRect(0, 0, 800, 800);context_MustashB.clearRect(0, 0, 800, 800);context_MustashR.clearRect(0, 0, 800, 800);context_MustashY.clearRect(0, 0, 800, 800);context_MustashLeftovers.clearRect(0, 0, 800, 800);context_MustashShadow.clearRect(0, 0, 800, 800);}//CLEAR EYES IF NOT BASE!if(ss!=0){context_Eyes.clearRect(0, 0, canvas.width, canvas.height);}//if(ss==0){context_SSJ2Lightning.clearRect(0, 0, canvas.width, canvas.height);}if(show_P==0){$(".palette1").hide();}if(show_G==0){$(".palette2").hide();}if(show_B==0){$(".palette3").hide();}if(show_Y==0){$(".palette4").hide();}if(show_R==0){$(".palette5").hide();} } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////FRONT FUNCTIONS - Start//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////var canvas_FrontR = document.getElementById('canvas_FrontR');var context_FrontR = canvas_FrontR.getContext('2d'); var canvas_FrontR_RAW;function draw_FrontR(val,type){ canvas_FrontR_RAW = document.getElementById('canvas_FrontR_RAW'); context_FrontR.imageSmoothingEnabled= false; context_FrontR.mozImageSmoothingEnabled = false; context_FrontR.globalCompositeOperation = "source-over"; if(type=="image"){ var imgtex = new Image(); imgtex.src = val; context_FrontR.fillStyle = context_FrontR.createPattern(imgtex, "repeat"); $(".palette5 div.sp-preview-inner").css("background-image","url("+val+")");} else{ context_FrontR.fillStyle = val; c_bred = val; $(".palette5 div.sp-preview-inner").css("background-color",val); if(val!="repos"){$(".palette5 div.sp-preview-inner").css("background-image","url()");}} context_FrontR.fillRect (0, 0, 608, 505); var img_r = new Image(); // img_r.src = 'Round Borders.png'; context_FrontR.globalCompositeOperation = "multiply";// draw sofa on top context_FrontR.drawImage(canvas_FrontR_RAW, -(res_0*zoomval), -(res_1*zoomval), img_FrontR.width*zoomval, img_FrontR.height*zoomval);// change composition mode context_FrontR.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_FrontR.drawImage(canvas_FrontR_RAW, -(res_0*zoomval), -(res_1*zoomval), img_FrontR.width*zoomval, img_FrontR.height*zoomval); //context_FrontR.drawImage(img_r,0,0); }var canvas_FrontY = document.getElementById('canvas_FrontY');var context_FrontY = canvas_FrontY.getContext('2d'); var canvas_FrontY_RAW;function draw_FrontY(val,type){ canvas_FrontY_RAW = document.getElementById('canvas_FrontY_RAW'); context_FrontY.imageSmoothingEnabled= false; context_FrontY.mozImageSmoothingEnabled = false; context_FrontY.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val; context_FrontY.fillStyle = context_FrontY.createPattern(imgtex, "repeat"); $(".palette4 div.sp-preview-inner").css("background-image","url("+val+")");} else{ context_FrontY.fillStyle = val; c_byellow = val; $(".palette4 div.sp-preview-inner").css("background-color",val); if(val!="repos"){$(".palette4 div.sp-preview-inner").css("background-image","url()");}} context_FrontY.fillRect (0, 0, 608, 505); var img_y = new Image(); // img_y.src = 'Round Borders.png'; context_FrontY.globalCompositeOperation = "multiply";// draw sofa on top context_FrontY.drawImage(canvas_FrontY_RAW, -(res_0*zoomval), -(res_1*zoomval), img_FrontY.width*zoomval, img_FrontY.height*zoomval);// change composition mode context_FrontY.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_FrontY.drawImage(canvas_FrontY_RAW, -(res_0*zoomval), -(res_1*zoomval), img_FrontY.width*zoomval, img_FrontY.height*zoomval);//context_FrontY.drawImage(img_y,0,0); }var canvas_FrontB = document.getElementById('canvas_FrontB');var context_FrontB = canvas_FrontB.getContext('2d'); var canvas_FrontB_RAW ;function draw_FrontB(val,type){ canvas_FrontB_RAW = document.getElementById('canvas_FrontB_RAW'); context_FrontB.imageSmoothingEnabled= false; context_FrontB.mozImageSmoothingEnabled = false; context_FrontB.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val; context_FrontB.fillStyle = context_FrontB.createPattern(imgtex, "repeat"); $(".palette3 div.sp-preview-inner").css("background-image","url("+val+")");} else{ context_FrontB.fillStyle = val; c_bblue = val; $(".palette3 div.sp-preview-inner").css("background-color",val); if(val!="repos"){$(".palette3 div.sp-preview-inner").css("background-image","url()");}} context_FrontB.fillRect (0, 0, 808, 805); var img_b = new Image(); // img_b.src = 'Round Borders.png'; context_FrontB.globalCompositeOperation = "multiply";// draw sofa on top context_FrontB.drawImage(canvas_FrontB_RAW, -(res_0*zoomval), -(res_1*zoomval), img_FrontB.width*zoomval, img_FrontB.height*zoomval);// change composition mode context_FrontB.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_FrontB.drawImage(canvas_FrontB_RAW, -(res_0*zoomval), -(res_1*zoomval), img_FrontB.width*zoomval, img_FrontB.height*zoomval);//context_FrontB.drawImage(img_b,0,0); }var canvas_FrontShadow = document.getElementById('canvas_FrontShadow');var context_FrontShadow = canvas_FrontShadow.getContext('2d'); var canvas_FrontShadow_RAW;function draw_FrontShadow(val,type){ canvas_FrontShadow_RAW = document.getElementById('canvas_FrontShadow_RAW'); context_FrontShadow.imageSmoothingEnabled= false; context_FrontShadow.mozImageSmoothingEnabled = false; context_FrontShadow.globalCompositeOperation = "source-over"; context_FrontShadow.globalAlpha = 0.65;context_FrontShadow.drawImage(canvas_FrontShadow_RAW, -(res_0*zoomval), -(res_1*zoomval), img_FrontShadow.width*zoomval, img_FrontShadow.height*zoomval);}var canvas_FrontG = document.getElementById('canvas_FrontG');var context_FrontG = canvas_FrontG.getContext('2d'); var canvas_FrontG_RAW;function draw_FrontG(val,type){ canvas_FrontG_RAW = document.getElementById('canvas_FrontG_RAW'); context_FrontG.imageSmoothingEnabled= false; context_FrontG.mozImageSmoothingEnabled = false; context_FrontG.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val; context_FrontG.fillStyle = context_FrontG.createPattern(imgtex, "repeat"); $(".palette2 div.sp-preview-inner").css("background-image","url("+val+")");} else{ context_FrontG.fillStyle = val; c_bgreen = val; $(".palette2 div.sp-preview-inner").css("background-color",val); if(val!="repos"){$(".palette2 div.sp-preview-inner").css("background-image","url()");}} context_FrontG.fillRect (0, 0, 608, 505); var img_g = new Image(); //img_g.src = 'Round Borders.png'; context_FrontG.globalCompositeOperation = "multiply";// draw sofa on top context_FrontG.drawImage(canvas_FrontG_RAW, -(res_0*zoomval), -(res_1*zoomval), img_FrontG.width*zoomval, img_FrontG.height*zoomval);// change composition mode context_FrontG.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_FrontG.drawImage(canvas_FrontG_RAW, -(res_0*zoomval), -(res_1*zoomval), img_FrontG.width*zoomval, img_FrontG.height*zoomval); // context_FrontG.drawImage(img_g,0,0); }var canvas_FrontLeftovers = document.getElementById('canvas_FrontLeftovers');var context_FrontLeftovers = canvas_FrontLeftovers.getContext('2d'); var canvas_FrontLeftovers_RAW;function draw_FrontLeftovers(val,type){ canvas_FrontLeftovers_RAW = document.getElementById('canvas_FrontLeftovers_RAW'); context_FrontLeftovers.imageSmoothingEnabled= false; context_FrontLeftovers.mozImageSmoothingEnabled = false; context_FrontLeftovers.globalCompositeOperation = "source-over"; context_FrontLeftovers.globalAlpha = 1;context_FrontLeftovers.drawImage(canvas_FrontLeftovers_RAW, -(res_0*zoomval), -(res_1*zoomval), img_FrontLeftovers.width*zoomval, img_FrontLeftovers.height*zoomval);}var canvas_FrontP = document.getElementById('canvas_FrontP');var context_FrontP = canvas_FrontP.getContext('2d'); var canvas_FrontP_RAW;function draw_FrontP(val,type){ canvas_FrontP_RAW = document.getElementById('canvas_FrontP_RAW'); context_FrontP.imageSmoothingEnabled= false; context_FrontP.mozImageSmoothingEnabled = false; context_FrontP.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val; context_FrontP.fillStyle = context_FrontP.createPattern(imgtex, "repeat"); $(".palette1 div.sp-preview-inner").css("background-image","url("+val+")");} else{ context_FrontP.fillStyle = val; c_bpink = val; $(".palette1 div.sp-preview-inner").css("background-color",val); if(val!="repos"){$(".palette1 div.sp-preview-inner").css("background-image","url()");}} context_FrontP.fillRect (0, 0, 608, 505); var img_p = new Image(); // img_p.src = 'Round Borders.png'; context_FrontP.globalCompositeOperation = "multiply";// draw sofa on top context_FrontP.drawImage(canvas_FrontP_RAW, -(res_0*zoomval), -(res_1*zoomval), img_FrontP.width*zoomval, img_FrontP.height*zoomval);// change composition mode context_FrontP.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_FrontP.drawImage(canvas_FrontP_RAW, -(res_0*zoomval), -(res_1*zoomval), img_FrontP.width*zoomval, img_FrontP.height*zoomval); // context_FrontP.drawImage(img_p,0,0); }///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////BODY FUNCTIONS - Start//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////var canvas_Eyes = document.getElementById('canvas_Eyes');var context_Eyes = canvas_Eyes.getContext('2d'); var canvas_Eyes_RAW;function draw_Eyes(val,type){ canvas_Eyes_RAW = document.getElementById('canvas_Eyes_RAW'); context_Eyes.imageSmoothingEnabled= false; context_Eyes.mozImageSmoothingEnabled = false; context_Eyes.globalCompositeOperation = "source-over";if(type=="image"){ var imgtex = new Image(); imgtex.src = val;context_Eyes.fillStyle = context_Eyes.createPattern(imgtex, "repeat");} else{ context_Eyes.fillStyle = val; c_hpink = val;} context_Eyes.fillRect (0, 0, 608, 505); var img_head_p = new Image(); // img_head_p.src = 'Round Borders.png'; context_Eyes.globalCompositeOperation = "multiply";// draw sofa on top context_Eyes.drawImage(canvas_Eyes_RAW, -(res_0*zoomval), -(res_1*zoomval), img_Eyes.width*zoomval, img_Eyes.height*zoomval);// change composition mode context_Eyes.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_Eyes.drawImage(canvas_Eyes_RAW, -(res_0*zoomval), -(res_1*zoomval), img_Eyes.width*zoomval, img_Eyes.height*zoomval); // context_Eyes.drawImage(img_head_p,0,0); }var canvas_EyesR = document.getElementById('canvas_EyesR');var context_EyesR = canvas_EyesR.getContext('2d'); var canvas_EyesR_RAW;function draw_EyesR(val,type){ canvas_EyesR_RAW = document.getElementById('canvas_EyesR_RAW'); context_EyesR.imageSmoothingEnabled= false; context_EyesR.mozImageSmoothingEnabled = false; context_EyesR.globalCompositeOperation = "source-over"; if(type=="image"){ var imgtex = new Image(); imgtex.src = val; context_EyesR.fillStyle = context_EyesR.createPattern(imgtex, "repeat"); $(".palette5 div.sp-preview-inner").css("background-image","url("+val+")");} else{ context_EyesR.fillStyle = val; c_bred = val; $(".palette5 div.sp-preview-inner").css("background-color",val); if(val!="repos"){$(".palette5 div.sp-preview-inner").css("background-image","url()");}} context_EyesR.fillRect (0, 0, 608, 505); var img_r = new Image(); // img_r.src = 'Round Borders.png'; context_EyesR.globalCompositeOperation = "multiply";// draw sofa on top context_EyesR.drawImage(canvas_EyesR_RAW, -(res_0*zoomval), -(res_1*zoomval), img_EyesR.width*zoomval, img_EyesR.height*zoomval);// change composition mode context_EyesR.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_EyesR.drawImage(canvas_EyesR_RAW, -(res_0*zoomval), -(res_1*zoomval), img_EyesR.width*zoomval, img_EyesR.height*zoomval); //context_EyesR.drawImage(img_r,0,0); }var canvas_EyesY = document.getElementById('canvas_EyesY');var context_EyesY = canvas_EyesY.getContext('2d'); var canvas_EyesY_RAW;function draw_EyesY(val,type){ canvas_EyesY_RAW = document.getElementById('canvas_EyesY_RAW'); context_EyesY.imageSmoothingEnabled= false; context_EyesY.mozImageSmoothingEnabled = false; context_EyesY.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val; context_EyesY.fillStyle = context_EyesY.createPattern(imgtex, "repeat"); $(".palette4 div.sp-preview-inner").css("background-image","url("+val+")");} else{ context_EyesY.fillStyle = val; c_byellow = val; $(".palette4 div.sp-preview-inner").css("background-color",val); if(val!="repos"){$(".palette4 div.sp-preview-inner").css("background-image","url()");}} context_EyesY.fillRect (0, 0, 608, 505); var img_y = new Image(); // img_y.src = 'Round Borders.png'; context_EyesY.globalCompositeOperation = "multiply";// draw sofa on top context_EyesY.drawImage(canvas_EyesY_RAW, -(res_0*zoomval), -(res_1*zoomval), img_EyesY.width*zoomval, img_EyesY.height*zoomval);// change composition mode context_EyesY.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_EyesY.drawImage(canvas_EyesY_RAW, -(res_0*zoomval), -(res_1*zoomval), img_EyesY.width*zoomval, img_EyesY.height*zoomval);//context_EyesY.drawImage(img_y,0,0); }var canvas_EyesB = document.getElementById('canvas_EyesB');var context_EyesB = canvas_EyesB.getContext('2d'); var canvas_EyesB_RAW ;function draw_EyesB(val,type){ canvas_EyesB_RAW = document.getElementById('canvas_EyesB_RAW'); context_EyesB.imageSmoothingEnabled= false; context_EyesB.mozImageSmoothingEnabled = false; context_EyesB.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val; context_EyesB.fillStyle = context_EyesB.createPattern(imgtex, "repeat"); $(".palette3 div.sp-preview-inner").css("background-image","url("+val+")");} else{ context_EyesB.fillStyle = val; c_bblue = val; $(".palette3 div.sp-preview-inner").css("background-color",val); if(val!="repos"){$(".palette3 div.sp-preview-inner").css("background-image","url()");}} context_EyesB.fillRect (0, 0, 808, 805); var img_b = new Image(); // img_b.src = 'Round Borders.png'; context_EyesB.globalCompositeOperation = "multiply";// draw sofa on top context_EyesB.drawImage(canvas_EyesB_RAW, -(res_0*zoomval), -(res_1*zoomval), img_EyesB.width*zoomval, img_EyesB.height*zoomval);// change composition mode context_EyesB.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_EyesB.drawImage(canvas_EyesB_RAW, -(res_0*zoomval), -(res_1*zoomval), img_EyesB.width*zoomval, img_EyesB.height*zoomval);//context_EyesB.drawImage(img_b,0,0); }var canvas_EyesShadow = document.getElementById('canvas_EyesShadow');var context_EyesShadow = canvas_EyesShadow.getContext('2d'); var canvas_EyesShadow_RAW;function draw_EyesShadow(val,type){ canvas_EyesShadow_RAW = document.getElementById('canvas_EyesShadow_RAW'); context_EyesShadow.imageSmoothingEnabled= false; context_EyesShadow.mozImageSmoothingEnabled = false; context_EyesShadow.globalCompositeOperation = "source-over"; context_EyesShadow.globalAlpha = 0.65;context_EyesShadow.drawImage(canvas_EyesShadow_RAW, -(res_0*zoomval), -(res_1*zoomval), img_EyesShadow.width*zoomval, img_EyesShadow.height*zoomval);}var canvas_EyesG = document.getElementById('canvas_EyesG');var context_EyesG = canvas_EyesG.getContext('2d'); var canvas_EyesG_RAW;function draw_EyesG(val,type){ canvas_EyesG_RAW = document.getElementById('canvas_EyesG_RAW'); context_EyesG.imageSmoothingEnabled= false; context_EyesG.mozImageSmoothingEnabled = false; context_EyesG.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val; context_EyesG.fillStyle = context_EyesG.createPattern(imgtex, "repeat"); $(".palette2 div.sp-preview-inner").css("background-image","url("+val+")");} else{ context_EyesG.fillStyle = val; c_bgreen = val; $(".palette2 div.sp-preview-inner").css("background-color",val); if(val!="repos"){$(".palette2 div.sp-preview-inner").css("background-image","url()");}} context_EyesG.fillRect (0, 0, 608, 505); var img_g = new Image(); //img_g.src = 'Round Borders.png'; context_EyesG.globalCompositeOperation = "multiply";// draw sofa on top context_EyesG.drawImage(canvas_EyesG_RAW, -(res_0*zoomval), -(res_1*zoomval), img_EyesG.width*zoomval, img_EyesG.height*zoomval);// change composition mode context_EyesG.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_EyesG.drawImage(canvas_EyesG_RAW, -(res_0*zoomval), -(res_1*zoomval), img_EyesG.width*zoomval, img_EyesG.height*zoomval); // context_EyesG.drawImage(img_g,0,0); }var canvas_EyesLeftovers = document.getElementById('canvas_EyesLeftovers');var context_EyesLeftovers = canvas_EyesLeftovers.getContext('2d'); var canvas_EyesLeftovers_RAW;function draw_EyesLeftovers(val,type){ canvas_EyesLeftovers_RAW = document.getElementById('canvas_EyesLeftovers_RAW'); context_EyesLeftovers.imageSmoothingEnabled= false; context_EyesLeftovers.mozImageSmoothingEnabled = false; context_EyesLeftovers.globalCompositeOperation = "source-over"; context_EyesLeftovers.globalAlpha = 1;context_EyesLeftovers.drawImage(canvas_EyesLeftovers_RAW, -(res_0*zoomval), -(res_1*zoomval), img_EyesLeftovers.width*zoomval, img_EyesLeftovers.height*zoomval);}var canvas_EyesP = document.getElementById('canvas_EyesP');var context_EyesP = canvas_EyesP.getContext('2d'); var canvas_EyesP_RAW;function draw_EyesP(val,type){ canvas_EyesP_RAW = document.getElementById('canvas_EyesP_RAW'); context_EyesP.imageSmoothingEnabled= false; context_EyesP.mozImageSmoothingEnabled = false; context_EyesP.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val; context_EyesP.fillStyle = context_EyesP.createPattern(imgtex, "repeat"); $(".palette1 div.sp-preview-inner").css("background-image","url("+val+")");} else{ context_EyesP.fillStyle = val; c_bpink = val; $(".palette1 div.sp-preview-inner").css("background-color",val); if(val!="repos"){$(".palette1 div.sp-preview-inner").css("background-image","url()");}} context_EyesP.fillRect (0, 0, 608, 505); var img_p = new Image(); // img_p.src = 'Round Borders.png'; context_EyesP.globalCompositeOperation = "multiply";// draw sofa on top context_EyesP.drawImage(canvas_EyesP_RAW, -(res_0*zoomval), -(res_1*zoomval), img_EyesP.width*zoomval, img_EyesP.height*zoomval);// change composition mode context_EyesP.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_EyesP.drawImage(canvas_EyesP_RAW, -(res_0*zoomval), -(res_1*zoomval), img_EyesP.width*zoomval, img_EyesP.height*zoomval); // context_EyesP.drawImage(img_p,0,0); }var canvas_MainR = document.getElementById('canvas_MainR');var context_MainR = canvas_MainR.getContext('2d'); var canvas_MainR_RAW;function draw_MainR(val,type){ canvas_MainR_RAW = document.getElementById('canvas_MainR_RAW'); context_MainR.imageSmoothingEnabled= false; context_MainR.mozImageSmoothingEnabled = false; context_MainR.globalCompositeOperation = "source-over"; if(type=="image"){ var imgtex = new Image(); imgtex.src = val; context_MainR.fillStyle = context_MainR.createPattern(imgtex, "repeat"); } else{ context_MainR.fillStyle = val; c_bred = val; } context_MainR.fillRect (0, 0, 608, 505); var img_r = new Image(); // img_r.src = 'Round Borders.png'; context_MainR.globalCompositeOperation = "multiply";// draw sofa on top context_MainR.drawImage(canvas_MainR_RAW, -(res_0*zoomval), -(res_1*zoomval), img_MainR.width*zoomval, img_MainR.height*zoomval);// change composition mode context_MainR.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_MainR.drawImage(canvas_MainR_RAW, -(res_0*zoomval), -(res_1*zoomval), img_MainR.width*zoomval, img_MainR.height*zoomval); // context_MainR.drawImage(img_r,0,0); }var canvas_MainY = document.getElementById('canvas_MainY');var context_MainY = canvas_MainY.getContext('2d'); var canvas_MainY_RAW;function draw_MainY(val,type){ canvas_MainY_RAW = document.getElementById('canvas_MainY_RAW'); context_MainY.imageSmoothingEnabled= false; context_MainY.mozImageSmoothingEnabled = false; context_MainY.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val; context_MainY.fillStyle = context_MainY.createPattern(imgtex, "repeat"); } else{ context_MainY.fillStyle = val; c_byellow = val; } context_MainY.fillRect (0, 0, 608, 505); var img_y = new Image(); // img_y.src = 'Round Borders.png'; context_MainY.globalCompositeOperation = "multiply";// draw sofa on top context_MainY.drawImage(canvas_MainY_RAW, -(res_0*zoomval), -(res_1*zoomval), img_MainY.width*zoomval, img_MainY.height*zoomval);// change composition mode context_MainY.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_MainY.drawImage(canvas_MainY_RAW, -(res_0*zoomval), -(res_1*zoomval), img_MainY.width*zoomval, img_MainY.height*zoomval);//context_MainY.drawImage(img_y,0,0); }var canvas_MainB = document.getElementById('canvas_MainB');var context_MainB = canvas_MainB.getContext('2d'); var canvas_MainB_RAW;function draw_MainB(val,type){ canvas_MainB_RAW = document.getElementById('canvas_MainB_RAW'); context_MainB.imageSmoothingEnabled= false; context_MainB.mozImageSmoothingEnabled = false; context_MainB.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val; context_MainB.fillStyle = context_MainB.createPattern(imgtex, "repeat"); } else{ context_MainB.fillStyle = val; c_bblue = val; } context_MainB.fillRect (0, 0, 808, 805); var img_b = new Image(); // img_b.src = 'Round Borders.png'; context_MainB.globalCompositeOperation = "multiply";// draw sofa on top context_MainB.drawImage(canvas_MainB_RAW, -(res_0*zoomval), -(res_1*zoomval), img_MainB.width*zoomval, img_MainB.height*zoomval);// change composition mode context_MainB.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_MainB.drawImage(canvas_MainB_RAW, -(res_0*zoomval), -(res_1*zoomval), img_MainB.width*zoomval, img_MainB.height*zoomval);//context_MainB.drawImage(img_b,0,0); }var canvas_MainShadow = document.getElementById('canvas_MainShadow');var context_MainShadow = canvas_MainShadow.getContext('2d'); var canvas_MainShadow_RAW;function draw_MainShadow(val,type){ canvas_MainShadow_RAW = document.getElementById('canvas_MainShadow_RAW'); context_MainShadow.imageSmoothingEnabled= false; context_MainShadow.mozImageSmoothingEnabled = false; context_MainShadow.globalCompositeOperation = "source-over"; context_MainShadow.globalAlpha = 0.65;context_MainShadow.drawImage(canvas_MainShadow_RAW, -(res_0*zoomval), -(res_1*zoomval), img_MainShadow.width*zoomval, img_MainShadow.height*zoomval);}var canvas_MainG = document.getElementById('canvas_MainG');var context_MainG = canvas_MainG.getContext('2d'); var canvas_MainG_RAW;function draw_MainG(val,type){ canvas_MainG_RAW = document.getElementById('canvas_MainG_RAW'); context_MainG.imageSmoothingEnabled= false; context_MainG.mozImageSmoothingEnabled = false; context_MainG.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val; context_MainG.fillStyle = context_MainG.createPattern(imgtex, "repeat"); } else{ context_MainG.fillStyle = val; c_bgreen = val;} context_MainG.fillRect (0, 0, 608, 505); var img_g = new Image(); // img_g.src = 'Round Borders.png'; context_MainG.globalCompositeOperation = "multiply";// draw sofa on top context_MainG.drawImage(canvas_MainG_RAW, -(res_0*zoomval), -(res_1*zoomval), img_MainG.width*zoomval, img_MainG.height*zoomval);// change composition mode context_MainG.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_MainG.drawImage(canvas_MainG_RAW, -(res_0*zoomval), -(res_1*zoomval), img_MainG.width*zoomval, img_MainG.height*zoomval); // context_MainG.drawImage(img_g,0,0); }var canvas_MainLeftovers = document.getElementById('canvas_MainLeftovers');var context_MainLeftovers = canvas_MainLeftovers.getContext('2d'); var canvas_MainLeftovers_RAW;function draw_MainLeftovers(val,type){ canvas_MainLeftovers_RAW = document.getElementById('canvas_MainLeftovers_RAW'); canvas_MainLeftovers.width = (res_2*zoomval); canvas_MainLeftovers.height = (res_3*zoomval); context_MainLeftovers.imageSmoothingEnabled= false; context_MainLeftovers.mozImageSmoothingEnabled = false; context_MainLeftovers.globalCompositeOperation = "source-over"; context_MainLeftovers.globalAlpha = 1;context_MainLeftovers.drawImage(canvas_MainLeftovers_RAW, -(res_0*zoomval), -(res_1*zoomval), img_MainLeftovers.width*zoomval, img_MainLeftovers.height*zoomval);}var canvas_MainP = document.getElementById('canvas_MainP');var context_MainP = canvas_MainP.getContext('2d'); var canvas_MainP_RAW;function draw_MainP(val,type){ canvas_MainP_RAW = document.getElementById('canvas_MainP_RAW'); context_MainP.imageSmoothingEnabled= false; context_MainP.mozImageSmoothingEnabled = false; context_MainP.globalCompositeOperation = "source-over";if(type=="image"){var imgtex = new Image(); imgtex.src = val; context_MainP.fillStyle = context_MainP.createPattern(imgtex, "repeat"); } else{ context_MainP.fillStyle = val; c_bpink = val; } if(ss==1 || ss==2 || ss==3 || ss==4 ){context_MainP.fillStyle = "#FFFFFF";} context_MainP.fillRect (0, 0, 608, 505); var img_p = new Image(); context_MainP.globalCompositeOperation = "multiply";// draw sofa on top context_MainP.drawImage(canvas_MainP_RAW, -(res_0*zoomval), -(res_1*zoomval), img_MainP.width*zoomval, img_MainP.height*zoomval);// change composition mode context_MainP.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_MainP.drawImage(canvas_MainP_RAW, -(res_0*zoomval), -(res_1*zoomval), img_MainP.width*zoomval, img_MainP.height*zoomval); //context_MainP.drawImage(img_p,0,0); }var canvas_BackLeftovers = document.getElementById('canvas_BackLeftovers');var context_BackLeftovers = canvas_BackLeftovers.getContext('2d'); var canvas_BackLeftovers_RAW;function draw_BackLeftovers(val,type){ canvas_BackLeftovers_RAW = document.getElementById('canvas_BackLeftovers_RAW'); context_BackLeftovers.imageSmoothingEnabled= false; context_BackLeftovers.mozImageSmoothingEnabled = false; context_BackLeftovers.globalCompositeOperation = "source-over"; context_BackLeftovers.globalAlpha = 1;context_BackLeftovers.drawImage(canvas_BackLeftovers_RAW, -(res_0*zoomval), -(res_1*zoomval), img_BackLeftovers.width*zoomval, img_BackLeftovers.height*zoomval);}var canvas_BackR = document.getElementById('canvas_BackR');var context_BackR = canvas_BackR.getContext('2d'); var canvas_BackR_RAW;function draw_BackR(val,type){ canvas_BackR_RAW = document.getElementById('canvas_BackR_RAW'); context_BackR.imageSmoothingEnabled= false; context_BackR.mozImageSmoothingEnabled = false; context_BackR.globalCompositeOperation = "source-over"; if(type=="image"){ var imgtex = new Image(); imgtex.src = val; context_BackR.fillStyle = context_BackR.createPattern(imgtex, "repeat"); } else{ context_BackR.fillStyle = val; c_bred = val; } context_BackR.fillRect (0, 0, 608, 505); var img_r = new Image(); // img_r.src = 'Round Borders.png'; context_BackR.globalCompositeOperation = "multiply";// draw sofa on top context_BackR.drawImage(canvas_BackR_RAW, -(res_0*zoomval), -(res_1*zoomval), img_BackR.width*zoomval, img_BackR.height*zoomval);// change composition mode context_BackR.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_BackR.drawImage(canvas_BackR_RAW, -(res_0*zoomval), -(res_1*zoomval), img_BackR.width*zoomval, img_BackR.height*zoomval); // context_BackR.drawImage(img_r,0,0); }var canvas_BackY = document.getElementById('canvas_BackY');var context_BackY = canvas_BackY.getContext('2d'); var canvas_BackY_RAW;function draw_BackY(val,type){ canvas_BackY_RAW = document.getElementById('canvas_BackY_RAW'); context_BackY.imageSmoothingEnabled= false; context_BackY.mozImageSmoothingEnabled = false; context_BackY.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val; context_BackY.fillStyle = context_BackY.createPattern(imgtex, "repeat"); } else{ context_BackY.fillStyle = val; c_byellow = val; } context_BackY.fillRect (0, 0, 608, 505); var img_y = new Image(); // img_y.src = 'Round Borders.png'; context_BackY.globalCompositeOperation = "multiply";// draw sofa on top context_BackY.drawImage(canvas_BackY_RAW, -(res_0*zoomval), -(res_1*zoomval), img_BackY.width*zoomval, img_BackY.height*zoomval);// change composition mode context_BackY.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_BackY.drawImage(canvas_BackY_RAW, -(res_0*zoomval), -(res_1*zoomval), img_BackY.width*zoomval, img_BackY.height*zoomval);//context_BackY.drawImage(img_y,0,0); }var canvas_BackB = document.getElementById('canvas_BackB');var context_BackB = canvas_BackB.getContext('2d'); var canvas_BackB_RAW;function draw_BackB(val,type){ canvas_BackB_RAW = document.getElementById('canvas_BackB_RAW'); context_BackB.imageSmoothingEnabled= false; context_BackB.mozImageSmoothingEnabled = false; context_BackB.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val; context_BackB.fillStyle = context_BackB.createPattern(imgtex, "repeat"); } else{ context_BackB.fillStyle = val; c_bblue = val; } context_BackB.fillRect (0, 0, 808, 805); var img_b = new Image(); // img_b.src = 'Round Borders.png'; context_BackB.globalCompositeOperation = "multiply";// draw sofa on top context_BackB.drawImage(canvas_BackB_RAW, -(res_0*zoomval), -(res_1*zoomval), img_BackB.width*zoomval, img_BackB.height*zoomval);// change composition mode context_BackB.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_BackB.drawImage(canvas_BackB_RAW, -(res_0*zoomval), -(res_1*zoomval), img_BackB.width*zoomval, img_BackB.height*zoomval);//context_BackB.drawImage(img_b,0,0); }var canvas_BackG = document.getElementById('canvas_BackG');var context_BackG = canvas_BackG.getContext('2d'); var canvas_BackG_RAW;function draw_BackG(val,type){ canvas_BackG_RAW = document.getElementById('canvas_BackG_RAW'); context_BackG.imageSmoothingEnabled= false; context_BackG.mozImageSmoothingEnabled = false; context_BackG.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val; context_BackG.fillStyle = context_BackG.createPattern(imgtex, "repeat"); } else{ context_BackG.fillStyle = val; c_bgreen = val;} context_BackG.fillRect (0, 0, 608, 505); var img_g2 = new Image(); // img_g2.src = 'Round Borders.png'; context_BackG.globalCompositeOperation = "multiply";// draw sofa on top context_BackG.drawImage(canvas_BackG_RAW, -(res_0*zoomval), -(res_1*zoomval), img_BackG.width*zoomval, img_BackG.height*zoomval);// change composition mode context_BackG.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_BackG.drawImage(canvas_BackG_RAW, -(res_0*zoomval), -(res_1*zoomval), img_BackG.width*zoomval, img_BackG.height*zoomval); // context_BackG.drawImage(img_g2,0,0); }var canvas_BackShadow = document.getElementById('canvas_BackShadow');var context_BackShadow = canvas_BackShadow.getContext('2d'); var canvas_BackShadow_RAW;function draw_BackShadow(val,type){ canvas_BackShadow_RAW = document.getElementById('canvas_BackShadow_RAW'); context_BackShadow.imageSmoothingEnabled= false; context_BackShadow.mozImageSmoothingEnabled = false; context_BackShadow.globalCompositeOperation = "source-over"; context_BackShadow.globalAlpha = 0.65;context_BackShadow.drawImage(canvas_BackShadow_RAW, -(res_0*zoomval), -(res_1*zoomval), img_BackShadow.width*zoomval, img_BackShadow.height*zoomval);}var canvas_TailsP = document.getElementById('canvas_TailsP');var context_TailsP = canvas_TailsP.getContext('2d'); var canvas_TailsP_RAW;function draw_TailsP(val,type){ canvas_TailsP_RAW = document.getElementById('canvas_TailsP_RAW'); context_TailsP.imageSmoothingEnabled= false; context_TailsP.mozImageSmoothingEnabled = false; context_TailsP.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val;context_TailsP.fillStyle = context_TailsP.createPattern(imgtex, "repeat");} else{ context_TailsP.fillStyle = val; c_bpink = val;} context_TailsP.fillRect (0, 0, 608, 505); // var img_head_p = new Image(); // img_head_p.src = 'Round Borders.png'; context_TailsP.globalCompositeOperation = "multiply";// draw sofa on top context_TailsP.drawImage(canvas_TailsP_RAW, -(tes_posx*zoomval), -(tes_posy*zoomval), Txsize*zoomval, Tysize*zoomval);// change composition mode context_TailsP.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_TailsP.drawImage(canvas_TailsP_RAW, -(tes_posx*zoomval), -(tes_posy*zoomval), Txsize*zoomval, Tysize*zoomval);//context_TailsP.drawImage(img_head_p,0,0); }var canvas_TailsB = document.getElementById('canvas_TailsB');var context_TailsB = canvas_TailsB.getContext('2d'); var canvas_TailsB_RAW;function draw_TailsB(val,type){ canvas_TailsB_RAW = document.getElementById('canvas_TailsB_RAW'); context_TailsB.imageSmoothingEnabled= false; context_TailsB.mozImageSmoothingEnabled = false; context_TailsB.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val;context_TailsB.fillStyle = context_TailsB.createPattern(imgtex, "repeat");} else{ context_TailsB.fillStyle = val; c_bblue = val;} //if(type=="color"){ alert("type="+type+" & val="+val); context_TailsB.fillStyle = val; c_bblue = val;} // alert("val"+val); context_TailsB.fillRect (0, 0, 808, 850); // img_head_b.src = 'Round Borders.png'; context_TailsB.globalCompositeOperation = "multiply";// draw sofa on top context_TailsB.drawImage(canvas_TailsB_RAW, -(tes_posx*zoomval), -(tes_posy*zoomval), Txsize*zoomval, Tysize*zoomval);// change composition mode context_TailsB.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_TailsB.drawImage(canvas_TailsB_RAW, -(tes_posx*zoomval), -(tes_posy*zoomval), Txsize*zoomval, Tysize*zoomval);//context_TailsB.drawImage(img_head_b,0,0); }var canvas_TailsR = document.getElementById('canvas_TailsR');var context_TailsR = canvas_TailsR.getContext('2d'); var canvas_TailsR_RAW;function draw_TailsR(val,type){ canvas_TailsR_RAW = document.getElementById('canvas_TailsR_RAW'); context_TailsR.imageSmoothingEnabled= false; context_TailsR.mozImageSmoothingEnabled = false; context_TailsR.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val;context_TailsR.fillStyle = context_TailsR.createPattern(imgtex, "repeat");} else{ context_TailsR.fillStyle = val; c_bred = val;} context_TailsR.fillRect (0, 0, 608, 505); // var img_head_r = new Image(); // img_head_r.src = 'Round Borders.png'; context_TailsR.globalCompositeOperation = "multiply";// draw sofa on top context_TailsR.drawImage(canvas_TailsR_RAW, -(tes_posx*zoomval), -(tes_posy*zoomval), Txsize*zoomval, Tysize*zoomval);// change composition mode context_TailsR.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_TailsR.drawImage(canvas_TailsR_RAW, -(tes_posx*zoomval), -(tes_posy*zoomval), Txsize*zoomval, Tysize*zoomval);//context_TailsR.drawImage(img_head_r,0,0); }var canvas_TailsG = document.getElementById('canvas_TailsG');var context_TailsG = canvas_TailsG.getContext('2d'); var canvas_TailsG_RAW;function draw_TailsG(val,type){ canvas_TailsG_RAW = document.getElementById('canvas_TailsG_RAW'); context_TailsG.imageSmoothingEnabled= false; context_TailsG.mozImageSmoothingEnabled = false; context_TailsG.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val; context_TailsG.fillStyle = context_TailsG.createPattern(imgtex, "repeat"); } else{ context_TailsG.fillStyle = val; c_bgreen = val; } context_TailsG.fillRect (0, 0, 608, 505); // var img_head_g = new Image(); // img_head_g.src = 'Round Borders.png'; context_TailsG.globalCompositeOperation = "multiply";// draw sofa on top context_TailsG.drawImage(canvas_TailsG_RAW, -(tes_posx*zoomval), -(tes_posy*zoomval), Txsize*zoomval, Tysize*zoomval);// change composition mode context_TailsG.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_TailsG.drawImage(canvas_TailsG_RAW, -(tes_posx*zoomval), -(tes_posy*zoomval), Txsize*zoomval, Tysize*zoomval);//context_TailsG.drawImage(img_head_g,0,0); }var canvas_TailsY = document.getElementById('canvas_TailsY');var context_TailsY = canvas_TailsY.getContext('2d'); var canvas_TailsY_RAW;function draw_TailsY(val,type){ canvas_TailsY_RAW = document.getElementById('canvas_TailsY_RAW'); context_TailsY.imageSmoothingEnabled= false; context_TailsY.mozImageSmoothingEnabled = false; context_TailsY.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val;context_TailsY.fillStyle = context_TailsY.createPattern(imgtex, "repeat");} else{ context_TailsY.fillStyle = val; c_byellow = val;} context_TailsY.fillRect (0, 0, 608, 505); //var img_head_y = new Image(); // img_head_y.src = 'Round Borders.png'; context_TailsY.globalCompositeOperation = "multiply";// draw sofa on top context_TailsY.drawImage(canvas_TailsY_RAW, -(tes_posx*zoomval), -(tes_posy*zoomval), Txsize*zoomval, Tysize*zoomval);// change composition mode context_TailsY.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_TailsY.drawImage(canvas_TailsY_RAW, -(tes_posx*zoomval), -(tes_posy*zoomval), Txsize*zoomval, Tysize*zoomval);//context_TailsY.drawImage(img_head_y,0,0); }var canvas_TailsShadow = document.getElementById('canvas_TailsShadow');var context_TailsShadow = canvas_TailsShadow.getContext('2d'); var canvas_TailsShadow_RAW;function draw_TailsShadow(val,type){ canvas_TailsShadow_RAW = document.getElementById('canvas_TailsShadow_RAW'); context_TailsShadow.imageSmoothingEnabled= false; context_TailsShadow.mozImageSmoothingEnabled = false; context_TailsShadow.globalCompositeOperation = "source-over"; context_TailsShadow.globalAlpha = 0.65;context_TailsShadow.drawImage(canvas_TailsShadow_RAW, -(tes_posx*zoomval), -(tes_posy*zoomval), Txsize*zoomval, Tysize*zoomval);}var canvas_TailsLeftovers = document.getElementById('canvas_TailsLeftovers');var context_TailsLeftovers = canvas_TailsLeftovers.getContext('2d'); var canvas_TailsLeftovers_RAW;function draw_TailsLeftovers(val,type){ canvas_TailsLeftovers_RAW = document.getElementById('canvas_TailsLeftovers_RAW'); context_TailsLeftovers.imageSmoothingEnabled= false; context_TailsLeftovers.mozImageSmoothingEnabled = false; context_TailsLeftovers.globalCompositeOperation = "source-over"; context_TailsLeftovers.globalAlpha = 1;context_TailsLeftovers.drawImage(canvas_TailsLeftovers_RAW, -(tes_posx*zoomval), -(tes_posy*zoomval), Txsize*zoomval, Tysize*zoomval);}var canvas_WingsP = document.getElementById('canvas_WingsP');var context_WingsP = canvas_WingsP.getContext('2d'); var canvas_WingsP_RAW;function draw_WingsP(val,type){ canvas_WingsP_RAW = document.getElementById('canvas_WingsP_RAW'); context_WingsP.imageSmoothingEnabled= false; context_WingsP.mozImageSmoothingEnabled = false; context_WingsP.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val;context_WingsP.fillStyle = context_WingsP.createPattern(imgtex, "repeat");} else{ context_WingsP.fillStyle = val; c_bpink = val;} context_WingsP.fillRect (0, 0, 608, 505); // var img_head_p = new Image(); // img_head_p.src = 'Round Borders.png'; context_WingsP.globalCompositeOperation = "multiply";// draw sofa on top context_WingsP.drawImage(canvas_WingsP_RAW, -(wes_posx*zoomval), -(wes_posy*zoomval), Wxsize*zoomval, Wysize*zoomval);// change composition mode context_WingsP.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_WingsP.drawImage(canvas_WingsP_RAW, -(wes_posx*zoomval), -(wes_posy*zoomval), Wxsize*zoomval, Wysize*zoomval);//context_WingsP.drawImage(img_head_p,0,0); }var canvas_WingsB = document.getElementById('canvas_WingsB');var context_WingsB = canvas_WingsB.getContext('2d'); var canvas_WingsB_RAW;function draw_WingsB(val,type){ canvas_WingsB_RAW = document.getElementById('canvas_WingsB_RAW'); context_WingsB.imageSmoothingEnabled= false; context_WingsB.mozImageSmoothingEnabled = false; context_WingsB.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val;context_WingsB.fillStyle = context_WingsB.createPattern(imgtex, "repeat");} else{ context_WingsB.fillStyle = val; c_bblue = val;} //if(type=="color"){ alert("type="+type+" & val="+val); context_WingsB.fillStyle = val; c_bblue = val;} // alert("val"+val); context_WingsB.fillRect (0, 0, 808, 850); // img_head_b.src = 'Round Borders.png'; context_WingsB.globalCompositeOperation = "multiply";// draw sofa on top context_WingsB.drawImage(canvas_WingsB_RAW, -(wes_posx*zoomval), -(wes_posy*zoomval), Wxsize*zoomval, Wysize*zoomval);// change composition mode context_WingsB.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_WingsB.drawImage(canvas_WingsB_RAW, -(wes_posx*zoomval), -(wes_posy*zoomval), Wxsize*zoomval, Wysize*zoomval);//context_WingsB.drawImage(img_head_b,0,0); }var canvas_WingsR = document.getElementById('canvas_WingsR');var context_WingsR = canvas_WingsR.getContext('2d'); var canvas_WingsR_RAW;function draw_WingsR(val,type){ canvas_WingsR_RAW = document.getElementById('canvas_WingsR_RAW'); context_WingsR.imageSmoothingEnabled= false; context_WingsR.mozImageSmoothingEnabled = false; context_WingsR.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val;context_WingsR.fillStyle = context_WingsR.createPattern(imgtex, "repeat");} else{ context_WingsR.fillStyle = val; c_bred = val;} context_WingsR.fillRect (0, 0, 608, 505); // var img_head_r = new Image(); // img_head_r.src = 'Round Borders.png'; context_WingsR.globalCompositeOperation = "multiply";// draw sofa on top context_WingsR.drawImage(canvas_WingsR_RAW, -(wes_posx*zoomval), -(wes_posy*zoomval), Wxsize*zoomval, Wysize*zoomval);// change composition mode context_WingsR.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_WingsR.drawImage(canvas_WingsR_RAW, -(wes_posx*zoomval), -(wes_posy*zoomval), Wxsize*zoomval, Wysize*zoomval);//context_WingsR.drawImage(img_head_r,0,0); }var canvas_WingsG = document.getElementById('canvas_WingsG');var context_WingsG = canvas_WingsG.getContext('2d'); var canvas_WingsG_RAW;function draw_WingsG(val,type){ canvas_WingsG_RAW = document.getElementById('canvas_WingsG_RAW'); context_WingsG.imageSmoothingEnabled= false; context_WingsG.mozImageSmoothingEnabled = false; context_WingsG.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val; context_WingsG.fillStyle = context_WingsG.createPattern(imgtex, "repeat"); } else{ context_WingsG.fillStyle = val; c_bgreen = val; } context_WingsG.fillRect (0, 0, 608, 505); // var img_head_g = new Image(); // img_head_g.src = 'Round Borders.png'; context_WingsG.globalCompositeOperation = "multiply";// draw sofa on top context_WingsG.drawImage(canvas_WingsG_RAW, -(wes_posx*zoomval), -(wes_posy*zoomval), Wxsize*zoomval, Wysize*zoomval);// change composition mode context_WingsG.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_WingsG.drawImage(canvas_WingsG_RAW, -(wes_posx*zoomval), -(wes_posy*zoomval), Wxsize*zoomval, Wysize*zoomval);//context_WingsG.drawImage(img_head_g,0,0); }var canvas_WingsY = document.getElementById('canvas_WingsY');var context_WingsY = canvas_WingsY.getContext('2d'); var canvas_WingsY_RAW;function draw_WingsY(val,type){ canvas_WingsY_RAW = document.getElementById('canvas_WingsY_RAW'); context_WingsY.imageSmoothingEnabled= false; context_WingsY.mozImageSmoothingEnabled = false; context_WingsY.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val;context_WingsY.fillStyle = context_WingsY.createPattern(imgtex, "repeat");} else{ context_WingsY.fillStyle = val; c_byellow = val;} context_WingsY.fillRect (0, 0, 608, 505); //var img_head_y = new Image(); // img_head_y.src = 'Round Borders.png'; context_WingsY.globalCompositeOperation = "multiply";// draw sofa on top context_WingsY.drawImage(canvas_WingsY_RAW, -(wes_posx*zoomval), -(wes_posy*zoomval), Wxsize*zoomval, Wysize*zoomval);// change composition mode context_WingsY.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_WingsY.drawImage(canvas_WingsY_RAW, -(wes_posx*zoomval), -(wes_posy*zoomval), Wxsize*zoomval, Wysize*zoomval);//context_WingsY.drawImage(img_head_y,0,0); }var canvas_WingsShadow = document.getElementById('canvas_WingsShadow');var context_WingsShadow = canvas_WingsShadow.getContext('2d'); var canvas_WingsShadow_RAW;function draw_WingsShadow(val,type){ canvas_WingsShadow_RAW = document.getElementById('canvas_WingsShadow_RAW'); context_WingsShadow.imageSmoothingEnabled= false; context_WingsShadow.mozImageSmoothingEnabled = false; context_WingsShadow.globalCompositeOperation = "source-over"; context_WingsShadow.globalAlpha = 0.65;context_WingsShadow.drawImage(canvas_WingsShadow_RAW, -(wes_posx*zoomval), -(wes_posy*zoomval), Wxsize*zoomval, Wysize*zoomval);}var canvas_WingsLeftovers = document.getElementById('canvas_WingsLeftovers');var context_WingsLeftovers = canvas_WingsLeftovers.getContext('2d'); var canvas_WingsLeftovers_RAW;function draw_WingsLeftovers(val,type){ canvas_WingsLeftovers_RAW = document.getElementById('canvas_WingsLeftovers_RAW'); context_WingsLeftovers.imageSmoothingEnabled= false; context_WingsLeftovers.mozImageSmoothingEnabled = false; context_WingsLeftovers.globalCompositeOperation = "source-over"; context_WingsLeftovers.globalAlpha = 1;context_WingsLeftovers.drawImage(canvas_WingsLeftovers_RAW, -(wes_posx*zoomval), -(wes_posy*zoomval), Wxsize*zoomval, Wysize*zoomval);}var canvas_CapesP = document.getElementById('canvas_CapesP');var context_CapesP = canvas_CapesP.getContext('2d'); var canvas_CapesP_RAW;function draw_CapesP(val,type){ canvas_CapesP_RAW = document.getElementById('canvas_CapesP_RAW'); context_CapesP.imageSmoothingEnabled= false; context_CapesP.mozImageSmoothingEnabled = false; context_CapesP.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val;context_CapesP.fillStyle = context_CapesP.createPattern(imgtex, "repeat");} else{ context_CapesP.fillStyle = val; c_bpink = val;} context_CapesP.fillRect (0, 0, 608, 505); // var img_head_p = new Image(); // img_head_p.src = 'Round Borders.png'; context_CapesP.globalCompositeOperation = "multiply";// draw sofa on top context_CapesP.drawImage(canvas_CapesP_RAW, -(ces_posx*zoomval), -(ces_posy*zoomval), Cxsize*zoomval, Cysize*zoomval);// change composition mode context_CapesP.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_CapesP.drawImage(canvas_CapesP_RAW, -(ces_posx*zoomval), -(ces_posy*zoomval), Cxsize*zoomval, Cysize*zoomval);//context_CapesP.drawImage(img_head_p,0,0); }var canvas_CapesB = document.getElementById('canvas_CapesB');var context_CapesB = canvas_CapesB.getContext('2d'); var canvas_CapesB_RAW;function draw_CapesB(val,type){ canvas_CapesB_RAW = document.getElementById('canvas_CapesB_RAW'); context_CapesB.imageSmoothingEnabled= false; context_CapesB.mozImageSmoothingEnabled = false; context_CapesB.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val;context_CapesB.fillStyle = context_CapesB.createPattern(imgtex, "repeat");} else{ context_CapesB.fillStyle = val; c_bblue = val;} //if(type=="color"){ alert("type="+type+" & val="+val); context_CapesB.fillStyle = val; c_bblue = val;} // alert("val"+val); context_CapesB.fillRect (0, 0, 808, 850); // img_head_b.src = 'Round Borders.png'; context_CapesB.globalCompositeOperation = "multiply";// draw sofa on top context_CapesB.drawImage(canvas_CapesB_RAW, -(ces_posx*zoomval), -(ces_posy*zoomval), Cxsize*zoomval, Cysize*zoomval);// change composition mode context_CapesB.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_CapesB.drawImage(canvas_CapesB_RAW, -(ces_posx*zoomval), -(ces_posy*zoomval), Cxsize*zoomval, Cysize*zoomval);//context_CapesB.drawImage(img_head_b,0,0); }var canvas_CapesR = document.getElementById('canvas_CapesR');var context_CapesR = canvas_CapesR.getContext('2d'); var canvas_CapesR_RAW;function draw_CapesR(val,type){ canvas_CapesR_RAW = document.getElementById('canvas_CapesR_RAW'); context_CapesR.imageSmoothingEnabled= false; context_CapesR.mozImageSmoothingEnabled = false; context_CapesR.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val;context_CapesR.fillStyle = context_CapesR.createPattern(imgtex, "repeat");} else{ context_CapesR.fillStyle = val; c_bred = val;} context_CapesR.fillRect (0, 0, 608, 505); // var img_head_r = new Image(); // img_head_r.src = 'Round Borders.png'; context_CapesR.globalCompositeOperation = "multiply";// draw sofa on top context_CapesR.drawImage(canvas_CapesR_RAW, -(ces_posx*zoomval), -(ces_posy*zoomval), Cxsize*zoomval, Cysize*zoomval);// change composition mode context_CapesR.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_CapesR.drawImage(canvas_CapesR_RAW, -(ces_posx*zoomval), -(ces_posy*zoomval), Cxsize*zoomval, Cysize*zoomval);//context_CapesR.drawImage(img_head_r,0,0); }var canvas_CapesG = document.getElementById('canvas_CapesG');var context_CapesG = canvas_CapesG.getContext('2d'); var canvas_CapesG_RAW;function draw_CapesG(val,type){ canvas_CapesG_RAW = document.getElementById('canvas_CapesG_RAW'); context_CapesG.imageSmoothingEnabled= false; context_CapesG.mozImageSmoothingEnabled = false; context_CapesG.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val; context_CapesG.fillStyle = context_CapesG.createPattern(imgtex, "repeat"); } else{ context_CapesG.fillStyle = val; c_bgreen = val; } context_CapesG.fillRect (0, 0, 608, 505); // var img_head_g = new Image(); // img_head_g.src = 'Round Borders.png'; context_CapesG.globalCompositeOperation = "multiply";// draw sofa on top context_CapesG.drawImage(canvas_CapesG_RAW, -(ces_posx*zoomval), -(ces_posy*zoomval), Cxsize*zoomval, Cysize*zoomval);// change composition mode context_CapesG.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_CapesG.drawImage(canvas_CapesG_RAW, -(ces_posx*zoomval), -(ces_posy*zoomval), Cxsize*zoomval, Cysize*zoomval);//context_CapesG.drawImage(img_head_g,0,0); }var canvas_CapesY = document.getElementById('canvas_CapesY');var context_CapesY = canvas_CapesY.getContext('2d'); var canvas_CapesY_RAW;function draw_CapesY(val,type){ canvas_CapesY_RAW = document.getElementById('canvas_CapesY_RAW'); context_CapesY.imageSmoothingEnabled= false; context_CapesY.mozImageSmoothingEnabled = false; context_CapesY.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val;context_CapesY.fillStyle = context_CapesY.createPattern(imgtex, "repeat");} else{ context_CapesY.fillStyle = val; c_byellow = val;} context_CapesY.fillRect (0, 0, 608, 505); //var img_head_y = new Image(); // img_head_y.src = 'Round Borders.png'; context_CapesY.globalCompositeOperation = "multiply";// draw sofa on top context_CapesY.drawImage(canvas_CapesY_RAW, -(ces_posx*zoomval), -(ces_posy*zoomval), Cxsize*zoomval, Cysize*zoomval);// change composition mode context_CapesY.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_CapesY.drawImage(canvas_CapesY_RAW, -(ces_posx*zoomval), -(ces_posy*zoomval), Cxsize*zoomval, Cysize*zoomval);//context_CapesY.drawImage(img_head_y,0,0); }var canvas_CapesShadow = document.getElementById('canvas_CapesShadow');var context_CapesShadow = canvas_CapesShadow.getContext('2d'); var canvas_CapesShadow_RAW;function draw_CapesShadow(val,type){ canvas_CapesShadow_RAW = document.getElementById('canvas_CapesShadow_RAW'); context_CapesShadow.imageSmoothingEnabled= false; context_CapesShadow.mozImageSmoothingEnabled = false; context_CapesShadow.globalCompositeOperation = "source-over"; context_CapesShadow.globalAlpha = 0.65;context_CapesShadow.drawImage(canvas_CapesShadow_RAW, -(ces_posx*zoomval), -(ces_posy*zoomval), Cxsize*zoomval, Cysize*zoomval);}var canvas_CapesLeftovers = document.getElementById('canvas_CapesLeftovers');var context_CapesLeftovers = canvas_CapesLeftovers.getContext('2d'); var canvas_CapesLeftovers_RAW;function draw_CapesLeftovers(val,type){ canvas_CapesLeftovers_RAW = document.getElementById('canvas_CapesLeftovers_RAW'); context_CapesLeftovers.imageSmoothingEnabled= false; context_CapesLeftovers.mozImageSmoothingEnabled = false; context_CapesLeftovers.globalCompositeOperation = "source-over"; context_CapesLeftovers.globalAlpha = 1;context_CapesLeftovers.drawImage(canvas_CapesLeftovers_RAW, -(ces_posx*zoomval), -(ces_posy*zoomval), Cxsize*zoomval, Cysize*zoomval);}var canvas_MustashP = document.getElementById('canvas_MustashP');var context_MustashP = canvas_MustashP.getContext('2d'); var canvas_MustashP_RAW;function draw_MustashP(val,type){ canvas_MustashP_RAW = document.getElementById('canvas_MustashP_RAW'); context_MustashP.imageSmoothingEnabled= false; context_MustashP.mozImageSmoothingEnabled = false; context_MustashP.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val;context_MustashP.fillStyle = context_MustashP.createPattern(imgtex, "repeat");} else{ context_MustashP.fillStyle = val; c_bpink = val;} context_MustashP.fillRect (0, 0, 608, 505); // var img_head_p = new Image(); // img_head_p.src = 'Round Borders.png'; context_MustashP.globalCompositeOperation = "multiply";// draw sofa on top context_MustashP.drawImage(canvas_MustashP_RAW, -(mes_posx*zoomval), -(mes_posy*zoomval), Mxsize*zoomval, Mysize*zoomval);// change composition mode context_MustashP.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_MustashP.drawImage(canvas_MustashP_RAW, -(mes_posx*zoomval), -(mes_posy*zoomval), Mxsize*zoomval, Mysize*zoomval);//context_MustashP.drawImage(img_head_p,0,0); }var canvas_MustashB = document.getElementById('canvas_MustashB');var context_MustashB = canvas_MustashB.getContext('2d'); var canvas_MustashB_RAW;function draw_MustashB(val,type){ canvas_MustashB_RAW = document.getElementById('canvas_MustashB_RAW'); context_MustashB.imageSmoothingEnabled= false; context_MustashB.mozImageSmoothingEnabled = false; context_MustashB.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val;context_MustashB.fillStyle = context_MustashB.createPattern(imgtex, "repeat");} else{ context_MustashB.fillStyle = val; c_bblue = val;} //if(type=="color"){ alert("type="+type+" & val="+val); context_MustashB.fillStyle = val; c_bblue = val;} // alert("val"+val); context_MustashB.fillRect (0, 0, 808, 850); // img_head_b.src = 'Round Borders.png'; context_MustashB.globalCompositeOperation = "multiply";// draw sofa on top context_MustashB.drawImage(canvas_MustashB_RAW, -(mes_posx*zoomval), -(mes_posy*zoomval), Mxsize*zoomval, Mysize*zoomval);// change composition mode context_MustashB.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_MustashB.drawImage(canvas_MustashB_RAW, -(mes_posx*zoomval), -(mes_posy*zoomval), Mxsize*zoomval, Mysize*zoomval);//context_MustashB.drawImage(img_head_b,0,0); }var canvas_MustashR = document.getElementById('canvas_MustashR');var context_MustashR = canvas_MustashR.getContext('2d'); var canvas_MustashR_RAW;function draw_MustashR(val,type){ canvas_MustashR_RAW = document.getElementById('canvas_MustashR_RAW'); context_MustashR.imageSmoothingEnabled= false; context_MustashR.mozImageSmoothingEnabled = false; context_MustashR.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val;context_MustashR.fillStyle = context_MustashR.createPattern(imgtex, "repeat");} else{ context_MustashR.fillStyle = val; c_bred = val;} context_MustashR.fillRect (0, 0, 608, 505); // var img_head_r = new Image(); // img_head_r.src = 'Round Borders.png'; context_MustashR.globalCompositeOperation = "multiply";// draw sofa on top context_MustashR.drawImage(canvas_MustashR_RAW, -(mes_posx*zoomval), -(mes_posy*zoomval), Mxsize*zoomval, Mysize*zoomval);// change composition mode context_MustashR.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_MustashR.drawImage(canvas_MustashR_RAW, -(mes_posx*zoomval), -(mes_posy*zoomval), Mxsize*zoomval, Mysize*zoomval);//context_MustashR.drawImage(img_head_r,0,0); }var canvas_MustashG = document.getElementById('canvas_MustashG');var context_MustashG = canvas_MustashG.getContext('2d'); var canvas_MustashG_RAW;function draw_MustashG(val,type){ canvas_MustashG_RAW = document.getElementById('canvas_MustashG_RAW'); context_MustashG.imageSmoothingEnabled= false; context_MustashG.mozImageSmoothingEnabled = false; context_MustashG.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val; context_MustashG.fillStyle = context_MustashG.createPattern(imgtex, "repeat"); } else{ context_MustashG.fillStyle = val; c_bgreen = val; } context_MustashG.fillRect (0, 0, 608, 505); // var img_head_g = new Image(); // img_head_g.src = 'Round Borders.png'; context_MustashG.globalCompositeOperation = "multiply";// draw sofa on top context_MustashG.drawImage(canvas_MustashG_RAW, -(mes_posx*zoomval), -(mes_posy*zoomval), Mxsize*zoomval, Mysize*zoomval);// change composition mode context_MustashG.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_MustashG.drawImage(canvas_MustashG_RAW, -(mes_posx*zoomval), -(mes_posy*zoomval), Mxsize*zoomval, Mysize*zoomval);//context_MustashG.drawImage(img_head_g,0,0); }var canvas_MustashY = document.getElementById('canvas_MustashY');var context_MustashY = canvas_MustashY.getContext('2d'); var canvas_MustashY_RAW;function draw_MustashY(val,type){ canvas_MustashY_RAW = document.getElementById('canvas_MustashY_RAW'); context_MustashY.imageSmoothingEnabled= false; context_MustashY.mozImageSmoothingEnabled = false; context_MustashY.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val;context_MustashY.fillStyle = context_MustashY.createPattern(imgtex, "repeat");} else{ context_MustashY.fillStyle = val; c_byellow = val;} context_MustashY.fillRect (0, 0, 608, 505); //var img_head_y = new Image(); // img_head_y.src = 'Round Borders.png'; context_MustashY.globalCompositeOperation = "multiply";// draw sofa on top context_MustashY.drawImage(canvas_MustashY_RAW, -(mes_posx*zoomval), -(mes_posy*zoomval), Mxsize*zoomval, Mysize*zoomval);// change composition mode context_MustashY.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_MustashY.drawImage(canvas_MustashY_RAW, -(mes_posx*zoomval), -(mes_posy*zoomval), Mxsize*zoomval, Mysize*zoomval);//context_MustashY.drawImage(img_head_y,0,0); }var canvas_MustashShadow = document.getElementById('canvas_MustashShadow');var context_MustashShadow = canvas_MustashShadow.getContext('2d'); var canvas_MustashShadow_RAW;function draw_MustashShadow(val,type){ canvas_MustashShadow_RAW = document.getElementById('canvas_MustashShadow_RAW'); context_MustashShadow.imageSmoothingEnabled= false; context_MustashShadow.mozImageSmoothingEnabled = false; context_MustashShadow.globalCompositeOperation = "source-over"; context_MustashShadow.globalAlpha = 0.65;context_MustashShadow.drawImage(canvas_MustashShadow_RAW, -(mes_posx*zoomval), -(mes_posy*zoomval), Mxsize*zoomval, Mysize*zoomval);}var canvas_MustashLeftovers = document.getElementById('canvas_MustashLeftovers');var context_MustashLeftovers = canvas_MustashLeftovers.getContext('2d'); var canvas_MustashLeftovers_RAW;function draw_MustashLeftovers(val,type){ canvas_MustashLeftovers_RAW = document.getElementById('canvas_MustashLeftovers_RAW'); context_MustashLeftovers.imageSmoothingEnabled= false; context_MustashLeftovers.mozImageSmoothingEnabled = false; context_MustashLeftovers.globalCompositeOperation = "source-over"; context_MustashLeftovers.globalAlpha = 1;context_MustashLeftovers.drawImage(canvas_MustashLeftovers_RAW, -(mes_posx*zoomval), -(mes_posy*zoomval), Mxsize*zoomval, Mysize*zoomval);}var canvas_SSJ2Lightning = document.getElementById('canvas_SSJ2Lightning');var context_SSJ2Lightning = canvas_SSJ2Lightning.getContext('2d'); var canvas_SSJ2Lightning2 = document.getElementById('canvas_SSJ2Lightning2');var context_SSJ2Lightning2 = canvas_SSJ2Lightning2.getContext('2d'); function draw_SSJ2Lightning(){context_SSJ2Lightning.clearRect(0, 0, 800, 800);/*img_SSJ2Lightning.src = "BLANK.png";if(ss==2){img_SSJ2Lightning.src = "ssjimgs/sprSSJ2Lightning_0.png";} //Lightningif(ss==3){img_SSJ2Lightning.src = "ssjimgs/sprSSJ3Lightning_0.png";} //Lightningif(ss==4){img_SSJ2Lightning.src = "ssjimgs/sprSSJGLightning_0.png";} //Lightningif(ss==5){img_SSJ2Lightning.src = "ssjimgs/sprSSJ3Lightning_0.png";} //Lightningif(ss==6){img_SSJ2Lightning.src = "ssjimgs/sprSSJBLightning_0.png";} //Lightningif(ss==7){img_SSJ2Lightning.src = "ssjimgs/sprSSJRLightning_0.png";} //Lightning if(ss==8){img_SSJ2Lightning.src = "ssjimgs/UIEffect.png";} //Lightning if(ss==9){img_SSJ2Lightning.src = "ssjimgs/UIMEffect3.png";} //Lightning if(ss==10){img_SSJ2Lightning.src = "ssjimgs/SSJBELightning2.png";} //Lightning if(ss==11){img_SSJ2Lightning.src = "ssjimgs/SSJ5Lightning2.png";} //Lightning */setTimeout(function(){ context_SSJ2Lightning.imageSmoothingEnabled= false; context_SSJ2Lightning.mozImageSmoothingEnabled = false; context_SSJ2Lightning.globalCompositeOperation = "source-over"; context_SSJ2Lightning.drawImage(img_SSJ2Lightning,SSLxoffset*zoomval,SSLyoffset*zoomval,SSLxsize*zoomval, SSLysize*zoomval); //img_SSJ2Lightning.src = "ssjimgs/sprSSJ2Lightning_0.png"; context_SSJ2Lightning2.drawImage(img_SSJ2Lightning,0,0,SSLxsize*zoomval, SSLysize*zoomval); }, 10);//context_SSJ2Lightning.drawImage(img_SSJ2Lightning,SSLxoffset*zoomval,SSLyoffset*zoomval,SSLxsize*zoomval, SSLysize*zoomval);}var canvas_KaiokenEffect = document.getElementById('canvas_KaiokenEffect');var context_KaiokenEffect = canvas_KaiokenEffect.getContext('2d'); function draw_KaiokenEffect(val,type){ context_KaiokenEffect.imageSmoothingEnabled= false; context_KaiokenEffect.mozImageSmoothingEnabled = false; context_KaiokenEffect.globalCompositeOperation = "source-over"; context_KaiokenEffect.globalAlpha = 1;context_KaiokenEffect.drawImage(img_KaiokenEffect, KKLxoffset*zoomval, KKLyoffset*zoomval, KKLxsize*zoomval, KKLysize*zoomval);$("#demogif").css('top', KK2Lyoffset*zoomval);$("#demogif").css('left', KK2Lxoffset*zoomval);//SSJAnm$("#demogifSSJ").css('top', KK2Lyoffset*zoomval);$("#demogifSSJ").css('left', KK2Lxoffset*zoomval);$("#demogifSSJBack").css('top', (KK2Lyoffset*0.85)*zoomval);$("#demogifSSJBack").css('left', KK2Lxoffset*zoomval);$("#demogifSSJ4Back").css('top', (KK2Lyoffset*0.85)*zoomval);$("#demogifSSJ4Back").css('left', KK2Lxoffset*zoomval);//SSJAnm$("#demogifPreSSJ").css('top', KK2Lyoffset*zoomval);$("#demogifPreSSJ").css('left', KK2Lxoffset*zoomval);//BIG Charge$("#demogifE3").css('top', KK2Lyoffset*zoomval);$("#demogifE3").css('left',KK2Lxoffset*zoomval);newsizex=KK2Lxsize/204;newsizey=KK2Lysize/228;newsizey2=newsizey*1;newsizexE3=KK2Lxsize/204;newsizeyE3=KK2Lysize/228;newsizey2E3=newsizey*1;//$('#demogif').css({ transform: 'scale('+newsizex+', '+newsizey+')' });}///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////HEAD FUNCTIONS - Start//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////var canvas_FullHairP = document.getElementById('canvas_FullHairP');var context_FullHairP = canvas_FullHairP.getContext('2d'); var canvas_FullHairP_RAW;function draw_FullHairP(val,type){ canvas_FullHairP_RAW = document.getElementById('canvas_FullHairP_RAW'); context_FullHairP.imageSmoothingEnabled= false; context_FullHairP.mozImageSmoothingEnabled = false; context_FullHairP.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val;context_FullHairP.fillStyle = context_FullHairP.createPattern(imgtex, "repeat");} else{ context_FullHairP.fillStyle = val; c_bpink = val;} context_FullHairP.fillRect (0, 0, 608, 505); var img_head_p = new Image(); // img_head_p.src = 'Round Borders.png'; context_FullHairP.globalCompositeOperation = "multiply";// draw sofa on top context_FullHairP.drawImage(canvas_FullHairP_RAW, newoffsetx2*zoomval, newoffsety2*zoomval, hwidth*zoomval, hheight*zoomval);// change composition mode context_FullHairP.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_FullHairP.drawImage(canvas_FullHairP_RAW, newoffsetx2*zoomval, newoffsety2*zoomval, hwidth*zoomval, hheight*zoomval);//context_FullHairP.drawImage(img_head_p,0,0); }var canvas_FullHairB = document.getElementById('canvas_FullHairB');var context_FullHairB = canvas_FullHairB.getContext('2d'); var canvas_FullHairB_RAW;function draw_FullHairB(val,type){ canvas_FullHairB_RAW = document.getElementById('canvas_FullHairB_RAW'); context_FullHairB.imageSmoothingEnabled= false; context_FullHairB.mozImageSmoothingEnabled = false; context_FullHairB.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val;context_FullHairB.fillStyle = context_FullHairB.createPattern(imgtex, "repeat");} else{ context_FullHairB.fillStyle = val; c_bblue = val;} context_FullHairB.fillRect (0, 0, 608, 505); var img_head_b = new Image(); // img_head_b.src = 'Round Borders.png'; context_FullHairB.globalCompositeOperation = "multiply";// draw sofa on top context_FullHairB.drawImage(canvas_FullHairB_RAW, newoffsetx2*zoomval, newoffsety2*zoomval, hwidth*zoomval, hheight*zoomval);// change composition mode context_FullHairB.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_FullHairB.drawImage(canvas_FullHairB_RAW, newoffsetx2*zoomval, newoffsety2*zoomval, hwidth*zoomval, hheight*zoomval);//context_FullHairB.drawImage(img_head_b,0,0); }var canvas_FullHairR = document.getElementById('canvas_FullHairR');var context_FullHairR = canvas_FullHairR.getContext('2d'); var canvas_FullHairR_RAW;function draw_FullHairR(val,type){ canvas_FullHairR_RAW = document.getElementById('canvas_FullHairR_RAW'); context_FullHairR.imageSmoothingEnabled= false; context_FullHairR.mozImageSmoothingEnabled = false; context_FullHairR.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val;context_FullHairR.fillStyle = context_FullHairR.createPattern(imgtex, "repeat");} else{ context_FullHairR.fillStyle = val; c_bred = val;} context_FullHairR.fillRect (0, 0, 608, 505); var img_head_r = new Image(); //img_head_r.src = 'Round Borders.png'; context_FullHairR.globalCompositeOperation = "multiply";// draw sofa on top context_FullHairR.drawImage(canvas_FullHairR_RAW, newoffsetx2*zoomval, newoffsety2*zoomval, hwidth*zoomval, hheight*zoomval);// change composition mode context_FullHairR.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_FullHairR.drawImage(canvas_FullHairR_RAW, newoffsetx2*zoomval, newoffsety2*zoomval, hwidth*zoomval, hheight*zoomval);//context_FullHairR.drawImage(img_head_r,0,0); }var canvas_FullHairG = document.getElementById('canvas_FullHairG');var context_FullHairG = canvas_FullHairG.getContext('2d'); var canvas_FullHairG_RAW;function draw_FullHairG(val,type){ canvas_FullHairG_RAW = document.getElementById('canvas_FullHairG_RAW'); context_FullHairG.imageSmoothingEnabled= false; context_FullHairG.mozImageSmoothingEnabled = false; context_FullHairG.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val; context_FullHairG.fillStyle = context_FullHairG.createPattern(imgtex, "repeat"); } else{ context_FullHairG.fillStyle = val; c_bgreen = val; } context_FullHairG.fillRect (0, 0, 608, 505); // var img_head_g = new Image(); // img_head_g.src = 'Round Borders.png'; context_FullHairG.globalCompositeOperation = "multiply";// draw sofa on top context_FullHairG.drawImage(canvas_FullHairG_RAW, newoffsetx2*zoomval, newoffsety2*zoomval, hwidth*zoomval, hheight*zoomval);// change composition mode context_FullHairG.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_FullHairG.drawImage(canvas_FullHairG_RAW, newoffsetx2*zoomval, newoffsety2*zoomval, hwidth*zoomval, hheight*zoomval);//context_FullHairG.drawImage(img_head_g,0,0); }var canvas_FullHairY = document.getElementById('canvas_FullHairY');var context_FullHairY = canvas_FullHairY.getContext('2d'); var canvas_FullHairY_RAW;function draw_FullHairY(val,type){ canvas_FullHairY_RAW = document.getElementById('canvas_FullHairY_RAW'); context_FullHairY.imageSmoothingEnabled= false; context_FullHairY.mozImageSmoothingEnabled = false; context_FullHairY.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val;context_FullHairY.fillStyle = context_FullHairY.createPattern(imgtex, "repeat");} else{ context_FullHairY.fillStyle = val; c_byellow = val;} context_FullHairY.fillRect (0, 0, 608, 505); var img_head_y = new Image(); // img_head_y.src = 'Round Borders.png'; context_FullHairY.globalCompositeOperation = "multiply";// draw sofa on top context_FullHairY.drawImage(canvas_FullHairY_RAW, newoffsetx2*zoomval, newoffsety2*zoomval, hwidth*zoomval, hheight*zoomval);// change composition mode context_FullHairY.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_FullHairY.drawImage(canvas_FullHairY_RAW, newoffsetx2*zoomval, newoffsety2*zoomval, hwidth*zoomval, hheight*zoomval);//context_FullHairY.drawImage(img_head_y,0,0); }var canvas_FullHairShadow = document.getElementById('canvas_FullHairShadow');var context_FullHairShadow = canvas_FullHairShadow.getContext('2d'); var canvas_FullHairShadow_RAW;function draw_FullHairShadow(val,type){ canvas_FullHairShadow_RAW = document.getElementById('canvas_FullHairShadow_RAW'); context_FullHairShadow.imageSmoothingEnabled= false; context_FullHairShadow.mozImageSmoothingEnabled = false; context_FullHairShadow.globalCompositeOperation = "source-over"; context_FullHairShadow.globalAlpha = 0.65;context_FullHairShadow.drawImage(canvas_FullHairShadow_RAW, newoffsetx2*zoomval, newoffsety2*zoomval, hwidth*zoomval, hheight*zoomval);}var canvas_FullHairLeftovers = document.getElementById('canvas_FullHairLeftovers');var context_FullHairLeftovers = canvas_FullHairLeftovers.getContext('2d'); var canvas_FullHairLeftovers_RAW;function draw_FullHairLeftovers(val,type){canvas_FullHairLeftovers_RAW = document.getElementById('canvas_FullHairLeftovers_RAW'); context_FullHairLeftovers.imageSmoothingEnabled= false; context_FullHairLeftovers.mozImageSmoothingEnabled = false; context_FullHairLeftovers.globalCompositeOperation = "source-over"; context_FullHairLeftovers.globalAlpha = 1;context_FullHairLeftovers.drawImage(canvas_FullHairLeftovers_RAW, newoffsetx2*zoomval, newoffsety2*zoomval, hwidth*zoomval, hheight*zoomval);}var canvas_FullBackHairP = document.getElementById('canvas_FullBackHairP');var context_FullBackHairP = canvas_FullBackHairP.getContext('2d'); var canvas_FullBackHairP_RAW;function draw_FullBackHairP(val,type){ canvas_FullBackHairP_RAW = document.getElementById('canvas_FullBackHairP_RAW'); context_FullBackHairP.imageSmoothingEnabled= false; context_FullBackHairP.mozImageSmoothingEnabled = false; context_FullBackHairP.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val;context_FullBackHairP.fillStyle = context_FullBackHairP.createPattern(imgtex, "repeat");} else{ context_FullBackHairP.fillStyle = val; c_bpink = val;} context_FullBackHairP.fillRect (0, 0, 608, 505); var img_head_p = new Image(); // img_head_p.src = 'Round Borders.png'; context_FullBackHairP.globalCompositeOperation = "multiply";// draw sofa on top context_FullBackHairP.drawImage(canvas_FullBackHairP_RAW, newoffsetx2*zoomval, newoffsety2*zoomval, hwidth*zoomval, hheight*zoomval);// change composition mode context_FullBackHairP.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_FullBackHairP.drawImage(canvas_FullBackHairP_RAW, newoffsetx2*zoomval, newoffsety2*zoomval, hwidth*zoomval, hheight*zoomval);//context_FullBackHairP.drawImage(img_head_p,0,0); }var canvas_FullBackHairB = document.getElementById('canvas_FullBackHairB');var context_FullBackHairB = canvas_FullBackHairB.getContext('2d'); var canvas_FullBackHairB_RAW;function draw_FullBackHairB(val,type){ canvas_FullBackHairB_RAW = document.getElementById('canvas_FullBackHairB_RAW'); context_FullBackHairB.imageSmoothingEnabled= false; context_FullBackHairB.mozImageSmoothingEnabled = false; context_FullBackHairB.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val;context_FullBackHairB.fillStyle = context_FullBackHairB.createPattern(imgtex, "repeat");} else{ context_FullBackHairB.fillStyle = val; c_bblue = val;} context_FullBackHairB.fillRect (0, 0, 608, 505); var img_head_b = new Image(); // img_head_b.src = 'Round Borders.png'; context_FullBackHairB.globalCompositeOperation = "multiply";// draw sofa on top context_FullBackHairB.drawImage(canvas_FullBackHairB_RAW, newoffsetx2*zoomval, newoffsety2*zoomval, hwidth*zoomval, hheight*zoomval);// change composition mode context_FullBackHairB.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_FullBackHairB.drawImage(canvas_FullBackHairB_RAW, newoffsetx2*zoomval, newoffsety2*zoomval, hwidth*zoomval, hheight*zoomval);//context_FullBackHairB.drawImage(img_head_b,0,0); }var canvas_FullBackHairR = document.getElementById('canvas_FullBackHairR');var context_FullBackHairR = canvas_FullBackHairR.getContext('2d'); var canvas_FullBackHairR_RAW;function draw_FullBackHairR(val,type){ canvas_FullBackHairR_RAW = document.getElementById('canvas_FullBackHairR_RAW'); context_FullBackHairR.imageSmoothingEnabled= false; context_FullBackHairR.mozImageSmoothingEnabled = false; context_FullBackHairR.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val;context_FullBackHairR.fillStyle = context_FullBackHairR.createPattern(imgtex, "repeat");} else{ context_FullBackHairR.fillStyle = val; c_bred = val;} context_FullBackHairR.fillRect (0, 0, 608, 505); var img_head_r = new Image(); // img_head_r.src = 'Round Borders.png'; context_FullBackHairR.globalCompositeOperation = "multiply";// draw sofa on top context_FullBackHairR.drawImage(canvas_FullBackHairR_RAW, newoffsetx2*zoomval, newoffsety2*zoomval, hwidth*zoomval, hheight*zoomval);// change composition mode context_FullBackHairR.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_FullBackHairR.drawImage(canvas_FullBackHairR_RAW, newoffsetx2*zoomval, newoffsety2*zoomval, hwidth*zoomval, hheight*zoomval);//context_FullBackHairR.drawImage(img_head_r,0,0); }var canvas_FullBackHairG = document.getElementById('canvas_FullBackHairG');var context_FullBackHairG = canvas_FullBackHairG.getContext('2d'); var canvas_FullBackHairG_RAW;function draw_FullBackHairG(val,type){ canvas_FullBackHairG_RAW = document.getElementById('canvas_FullBackHairG_RAW'); context_FullBackHairG.imageSmoothingEnabled= false; context_FullBackHairG.mozImageSmoothingEnabled = false; context_FullBackHairG.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val;context_FullBackHairG.fillStyle = context_FullBackHairG.createPattern(imgtex, "repeat");} else{ context_FullBackHairG.fillStyle = val; c_bgreen = "val";} context_FullBackHairG.fillRect (0, 0, 608, 505); // var img_head_g = new Image(); // img_head_g.src = 'Round Borders.png'; context_FullBackHairG.globalCompositeOperation = "multiply";// draw sofa on top context_FullBackHairG.drawImage(canvas_FullBackHairG_RAW, newoffsetx2*zoomval, newoffsety2*zoomval, hwidth*zoomval, hheight*zoomval);// change composition mode context_FullBackHairG.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_FullBackHairG.drawImage(canvas_FullBackHairG_RAW, newoffsetx2*zoomval, newoffsety2*zoomval, hwidth*zoomval, hheight*zoomval);//context_FullBackHairG.drawImage(img_head_g,0,0); }var canvas_FullBackHairY = document.getElementById('canvas_FullBackHairY');var context_FullBackHairY = canvas_FullBackHairY.getContext('2d'); var canvas_FullBackHairY_RAW;function draw_FullBackHairY(val,type){ canvas_FullBackHairY_RAW = document.getElementById('canvas_FullBackHairY_RAW'); context_FullBackHairY.imageSmoothingEnabled= false; context_FullBackHairY.mozImageSmoothingEnabled = false; context_FullBackHairY.globalCompositeOperation = "source-over"; if(type=="image"){var imgtex = new Image(); imgtex.src = val;context_FullBackHairY.fillStyle = context_FullBackHairY.createPattern(imgtex, "repeat");} else{ context_FullBackHairY.fillStyle = val; c_byellow = val;} context_FullBackHairY.fillRect (0, 0, 608, 505); var img_head_y = new Image(); // img_head_y.src = 'Round Borders.png'; context_FullBackHairY.globalCompositeOperation = "multiply";// draw sofa on top context_FullBackHairY.drawImage(canvas_FullBackHairY_RAW, newoffsetx2*zoomval, newoffsety2*zoomval, hwidth*zoomval, hheight*zoomval);// change composition mode context_FullBackHairY.globalCompositeOperation = "destination-in";// draw to cut-out sofa context_FullBackHairY.drawImage(canvas_FullBackHairY_RAW, newoffsetx2*zoomval, newoffsety2*zoomval, hwidth*zoomval, hheight*zoomval);//context_FullBackHairY.drawImage(img_head_y,0,0); }var canvas_FullBackHairShadow = document.getElementById('canvas_FullBackHairShadow');var context_FullBackHairShadow = canvas_FullBackHairShadow.getContext('2d'); var canvas_FullBackHairShadow_RAW;function draw_FullBackHairShadow(val,type){canvas_FullBackHairShadow_RAW = document.getElementById('canvas_FullBackHairShadow_RAW'); context_FullBackHairShadow.imageSmoothingEnabled= false; context_FullBackHairShadow.mozImageSmoothingEnabled = false; context_FullBackHairShadow.globalCompositeOperation = "source-over"; context_FullBackHairShadow.globalAlpha = 0.65;context_FullBackHairShadow.drawImage(canvas_FullBackHairShadow_RAW, newoffsetx2*zoomval, newoffsety2*zoomval, hwidth*zoomval, hheight*zoomval);}var canvas_FullBackHairLeftovers = document.getElementById('canvas_FullBackHairLeftovers');var context_FullBackHairLeftovers = canvas_FullBackHairLeftovers.getContext('2d'); var canvas_FullBackHairLeftovers_RAW;function draw_FullBackHairLeftovers(val,type){ canvas_FullBackHairLeftovers_RAW = document.getElementById('canvas_FullBackHairLeftovers_RAW'); context_FullBackHairLeftovers.imageSmoothingEnabled= false; context_FullBackHairLeftovers.mozImageSmoothingEnabled = false; context_FullBackHairLeftovers.globalCompositeOperation = "source-over"; context_FullBackHairLeftovers.globalAlpha = 1;context_FullBackHairLeftovers.drawImage(canvas_FullBackHairLeftovers_RAW, newoffsetx2*zoomval, newoffsety2*zoomval, hwidth*zoomval, hheight*zoomval);}/*var canvas_MainGShadow = document.getElementById('canvas_MainGShadow');var context_MainGShadow = canvas_MainGShadow.getContext('2d'); var canvas_MainGShadow_RAW;function draw_MainGShadow(val,type){ canvas_MainGShadow_RAW = document.getElementById('canvas_MainGShadow_RAW'); //alert(hwidth); context_MainGShadow.imageSmoothingEnabled= false; context_MainGShadow.mozImageSmoothingEnabled = false; context_MainGShadow.globalCompositeOperation = "source-over"; context_MainGShadow.globalAlpha = 0.65;//context_MainGShadow.drawImage(img_MainGShadow, 0, 0, img_MainGShadow.width*zoomval, img_MainGShadow.height*zoomval);//context_MainGShadow.drawImage(canvas_MainGShadow_RAW, -(res_0*zoomval), -(res_1*zoomval), img_MainGShadow.width*zoomval, img_MainGShadow.height*zoomval);//context_MainGShadow.drawImage(img_MainGShadow, 0, 0, 0, img_MainGShadow.height*zoomval);}*/var canvas_Extra1 = document.getElementById('canvas_Extra1');var context_Extra1 = canvas_Extra1.getContext('2d'); function draw_Extra1(val,type){ context_Extra1.imageSmoothingEnabled= false; context_Extra1.mozImageSmoothingEnabled = false; context_Extra1.globalCompositeOperation = "source-over"; context_Extra1.globalAlpha = 1; if(Ex1Type=="Sunglasses"){context_Extra1.drawImage(img_Extra1, -(Ex1Crop_x*zoomval), -(Ex1Crop_y*zoomval), img_Extra1.width*zoomval, img_Extra1.height*zoomval);} if(Ex1Type=="Cat"){context_Extra1.drawImage(img_Extra1, -(Ex1Crop_x*zoomval), -(Ex1Crop_y*zoomval), img_Extra1.width*zoomval, img_Extra1.height*zoomval);} if(Ex1Type=="WhisHalo"){context_Extra1.drawImage(img_Extra1, -(Ex1Crop_x*zoomval), -(Ex1Crop_y*zoomval), Ex1_imgW*zoomval, Ex1_imgH*zoomval);}}function draw_txt1(val,type){ var canvas_txt1 = document.getElementById('canvas_txt1');var ctx_txt = canvas_txt1.getContext('2d'); ctx_txt.globalCompositeOperation = "source-over";ctx_txt.clearRect(0, 0, canvas_txt1.width, canvas_txt1.height);ctx_txt.font = "12px pkmfont";ctx_txt.shadowColor = "rgb(215,207,175)";ctx_txt.shadowOffsetX = 2; ctx_txt.shadowOffsetY = 2; ctx_txt.shadowBlur = 0;ctx_txt.scale(1,1);ctx_txt.fillStyle = "rgb(66,66,66)";ctx_txt.textAlign = "left";ctx_txt.fillText(nameStr[p1],48,268,156); ctx_txt.shadowColor = "rgb(215,207,175)";ctx_txt.shadowOffsetX = 2; ctx_txt.shadowOffsetY = 2; ctx_txt.shadowBlur = 0;ctx_txt.font = "12px pkmfont";ctx_txt.fillStyle = "rgb(66,66,66)";ctx_txt.textAlign = "left";ctx_txt.fillText("Lv8",210,268); ctx_txt.shadowColor = "rgb(64,72,120)";ctx_txt.shadowOffsetX = 2; ctx_txt.shadowOffsetY = 2; ctx_txt.shadowBlur = 0;ctx_txt.font = "11px pkmfont";ctx_txt.fillStyle = "rgb(254,254,254)";ctx_txt.textAlign = "left";ctx_txt.fillText("A wild "+nameStr[p1]+" has appeared!",30,515); }//AURA transform colorfunction changecolor(type){ var combined = document.getElementById("combined");var ctx = combined.getContext("2d"); ctx.imageSmoothingEnabled= false; ctx.mozImageSmoothingEnabled = false; ctx.globalCompositeOperation = "source-over"; ctx.shadowOffsetX = 0; ctx.shadowOffsetY = 0; ctx.clearRect(0, 0, combined.width, combined.height);ctx.clearRect(0, 0, 800, 800);ctx.globalAlpha = 1;ctx.shadowColor = type;ctx.shadowOffsetX = 0; ctx.shadowOffsetY = 0; ctx.shadowBlur = 11;var img=document.getElementById("image2"); ctx.drawImage(img,0,0); // set composite mode ctx.globalCompositeOperation = "source-in"; // draw color ctx.fillStyle = type; ctx.fillRect(0, 0, 608, 505); document.getElementById("image2").src = combined.toDataURL();document.getElementById("image3").src = combined.toDataURL();}function LoadChar1(clicked){ var activecheck01=document.getElementById("CharSelectDiv").style.opacity; if(activecheck01!=1){return;} // alert("clicked="+clicked); if(clicked==1) { var combinedCC = document.getElementById("canvas_CHARCurrent"); var combinedC1 = document.getElementById("canvas_CHAR1");var ctxC1= combinedC1.getContext("2d"); combinedC1.width = 256*2;//combined.width;combinedC1.height = 256*2;//combined.height;ctxC1.drawImage(canvas_StampsB,17,16);ctxC1.drawImage(combinedCC, 0,0);ctxC1.drawImage(canvas_StampsF,17,16); //alert("clicked1="+clicked);var combinedGC = document.getElementById("canvas_GlowCurrent"); var combinedG1 = document.getElementById("canvas_GlowC1");var ctxG1= combinedG1.getContext("2d"); combinedG1.width = 600;combinedG1.height = 600;ctxG1.drawImage(combinedGC, 0,0);// alert("clicked2="+clicked);var combinedLC = document.getElementById("canvas_SSJ2Lightning");var combinedL1 = document.getElementById("canvas_LightningC1");var ctxL1= combinedL1.getContext("2d"); combinedL1.width = 256*2;//combined.width;combinedL1.height = 256*2;//combined.height;ctxL1.drawImage(combinedLC, 0,0);if(document.getElementById('canvas_red').style.display != 'none') {var combinedKC = document.getElementById("canvas_KaiokenEffect");var combinedK1 = document.getElementById("canvas_KaiokenEffectC1");var combinedKRed = document.getElementById("canvas_red");var ctxK1= combinedK1.getContext("2d"); combinedK1.width = 256*2;//combined.width;combinedK1.height = 256*2;//combined.height;ctxK1.drawImage(combinedKC, 0,0);ctxK1.drawImage(combinedKRed, -44,-44); } var sqltemp=sqlwingstr.split("@"); var adjCrop=[];adjCrop[0]=eval(sqltemp[0])+eval(sqltemp[3]);adjCrop[1]=eval(sqltemp[1])+eval(sqltemp[4]);adjCrop[2]=eval(sqltemp[2])+eval(sqltemp[5]);C1varWingX=adjCrop[0];//varWingX[newp1]; C1varWingY=adjCrop[1];//varWingY[newp1];C1varWingSize=adjCrop[2];//varWingSize[newp1];var sqltemp=sqltailstr.split("@"); var adjCrop=[];adjCrop[0]=eval(sqltemp[0])+eval(sqltemp[3]);adjCrop[1]=eval(sqltemp[1])+eval(sqltemp[4]);adjCrop[2]=eval(sqltemp[2])+eval(sqltemp[5]);C1varTailX=adjCrop[0]//varTailX[newp1];;C1varTailY=adjCrop[1]//varTailY[newp1];;C1res_3=res_1+res_3;C1varTailSize=adjCrop[2]//varTailSize[newp1];c1loaded=1;Char1x=Char1x; Char1y=Char1y;Char1w=Char1w; Char1h=Char1h;Char1Name=document.getElementById("fnametxt").innerHTML;}document.getElementById('GlowC1').style.visibility = 'visible'; document.getElementById('LoadC1').style.zIndex = 80; var zoomvalchar1=-1000; if(BGNum!=1) { document.getElementById('SuperCreditBtn').style.zIndex = -90; document.getElementById('sbtn').style.zIndex = -90; document.getElementById('kbtn').style.zIndex = -90; } else { document.getElementById('SuperCreditBtn').style.zIndex = 999; document.getElementById('sbtn').style.zIndex = 850; document.getElementById('kbtn').style.zIndex = 850; } var x128x=C1varWingX;var x128y=C1varWingY;//x128y=C1res_3;var x128w=C1varWingSize;if(BGNum==4){ x128x=C1varTailX; x128y=C1varTailY; x128w=C1varTailSize;}if(BGNum==15){ x128x=C1varTailX; x128y=C1varTailY; x128w=C1varTailSize;}if(BGNum==19){ x128x=C1varTailX; x128y=C1varTailY; x128w=C1varTailSize;}if(BGNum==7){ x128x=C1varTailX; x128y=C1varTailY; x128w=C1varTailSize; LoadChar2();}if(BGNum==18){ x128x=C1varTailX; x128y=C1varTailY; x128w=C1varTailSize;}if(BGNum==8){ x128x=C1varTailX; x128y=C1varTailY; x128w=C1varTailSize;}if(BGNum==9){ x128x=C1varTailX; x128y=C1varTailY; x128w=C1varTailSize;}if(BGNum==20){ x128x=C1varTailX; x128y=C1varTailY; x128w=C1varTailSize;}if(BGNum==13){ x128x=C1varTailX; x128y=C1varTailY; x128w=C1varTailSize;}if(BGNum==30){ x128x=C1varTailX; x128y=C1varTailY; x128w=C1varTailSize;}if(BGNum==28){ x128x=C1varTailX; x128y=C1varTailY; x128w=C1varTailSize;}if(BGNum==26){ x128x=C1varTailX; x128y=C1varTailY; x128w=C1varTailSize;}if(BGNum==24){ x128x=C1varTailX; x128y=C1varTailY; x128w=C1varTailSize;}if(BGNum==21){ x128x=C1varTailX; x128y=C1varTailY; x128w=C1varTailSize;}if(BGNum==14){ x128x=C1varTailX; x128y=C1varTailY; x128w=C1varTailSize;}if(BGNum==4){zoomvalchar1=(208/512);}if(BGNum==15){zoomvalchar1=(228/512);}if(BGNum==19){zoomvalchar1=(325/512);}if(BGNum==2){zoomvalchar1=(786/512); x128y=C1varWingY;}if(BGNum==16){zoomvalchar1=(786/512); x128y=C1varWingY;}if(BGNum==5){zoomvalchar1=(325/512); x128y=C1varWingY;}if(BGNum==6){zoomvalchar1=(227/512);}if(BGNum==32){zoomvalchar1=(227/512);}if(BGNum==25){zoomvalchar1=(227/512);}if(BGNum==27){zoomvalchar1=(287/512);}if(BGNum==29){zoomvalchar1=(137/512);} if(BGNum==10){zoomvalchar1=(385/512);} if(BGNum==31){zoomvalchar1=(315/512);} if(BGNum==22){zoomvalchar1=(275/512);} if(BGNum==23){zoomvalchar1=(275/512);} if(BGNum==11){zoomvalchar1=(345/512);} if(BGNum==3){zoomvalchar1=(245/512);} if(BGNum==17){zoomvalchar1=(320/512);} if(BGNum==14){zoomvalchar1=(135/512);} if(BGNum==12){zoomvalchar1=(345/512);} if(BGNum==13){zoomvalchar1=(245/512);} if(BGNum==30){zoomvalchar1=(245/512);} if(BGNum==28){zoomvalchar1=(350/512);} if(BGNum==26){zoomvalchar1=(205/512);} if(BGNum==24){zoomvalchar1=(345/512);} if(BGNum==21){zoomvalchar1=(195/512);} if(BGNum==7){zoomvalchar1=(425/512);} if(BGNum==18){zoomvalchar1=(385/512);} if(BGNum==8){zoomvalchar1=(245/512);} if(BGNum==9){zoomvalchar1=(385/512);} if(BGNum==20){zoomvalchar1=(175/512);} if(clicked==0){ var oldzoom=zoomvalchar1; zoomvalchar1=0.2;} var combinedX = document.getElementById('canvas_CHAR1'); var dataURL = combinedX.toDataURL('image/png');var combinedX0 = document.createElement('canvas');var ctxX = combinedX0.getContext("2d");// flip context horizontally combinedX0.width = 512; yoff_calc=(x128y*2); //yoff_calc+=(x128w)*zoomvalchar1; ncalc=((512)-yoff_calc); // alert("C1 yoff_calc "+yoff_calc); combinedX0.height = 512;//alert("combinedX0.height="+combinedX0.height);if(BGNum==6){ ctxX.scale(-1,1); ctxX.drawImage(combinedX, -512, 0); ctxX.drawImage(combinedX, 512, 0);}if(BGNum==32){ ctxX.scale(-1,1); ctxX.drawImage(combinedX, -512, 0); ctxX.drawImage(combinedX, 512, 0);}if(BGNum==25){ ctxX.scale(-1,1); ctxX.drawImage(combinedX, -512, 0); ctxX.drawImage(combinedX, 512, 0);}if(BGNum==27){ ctxX.scale(-1,1); ctxX.drawImage(combinedX, -512, 0); ctxX.drawImage(combinedX, 512, 0);}if(BGNum==29){ ctxX.scale(-1,1); ctxX.drawImage(combinedX, -512, 0); ctxX.drawImage(combinedX, 512, 0);}if(BGNum==2){ctxX.drawImage(combinedX, 0, 0);}if(BGNum==16){ctxX.drawImage(combinedX, 0, 0);}if(BGNum==5){ctxX.drawImage(combinedX, 0, 0);}if(BGNum==4){ctxX.drawImage(combinedX, 0, 0);}if(BGNum==15){ctxX.drawImage(combinedX, 0, 0);}if(BGNum==19){ctxX.drawImage(combinedX, 0, 0);}if(BGNum==7){ctxX.drawImage(combinedX, 0, ncalc);}if(BGNum==18){ctxX.drawImage(combinedX, 0, ncalc); }if(BGNum==8){ctxX.drawImage(combinedX, 0, 0);}if(BGNum==9){ ctxX.scale(-1,1); ctxX.drawImage(combinedX, -512, 0); //ctxX.drawImage(combinedX, 612, 0);}if(BGNum==20){ ctxX.scale(-1,1); ctxX.drawImage(combinedX, -512, 0); //ctxX.drawImage(combinedX, 612, 0);}if(BGNum==10){ ctxX.scale(-1,1); ctxX.drawImage(combinedX, -512, 0); //ctxX.drawImage(combinedX, 612, 0);}if(BGNum==31){ ctxX.scale(-1,1); ctxX.drawImage(combinedX, -512, 0); //ctxX.drawImage(combinedX, 612, 0);}if(BGNum==22){ ctxX.scale(-1,1); ctxX.drawImage(combinedX, -512, 0); //ctxX.drawImage(combinedX, 612, 0);}if(BGNum==23){ ctxX.scale(-1,1); ctxX.drawImage(combinedX, -512, 0); //ctxX.drawImage(combinedX, 612, 0);}if(BGNum==11){ ctxX.scale(-1,1); ctxX.drawImage(combinedX, -512, 0); // ctxX.drawImage(combinedX, 612, 0);}if(BGNum==3){ //ctxX.globalAlpha = 1;ctxX.scale(-1,1); ctxX.drawImage(combinedX, -512, 0);ctxX.globalAlpha = 0.85; ctxX.fillStyle = "rgba(255, 0, 0, 0.7)"; //Replace with wanted color. ctxX.fillRect(-512,-512,(512*2), (512*2)); ctxX.globalCompositeOperation = "destination-in"; ctxX.drawImage(combinedX, -512, 0); ctxX.globalCompositeOperation = "multiply"; // ctxX.drawImage(combinedX, -512, 0);}if(BGNum==17){ //ctxX.globalAlpha = 1;ctxX.scale(-1,1); ctxX.drawImage(combinedX, -512, 0);ctxX.globalAlpha = 0.85; ctxX.fillStyle = "rgba(0, 128, 255, 0.7)"; //Replace with wanted color. ctxX.fillRect(-512,-512,(512*2), (512*2)); ctxX.globalCompositeOperation = "destination-in"; ctxX.drawImage(combinedX, -512, 0); ctxX.globalCompositeOperation = "multiply"; // ctxX.drawImage(combinedX, -512, 0);}if(BGNum==12){ //ctxX.globalAlpha = 1;ctxX.scale(-1,1); ctxX.drawImage(combinedX, -512, 0);//ctxX.globalAlpha = 0.65; ctxX.fillStyle = "rgba(2, 240, 136, 0.7)"; //Replace with wanted color. ctxX.fillRect(-512,-512,(512*2), (512*2)); ctxX.globalCompositeOperation = "destination-in"; ctxX.drawImage(combinedX, -512, 0); ctxX.globalCompositeOperation = "multiply"; ctxX.drawImage(combinedX, -512, 0);}if(BGNum==13){ ctxX.scale(1,1); //ctxX.globalAlpha = 1; ctxX.drawImage(combinedX, 0, 0);//ctxX.globalAlpha = 0.65; ctxX.fillStyle = "rgba(255, 255, 0, 0.7)"; //Replace with wanted color. ctxX.fillRect(0,0,512, 512); ctxX.globalCompositeOperation = "destination-in"; ctxX.drawImage(combinedX, 0, 0); ctxX.globalCompositeOperation = "multiply"; ctxX.drawImage(combinedX, 0, 0);}if(BGNum==30){ ctxX.scale(1,1); //ctxX.globalAlpha = 1; ctxX.drawImage(combinedX, 0, 0);//ctxX.globalAlpha = 0.65; ctxX.fillStyle = "rgba(255, 255, 0, 0.7)"; //Replace with wanted color. ctxX.fillRect(0,0,512, 512); ctxX.globalCompositeOperation = "destination-in"; ctxX.drawImage(combinedX, 0, 0); ctxX.globalCompositeOperation = "multiply"; ctxX.drawImage(combinedX, 0, 0);}if(BGNum==28){ ctxX.scale(1,1); //ctxX.globalAlpha = 1; ctxX.drawImage(combinedX, 0, 0);}if(BGNum==26){ ctxX.scale(1,1); //ctxX.globalAlpha = 1; ctxX.drawImage(combinedX, 0, 0);//ctxX.globalAlpha = 0.65; ctxX.fillStyle = "rgba(255, 255, 0, 0.2)"; //Replace with wanted color. ctxX.fillRect(0,0,512, 512); ctxX.globalCompositeOperation = "destination-in"; ctxX.drawImage(combinedX, 0, 0); ctxX.globalCompositeOperation = "multiply"; ctxX.drawImage(combinedX, 0, 0);}if(BGNum==24){ ctxX.scale(1,1); //ctxX.globalAlpha = 1; ctxX.drawImage(combinedX, 0, 0);//ctxX.globalAlpha = 0.65; ctxX.fillStyle = "rgba(50, 50, 50, 0.25)"; //Replace with wanted color. ctxX.fillRect(0,0,512, 512); ctxX.globalCompositeOperation = "destination-in"; ctxX.drawImage(combinedX, 0, 0); ctxX.globalCompositeOperation = "multiply"; ctxX.drawImage(combinedX, 0, 0);}if(BGNum==21){ctxX.drawImage(combinedX, 0, 0);}if(BGNum==14){ ctxX.scale(1,1); //ctxX.globalAlpha = 1; //ctxX.drawImage(combinedX, 0, 0);ctxX.globalAlpha = 0.85; ctxX.fillStyle = "rgba(0, 128, 255, 0.7)"; //Replace with wanted color. ctxX.fillRect(0,0,512, 512); ctxX.globalCompositeOperation = "destination-in"; ctxX.drawImage(combinedX, 0, 0); ctxX.globalCompositeOperation = "multiply"; ctxX.drawImage(combinedX, 0, 0);}var combinedLightning = document.getElementById("canvas_LightningC1");var combinedKaiokenEffect = document.getElementById("canvas_KaiokenEffectC1");var check090=0;if(BGNum==6 || BGNum==32 || BGNum==9 || BGNum==20 || BGNum==10 || BGNum==31 || BGNum==22 || BGNum==23 || BGNum==11 || BGNum==3 || BGNum==12 || BGNum==17 || BGNum==25 || BGNum==27 || BGNum==29){ ctxX.drawImage(combinedLightning, -512, 0); ctxX.drawImage(combinedKaiokenEffect, -512, 0); check090=1;}if(check090==0 && BGNum!=7 && BGNum!=18){ ctxX.drawImage(combinedLightning, 0, 0); ctxX.drawImage(combinedKaiokenEffect, 0, 0);} //// document.getElementById('GlowC1').style.visibility = 'hidden';document.getElementById("LoadC1").src = combinedX0.toDataURL();//if(BGNum==12){document.getElementById("LoadC1").src = "BLANK.png";} document.getElementById('LoadC1').style.zIndex = 81;if(clicked==0){document.getElementById("LoadC1").src="ClickHERE.png"; document.getElementById('LoadC1').style.zIndex = 900;}var combinedG1 = document.getElementById("canvas_GlowC1");var combinedG0 = document.createElement('canvas');var ctxX = combinedG0.getContext("2d");combinedG0.width = 600;combinedG0.height = 600;var check090=0;if( BGNum==6 || BGNum==32 || BGNum==9 || BGNum==20 || BGNum==10 || BGNum==31 || BGNum==22 || BGNum==23 || BGNum==11 || BGNum==3 || BGNum==12 || BGNum==17 || BGNum==25 || BGNum==27 || BGNum==29){ ctxX.scale(-1,1); ctxX.drawImage(combinedG1, -600, 0); //ctxX.drawImage(combinedG1, 612, 0); check090=1;}if(BGNum==13){ ctxX.scale(1,1); ctxX.drawImage(combinedG1, 0, 0); // ctxX.globalAlpha = 0.85; // ctxX.fillStyle = "rgba(2, 240, 136, 0.7)"; //Replace with wanted color.// ctxX.fillRect(0,0,512,512); // ctxX.globalCompositeOperation = "destination-in"; // ctxX.drawImage(combinedG1, 0, 0); // ctxX.globalCompositeOperation = "multiply"; check090=1;}if(BGNum==30){ ctxX.scale(1,1); ctxX.drawImage(combinedG1, 0, 0); // ctxX.globalAlpha = 0.85; // ctxX.fillStyle = "rgba(2, 240, 136, 0.7)"; //Replace with wanted color. // ctxX.fillRect(0,0,512,512); // ctxX.globalCompositeOperation = "destination-in"; // ctxX.drawImage(combinedG1, 0, 0); // ctxX.globalCompositeOperation = "multiply"; check090=1;}if(BGNum==28){ ctxX.scale(1,1); ctxX.drawImage(combinedG1, 0, 0); }if(BGNum==26){ ctxX.scale(1,1); ctxX.drawImage(combinedG1, 0, 0);// ctxX.globalAlpha = 0.85; // ctxX.fillStyle = "rgba(2, 240, 136, 0.2)"; //Replace with wanted color. // ctxX.fillRect(0,0,512,512); // ctxX.globalCompositeOperation = "destination-in"; // ctxX.drawImage(combinedG1, 0, 0); // ctxX.globalCompositeOperation = "multiply"; check090=1;}if(BGNum==24){ ctxX.scale(1,1); ctxX.drawImage(combinedG1, 0, 0); // ctxX.globalAlpha = 0.85; // ctxX.fillStyle = "rgba(50, 50, 50, 0.25)"; //Replace with wanted color. // ctxX.fillRect(0,0,512,512); // ctxX.globalCompositeOperation = "destination-in"; // ctxX.drawImage(combinedG1, 0, 0); // ctxX.globalCompositeOperation = "multiply"; check090=1;}if(BGNum==14){ ctxX.scale(1,1); ctxX.drawImage(combinedG1, 0, 0); // ctxX.globalAlpha = 0.85; // ctxX.fillStyle = "rgba(0, 128, 255, 0.7)"; //Replace with wanted color. // ctxX.fillRect(0,0,512,512); // ctxX.globalCompositeOperation = "destination-in"; // ctxX.drawImage(combinedG1, 0, 0); // ctxX.globalCompositeOperation = "multiply"; check090=1;}if(check090==0){ctxX.drawImage(combinedG1, 0, 0);}if(BGNum==3){ var ctxG0 = combinedG0.getContext("2d"); ctxG0.clearRect(0, 0, combinedG0.width, combinedG0.height); ctxG0.scale(-1,1); ctxG0.drawImage(combinedG0, -512, 0);ctxG0.globalAlpha = 0.85; ctxG0.fillStyle = "rgba(255, 0, 0, 0.7)"; //Replace with wanted color. ctxG0.fillRect(-512,-512,(512*2), (512*2)); ctxG0.globalCompositeOperation = "destination-in"; ctxG0.drawImage(combinedG0, -512, 0); ctxG0.globalCompositeOperation = "multiply";}if(BGNum==17){ var ctxG0 = combinedG0.getContext("2d"); ctxG0.clearRect(0, 0, combinedG0.width, combinedG0.height); ctxG0.scale(-1,1); ctxG0.drawImage(combinedG0, -512, 0);ctxG0.globalAlpha = 0.85; ctxG0.fillStyle = "rgba(0, 128, 255, 0.7)"; //Replace with wanted color. ctxG0.fillRect(-512,-512,(512*2), (512*2)); ctxG0.globalCompositeOperation = "destination-in"; ctxG0.drawImage(combinedG0, -512, 0); ctxG0.globalCompositeOperation = "multiply";}if(BGNum==12){ var ctxG0 = combinedG0.getContext("2d"); ctxG0.clearRect(0, 0, combinedG0.width, combinedG0.height); ctxG0.scale(-1,1); ctxG0.drawImage(combinedG0, -512, 0);ctxG0.globalAlpha = 0.85; ctxG0.fillStyle = "rgba(2, 240, 136, 0.7)"; //Replace with wanted color. ctxG0.fillRect(-512,-512,(512*2), (512*2)); ctxG0.globalCompositeOperation = "destination-in"; ctxG0.drawImage(combinedG0, -512, 0); ctxG0.globalCompositeOperation = "multiply";}if(BGNum==7||BGNum==18){ var ctxG0 = combinedG0.getContext("2d"); ctxG0.clearRect(0, 0, combinedG0.width, combinedG0.height); document.getElementById('GlowC1').style.visibility = 'hidden';}document.getElementById("GlowC1").src = combinedG0.toDataURL();//if(clicked==-1){ document.getElementById("LoadC1").src = "BLANK.png";}var combinedX2 = document.getElementById('canvas_CHAR1');$(LoadC1).css("height", combinedX2.height*zoomvalchar1);$(LoadC1).css("width", combinedX2.width*zoomvalchar1);$(GlowC1).css("height", 600*zoomvalchar1);$(GlowC1).css("width", 600*zoomvalchar1);xoffchar=0; yoffchar=0;if(BGNum==1){xoffchar=5; yoffchar=5;}if(BGNum==4){xoffchar=310; yoffchar=504;}if(BGNum==15){xoffchar=235; yoffchar=377;}if(BGNum==19){xoffchar=300; yoffchar=352;}if(BGNum==2){xoffchar=300; yoffchar=305;}if(BGNum==16){xoffchar=280; yoffchar=470;}if(BGNum==5){xoffchar=182; yoffchar=505;}if(BGNum==6){xoffchar=110; yoffchar=475;}//{xoffchar=50; yoffchar=250;}if(BGNum==32){xoffchar=50+60; yoffchar=350+225;}if(BGNum==25){xoffchar=50+60; yoffchar=280+225;}if(BGNum==27){xoffchar=40+70; yoffchar=170+225+90;}if(BGNum==29){xoffchar=5+60; yoffchar=300+225;} if(BGNum==7){xoffchar=240; yoffchar=510;} if(BGNum==18){xoffchar=295+80; yoffchar=572;} if(BGNum==8){xoffchar=245+60; yoffchar=200+225;} if(BGNum==9){xoffchar=135; yoffchar=520;}//UPDATED if(BGNum==20){xoffchar=155; yoffchar=150+225;} if(BGNum==10){xoffchar=100+90; yoffchar=325+225; } if(BGNum==31){xoffchar=140+60; yoffchar=280+225; } if(BGNum==22){xoffchar=100; yoffchar=380+225;}//{xoffchar=-10; yoffchar=370;} if(BGNum==23){xoffchar=100; yoffchar=380+225;}//{xoffchar=-10; yoffchar=370;} if(BGNum==11){xoffchar=35+60; yoffchar=280+225+90;} if(BGNum==3){xoffchar=55; yoffchar=290;} if(BGNum==17){xoffchar=-5+60; yoffchar=287+225;} if(BGNum==14){xoffchar=475; yoffchar=200;} if(BGNum==12){xoffchar=35+70; yoffchar=280;} if(BGNum==13){xoffchar=250+60; yoffchar=275+225;} if(BGNum==30){xoffchar=250+60; yoffchar=275+225;} if(BGNum==28){xoffchar=385+60; yoffchar=285+225;} if(BGNum==26){xoffchar=230+50; yoffchar=265+225;} if(BGNum==24){xoffchar=410+60; yoffchar=320+225;} if(BGNum==21){xoffchar=300; yoffchar=265+225;} var xoff=(x128x*2)*zoomvalchar1; var char_xoff2=xoffchar-xoff; var yoff=(x128y*2)*zoomvalchar1; var char_yoff2=yoffchar-yoff; char_xoff2-=((x128w*zoomvalchar1)); char_yoff2-=((x128w*zoomvalchar1)); //if(BGNum!=7 && BGNum!=18){ char_yoff2-=((x128w*zoomvalchar1)/2);} if(BGNum==7){char_yoff2=yoffchar-combinedX0.height;} if(BGNum==18){char_yoff2=yoffchar-combinedX0.height;} if(BGNum==8){} if(BGNum==9 || BGNum==6 || BGNum==32 || BGNum==11 || BGNum==13 || BGNum==8 || BGNum==17 || BGNum==10 || BGNum==20 || BGNum==21 || BGNum==22 || BGNum==23 || BGNum== 24 || BGNum==25 || BGNum==26 || BGNum==27 || BGNum==28 || BGNum==29 || BGNum==30 || BGNum==31 ) {char_yoff2=yoffchar-((C1res_3*2)*zoomvalchar1)} if(BGNum==20) {char_xoff2=xoffchar-((x128x*2)*zoomvalchar1); char_xoff2-=((x128w)*zoomvalchar1);} // if(BGNum==20){char_yoff2=yoffchar+((x128y/2)*zoomvalchar1)} if(BGNum==3){char_yoff2=yoffchar+((x128y/2)*zoomvalchar1)} if(BGNum==14){char_yoff2=yoffchar+((x128y/2)*zoomvalchar1)} if(BGNum==12){char_yoff2=yoffchar+((x128y/2)*zoomvalchar1)} if(BGNum==5 || BGNum==2 || BGNum==16 || BGNum==19 || BGNum==15) { var x128x_2=x128x*2; var x128x_2=x128x_2*zoomvalchar1; var x128y_2=x128y*2; var x128y_2=x128y_2*zoomvalchar1; /* char_xoff2=xoffchar-x128x_2; char_yoff2=yoffchar-x128y_2; char_xoff2-=((x128w)*zoomvalchar1); char_yoff2=((x128w)*zoomvalchar1); */ char_xoff2=xoffchar-(x128x*2)*zoomvalchar1; char_xoff2-=(x128w)*zoomvalchar1; char_yoff2=yoffchar-(x128y*2)*zoomvalchar1; char_yoff2-=(x128w)*zoomvalchar1; // char_yoff2=0-char_yoff2; // char_xoff2-=((x128w)*zoomvalchar1); char_yoff2=((x128w)*zoomvalchar1); } // if(clicked==0){char_yoff2+=(128*oldzoom);} if(clicked==0 && c1loaded==0){char_xoff2=xoffchar; char_yoff2=yoffchar;} // alert("char_xoff2="+char_xoff2); // char_xoff2=0;document.getElementById("LoadC1").style.left=char_xoff2+"px"; document.getElementById("LoadC1").style.top=char_yoff2+"px"; var Gchar_xoff2=char_xoff2-(44*zoomvalchar1); var Gchar_yoff2=char_yoff2-(44*zoomvalchar1);document.getElementById("GlowC1").style.left=Gchar_xoff2+"px"; document.getElementById("GlowC1").style.top=Gchar_yoff2+"px"; var combinedT = document.getElementById("canvas_Text1");//document.createElement('canvas'); var ctxT = combinedT.getContext("2d");ctxT.clearRect(0, 0, combinedT.width, combinedT.height);var x128xcheck=(x128x*2);var headtextX=(x128xcheck*zoomvalchar1)+char_xoff2+(50*zoomvalchar1);var headtextY=(x128y*zoomvalchar1)+char_yoff2; headtextY-=(200+(15*zoomvalchar1));if(DisplayNames==1){document.getElementById("canvas_Text1").style.display = 'block';}else{document.getElementById("canvas_Text1").style.display = 'none';}if(zoomvalchar1!=-1000){ctxT.shadowColor = "black";ctxT.shadowOffsetX = 0; ctxT.shadowOffsetY = 0; ctxT.shadowBlur = 5;var fsize=25*zoomvalchar1;ctxT.font = "bold "+fsize+"px Arial, Helvetica, sans-serif";ctxT.scale(1,1);ctxT.fillStyle = "white";ctxT.textAlign = "center";ctxT.fillText(""+Char1Name,headtextX,headtextY); }if(clicked==1){ // alert("bgi changed");$('#Char1div').css('background-position', '-'+Char1x+'px -'+Char1y+'px');$("#Char1div").css('background-image','url('+dataURL+')');$('#Char1div').css('background-size', Char1w+'px ' + Char1h + 'px');}setTimeout(function () {document.getElementById("LoadC1").src = combinedX0.toDataURL(); }, 50); /* if(BGNum==-100) { console.log("BGNum==-100!!"); if(LoadStickers_Loaded!=0){ document.getElementById("MasterStamp").style.display = 'block'; document.getElementById("StickerMenuBG").style.display = 'block'; } if(LoadStickers_Loaded==0){LoadStickers2(); document.getElementById('loadingBGS').style.display = 'block'; LoadStickers_Loaded=1; } } */ }function LoadChar2(clicked){ var activecheck01=document.getElementById("CharSelectDiv").style.opacity; if(activecheck01!=1){return;} if(clicked==1 && BGNum!=7 && BGNum!=18) { var combinedCC = document.getElementById("canvas_CHARCurrent"); var combinedC2 = document.getElementById("canvas_CHAR2");var ctxC2= combinedC2.getContext("2d"); combinedC2.width = 256*2;//combined.width;combinedC2.height = 256*2;//combined.height;ctxC2.drawImage(canvas_StampsB,17,16);ctxC2.drawImage(combinedCC, 0,0);ctxC2.drawImage(canvas_StampsF,17,16);var combinedGC = document.getElementById("canvas_GlowCurrent"); var combinedG1 = document.getElementById("canvas_GlowC2");var ctxG1= combinedG1.getContext("2d"); combinedG1.width = 600;combinedG1.height = 600;ctxG1.drawImage(combinedGC, 0,0);var combinedLC = document.getElementById("canvas_SSJ2Lightning");var combinedL2 = document.getElementById("canvas_LightningC2");var ctxL2= combinedL2.getContext("2d"); combinedL2.width = 256*2;//combined.width;combinedL2.height = 256*2;//combined.height;ctxL2.drawImage(combinedLC, 0,0); if(document.getElementById('canvas_red').style.display != 'none') {var combinedKC = document.getElementById("canvas_KaiokenEffect");var combinedK2 = document.getElementById("canvas_KaiokenEffectC2");var combinedKRed = document.getElementById("canvas_red");var ctxK2= combinedK2.getContext("2d"); combinedK2.width = 256*2;//combined.width;combinedK2.height = 256*2;//combined.height;ctxK2.drawImage(combinedKC, 0,0);ctxK2.drawImage(combinedKRed, -44,-44) }var sqltemp=sqlwingstr.split("@"); var adjCrop=[];adjCrop[0]=eval(sqltemp[0])+eval(sqltemp[3]);adjCrop[1]=eval(sqltemp[1])+eval(sqltemp[4]);adjCrop[2]=eval(sqltemp[2])+eval(sqltemp[5]);C2varWingX=adjCrop[0];//varWingX[newp1]; C2varWingY=adjCrop[1];//varWingY[newp1];C2varWingSize=adjCrop[2];//varWingSize[newp1];var sqltemp=sqltailstr.split("@"); var adjCrop=[];adjCrop[0]=eval(sqltemp[0])+eval(sqltemp[3]);adjCrop[1]=eval(sqltemp[1])+eval(sqltemp[4]);adjCrop[2]=eval(sqltemp[2])+eval(sqltemp[5]);C2varTailX=adjCrop[0]//varTailX[newp1];;C2varTailY=adjCrop[1]//varTailY[newp1];;C2res_3=res_1+res_3;C2varTailSize=adjCrop[2]//varTailSize[newp1];c2loaded=1;Char2x=Char1x; Char2y=Char1y;Char2w=Char1w; Char2h=Char1h;Char2Name=document.getElementById("fnametxt").innerHTML;} document.getElementById('GlowC2').style.visibility = 'visible';document.getElementById('LoadC2').style.zIndex = 80;var zoomvalchar2=-1000;var x128x=C2varWingX;var x128y=C2varWingY;//if(BGNum!=7){x128y=(256-C2res_3);}//x128y=C2res_3;var x128w=C2varWingSize;if(clicked==0 && c2loaded==0){x128y=64; x128x=32; x128w=2;}if(BGNum==7){x128x=C1varTailX; x128y=C1varTailY; x128w=C1varTailSize; zoomvalchar2=(425/512);}if(BGNum==18){ x128x=C1varTailX; x128y=C1varTailY; x128w=C1varTailSize; zoomvalchar2=(385/512);}if(BGNum==9){ x128x=C2varTailX; x128y=C2varTailY; x128w=C2varTailSize; zoomvalchar2=0.35;}if(BGNum==22){ x128x=C1varTailX; x128y=C1varTailY; x128w=C1varTailSize; zoomvalchar2=(385/512);}if(BGNum==23){ x128x=C1varTailX; x128y=C1varTailY; x128w=C1varTailSize; zoomvalchar2=(385/512);}if(BGNum==10){zoomvalchar2=(275/512);}if(BGNum==31){zoomvalchar2=(205/512);}if(clicked==0 && c2loaded==0){ var oldzoom=zoomvalchar2; zoomvalchar2=0.2;} var combinedX = document.getElementById('canvas_CHAR2'); if(BGNum==7){combinedX = document.getElementById('canvas_CHAR1');} if(BGNum==6){zoomvalchar2=(227/512);} if(BGNum==32){zoomvalchar2=(227/512);} if(BGNum==25){zoomvalchar2=(227/512);} if(BGNum==27){zoomvalchar2=(287/512);} if(BGNum==29){zoomvalchar2=(137/512);} if(BGNum==18){combinedX = document.getElementById('canvas_CHAR1');} var dataURL = combinedX.toDataURL('image/png'); var combinedX0 = document.createElement('canvas');var ctxX = combinedX0.getContext("2d");// flip context horizontally combinedX0.width = 512;combinedX0.height = 512;if(clicked==0 && c2loaded==0){ combinedX0.width = 64; combinedX0.height = 64;}var yoff_calc2=(x128y*2); // yoff_calc2+=(x128w)*zoomvalchar2; // var ncalc2=((512*zoomvalchar2)-yoff_calc2); //alert("C2 yoff_calc "+yoff_calc2);//ctxX.scale(-1,1); // ctxX.drawImage(combinedX, -512, 0);if(BGNum==6){ctxX.drawImage(combinedX, 0, 0);}if(BGNum==32){ctxX.drawImage(combinedX, 0, 0);}if(BGNum==25){ctxX.drawImage(combinedX, 0, 0);}if(BGNum==27){ctxX.drawImage(combinedX, 0, 0);} if(BGNum==29){ctxX.drawImage(combinedX, 0, 0);}if(BGNum==18){var x128y2=yoff_calc2; ctxX.drawImage(combinedX, 0, -x128y2);}if(BGNum==7){var x128y2=yoff_calc2; ctxX.drawImage(combinedX, 0, -x128y2);}if(BGNum==9){ctxX.drawImage(combinedX, 0, 0);}if(BGNum==10){ctxX.drawImage(combinedX, 0, 0);}if(BGNum==31){ctxX.drawImage(combinedX, 0, 0);}if(BGNum==22){ ctxX.scale(-1,1); ctxX.drawImage(combinedX, -512, 0); //ctxX.drawImage(combinedX, 612, 0);}if(BGNum==23){ ctxX.scale(-1,1); ctxX.drawImage(combinedX, -512, 0); //ctxX.drawImage(combinedX, 612, 0);}var combinedLightning = document.getElementById("canvas_LightningC2");var combinedKaiokenEffect = document.getElementById("canvas_KaiokenEffectC2");if(BGNum==22 || BGNum==23){ ctxX.drawImage(combinedLightning, -512, 0); ctxX.drawImage(combinedKaiokenEffect, -512, 0);}else{ ctxX.drawImage(combinedLightning, 0, 0); ctxX.drawImage(combinedKaiokenEffect, 0, 0);}if(clicked==-1){ ctxX.clearRect(0, 0, combinedX0.width, combinedX0.height);}document.getElementById("LoadC2").src = combinedX0.toDataURL();var combinedG1 = document.getElementById("canvas_GlowC2"); var combinedG0 = document.createElement('canvas');var ctxX = combinedG0.getContext("2d");combinedG0.width = 600;combinedG0.height = 600;if(BGNum==22 || BGNum==23){ ctxX.scale(-1,1); ctxX.drawImage(combinedG1, -600, 0); //ctxX.drawImage(combinedG1, 612, 0); check090=1;}else{ctxX.drawImage(combinedG1, 0,0); check090=1;}//if(clicked==-1 || BGNum==8){ var ctxG1 = combinedG1.getContext("2d"); ctxG1.clearRect(0, 0, combinedG1.width, combinedG1.height);}document.getElementById("GlowC2").src = combinedG0.toDataURL(); document.getElementById('LoadC2').style.zIndex = 81;var combinedX2 = document.getElementById('canvas_CHAR2');$(LoadC2).css("height", combinedX2.height*zoomvalchar2);$(LoadC2).css("width", combinedX2.width*zoomvalchar2);$(GlowC2).css("height", 600*zoomvalchar2);$(GlowC2).css("width", 600*zoomvalchar2);if(clicked==0 && c2loaded==0){$(LoadC2).css("height", 64);$(LoadC2).css("width", 64);}xoffchar=0; yoffchar=0;if(BGNum==4){xoffchar=300; yoffchar=500;}if(BGNum==6){xoffchar=430+50; yoffchar=475;}if(BGNum==32){xoffchar=430+50; yoffchar=350+225;}if(BGNum==25){xoffchar=450+50; yoffchar=280+222;}if(BGNum==27){xoffchar=390+60; yoffchar=200+280;}if(BGNum==29){xoffchar=512+30; yoffchar=390+140;}if(BGNum==18){xoffchar=410; yoffchar=-30;}if(BGNum==7){xoffchar=220+100; yoffchar=-40;}if(BGNum==8){xoffchar=380; yoffchar=270;} if(BGNum==9){xoffchar=380+40; yoffchar=185+160; } if(BGNum==10){xoffchar=430+60; yoffchar=270+225;} if(BGNum==31){xoffchar=480+50; yoffchar=336+190;} if(BGNum==22){xoffchar=140+100; yoffchar=365+350;} if(BGNum==23){xoffchar=140+100; yoffchar=365+350;} var xoff=(x128x*2)*zoomvalchar2; var char_xoff2=xoffchar-xoff; var yoff=(x128y*2)*zoomvalchar2; var char_yoff2=yoffchar-yoff; char_xoff2-=((x128w*zoomvalchar2)); char_yoff2-=((x128w*zoomvalchar2)); // if(BGNum!=7 && BGNum!=18){char_yoff2-=((x128w*zoomvalchar2)/2);} if(BGNum==7){char_yoff2=yoffchar+combinedX0.height;} if(BGNum==18){char_yoff2=yoffchar+combinedX0.height;} if(BGNum==9 || BGNum==6 || BGNum==32 || BGNum==10 || BGNum==22 || BGNum==23 || BGNum==25 || BGNum==27 || BGNum==29 || BGNum==31 ) {char_yoff2=yoffchar-((C2res_3*2)*zoomvalchar2)} if(clicked==0 && c2loaded==0){char_xoff2=xoffchar; char_yoff2=yoffchar;}document.getElementById("LoadC2").style.left=char_xoff2+"px"; document.getElementById("LoadC2").style.top=char_yoff2+"px"; var Gchar_xoff2=char_xoff2-(44*zoomvalchar2); var Gchar_yoff2=char_yoff2-(44*zoomvalchar2);document.getElementById("GlowC2").style.left=(Gchar_xoff2)+"px"; document.getElementById("GlowC2").style.top=Gchar_yoff2+"px"; var combinedT = document.getElementById("canvas_Text2");//document.createElement('canvas'); var ctxT = combinedT.getContext("2d");ctxT.clearRect(0, 0, combinedT.width, combinedT.height);var x128xcheck=(x128x*2);var headtextX=(x128xcheck*zoomvalchar2)+char_xoff2+(50*zoomvalchar2);var headtextY=(x128y*zoomvalchar2)+char_yoff2; headtextY-=(200+(15*zoomvalchar2));if(DisplayNames==1){document.getElementById("canvas_Text2").style.display = 'block';}else{document.getElementById("canvas_Text2").style.display = 'none';}if(zoomvalchar2!=-1000){ctxT.shadowColor = "black";ctxT.shadowOffsetX = 0; ctxT.shadowOffsetY = 0; ctxT.shadowBlur = 5;var fsize=25*zoomvalchar2;ctxT.font = "bold "+fsize+"px Arial, Helvetica, sans-serif";ctxT.scale(1,1);ctxT.fillStyle = "white";ctxT.textAlign = "center";ctxT.fillText(""+Char2Name,headtextX,headtextY); }if(clicked==1){$('#Char2div').css('background-position', '-'+Char2x+'px -'+Char2y+'px');$("#Char2div").css('background-image','url('+dataURL+')');$('#Char2div').css('background-size', Char2w+'px ' + Char2h + 'px');}if(xoffchar==0){document.getElementById('GlowC2').style.visibility = 'hidden'; document.getElementById('LoadC2').style.visibility = 'hidden'}}function LoadChar3(clicked){ var activecheck01=document.getElementById("CharSelectDiv").style.opacity; if(activecheck01!=1){return;} if(clicked==1){ var combinedCC = document.getElementById("canvas_CHARCurrent"); var combinedC3 = document.getElementById("canvas_CHAR3");var ctxC3= combinedC3.getContext("2d"); combinedC3.width = 256*2;//combined.width;combinedC3.height = 256*2;//combined.height;ctxC3.drawImage(canvas_StampsB,17,16);ctxC3.drawImage(combinedCC, 0,0);ctxC3.drawImage(canvas_StampsF,17,16);var combinedGC = document.getElementById("canvas_GlowCurrent"); var combinedG1 = document.getElementById("canvas_GlowC3");var ctxG1= combinedG1.getContext("2d"); combinedG1.width = 600;combinedG1.height = 600;ctxG1.drawImage(combinedGC, 0,0);var combinedLC = document.getElementById("canvas_SSJ2Lightning");var combinedL3 = document.getElementById("canvas_LightningC3");var ctxL3= combinedL3.getContext("2d");combinedL3.width = 256*2;//combined.width;combinedL3.height = 256*2;//combined.height;ctxL3.drawImage(combinedLC, 0,0); if(document.getElementById('canvas_red').style.display != 'none') {var combinedKC = document.getElementById("canvas_KaiokenEffect");var combinedK3 = document.getElementById("canvas_KaiokenEffectC3");var combinedKRed = document.getElementById("canvas_red");var ctxK3= combinedK3.getContext("2d"); combinedK3.width = 256*2;//combined.width;combinedK3.height = 256*2;//combined.height;ctxK3.drawImage(combinedKC, 0,0);ctxK3.drawImage(combinedKRed, -44,-44) }var sqltemp=sqlwingstr.split("@"); var adjCrop=[];adjCrop[0]=eval(sqltemp[0])+eval(sqltemp[3]);adjCrop[1]=eval(sqltemp[1])+eval(sqltemp[4]);adjCrop[2]=eval(sqltemp[2])+eval(sqltemp[5]);C3varWingX=adjCrop[0];//varWingX[newp1]; C3varWingY=adjCrop[1];//varWingY[newp1];C3res_3=res_1+res_3;C3varWingSize=adjCrop[2];//varWingSize[newp1];c3loaded=1;Char3x=Char1x; Char3y=Char1y;Char3w=Char1w; Char3h=Char1h;Char3Name=document.getElementById("fnametxt").innerHTML; } document.getElementById('GlowC3').style.visibility = 'visible'; document.getElementById('LoadC3').style.zIndex = 80;var zoomvalchar3=-1000;var x128x=C3varWingX;var x128y=C3varWingY;if(BGNum!=7 && BGNum!=18){x128y=C3varWingY;}var x128w=C3varWingSize;//if(clicked==0 && c3loaded==0){x128y=64; x128x=32; x128w=2;}if(BGNum==10){zoomvalchar3=(195/512);}if(BGNum==31){zoomvalchar3=(215/512);}if(BGNum==22){zoomvalchar3=(175/512);}if(BGNum==23){zoomvalchar3=(175/512);}// if(clicked==0 && c3loaded==0){ var oldzoom=zoomvalchar3; zoomvalchar3=0.2;} var combinedX = document.getElementById('canvas_CHAR3'); var dataURL = combinedX.toDataURL('image/png');var combinedX0 = document.createElement('canvas');var ctxX = combinedX0.getContext("2d");// flip context horizontally combinedX0.width = 512;combinedX0.height = 512;if(BGNum==10){ ctxX.scale(-1,1); ctxX.drawImage(combinedX, -512, 0); ctxX.drawImage(combinedX, 612, 0);}if(BGNum==31){ ctxX.scale(-1,1); ctxX.drawImage(combinedX, -512, 0); ctxX.drawImage(combinedX, 612, 0);}if(BGNum==22){ ctxX.scale(-1,1); ctxX.drawImage(combinedX, -512, 0); ctxX.drawImage(combinedX, 612, 0);}if(BGNum==23){ ctxX.scale(-1,1); ctxX.drawImage(combinedX, -512, 0); ctxX.drawImage(combinedX, 612, 0);}var combinedLightning = document.getElementById("canvas_LightningC3");var combinedKaiokenEffect = document.getElementById("canvas_KaiokenEffectC3");if(BGNum==10 || BGNum==22 || BGNum==23 || BGNum==31){ctxX.drawImage(combinedLightning, -512, 0);ctxX.drawImage(combinedKaiokenEffect, 0, 0);}else{ctxX.drawImage(combinedLightning, 0, 0);ctxX.drawImage(combinedKaiokenEffect, 0, 0);}if(clicked==-1 || BGNum==8){ ctxX.clearRect(0, 0, combinedX0.width, combinedX0.height);}document.getElementById("LoadC3").src = combinedX0.toDataURL();var combinedG1 = document.getElementById("canvas_GlowC3");var combinedG0 = document.createElement('canvas');var ctxX = combinedG0.getContext("2d");combinedG0.width = 600;combinedG0.height = 600;var check090=0;if(BGNum==10){ ctxX.scale(-1,1); ctxX.drawImage(combinedG1, -600, 0); //ctxX.drawImage(combinedG1, 612, 0); check090=1;}if(BGNum==31){ ctxX.scale(-1,1); ctxX.drawImage(combinedG1, -600, 0); //ctxX.drawImage(combinedG1, 612, 0); check090=1;}if(BGNum==22){ ctxX.scale(-1,1); ctxX.drawImage(combinedG1, -600, 0); //ctxX.drawImage(combinedG1, 612, 0); check090=1;}if(BGNum==23){ ctxX.scale(-1,1); ctxX.drawImage(combinedG1, -600, 0); //ctxX.drawImage(combinedG1, 612, 0); check090=1;}if(clicked==-1 || BGNum==8){ var ctxG0 = combinedG0.getContext("2d"); ctxG0.clearRect(0, 0, combinedG0.width, combinedG0.height); document.getElementById('GlowC3').style.visibility = 'hidden';}if(check090==0){ctxX.drawImage(combinedG1, 0, 0);}document.getElementById("GlowC3").src = combinedG0.toDataURL();var combinedX2 = document.getElementById('canvas_CHAR3');$(LoadC3).css("height", combinedX2.height*zoomvalchar3);$(LoadC3).css("width", combinedX2.width*zoomvalchar3);$(GlowC3).css("height", 600*zoomvalchar3);$(GlowC3).css("width", 600*zoomvalchar3);xoffchar=0; yoffchar=0; if(BGNum==10){xoffchar=30+40; yoffchar=240+160; } if(BGNum==31){xoffchar=25+40; yoffchar=290+210; } if(BGNum==22){xoffchar=100+100; yoffchar=370+160; } if(BGNum==23){xoffchar=100+100; yoffchar=370+160; } var xoff=(x128x*2)*zoomvalchar3; var char_xoff2=xoffchar-xoff; var yoff=(x128y*2)*zoomvalchar3; var char_yoff2=yoffchar-yoff; char_xoff2-=((x128w*zoomvalchar3)); char_yoff2-=((x128w*zoomvalchar3)); if(BGNum==10 || BGNum==22 || BGNum==23 || BGNum==31 ){char_yoff2=yoffchar-((C3res_3*2)*zoomvalchar3)} if(clicked==0 && c4loaded==0){char_xoff2=xoffchar; char_yoff2=yoffchar;}document.getElementById("LoadC3").style.left=char_xoff2+"px"; document.getElementById("LoadC3").style.top=char_yoff2+"px"; var Gchar_xoff2=char_xoff2-(44*zoomvalchar3); var Gchar_yoff2=char_yoff2-(44*zoomvalchar3);document.getElementById("GlowC3").style.left=(Gchar_xoff2)+"px"; document.getElementById("GlowC3").style.top=Gchar_yoff2+"px"; var combinedT = document.getElementById("canvas_Text3");//document.createElement('canvas'); var ctxT = combinedT.getContext("2d");ctxT.clearRect(0, 0, combinedT.width, combinedT.height);var x128xcheck=(x128x*2);var headtextX=(x128xcheck*zoomvalchar3)+char_xoff2+(50*zoomvalchar3);var headtextY=(x128y*zoomvalchar3)+char_yoff2; headtextY-=(200+(15*zoomvalchar3));if(DisplayNames==1){document.getElementById("canvas_Text3").style.display = 'block';}else{document.getElementById("canvas_Text3").style.display = 'none';}if(zoomvalchar3!=-1000){ctxT.shadowColor = "black";ctxT.shadowOffsetX = 0; ctxT.shadowOffsetY = 0; ctxT.shadowBlur = 5;var fsize=25*zoomvalchar3;ctxT.font = "bold "+fsize+"px Arial, Helvetica, sans-serif";ctxT.scale(1,1);ctxT.fillStyle = "white";ctxT.textAlign = "center";ctxT.fillText(""+Char3Name,headtextX,headtextY); }if(clicked==1){$('#Char3div').css('background-position', '-'+Char3x+'px -'+Char3y+'px');$("#Char3div").css('background-image','url('+dataURL+')');$('#Char3div').css('background-size', Char3w+'px ' + Char3h + 'px');}if(BGNum==6 || BGNum==32 || BGNum==18 || BGNum==25 || BGNum==27 || BGNum==29){ document.getElementById('GlowC3').style.visibility = 'hidden'; document.getElementById('LoadC3').style.visibility = 'hidden';}if(xoffchar==0){document.getElementById('GlowC3').style.visibility = 'hidden'; document.getElementById('LoadC3').style.visibility = 'hidden'}}function LoadChar4(clicked){ var activecheck01=document.getElementById("CharSelectDiv").style.opacity; if(activecheck01!=1){return;} if(clicked==1){ var combinedCC = document.getElementById("canvas_CHARCurrent"); var combinedC4 = document.getElementById("canvas_CHAR4");var ctxC4= combinedC4.getContext("2d"); combinedC4.width = 256*2;//combined.width;combinedC4.height = 256*2;//combined.height;ctxC4.drawImage(canvas_StampsB,17,16);ctxC4.drawImage(combinedCC, 0,0);ctxC4.drawImage(canvas_StampsF,17,16);var combinedGC = document.getElementById("canvas_GlowCurrent"); var combinedG1 = document.getElementById("canvas_GlowC4");var ctxG1= combinedG1.getContext("2d"); combinedG1.width = 600;combinedG1.height = 600;ctxG1.drawImage(combinedGC, 0,0);var combinedLC = document.getElementById("canvas_SSJ2Lightning");var combinedL4 = document.getElementById("canvas_LightningC4");var ctxL4= combinedL4.getContext("2d");combinedL4.width = 256*2;//combined.width;combinedL4.height = 256*2;//combined.height;ctxL4.drawImage(combinedLC, 0,0); if(document.getElementById('canvas_red').style.display != 'none') {var combinedKC = document.getElementById("canvas_KaiokenEffect");var combinedK4 = document.getElementById("canvas_KaiokenEffectC4");var combinedKRed = document.getElementById("canvas_red");var ctxK4= combinedK4.getContext("2d"); combinedK4.width = 256*2;//combined.width;combinedK4.height = 256*2;//combined.height;ctxK4.drawImage(combinedKC, 0,0);ctxK4.drawImage(combinedKRed, -44,-44) }var sqltemp=sqlwingstr.split("@"); var adjCrop=[];adjCrop[0]=eval(sqltemp[0])+eval(sqltemp[3]);adjCrop[1]=eval(sqltemp[1])+eval(sqltemp[4]);adjCrop[2]=eval(sqltemp[2])+eval(sqltemp[5]);C4varWingX=adjCrop[0];//varWingX[newp1]; C4varWingY=adjCrop[1];//varWingY[newp1];C4res_3=res_1+res_3;C4varWingSize=adjCrop[2];//varWingSize[newp1];c4loaded=1;Char4x=Char1x; Char4y=Char1y;Char4w=Char1w; Char4h=Char1h;Char4Name=document.getElementById("fnametxt").innerHTML;} document.getElementById('GlowC4').style.visibility = 'visible'; document.getElementById('LoadC4').style.zIndex = 80;var zoomvalchar4=-1000;//zoomvalchar;var x128x=C4varWingX;var x128y=C4varWingY;if(BGNum!=7 && BGNum!=18){x128y=C4varWingY;}var x128w=C4varWingSize;//if(clicked==0 && c4loaded==0){x128y=64; x128x=32; x128w=2;}if(BGNum==10){zoomvalchar4=(135/512);}if(BGNum==31){zoomvalchar4=(195/512);} if(clicked==0 && c4loaded==0){ var oldzoom=zoomvalchar4; zoomvalchar4=0.2;} var combinedX = document.getElementById('canvas_CHAR4'); var dataURL = combinedX.toDataURL('image/png');var combinedX0 = document.createElement('canvas');var ctxX = combinedX0.getContext("2d");// flip context horizontally combinedX0.width = 512;combinedX0.height = 512;if(BGNum==10){ctxX.drawImage(combinedX, 0, 0);}if(BGNum==31){ctxX.drawImage(combinedX, 0, 0);}var combinedLightning = document.getElementById("canvas_LightningC4");ctxX.drawImage(combinedLightning, 0, 0);var combinedKaiokenEffect = document.getElementById("canvas_KaiokenEffectC4");ctxX.drawImage(combinedKaiokenEffect, 0, 0);var combinedG1 = document.getElementById("canvas_GlowC4");//if(clicked==-1 || BGNum==8){ var ctxG1 = combinedG1.getContext("2d"); ctxG1.clearRect(0, 0, combinedG1.width, combinedG1.height);}document.getElementById("GlowC4").src = combinedG1.toDataURL();if(clicked==-1){ ctxX.clearRect(0, 0, combinedX0.width, combinedX0.height);}document.getElementById("LoadC4").src = combinedX0.toDataURL();if(clicked==0 && c4loaded==0){$("#Char4div").css('background-image','url(PlusMarkS2.png)'); document.getElementById('LoadC4').style.zIndex = 900;}var combinedX2 = document.getElementById('canvas_CHAR4');$(LoadC4).css("height", combinedX2.height*zoomvalchar4);$(LoadC4).css("width", combinedX2.width*zoomvalchar4);$(GlowC4).css("height", 600*zoomvalchar4);$(GlowC4).css("width", 600*zoomvalchar4);xoffchar=0; yoffchar=0; if(BGNum==10){xoffchar=360+80; yoffchar=265+100; }if(BGNum==31){xoffchar=318+45; yoffchar=320+180; } var xoff=(x128x*2)*zoomvalchar4; var char_xoff2=xoffchar-xoff; var yoff=(x128y*2)*zoomvalchar4; var char_yoff2=yoffchar-yoff; char_xoff2-=((x128w*zoomvalchar4)); char_yoff2-=((x128w*zoomvalchar4)); if(BGNum==10 || BGNum==31){char_yoff2=yoffchar-((C4res_3*2)*zoomvalchar4)} if(clicked==0 && c4loaded==0){char_xoff2=xoffchar; char_yoff2=yoffchar;}document.getElementById("LoadC4").style.left=char_xoff2+"px"; document.getElementById("LoadC4").style.top=char_yoff2+"px"; var Gchar_xoff2=char_xoff2-(44*zoomvalchar4); var Gchar_yoff2=char_yoff2-(44*zoomvalchar4);document.getElementById("GlowC4").style.left=(Gchar_xoff2)+"px"; document.getElementById("GlowC4").style.top=Gchar_yoff2+"px"; var combinedT = document.getElementById("canvas_Text4");//document.createElement('canvas'); var ctxT = combinedT.getContext("2d");ctxT.clearRect(0, 0, combinedT.width, combinedT.height);var x128xcheck=(x128x*2);var headtextX=(x128xcheck*zoomvalchar4)+char_xoff2+(50*zoomvalchar4);var headtextY=(x128y*zoomvalchar4)+char_yoff2; headtextY-=(200+(15*zoomvalchar4));if(DisplayNames==1){document.getElementById("canvas_Text4").style.display = 'block';}else{document.getElementById("canvas_Text4").style.display = 'none';}if(zoomvalchar4!=-1000){ctxT.shadowColor = "black";ctxT.shadowOffsetX = 0; ctxT.shadowOffsetY = 0; ctxT.shadowBlur = 5;var fsize=25*zoomvalchar4;ctxT.font = "bold "+fsize+"px Arial, Helvetica, sans-serif";ctxT.scale(1,1);ctxT.fillStyle = "white";ctxT.textAlign = "center";ctxT.fillText(""+Char4Name,headtextX,headtextY); }if(clicked==1){$('#Char4div').css('background-position', '-'+Char4x+'px -'+Char4y+'px');$("#Char4div").css('background-image','url('+dataURL+')');$('#Char4div').css('background-size', Char4w+'px ' + Char4h + 'px');}if(BGNum==6 || BGNum==32 || BGNum==18 || BGNum==25 || BGNum==27 || BGNum==29 ){ document.getElementById('GlowC4').style.visibility = 'hidden'; document.getElementById('LoadC4').style.visibility = 'hidden';}if(xoffchar==0){document.getElementById('GlowC4').style.visibility = 'hidden'; document.getElementById('LoadC4').style.visibility = 'hidden'}}function KaiokenOn(){ if(document.getElementById('canvas_red').style.display == 'none') {resetanm();}else{KKOff();}}function removeBlanks(imgWidth, imgHeight, canvasid, destcanvas) { var canvas = document.getElementById(canvasid); var context = canvas.getContext("2d"); var imageData = context.getImageData(0, 0, imgWidth, imgHeight), data = imageData.data, getRBG = function(x, y) { var offset = imgWidth * y + x; return { red: data[offset * 4], green: data[offset * 4 + 1], blue: data[offset * 4 + 2], opacity: data[offset * 4 + 3] }; }, isWhite = function (rgb) { // many images contain noise, as the white is not a pure #fff white return rgb.red ==0 && rgb.green ==0 && rgb.blue ==0 ; }, scanY = function (fromTop) { var offset = fromTop ? 1 : -1; // loop through each row for(var y = fromTop ? 0 : imgHeight - 1; fromTop ? (y < imgHeight) : (y > -1); y += offset) { // loop through each column for(var x = 0; x < imgWidth; x++) { var rgb = getRBG(x, y); if (!isWhite(rgb)) { return y; } } } return null; // all image is white }, scanX = function (fromLeft) { var offset = fromLeft? 1 : -1; // loop through each column for(var x = fromLeft ? 0 : imgWidth - 1; fromLeft ? (x < imgWidth) : (x > -1); x += offset) { // loop through each row for(var y = 0; y < imgHeight; y++) { var rgb = getRBG(x, y); if (!isWhite(rgb)) { return x; } } } return null; // all image is white }; var cropTop = scanY(true), cropBottom = scanY(false), cropLeft = scanX(true), cropRight = scanX(false), cropWidth = cropRight - cropLeft, cropHeight = cropBottom - cropTop; var $croppedCanvas = $("#"+destcanvas).attr({ width: cropWidth, height: cropHeight }); // finally crop the guy $croppedCanvas[0].getContext("2d").drawImage(canvas, cropLeft, cropTop, cropWidth, cropHeight, 0, 0, cropWidth, cropHeight); /* $("body"). append("

same image with white spaces cropped:

"). append($croppedCanvas); */ console.log(cropTop, cropBottom, cropLeft, cropRight);};function saveall(type){///alert("saveAll Started"); // if(ss==1){resetanmSSJ();} firstload=1; var combined = document.getElementById("combined");var ctx = combined.getContext("2d"); ctx.imageSmoothingEnabled= false; ctx.mozImageSmoothingEnabled = false; ctx.globalCompositeOperation = "source-over"; combined.width = document.getElementById("bgimg").width;combined.height = document.getElementById("bgimg").height; ctx.shadowOffsetX = 0; ctx.shadowOffsetY = 0; ctx.clearRect(0, 0, combined.width, combined.height);ctx.globalAlpha = 1;var xoff=document.getElementById("canvas_FullHairShadow").style.left;var yoff=document.getElementById("canvas_FullHairShadow").style.top;xoff= xoff.replace(/px/g, "");xoff=parseFloat(xoff);var xoff2= xoff+200;yoff= yoff.replace(/px/g, "");yoff=parseFloat(yoff);yoff-=200;var yoff2= yoff+200; var xoff3=xoff2+(res_0*zoomval); var yoff3=yoff2+(res_1*zoomval); var xoff3=document.getElementById("canvas_MainShadow").style.left;var yoff3=document.getElementById("canvas_MainShadow").style.top;xoff3= xoff3.replace(/px/g, "");xoff3=parseFloat(xoff3);yoff3= yoff3.replace(/px/g, "");yoff3=parseFloat(yoff3);yoff3-=200; // xoff3=xoff; // yoff3=xoff;//////////////////////////////////////////////var tempofx=Wxoffset*zoomval;//alert("newoffsetx="+tempofx);//tempofx=parseInt(tempofx, 10);//alert("newoffsetx="+tempofx);tempofx=xoff2;//alert("newoffsetx="+tempofx);var tempofy=Wyoffset*zoomval;tempofy=yoff2;/*var tailoffx_2= tes_posx2;var tailoffy_2= tes_posy2;tailoffx_2+=(44/2);tailoffy_2-=(35/2);tailoffx_2=tailoffx_2*zoomval;tailoffy_2=tailoffy_2*zoomval;*/var tailoffx_2=document.getElementById("canvas_TailsShadow").style.left;var tailoffy_2=document.getElementById("canvas_TailsShadow").style.top;tailoffx_2=tailoffx_2.replace(/px/g, "");tailoffy_2=tailoffy_2.replace(/px/g, "");tailoffy_2-=200;if(tailoffx_2<=-5000){tailoffx_2=1;}if(tailoffy_2<=0){tailoffy_2=1;}var wingoffx_2=document.getElementById("canvas_WingsShadow").style.left;var wingoffy_2=document.getElementById("canvas_WingsShadow").style.top;wingoffx_2=wingoffx_2.replace(/px/g, "");wingoffy_2=wingoffy_2.replace(/px/g, "");wingoffy_2-=200;if(wingoffx_2<=-5000){wingoffx_2=1;}if(wingoffy_2<=0){wingoffy_2=1;}var capeoffx_2=document.getElementById("canvas_CapesShadow").style.left;var capeoffy_2=document.getElementById("canvas_CapesShadow").style.top;capeoffx_2=capeoffx_2.replace(/px/g, "");capeoffy_2=capeoffy_2.replace(/px/g, "");capeoffy_2-=200;if(capeoffx_2<=-5000){capeoffx_2=1;}if(capeoffy_2<=0){capeoffy_2=1;}var mustashoffx_2=document.getElementById("canvas_MustashShadow").style.left;var mustashoffy_2=document.getElementById("canvas_MustashShadow").style.top;mustashoffx_2=mustashoffx_2.replace(/px/g, "");mustashoffy_2=mustashoffy_2.replace(/px/g, "");mustashoffy_2-=200;////////////////////////////////////////////////////////////////////// combined.width = 600; //document.getElementById("bgimg").width;combined.height = 600; //document.getElementById("bgimg").height;ctx.shadowOffsetX = 0; ctx.shadowOffsetY = 0; ctx.shadowBlur = 0;ctx.clearRect(0, 0, combined.width, combined.height); ctx.globalCompositeOperation = "source-over"; //ctx.drawImage(combined, 0, 0);/////ctx.drawImage(canvas_TailsP, tailoffx_2, tailoffy_2);ctx.drawImage(canvas_TailsB, tailoffx_2, tailoffy_2);ctx.drawImage(canvas_TailsG, tailoffx_2, tailoffy_2);ctx.drawImage(canvas_TailsR, tailoffx_2, tailoffy_2);ctx.drawImage(canvas_TailsY, tailoffx_2, tailoffy_2);ctx.drawImage(canvas_TailsShadow, tailoffx_2, tailoffy_2);ctx.drawImage(canvas_TailsLeftovers, tailoffx_2, tailoffy_2);ctx.drawImage(canvas_CapesP, capeoffx_2, capeoffy_2);ctx.drawImage(canvas_CapesB, capeoffx_2, capeoffy_2);ctx.drawImage(canvas_CapesG, capeoffx_2, capeoffy_2);ctx.drawImage(canvas_CapesR, capeoffx_2, capeoffy_2);ctx.drawImage(canvas_CapesY, capeoffx_2, capeoffy_2);ctx.drawImage(canvas_CapesShadow, capeoffx_2, capeoffy_2);ctx.drawImage(canvas_CapesLeftovers, capeoffx_2, capeoffy_2);ctx.drawImage(canvas_WingsP, wingoffx_2, wingoffy_2);ctx.drawImage(canvas_WingsB, wingoffx_2, wingoffy_2);ctx.drawImage(canvas_WingsG, wingoffx_2, wingoffy_2);ctx.drawImage(canvas_WingsR, wingoffx_2, wingoffy_2);ctx.drawImage(canvas_WingsY, wingoffx_2, wingoffy_2);ctx.drawImage(canvas_WingsShadow, wingoffx_2, wingoffy_2);ctx.drawImage(canvas_WingsLeftovers, wingoffx_2, wingoffy_2);//ctx.drawImage(canvas_MustashShadow, xoff3, yoff3);ctx.drawImage(canvas_BackR, xoff3, yoff3);ctx.drawImage(canvas_BackY, xoff3, yoff3);ctx.drawImage(canvas_BackB, xoff3, yoff3);ctx.drawImage(canvas_BackShadow, xoff3, yoff3);ctx.drawImage(canvas_BackG, xoff3, yoff3);ctx.drawImage(canvas_BackShadow, xoff3, yoff3);ctx.drawImage(canvas_BackLeftovers, xoff3, yoff3); ctx.drawImage(canvas_FullBackHairP, xoff, yoff);ctx.drawImage(canvas_FullBackHairB, xoff, yoff);ctx.drawImage(canvas_FullBackHairG, xoff, yoff);ctx.drawImage(canvas_FullBackHairR, xoff, yoff);ctx.drawImage(canvas_FullBackHairY, xoff, yoff);ctx.drawImage(canvas_FullBackHairShadow, xoff, yoff);ctx.drawImage(canvas_FullBackHairLeftovers, xoff, yoff);ctx.drawImage(canvas_MainR, xoff3, yoff3);ctx.drawImage(canvas_MainY, xoff3, yoff3);ctx.drawImage(canvas_MainB, xoff3, yoff3);ctx.drawImage(canvas_MainG, xoff3, yoff3);ctx.drawImage(canvas_MainP, xoff3, yoff3);ctx.drawImage(canvas_MainShadow, xoff3, yoff3);ctx.drawImage(canvas_MainLeftovers, xoff3, yoff3);ctx.drawImage(canvas_MainR, xoff3, yoff3);ctx.drawImage(canvas_MainY, xoff3, yoff3);ctx.drawImage(canvas_MainB, xoff3, yoff3);ctx.drawImage(canvas_MainG, xoff3, yoff3);ctx.drawImage(canvas_MainP, xoff3, yoff3);ctx.drawImage(canvas_MainShadow, xoff3, yoff3);ctx.drawImage(canvas_MainLeftovers, xoff3, yoff3);//ctx.drawImage(canvas_Mustash, mustashoffx_2, mustashoffy_2);//ctx.drawImage(canvas_MustashShadow, mustashoffx_2, mustashoffy_2);ctx.drawImage(canvas_MustashP, mustashoffx_2, mustashoffy_2);ctx.drawImage(canvas_MustashB, mustashoffx_2, mustashoffy_2);ctx.drawImage(canvas_MustashG, mustashoffx_2, mustashoffy_2);ctx.drawImage(canvas_MustashR, mustashoffx_2, mustashoffy_2);ctx.drawImage(canvas_MustashY, mustashoffx_2, mustashoffy_2);ctx.drawImage(canvas_MustashShadow, mustashoffx_2, mustashoffy_2);ctx.drawImage(canvas_MustashLeftovers, mustashoffx_2, mustashoffy_2);ctx.drawImage(canvas_FrontR, xoff3, yoff3);ctx.drawImage(canvas_FrontY, xoff3, yoff3);ctx.drawImage(canvas_FrontB, xoff3, yoff3);ctx.drawImage(canvas_FrontG, xoff3, yoff3);ctx.drawImage(canvas_FrontLeftovers, xoff3, yoff3);ctx.drawImage(canvas_FrontP, xoff3, yoff3);ctx.drawImage(canvas_FrontShadow, xoff3, yoff3);if(IsBald==1){ctx.drawImage(canvas_FullHairP, xoff, yoff);ctx.drawImage(canvas_FullHairB, xoff, yoff);ctx.drawImage(canvas_FullHairG, xoff, yoff);ctx.drawImage(canvas_FullHairR, xoff, yoff);ctx.drawImage(canvas_FullHairY, xoff, yoff);ctx.drawImage(canvas_FullHairShadow, xoff, yoff);ctx.drawImage(canvas_FullHairLeftovers, xoff, yoff);}if(BGNum==30000000000000)//USED BELOW FOR ADDING TEXT TO CANVAS{ctx.shadowColor = "rgb(215,207,175)";ctx.shadowOffsetX = 2; ctx.shadowOffsetY = 2; ctx.shadowBlur = 0;ctx.font = "12px pkmfont";ctx.scale(1,1);ctx.fillStyle = "rgb(66,66,66)";ctx.textAlign = "left";ctx.fillText(nameStr[p1],48,68,156); ctx.shadowColor = "rgb(215,207,175)";ctx.shadowOffsetX = 2; ctx.shadowOffsetY = 2; ctx.shadowBlur = 0;ctx.font = "12px pkmfont";ctx.fillStyle = "rgb(66,66,66)";ctx.textAlign = "left";ctx.fillText("Lv8",210,68); ctx.shadowColor = "rgb(64,72,120)";ctx.shadowOffsetX = 2; ctx.shadowOffsetY = 2; ctx.shadowBlur = 0;ctx.font = "11px pkmfont";ctx.fillStyle = "rgb(254,254,254)";ctx.textAlign = "left";ctx.fillText("A wild "+nameStr[p1]+" has appeared!",30,315); } var combinedG = document.createElement('canvas');var ctxG = combinedG.getContext("2d"); combinedG.width = combined.width;combinedG.height = combined.height; ctxG.imageSmoothingEnabled= false; ctxG.mozImageSmoothingEnabled = false; ctxG.globalCompositeOperation = "source-over";ctxG.shadowColor = "#feb120";ctxG.shadowOffsetX = 0; ctxG.shadowOffsetY = 0; ctxG.shadowBlur = 4;ctxG.drawImage(combined, 0, 0);ctxG.drawImage(combined, 0, 0); // set composite mode ctxG.globalCompositeOperation = "source-in"; // draw color /////////////////////////////////////////////////////////////////////if(ss==0){ctxG.fillStyle = "#09f";}if(ss==1){ctxG.fillStyle = "#FFF400";}if(ss==2){ctxG.fillStyle = "#FFF400";}if(ss==3){ctxG.fillStyle = "#FFF400";}if(ss==4){ ctxG.fillStyle = "#feb120";}if(ss==5){ctxG.fillStyle = "#F02";}if(ss==6){ctxG.fillStyle = "#ffffff";}if(ss==7){ctxG.fillStyle = "#ffffff";} if(ss==8){ctxG.fillStyle = "#ffffff";} if(ss==9){ctxG.fillStyle = "#ffffff";} if(ss==10){ctxG.fillStyle = "#ffffff";} if(ss==11){ctxG.fillStyle = "#ffffff";} if(ss==12){ctxG.fillStyle = "#ffffff";} ctxG.fillRect(0, 0, 608, 505); document.getElementById("image6").src = combinedG.toDataURL();if(BGNum==1){ document.getElementById("image6").style.display = "block"; document.getElementById("image3").style.display = "block"; document.getElementById("imageBlue").style.display = "block"; document.getElementById("imageBlue2").style.display = "block";} // set composite mode ctxG.globalCompositeOperation = "source-in"; var combinedG2 = document.createElement('canvas');var ctxG2 = combinedG2.getContext("2d"); combinedG2.width = combined.width;combinedG2.height = combined.height; ctxG2.imageSmoothingEnabled= false; ctxG2.mozImageSmoothingEnabled = false; ctxG2.globalCompositeOperation = "source-over";if(ss==0){ctxG2.shadowColor = "#09f"; ctxG.globalAlpha=0;}if(ss==1){ctxG2.shadowColor = "#F02"; ctxG.globalAlpha=0;}if(ss==2){ctxG2.shadowColor = "#F02"; ctxG.globalAlpha=0;}if(ss==3){ctxG2.shadowColor = "#FFF400";}if(ss==4){ctxG2.shadowColor = "#F02";}if(ss==5){ ctxG2.shadowColor = "#feb120";}if(ss==6){ ctxG2.shadowColor = "#0696f8";}if(ss==7){ ctxG2.shadowColor = "#7920cb";}if(ss==8){ }if(ss==9){ }if(ss==10){ }if(ss==11){ }if(ss==12){ }ctxG2.shadowOffsetX = 0; ctxG2.shadowOffsetY = 0; ctxG2.shadowBlur = 11;if(ss==4){ctxG2.shadowBlur = 40; ctxG2.globalAlpha=0.95; ctxG2.drawImage(combined, 0, 0);}if(ss==5){ctxG2.shadowBlur = 25; ctxG2.globalAlpha=0.98; ctxG2.drawImage(combined, 0, 0);}if(ss==6){ctxG2.shadowBlur = 10; ctxG2.globalAlpha=1; ctxG2.drawImage(combined, 0, 0); ctxG2.drawImage(combined, 0, 0); ctxG2.drawImage(combined, 0, 0); ctxG2.drawImage(combined, 0, 0);ctxG2.drawImage(combined, 0, 0); ctxG2.drawImage(combined, 0, 0); ctxG2.drawImage(combined, 0, 0);}if(ss==7){ctxG2.shadowBlur = 7; ctxG2.globalAlpha=1; ctxG2.drawImage(combined, 0, 0); ctxG2.drawImage(combined, 0, 0); ctxG2.drawImage(combined, 0, 0); ctxG2.drawImage(combined, 0, 0);ctxG2.drawImage(combined, 0, 0); ctxG2.drawImage(combined, 0, 0); ctxG2.drawImage(combined, 0, 0);}ctxG2.drawImage(combined, 0, 0); // set composite mode ctxG2.globalCompositeOperation = "source-in"; // draw color if(ss==0){ctxG2.fillStyle = "#09f";}if(ss==1){ctxG2.fillStyle = "#FFF400";}if(ss==2){ctxG2.fillStyle = "#FFF400";}if(ss==3){ctxG2.fillStyle = "#FFF400";} if(ss==4){ctxG2.fillStyle = "#F02";} if(ss==5){ ctxG2.fillStyle = "#feb120";}if(ss==6){ ctxG2.fillStyle = "#0696f8";}if(ss==7){ ctxG2.fillStyle = "#7920cb";}if(ss==8){ ctxG2.fillStyle = "#7920cb";}if(ss==9){ ctxG2.fillStyle = "#7920cb";}if(ss==10){ ctxG2.fillStyle = "#7920cb";}if(ss==11){ ctxG2.fillStyle = "#7920cb";}if(ss==12){ ctxG2.fillStyle = "#7920cb";}//////////////////////////////////////////////////////////////////////////////////// ctxG2.fillRect(0, 0, 608, 505); if(ss==6 || ss==7){ // set composite mode ctxG.globalCompositeOperation = "source-in"; var combinedG3 = document.createElement('canvas');var ctxG3 = combinedG3.getContext("2d"); combinedG3.width = combined.width;combinedG3.height = combined.height; ctxG3.imageSmoothingEnabled= false; ctxG3.mozImageSmoothingEnabled = false; ctxG3.globalCompositeOperation = "source-over"; ctxG3.shadowColor = "#1d28f9"; if(ss==7){ctxG3.shadowColor = "#bb0b39";}ctxG3.shadowOffsetX = 0; ctxG3.shadowOffsetY = 0; ctxG3.shadowBlur = 14;ctxG3.shadowBlur = 14; ctxG3.globalAlpha=1; ctxG3.drawImage(combined, 0, 0); ctxG3.drawImage(combined, 0, 0);ctxG3.drawImage(combined, 0, 0); // set composite mode ctxG3.globalCompositeOperation = "source-in";ctxG3.fillStyle = "#1d28f9"; if(ss==7){ctxG3.fillStyle = "#bb0b39";}//////////////////////////////////////////////////////////////////////////////////// ctxG3.fillRect(0, 0, 608, 505); // set composite mode ctxG.globalCompositeOperation = "source-in"; var combinedG4 = document.createElement('canvas');var ctxG4 = combinedG4.getContext("2d"); combinedG4.width = combined.width;combinedG4.height = combined.height; ctxG4.imageSmoothingEnabled= false; ctxG4.mozImageSmoothingEnabled = false; ctxG4.globalCompositeOperation = "source-over"; ctxG4.shadowColor = "#FFF400"; if(ss==7){ctxG4.fillStyle = "#bb0b39";}ctxG4.shadowOffsetX = 0; ctxG4.shadowOffsetY = 0; ctxG4.shadowBlur = 15; ctxG4.globalAlpha=1; ctxG4.drawImage(combined, 0, 0); ctxG4.drawImage(combined, 0, 0); ctxG4.drawImage(combined, 0, 0); ctxG4.drawImage(combined, 0, 0); ctxG4.drawImage(combined, 0, 0); ctxG4.drawImage(combined, 0, 0); ctxG4.drawImage(combined, 0, 0); // set composite mode ctxG4.globalCompositeOperation = "source-in";ctxG4.fillStyle = "#FFF400"; if(ss==7){ctxG4.fillStyle = "#bb0b39";}//////////////////////////////////////////////////////////////////////////////////// ctxG4.fillRect(0, 0, 608, 505); } else {var combinedG3 = document.createElement('canvas');var ctxG3 = combinedG3.getContext("2d");combinedG3.width = combined.width; combinedG3.height = combined.height;ctxG3.clearRect(0, 0, canvas.width, canvas.height); var combinedG4 = document.createElement('canvas');var ctxG4 = combinedG4.getContext("2d");combinedG4.width = combined.width; combinedG4.height = combined.height;ctxG4.clearRect(0, 0, canvas.width, canvas.height); }//////////////////////////////////////////////////////////////////////////////////// var combinedCC = document.getElementById("canvas_CHARCurrent");var ctxCC= combinedCC.getContext("2d"); combinedCC.width = 256*2;//combined.width;combinedCC.height = 256*2;//combined.height;ctxCC.drawImage(combined, 0, 0);var dataURL = combinedCC.toDataURL('image/png');/* var combinedC1 = document.getElementById("canvas_CHAR1");var ctxC1= combinedC1.getContext("2d"); combinedC1.width = 256*2;//combined.width;combinedC1.height = 256*2;//combined.height;ctxC1.drawImage(combined, 0,0);*/var combinedX = document.createElement('canvas');var ctxX = combinedX.getContext("2d"); combinedX.width = combined.width;combinedX.height = combined.height; var imgbg = new Image;imgbg.src = document.getElementById("bgimg").src; ctxX.drawImage(imgbg, 0, 0,document.getElementById("bgimg").width,document.getElementById("bgimg").height);ctxX.drawImage(combinedG4, 0, 0); ctxX.drawImage(combinedG3, 0, 0);ctxX.drawImage(combinedG2, 0, 0);ctxX.drawImage(combinedG, 0, 0);ctxX.drawImage(combined, 0, 0);if(type==6){ ctxX.globalAlpha = 0.3; ctxX.drawImage(imgbg, 0, 0,document.getElementById("bgimg").width,document.getElementById("bgimg").height);}if(type==2){ ctxX.globalAlpha = 0.7; ctxX.drawImage(imgbg, 0, 0,document.getElementById("bgimg").width,document.getElementById("bgimg").height); }var combined = document.getElementById("combined");var ctx = combined.getContext("2d"); combined.width = combinedX.width;combined.height = combinedX.height;ctx.drawImage(combinedX, 0, 0); if(ss==8 || ss==9|| ss==10|| ss==11|| ss==12){ var combinedcav = document.getElementById("canvas_CHARCurrent"); img000 = combinedcav; ctxG2.clearRect(0, 0, combinedG2.width, combinedG2.height); var ctxX = combinedX.getContext("2d"); var canvasCA = document.getElementById("canvas_RFh_G5"); var ctxCA = canvasCA.getContext("2d"); ctxCA.clearRect(0, 0, 600, 600); var canvasCA = document.getElementById("canvas_RFh_G3"); var ctxCA = canvasCA.getContext("2d"); ctxCA.clearRect(0, 0, 600, 600); var canvasCA = document.getElementById("canvas_RFh_G4"); var ctxCA = canvasCA.getContext("2d"); ctxCA.clearRect(0, 0, 600, 600); makeAuraWhite('canvas_RFh_G5',3,"white","auramaker"); makeAura('canvas_RFh_G3',48,"canvas_CHARCurrent"); makeAura('canvas_RFh_G4',28,"canvas_CHARCurrent"); combinedG2 = document.createElement('canvas'); ctxG2 = combinedG2.getContext("2d"); ctxG2.clearRect(0, 0, 600, 600); combinedG2.width =600;// combined.width;combinedG2.height = 600;//combined.height; var canvas_UIaur = document.getElementById('canvas_RFh_G4'); var canvas_RFh_G4 = document.getElementById('canvas_RFh_G4'); var canvas_RFh_G3 = document.getElementById('canvas_RFh_G3'); var canvas_RFh_G5 = document.getElementById('canvas_RFh_G5'); ctxG2.drawImage(canvas_RFh_G4, -44, -44); ctxG2.drawImage(canvas_RFh_G3, -44, -44); //ctxG2.drawImage(canvas_RFh_G5, -44, -44); // combinedG2=canvas_RFh_G4;}document.getElementById("image").src = combinedX.toDataURL(); document.getElementById("imageBlue").src = combinedG3.toDataURL(); document.getElementById("imageBlue2").src = combinedG4.toDataURL();document.getElementById("image2").src = combinedG2.toDataURL();document.getElementById("image3").src = combinedG2.toDataURL(); var combinedG1 = document.getElementById("canvas_GlowCurrent");var ctxG1= combinedG1.getContext("2d"); combinedG1.width = combinedX.width;combinedG1.height = combinedX.height;if(document.getElementById('canvas_red').style.display != 'none') { var canvas_RFh_G52 = document.getElementById('canvas_RFh_G5'); var canvas_RFh_GK2= document.getElementById('canvas_RFh_GK'); ctxG1.drawImage(canvas_RFh_GK2, 0, 0); ctxG1.drawImage(canvas_RFh_G52, 0, 0);}if(ss!=0){ctxG1.drawImage(combinedG4, 44, 44);ctxG1.drawImage(combinedG3, 44, 44);ctxG1.drawImage(combinedG2, 44, 44);ctxG1.drawImage(combinedG, 44, 44);}var combinedGC = document.getElementById("canvas_GlowCurrent");/* var combinedG1 = document.getElementById("canvas_GlowC1"); var ctxG1= combinedG1.getContext("2d"); combinedG1.width = combinedGC.width;combinedG1.height = combinedGC.height;ctxG1.drawImage(combinedGC, 0,0);*/var combinedLC = document.getElementById("canvas_SSJ2Lightning");var combinedKC = document.getElementById("canvas_KaiokenEffect");/* var combinedL1 = document.getElementById("canvas_LightningC1"); var ctxL1= combinedL1.getContext("2d"); combinedL1.width = combinedX.width;combinedL1.height = combinedX.height;ctxL1.drawImage(combinedLC, 0,0);*///$('#Char0div').css('background-position', ''+document.getElementById("bgimg").width+'px '+document.getElementById("bgimg").width+'px');$('#Char0div').css('background-position', '-'+Char0x+'px -'+Char0y+'px');$("#Char0div").css('background-image','url('+dataURL+')');$('#Char0div').css('background-size', Char0w+'px ' + Char0h + 'px');document.getElementById('colordiv').style.display="none"; document.getElementById('CharSelectDiv').style.display = 'block';document.getElementById('ShareBar').style.display="none"; document.getElementById('TwitBut').style.display="none"; document.getElementById('visible-button').style.display="none"; document.getElementById('sharebt').style.display="none"; document.getElementById('settingsbt').style.display="block"; document.getElementById('FilterShareTab').style.display="block"; if(BGNum==1){ LoadChar1(-1); LoadChar2(-1); LoadChar3(-1); LoadChar4(-1); document.getElementById('colordiv').style.display = 'block'; document.getElementById('CharSelectDiv').style.display="none"; document.getElementById('ShareBar').style.display="block"; //document.getElementById('TwitBut').style.display="block"; document.getElementById('visible-button').style.display="block"; document.getElementById('sharebt').style.display="block"; document.getElementById('FilterShareTab').style.display="none"; document.getElementById('settingsbt').style.display="none";$('#BorderDiv').css("overflow","visible");}if(BGNum==22){LoadChar1(-1); LoadChar2(0); LoadChar3(0); LoadChar4(0);}if(BGNum==23){LoadChar1(-1); LoadChar2(0); LoadChar3(0); LoadChar4(0);}if(BGNum==15){LoadChar1(-1); LoadChar2(-1); LoadChar3(-1); LoadChar4(-1);}if(BGNum==17){LoadChar1(-1); LoadChar2(-1); LoadChar3(-1); LoadChar4(-1);}if(BGNum==14){LoadChar1(-1); LoadChar2(-1); LoadChar3(-1); LoadChar4(-1);}if(BGNum==13){LoadChar1(-1); LoadChar2(-1); LoadChar3(-1); LoadChar4(-1);}if(BGNum==30){LoadChar1(-1); LoadChar2(-1); LoadChar3(-1); LoadChar4(-1);}if(BGNum==28){LoadChar1(-1); LoadChar2(-1); LoadChar3(-1); LoadChar4(-1);}if(BGNum==26){LoadChar1(-1); LoadChar2(-1); LoadChar3(-1); LoadChar4(-1);}if(BGNum==24){LoadChar1(-1); LoadChar2(-1); LoadChar3(-1); LoadChar4(-1);}if(BGNum==21){LoadChar1(-1); LoadChar2(-1); LoadChar3(-1); LoadChar4(-1);}if(BGNum==12){LoadChar1(-1); LoadChar2(-1); LoadChar3(-1); LoadChar4(-1);}if(BGNum==3){LoadChar1(-1); LoadChar2(-1); LoadChar3(-1); LoadChar4(-1);}if(BGNum==11){LoadChar1(-1); LoadChar2(-1); LoadChar3(-1); LoadChar4(-1);}if(BGNum==10){LoadChar1(-1); LoadChar2(0); LoadChar3(0); LoadChar4(0);}if(BGNum==31){LoadChar1(-1); LoadChar2(0); LoadChar3(0); LoadChar4(0);}if(BGNum==9){LoadChar1(-1); LoadChar2(0); LoadChar3(-1); LoadChar4(-1);}if(BGNum==8){LoadChar1(-1); LoadChar2(-1); LoadChar3(-1); LoadChar4(-1);}if(BGNum==19){LoadChar1(-1); LoadChar2(-1); LoadChar3(-1); LoadChar4(-1);}if(BGNum==20){LoadChar1(-1); LoadChar2(-1); LoadChar3(-1); LoadChar4(-1);}if(BGNum==7){LoadChar1(-1); LoadChar2(); LoadChar3(-1); LoadChar4(-1);}if(BGNum==18){LoadChar1(-1); LoadChar2(); LoadChar3(-1); LoadChar4(-1);}if(BGNum==6){LoadChar1(-1); LoadChar2(0); LoadChar3(-1); LoadChar4(-1);}if(BGNum==32){LoadChar1(-1); LoadChar2(0); LoadChar3(-1); LoadChar4(-1);}if(BGNum==25){LoadChar1(-1); LoadChar2(0); LoadChar3(-1); LoadChar4(-1);}if(BGNum==27){LoadChar1(-1); LoadChar2(0); LoadChar3(-1); LoadChar4(-1);}if(BGNum==29){LoadChar1(-1); LoadChar2(0); LoadChar3(-1); LoadChar4(-1);}if(BGNum==5){LoadChar1(-1); LoadChar2(-1); LoadChar3(-1); LoadChar4(-1);}if(BGNum==2){LoadChar1(-1); LoadChar2(-1); LoadChar3(-1); LoadChar4(-1);}if(BGNum==16){LoadChar1(-1); LoadChar2(-1); LoadChar3(-1); LoadChar4(-1);} if(BGNum==4){LoadChar1(-1); LoadChar2(-1); LoadChar3(-1); LoadChar4(-1);}////////////////////////////////////////////////////////////////// var multiplier=1; var combined = document.getElementById("canvas_StickMake");var ctx = combined.getContext("2d"); var combinedX2 = document.getElementById('canvas_CHARCurrent'); combined.width = combinedX2.width;combined.height = combinedX2.height;var combinedGC = document.getElementById("canvas_GlowCurrent");var tempvar80=combinedGC.width-combined.width;tempvar80=tempvar80/2;ctx.fillStyle = "rgb(0,0,0,0.004)";ctx.fillRect(0, 0, combined.width, combined.height); if(document.getElementById('canvas_red').style.display != 'none') { var canvas_RFh_G52 = document.getElementById('canvas_RFh_G5'); var canvas_RFh_GK2= document.getElementById('canvas_RFh_GK'); ctx.drawImage(canvas_RFh_GK2, -44, -44); ctx.drawImage(canvas_RFh_G52, -44, -44);}if(ss!=0){ctx.drawImage(combinedGC, -tempvar80*multiplier,-tempvar80*multiplier,combinedGC.width*multiplier,combinedGC.height*multiplier);}ctx.drawImage(canvas_StampsB,17,16);ctx.drawImage(combinedX2, 0, 0,combinedX2.width*multiplier,combinedX2.height*multiplier);ctx.drawImage(canvas_StampsF,17,16);var combinedL1 = document.getElementById("canvas_SSJ2Lightning");ctx.drawImage(combinedL1, 0,0,combinedL1.width*multiplier,combinedL1.height*multiplier);if(document.getElementById('canvas_red').style.display != 'none') { var combinedK1CD2R2 = document.getElementById("canvas_red");ctx.drawImage(combinedK1CD2R2, -tempvar80*multiplier,-tempvar80*multiplier,combinedGC.width*multiplier,combinedGC.height*multiplier);var combinedK1 = document.getElementById("canvas_KaiokenEffect");ctx.drawImage(combinedK1, 0, 0,combinedX2.width*multiplier,combinedX2.height*multiplier); } var dataURLM = combined.toDataURL("image/png"); // uploadimg(dataURLM)LoadAddtoKonvaImg(dataURL); removeBlanks(combined.width, combined.height,'canvas_StickMake','canvasCropped'); removeBlanks(combined.width, combined.height,'canvas_StickMake','canvasCroppedRAW');AddImgToArt(); if(uploadedchar==0){ var tnewp2_x=eval(p2)+1;var tnewp1_x=eval(p1)+1; var workot_w_x=(25/bodySize[tnewp1_x]);var workot_h_x=(25/bodySize[tnewp1_x]);var thumbw_x=300*workot_w_x;var thumbh_x=300*workot_h_x;var thumbx_x=bodyX[tnewp1_x]*workot_w_x;//*bodySize[tnewp2]; var thumby_x=(bodyY[tnewp1_x]+(bodyH[tnewp1_x])/2)*workot_h_x; thumbx_x-=28; thumby_x-=24; var Char0x_x=thumbx_x; var Char0y_x=thumby_x; var Char0w_x=thumbw_x; var Char0h_x=thumbh_x; Char0x_x=Math.round(Char0x_x); Char0y_x=Math.round(Char0y_x); Char0w_x=Math.round(Char0w_x); var combinedXX = document.createElement('canvas');var ctxXX = combinedXX.getContext("2d");combinedXX.width = 75;combinedXX.height = 75; var combinedX = document.getElementById('combined');ctxXX.drawImage(combinedX, -Char0x_x, -Char0y_x,Char0w_x,Char0w_x); var combinedcav = document.getElementById("canvas_CHARCurrent"); /* if(ss==0){var combinedcav = image6;} if(ss==1){var combinedcav = image6;} if(ss==2){var combinedcav = image6;} if(ss==3){var combinedcav = image6;} if(ss==4){var combinedcav = image6;} if(ss==5){var combinedcav = image6;} if(ss==6){var combinedcav = image6;} if(ss==7){var combinedcav = image6;} if(ss==8){var combinedcav = image6;} */ //KAIOKEN///////////////////////////// if(ss==0) { aurame(combinedcav,0); document.getElementById('canvas_RFh_G5').style.zIndex = -60; document.getElementById('canvas_RFh_GK').style.zIndex = -61; } if(ss>0 && ss!=6 && ss!=7 && ss!=8) { aurame(combinedcav,1); document.getElementById('canvas_RFh_G5').style.zIndex = -100; document.getElementById('canvas_RFh_GK').style.zIndex = -101; } if(ss==8 || ss==9 || ss==10 || ss==11) { aurame(combinedcav,2); document.getElementById('canvas_RFh_G5').style.zIndex = -100; document.getElementById('canvas_RFh_GK').style.zIndex = -101; } if(ss==6 || ss==7) { aurame(combinedcav,3); document.getElementById('canvas_RFh_G5').style.zIndex = -100; document.getElementById('canvas_RFh_GK').style.zIndex = -101; } ///////////////////////////////////////////////////////////SSJAnm///////////////////////////// if(ss==0) { aurame(combinedcav,4); document.getElementById('canvas_RFh_G5').style.zIndex = -60; document.getElementById('canvas_RFh_GK').style.zIndex = -61; } var combinedcav = document.getElementById("canvas_CHARCurrent"); aurame(combinedcav,5); document.getElementById('canvas_RFh_G5SSJ').style.zIndex = -60; document.getElementById('canvas_RFh_GKSSJ').style.zIndex = -61; /////////////////////////////////////////////////// // DownloadIt(); if(saiyanblood==0) { uploadtimeout=setTimeout(function(){ var dataURLM = combinedXX.toDataURL("image/png"); uploadimg(dataURLM) },25500); uploadedchar=1; } }//alert("bg height"+document.getElementById("bgimg").height);////////////////////////////////////////////////////////////////////alert("Loading="+Loading); // $("#image3").fadeOut(100, function(){}); setTimeout(function() { if(BREAKLoad==1){BREAKLoad=0; Loading=0; LoadNewFusionDelay(p1,p2,ss); } else { if(BREAKLoad!=1 && Loading !=0){ if(BGNum!=1){$("#image2").fadeOut(1, function(){}); $("#image3").fadeOut(1, function(){});} else { // $("#image2").fadeIn(1, function(){}); document.getElementById('image2').style.display = 'block'; setTimeout(function(){ $("#image2").fadeOut(300, function(){document.getElementById('image2').style.display = 'block'; document.getElementById('image2').style.display = 'none';}); },300); $("#image3").fadeIn(1, function(){}); }} document.getElementById('canvas_BackLeftovers').style.display = 'block'; document.getElementById('canvas_BackR').style.display = 'block'; document.getElementById('canvas_BackY').style.display = 'block'; document.getElementById('canvas_BackB').style.display = 'block'; document.getElementById('canvas_BackShadow').style.display = 'block'; document.getElementById('canvas_BackG').style.display = 'block'; document.getElementById('canvas_FrontR').style.display = 'block'; document.getElementById('canvas_FrontY').style.display = 'block'; document.getElementById('canvas_FrontB').style.display = 'block'; document.getElementById('canvas_FrontShadow').style.display = 'block'; document.getElementById('canvas_FrontG').style.display = 'block'; document.getElementById('canvas_FrontP').style.display = 'block'; document.getElementById('canvas_FrontLeftovers').style.display = 'block'; document.getElementById('canvas_MainR').style.display = 'block'; document.getElementById('canvas_MainY').style.display = 'block'; document.getElementById('canvas_MainB').style.display = 'block'; document.getElementById('canvas_MainShadow').style.display = 'block'; document.getElementById('canvas_MainG').style.display = 'block'; document.getElementById('canvas_MainP').style.display = 'block'; document.getElementById('canvas_MainLeftovers').style.display = 'block'; //document.getElementById('canvas_MainGShadow').style.display = 'block'; // document.getElementById('canvas_EyesR').style.display = 'block'; // document.getElementById('canvas_EyesY').style.display = 'block'; // document.getElementById('canvas_EyesB').style.display = 'block'; document.getElementById('canvas_EyesShadow').style.display = 'block'; /// document.getElementById('canvas_EyesG').style.display = 'block'; // document.getElementById('canvas_EyesP').style.display = 'block'; document.getElementById('canvas_EyesLeftovers').style.display = 'block'; // document.getElementById('canvas_EyesGShadow').style.display = 'block'; document.getElementById('canvas_FullHairP').style.display = 'block'; document.getElementById('canvas_FullHairB').style.display = 'block'; document.getElementById('canvas_FullHairG').style.display = 'block'; document.getElementById('canvas_FullHairR').style.display = 'block'; document.getElementById('canvas_FullHairY').style.display = 'block'; document.getElementById('canvas_FullHairLeftovers').style.display = 'block'; document.getElementById('canvas_FullHairShadow').style.display = 'block'; document.getElementById('canvas_FullBackHairP').style.display = 'block'; document.getElementById('canvas_FullBackHairB').style.display = 'block'; document.getElementById('canvas_FullBackHairG').style.display = 'block'; document.getElementById('canvas_FullBackHairR').style.display = 'block'; document.getElementById('canvas_FullBackHairY').style.display = 'block'; document.getElementById('canvas_FullBackHairLeftovers').style.display = 'block'; document.getElementById('canvas_FullBackHairShadow').style.display = 'block'; document.getElementById('canvas_BackG').style.display = 'block'; document.getElementById('canvas_BackShadow').style.display = 'block'; document.getElementById('canvas_WingsP').style.display = 'block'; document.getElementById('canvas_WingsB').style.display = 'block'; document.getElementById('canvas_WingsG').style.display = 'block'; document.getElementById('canvas_WingsR').style.display = 'block'; document.getElementById('canvas_WingsY').style.display = 'block'; document.getElementById('canvas_WingsLeftovers').style.display = 'block'; document.getElementById('canvas_WingsShadow').style.display = 'block'; document.getElementById('canvas_TailsP').style.display = 'block'; document.getElementById('canvas_TailsB').style.display = 'block'; document.getElementById('canvas_TailsG').style.display = 'block'; document.getElementById('canvas_TailsR').style.display = 'block'; document.getElementById('canvas_TailsY').style.display = 'block'; document.getElementById('canvas_TailsLeftovers').style.display = 'block'; document.getElementById('canvas_TailsShadow').style.display = 'block'; document.getElementById('canvas_CapesP').style.display = 'block'; document.getElementById('canvas_CapesB').style.display = 'block'; document.getElementById('canvas_CapesG').style.display = 'block'; document.getElementById('canvas_CapesR').style.display = 'block'; document.getElementById('canvas_CapesY').style.display = 'block'; document.getElementById('canvas_CapesLeftovers').style.display = 'block'; document.getElementById('canvas_CapesShadow').style.display = 'block'; document.getElementById('canvas_MustashP').style.display = 'block'; document.getElementById('canvas_MustashB').style.display = 'block'; document.getElementById('canvas_MustashG').style.display = 'block'; document.getElementById('canvas_MustashR').style.display = 'block'; document.getElementById('canvas_MustashY').style.display = 'block'; document.getElementById('canvas_MustashLeftovers').style.display = 'block'; document.getElementById('canvas_MustashShadow').style.display = 'block'; document.getElementById('canvas_SSJ2Lightning').style.display = 'block'; if(document.getElementById('canvas_red').style.display != 'none') {document.getElementById('canvas_KaiokenEffect').style.display = 'block';} document.getElementById('canvas_Extra1').style.display = 'block'; draw_SSJ2Lightning(); $("#spin3").fadeOut(300); $("#glow3").fadeOut(300); // document.getElementById('spin3').style.display = 'none'; // document.getElementById('glow3').style.display = 'none';EnableStuff(); if(activetest!=1){$('#NextSS').attr({src:'PUButtonsUI.png', onclick:"MasterSSCheckPre(-3,-3,8)"}); document.getElementById('oneSS').style.display = 'block'; document.getElementById("NextSS").src=document.getElementById("PUButtonsUI").src; $("#NextSS").width(110).height("110"); var child1 = document.getElementById("NextSS"); var x2=child1.parentNode; x2.style.left = "485px"; x2.style.top = "525px"; // x2.style.left = "483px"; x2.style.top = "538px"; document.getElementById('allSS').style.display = 'none';if(ss==8) { // alert("TTTT"); $('#NextSS').attr({src:'PUButtonsUIM.png', onclick:"MasterSSCheckPre(-3,-3,9)"}); document.getElementById('oneSS').style.display = 'block'; document.getElementById("NextSS").src=document.getElementById("PUButtonsUIM").src; $("#NextSS").width(110).height("110"); var child1 = document.getElementById("NextSS"); var x2=child1.parentNode; x2.style.left = "485px"; x2.style.top = "525px"; // x2.style.left = "483px"; x2.style.top = "538px"; document.getElementById('allSS').style.display = 'none'; }if(VIPstatus=="Y") // document.getElementById("NextSS").src=document.getElementById("PUButtonsSSB").src; $('#NextSS').attr({src:'TwitterButtonSSUI.png', onclick:"openInNewTab('twitter',1)"});{ //document.getElementById('oneSS').style.display = 'none'; //DELETE THIS KINGAKU 2000 if(ss==9) { //document.getElementById("NextSS").src=document.getElementById("PUButtonsSSB").src; $('#NextSS').attr({src:'TwitterUIMButton.png', onclick:"openInNewTab('twitter',1)"});document.getElementById("NextSS").src=document.getElementById("PUButtonsSSB").src; $('#NextSS').attr({src:'BLANK.png', onclick:"openInNewTab('twitter',1)"}); $("#NextSS").width(110).height("110"); var child1 = document.getElementById("NextSS"); var x2=child1.parentNode; x2.style.left = "485px"; x2.style.top = "525px"; // x2.style.left = "483px"; x2.style.top = "538px"; }}else{// document.getElementById('SSBox').style.display = 'none';//document.getElementById('lessID').style.display = 'none';}}else{ $("#NextSS").width(140).height("140"); var child1 = document.getElementById("NextSS"); var x2=child1.parentNode; x2.style.left = "470px"; x2.style.top = "525px"; //{if(isagod==0){if(VIPstatus=="Y"){$("#PUButtonsSSB").attr({src:'PUButtonsSSB.png', onclick:"MasterSSCheckPre(-3,-3,6)"});$("#PUButtonsSSR").attr({src:'PUButtonSSR.png', onclick:"MasterSSCheckPre(-3,-3,7)"});}else{$("#PUButtonsSSB").attr({src:'PUButtonsSSB.png', onclick:"MasterSSCheckPre(-3,-3,6)"});$("#PUButtonsSSR").attr({src:'PUButtonSSRLocked.png', onclick:"ShowUnlock()"});}}if(isagod==1){if(VIPstatus=="Y"){$("#PUButtonsSSB").attr({src:'PUButtonSSR.png', onclick:"MasterSSCheckPre(-3,-3,7)"});$("#PUButtonsSSR").attr({src:'PUButtonsSSB.png', onclick:"MasterSSCheckPre(-3,-3,6)"});}else{$("#PUButtonsSSB").attr({src:'PUButtonSSR.png', onclick:"MasterSSCheckPre(-3,-3,7)"});$("#PUButtonsSSR").attr({src:'PUButtonsSSBLocked.png', onclick:"ShowUnlock()"});}}//} if(ss==0){ document.getElementById("NextSS").src=document.getElementById("PUButtonsSS1").src; $('#NextSS').attr({src:'PUButtonsSS1.png', onclick:"MasterSSCheckPre(-3,-3,1)"});} if(ss==1){ document.getElementById("NextSS").src=document.getElementById("PUButtonsSS2").src; $('#NextSS').attr({src:'PUButtonsSS2.png', onclick:"MasterSSCheckPre(-3,-3,2)"});} if(ss==2){ document.getElementById("NextSS").src=document.getElementById("PUButtonsSS3").src; $('#NextSS').attr({src:'PUButtonsSS3.png', onclick:"MasterSSCheckPre(-3,-3,3)"});} if(ss==3){ document.getElementById("NextSS").src=document.getElementById("PUButtonsSSG").src; $('#NextSS').attr({src:'PUButtonsSSG.png', onclick:"MasterSSCheckPre(-3,-3,4)"});}if(ss==4){ if(isagod==1){ $('#NextSS').attr({src:'PUButtonSSR.png', onclick:"MasterSSCheckPre(-3,-3,7)"});} if(isagod==0){ $('#NextSS').attr({src:'PUButtonsSSB.png', onclick:"MasterSSCheckPre(-3,-3,6)"});} document.getElementById("NextSS").src=document.getElementById("PUButtonsSSB").src; $("#NextSS").width(140).height("140"); var child1 = document.getElementById("NextSS"); var x2=child1.parentNode; x2.style.left = "468px"; x2.style.top = "538px"; } if(VIPstatus=="Y") { if(Kingaku<150) { //$('#PUButtonsLSS').attr({src:'BLANK.png', onclick:"ShowUnlock()"});// $("#PUButtonsLSS").width(0).height("0");} } else {// $('#PUButtonsSSBE').attr({src:'PUButtonsSSBELocked.png', onclick:"ShowUnlock()"});$('#PUButtonsLSS').attr({src:'PUButtonsLSSLocked.png', onclick:"ShowUnlock()"}); $('#PUButtonsSS5').attr({src:'PUButtonsSS5Locked.png', onclick:"ShowUnlock()"}); //$('#PUButtonsLSS').attr({src:'BLANK.png', onclick:"ShowUnlock()"});// $("#PUButtonsLSS").width(0).height("0"); } if(ss==6 || ss==7 ) { document.getElementById("NextSS").src=document.getElementById("PUButtonsSSB").src; $('#NextSS').attr({src:'TwitterButton01.png', onclick:"openInNewTab('twitter',1)"}); $("#NextSS").width(110).height("110"); var child1 = document.getElementById("NextSS"); var x2=child1.parentNode; x2.style.left = "485px"; x2.style.top = "525px"; // x2.style.left = "483px"; x2.style.top = "538px"; } if(VIPstatus=="Y") {/* document.getElementById("NextSS").src=document.getElementById("PUButtonsSSB").src; $('#NextSS').attr({src:'TwitterButtonSSUI.png', onclick:"openInNewTab('twitter',1)"}); $("#NextSS").width(110).height("110"); var child1 = document.getElementById("NextSS"); var x2=child1.parentNode; x2.style.left = "485px"; x2.style.top = "530px"; */ if(ss==6 || ss==7 ) { $('#NextSS').attr({src:'PUButtonsUI.png', onclick:"MasterSSCheckPre(-3,-3,8)"}); document.getElementById("NextSS").src=document.getElementById("PUButtonsUI").src; $("#NextSS").width(140).height("140"); var child1 = document.getElementById("NextSS"); var x2=child1.parentNode; x2.style.left = "468px"; x2.style.top = "538px"; } if(ss==9) { document.getElementById("NextSS").src=document.getElementById("PUButtonsSSB").src; $('#NextSS').attr({src:'TwitterUIMButton.png', onclick:"openInNewTab('twitter',1)"}); $("#NextSS").width(110).height("110"); var child1 = document.getElementById("NextSS"); var x2=child1.parentNode; x2.style.left = "485px"; x2.style.top = "525px"; // x2.style.left = "483px"; x2.style.top = "538px"; } } } //document.getElementById('yourDiv').style.display = 'block';document.getElementById('yourDiv').style.display = 'none';if(BGNum==4){document.getElementById('yourDiv').style.display = 'hidden';}if(BGNum==1){document.getElementById('yourDiv').style.display = 'block';} document.getElementById('GlowC1').style.visibility = 'visible'; document.getElementById('GlowC2').style.visibility = 'visible'; document.getElementById('GlowC3').style.visibility = 'visible'; document.getElementById('GlowC4').style.visibility = 'visible'; document.getElementById('LoadC1').style.visibility = 'visible'; document.getElementById('LoadC2').style.visibility = 'visible'; document.getElementById('LoadC3').style.visibility = 'visible'; document.getElementById('LoadC4').style.visibility = 'visible'; document.getElementById('image3').style.visibility = 'hidden'; document.getElementById('image6').style.visibility = 'hidden';if(BGNum==1){ document.getElementById('GlowC1').style.visibility = 'hidden'; document.getElementById('GlowC2').style.visibility = 'hidden'; document.getElementById('GlowC3').style.visibility = 'hidden'; document.getElementById('GlowC4').style.visibility = 'hidden'; document.getElementById('LoadC1').style.visibility = 'hidden'; document.getElementById('LoadC2').style.visibility = 'hidden'; document.getElementById('LoadC3').style.visibility = 'hidden'; document.getElementById('LoadC4').style.visibility = 'hidden'; document.getElementById('image3').style.visibility = 'visible'; document.getElementById('image6').style.visibility = 'visible';}document.getElementById('image3').style.zIndex = -98; document.getElementById('image6').style.zIndex = -97;document.getElementById('imageBlue').style.zIndex = -99; document.getElementById('imageBlue2').style.zIndex = -100;//alert("shown");Loading=0;}}, 1) }///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////HEAD FUNCTIONS - End//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////function uploadimg(dataURL){ // alert("upload_data.php activated!") //var canvas = document.getElementById("image1"); document.getElementById('hidden_data').value = dataURL; var fd = new FormData(document.forms["form1"]); var xhr = new XMLHttpRequest(); var urltempy=efc_code; xhr.open('POST', 'upload_data.php?p1='+p1+'&p2='+p2+'&c1='+ss+'&z1=0&efc='+urltempy+'&posxyw='+Char0x+','+Char0y+','+Char0w+'&ver='+new Date().getTime(), true); xhr.upload.onprogress = function(e) { if (e.lengthComputable) { var percentComplete = (e.loaded / e.total) * 100; console.log(percentComplete + '% uploaded'); // alert('Succesfully uploaded'); } }; xhr.onload = function() { }; xhr.send(fd); }///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////COLORS - Start//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////function checkTextureLocks(){ /*if(VIPstatus=="N"){var textop = $("#palletid").offset().top; var texleft = $("#palletid").offset().left;$('#ltex1').css({ 'left': texleft + '', 'top': textop + '' });}$("#palletid #tex2, #palletid #tex3, #palletid #tex5, #palletid #tex7, #palletid #tex8, #palletid #tex9, #palletid #tex10, #palletid #tex11, #palletid #tex12, #palletid #tex13, #palletid #tex14, #palletid #tex15, #palletid #tex16, #palletid #tex17, #palletid #tex18, #palletid #tex19, #palletid #tex20, #palletid #tex21, #palletid #tex22, #palletid #tex23, #palletid #tex24, #palletid #tex25, #palletid #tex26, #palletid #tex27, #palletid #tex28, #palletid #tex29, #palletid #tex30, #palletid #tex31, #palletid #tex32").each(function() { var src = $(this).attr("src"); var $overlay = $('Dragon Ball Fusion Generator (39)'); $overlay.css({ position: "relative", display: "inline-block", width: $(this).width(), height: $(this).height(), backgroundPosition: "center center", backgroundImage: "url("+src+")" }); $(this).wrap($overlay);});*/}$("#custom").spectrum({ showPalette: true, color: "#f00", className: "palette1", preferredFormat: "rgb", showButtons: false, maxSelectionSize: 1, change: function(color) { }, show: function(tinycolor) { selectedp="0"; }, move: function(color) { draw_FullHairP( color,"color"); draw_MainP( color,"color"); draw_FrontP( color,"color"); // draw_BackHair( color,"color"); draw_TailsP( color,"color"); draw_CapesP( color,"color"); draw_WingsP( color,"color"); draw_FullBackHairP( color,"color"); draw_MustashP( color,"color"); CheckForBlanks(); c1=color; getPermaLink();}});$("#custom2").spectrum({ showPalette: true, color: "#f00", className: "palette2", preferredFormat: "rgb", showButtons: false, maxSelectionSize: 1, change: function(color) { }, show: function(tinycolor) { selectedp="1"; }, move: function(color) { draw_MainG( color,"color"); draw_BackG( color,"color"); draw_FrontG( color,"color"); draw_FullHairG( color,"color"); draw_TailsG( color,"color"); draw_WingsG( color,"color"); draw_CapesG( color,"color"); draw_FullBackHairG( color,"color"); draw_BackG( color,"color");draw_MustashG( color,"color"); CheckForBlanks(); c2=color; getPermaLink();}});$("#custom3").spectrum({ showPalette: true, color: "#f00", className: "palette3", preferredFormat: "rgb", showButtons: false, maxSelectionSize: 1, change: function(color) { }, show: function(tinycolor) { selectedp="4"; }, move: function(color) { draw_FrontB( color,"color"); draw_BackB( color,"color"); draw_MainB( color,"color"); draw_TailsB( color,"color"); draw_WingsB( color,"color"); draw_CapesB( color,"color"); draw_FullHairB( color,"color"); draw_FullBackHairB( color,"color"); draw_MustashB( color,"color"); CheckForBlanks(); c3=color; getPermaLink();}});$("#custom4").spectrum({ showPalette: true, color: "#f00", className: "palette4", preferredFormat: "rgb", showButtons: false, maxSelectionSize: 1, change: function(color) { }, show: function(tinycolor) { selectedp="3"; }, move: function(color) { draw_FrontY( color,"color"); draw_BackY( color,"color"); draw_MainY( color,"color"); draw_TailsY( color,"color"); draw_WingsY( color,"color"); draw_CapesY( color,"color"); draw_FullHairY( color,"color"); draw_FullBackHairY( color,"color"); draw_MustashY( color,"color"); CheckForBlanks(); c4=color; getPermaLink();}});$("#custom5").spectrum({ showPalette: true, color: "#f00", className: "palette5", preferredFormat: "rgb", showButtons: false, maxSelectionSize: 1, change: function(color) { }, show: function(tinycolor) {selectedp="2"; }, move: function(color) { draw_FrontR( color,"color"); draw_BackR( color,"color"); draw_MainR( color,"color"); draw_TailsR( color,"color"); draw_WingsR( color,"color"); draw_CapesR( color,"color"); draw_FullHairR( color,"color"); draw_FullBackHairR( color,"color"); draw_MustashR( color,"color"); CheckForBlanks(); c5=color; getPermaLink();}}); function changedata(val,type){ if(selectedp=="0"){if(val=="default"){val=default_main;}draw_TailsP(val,type);draw_WingsP(val,type); draw_CapesP(val,type);draw_FrontP(val,type); draw_MainP(val,type); draw_FullHairP(val,type); draw_FullBackHairP(val,type); draw_MustashP(val,type); c1=val; getPermaLink();} if(selectedp=="1"){if(val=="default"){val=default_belly;}draw_TailsG(val,type);draw_WingsG(val,type); draw_CapesG(val,type);draw_BackG(val,type);draw_FrontG(val,type); draw_MainG(val,type); draw_FullHairG(val,type); draw_FullBackHairG(val,type);draw_MustashG(val,type); draw_BackG(val,type); c2=val; getPermaLink();}if(selectedp=="4"){if(val=="default"){val=default_shell;} draw_TailsB(val,type); draw_WingsB(val,type); draw_CapesB(val,type);draw_BackB(val,type);draw_FrontB(val,type); draw_MainB(val,type); draw_FullHairB(val,type); draw_FullBackHairB(val,type);draw_MustashB(val,type); c3=val; getPermaLink();}if(selectedp=="3"){if(val=="default"){val=default_color;}draw_TailsY(val,type);draw_WingsY(val,type); draw_CapesY(val,type);draw_BackY(val,type);draw_FrontY(val,type); draw_MainY(val,type); draw_FullHairY(val,type); draw_FullBackHairY(val,type);draw_MustashY(val,type); c4=val; getPermaLink();}if(selectedp=="2"){if(val=="default"){val=default_xcolor;}draw_TailsR(val,type);draw_WingsR(val,type); draw_CapesR(val,type);draw_FrontR(val,type);draw_BackR(val,type); draw_MainR(val,type); draw_FullHairR(val,type); draw_FullBackHairR(val,type);draw_MustashR(val,type); c5=val; getPermaLink();} CheckForBlanks()}///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////COLORS - End//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Videos

1. Goten Plays Dragon Ball Fusions Generator!
(Goten)
2. GOGETA MUI + VEGITO MUI = NOVA FORMA SAIYAJIN?! - DRAGON BALL FUSION GENERATOR
(AbsintoJ)
3. THE MOST HILARIOUS DRAGON BALL FUSIONS!
(Lord Frieza)
4. DRAGON BALL FUSION SIMULATOR | MasakoX
(MasakoX)
5. Dbfg (Dragon ball Fusion Generator)
(LEGENDARY TPOSEGOD (OOFGAMER))
6. GOKU SSJ5 + VEGETA GOD = NOVA FORMA MAIS FORTE?! - DRAGON BALL FUSION GENERATOR
(AbsintoJ)
Top Articles
Latest Posts
Article information

Author: Jamar Nader

Last Updated: 05/25/2023

Views: 5743

Rating: 4.4 / 5 (55 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Jamar Nader

Birthday: 1995-02-28

Address: Apt. 536 6162 Reichel Greens, Port Zackaryside, CT 22682-9804

Phone: +9958384818317

Job: IT Representative

Hobby: Scrapbooking, Hiking, Hunting, Kite flying, Blacksmithing, Video gaming, Foraging

Introduction: My name is Jamar Nader, I am a fine, shiny, colorful, bright, nice, perfect, curious person who loves writing and wants to share my knowledge and understanding with you.