');
textDiv.innerHTML+="
";
}
var diy=0;
for(;diy
');
textDiv.innerHTML+="
";
}
textDiv.innerHTML+=d.hatmatilkaSpecialChars("");
textDiv.innerHTML+="
";
textDiv.innerHTML+=d.hatmatilkaSpecialChars('');
textDiv.innerHTML+="
";
textDiv.innerHTML+=d.hatmatilkaSpecialChars('');
textDiv.innerHTML+="
";
textDiv.innerHTML+="";
textDiv.innerHTML+="
";
textDiv.innerHTML+="
";
textDiv.innerHTML+="Text above (HTML markup, CSS code, texts...) is released to public domain.";
d.textDrawingFinished=true;
}
}
}
if(d.startTextEditation===true){
var textareaContent=d.find("textarea_"+d.components[d.actualStructure][0]);
if(textareaContent){
if(textareaContent.select){
textareaContent.select();
}
if(textareaContent.focus){
textareaContent.focus();
}
}
d.startTextEditation=false;
}
return true;
};
d.hatmatilkaSpecialChars=function(htmlCode)
{
htmlCode=htmlCode.replace('','</');
htmlCode=htmlCode.replace('/>','/>');
htmlCode=htmlCode.replace('<','<');
htmlCode=htmlCode.replace('>','>');
return htmlCode;
};
d.createHTML=function(positio){
var contentString='';
if(d.components[positio][6]!==-1){
contentString=d.hatmatilkaSpecialChars(d.components[positio][5]);
}else{
contentString=d.hatmatilkaSpecialChars(d.singleE('img','img_'+d.components[positio][0],'id="img_'+positio+'" src="'+d.imgDir+'/'+d.components[positio][8]+'" alt="'+d.components[positio][5]+'"'));
}
var result=d.hatmatilkaSpecialChars('')+"
"+contentString+"
"+d.hatmatilkaSpecialChars('
')+"
";
return result;
};
d.createCSS=function(positio){
var contentString='#div_'+positio+'{'+'
';
var colorAdString='';
if(d.components[positio][6]!==-1){
if(d.components[positio][6]===-2){
colorAdString='background-image:url("'+d.imgDir+'/'+d.components[positio][8]+'");';
}else{
colorAdString='background-color:'+d.colorz[d.components[positio][6]]+';';
}
}
contentString+=' '+d.positioningStrings[d.components[positio][7]]+'width:'+d.components[positio][3]+'px;height:'+d.components[positio][4]+'px;left:'+d.components[positio][1]+'px;top:'+d.components[positio][2]+'px;'+colorAdString;
if(d.components[positio][6]===-1){
contentString+="
}";
contentString+='
#img_'+positio+'{'+'
';
contentString+=' width:'+d.components[positio][3]+'px;height:'+d.components[positio][4]+'px;';
}
contentString+="
}
";
return contentString;
};
d.createDivak=function(positionInStructuresArray,adik)
{
if(adik){
var adMouseStuff='';
} else {
var adMouseStuff=' onmousedown="d.moveMe=true;d.actualStructure='+positionInStructuresArray+';d.makeNoneditableMenu();" onmouseup="d.moveMe=false;"';
}
if(d.components[positionInStructuresArray][6]===-1){
var colorAdString='';
var contentString=d.singleE('img','img_'+d.components[positionInStructuresArray][0],'src="'+d.imgDir+'/'+d.components[positionInStructuresArray][8]+'" alt="'+d.components[positionInStructuresArray][5]+'" style="width: '+d.components[positionInStructuresArray][3]+'px; height: '+d.components[positionInStructuresArray][4]+'px;"'+adMouseStuff);
}else if(d.components[positionInStructuresArray][6]===-2){
var colorAdString=' background-image:url('+d.imgDir+'/'+d.components[positionInStructuresArray][8]+');';
var contentString=d.components[positionInStructuresArray][5];
}else{
var colorAdString=' background-color:'+d.colorz[d.components[positionInStructuresArray][6]]+';';
var contentString=d.components[positionInStructuresArray][5];
}
if(adik){
contentString=d.hatmatilkaSpecialChars(contentString);
}
var divak=d.doubleE('div',contentString,d.components[positionInStructuresArray][0],'style="'+d.positioningStrings[d.components[positionInStructuresArray][7]]+' width: '+d.components[positionInStructuresArray][3]+'px; height: '+d.components[positionInStructuresArray][4]+'px; left: '+d.components[positionInStructuresArray][1]+'px; top: '+d.components[positionInStructuresArray][2]+'px;'+colorAdString+'"'+adMouseStuff);
if(adik){
divak=d.hatmatilkaSpecialChars(divak);
}
return divak;
};
d.wdpt=function()
{
d.actualStructure=0;
d.textMode=false;
d.showMenu=false;
if(d.count(d.components)===0){
d.components=[["divak0"]];
// left
d.components[d.actualStructure][1]=0;
// top
d.components[d.actualStructure][2]=0;
// width
d.components[d.actualStructure][3]=300;
// height
d.components[d.actualStructure][4]=100;
// text content (img => alt text)
d.components[d.actualStructure][5]="use m for menu with help alert.. useful? Bitcoin: 1KG1CABoioqunp6t9TFPi4BawCAVZ4Kfbd";
// background-color ( -1 => img)
d.components[d.actualStructure][6]=1;
// positioning string
d.components[d.actualStructure][7]=1;
// src string
d.components[d.actualStructure][8]='foo.jpg';
}
d.speedHorizontally=0;
d.speedVertically=0;
d.growthHorizontally=0;
d.growthVertically=0;
d.lastUpX=0;
d.lastUpY=0;
d.lastDownX=0;
d.lastDownY=0;
d.makeNoneditableMenu();
document.onkeyup=d.keyup;
document.onkeydown=d.keydown;
d.khf=MOOPH.createPseudoThread();
d.stop=MOOPH.createPseudoThread();
d.draw=MOOPH.createPseudoThread();
d.sij=MOOPH.createPseudoThread();
d.khf.setFunction(d.keyboardHandlerFunction);
d.stop.setFunction(d.stopperFunction);
d.draw.setFunction(d.drawFunction);
d.sij.setFunction(d.saveInJSON);
d.khf.setMeasuredDelay(40);
d.khf.start();
d.stop.start();
d.draw.start();
d.sij.start();
};
d.wdpt();
//-->