Dewiar 3D презентация/витрина
+
$(document).ready(function()
{
$("#newobl,#upp,#vr,#dwnl,.userhidebox,.zx").remove();
$("#menuObl").addClass("usermenuObl").hide();$(".bx1").show();$(".slidecontainer").hide();
$("#menuOblkn").removeClass("actbtnkn");
// ПОЛНОЭКРАННЫЙ РЕЖИМ
document.cancelFullScreen = document.cancelFullScreen || document.webkitCancelFullScreen || document.mozCancelFullScreen;
function enterFullscreen()
{
var el=document.documentElement;
var onfullscreenchange = function(e){var fullscreenElement = document.fullscreenElement || document.mozFullscreenElement || document.webkitFullscreenElement;var fullscreenEnabled = document.fullscreenEnabled || document.mozFullscreenEnabled || document.webkitFullscreenEnabled;}
el.addEventListener("webkitfullscreenchange", onfullscreenchange);
el.addEventListener("mozfullscreenchange", onfullscreenchange);
el.addEventListener("fullscreenchange", onfullscreenchange);
if(el.webkitRequestFullScreen){el.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);}else{el.mozRequestFullScreen();}
}
$(document).on("click","#full_yes",function()
{
$(this).toggleClass("fe");
if($(this).hasClass("fe")){enterFullscreen();}else{document.cancelFullScreen();}
});
$(document).on("click",'#menuOblkn',function()
{
$("#menuObl").toggle();
$(this).toggleClass("actbtnkn");
var menuOblkn=0;
if($(this).hasClass("actbtnkn")){menuOblkn=1;}else{$("#slidecontainerclose").click();}
});
$(document).on("click",'#setx',function(){$(this).toggleClass("actbtn"); $(".slidecontainer").toggle();});
$(document).on("click",'#slidecontainerclose',function(){$(".slidecontainer").hide(); $('#setx').removeClass("actbtn");});
$(document).on("input",'#topotstup',function()
{
var oblstyle=$("#oblako").attr("style");
var newstyle="";var arroblstyle = oblstyle.split(";");
var background=false;margin_top=false;
arroblstyle.forEach(function(item, i, arr) {
if(item.indexOf('background')!=-1){background=item;}
else if(item.indexOf('margin-top')!=-1){margin_top=item;}
});
var topotstup=$(this).val();
if(topotstup>0)
{
if(background!=false){newstyle=background+";margin-top:"+topotstup+"%";}
else{newstyle="margin-top:"+topotstup+"%";}
}
else
{
if(background!=false){newstyle=background+";margin-top:-"+topotstup*-1+"%";}
else{newstyle="margin-top:-"+topotstup*-1+"%";}
}
$("#oblako").attr("style",newstyle);
$("#mycanvas").addClass("canvedit");
$('#topotstupU').val(topotstup);
});
$(document).on("change",'#topotstup',function(){$("#mycanvas").removeClass("canvedit");});
var zoom=$('#zoomU').val();$('#zoom').val(zoom);
$(document).on("input",'#zoom',function(){$('#zoomU').val($(this).val());OBLAKO();});
$(document).on("change",'#zoom',function(){OBLAKO();});
$(document).on("input",'#sizePh',function(){$('#sizePhU').val($(this).val());XSTART();});
$(document).on("change",'#sizePh',function(){XSTART();});
var cornPh=$('#cornPhU').val();$('#cornPh').val(cornPh);
$(document).on("input",'#cornPh',function(){$('#cornPhU').val($(this).val());OBLAKO();});
$(document).on("change",'#cornPh',function(){OBLAKO();});
function XSTART()
{
var countph=$('#oblako img').length;
if(countph>0){$("#imgnull").hide();}
var countx=0;
$("#oblako img").each(function( index )
{
countx=countx+1;
var newsize=$("#sizePh").val();
var src=$(this).attr("src");
var id=$(this).parent("a").attr("id");//9.jpg
if(id!=undefined && id!='imgnull')
{
var data_caption=$(this).parent("a").attr("data-caption");
if(data_caption==false){data_caption=id.split(".")[0];$(this).parent("a").attr("data-caption",data_caption);}
var width=`${this.width}`;
var height=`${this.height}`;
var indx=0;
if(width>0)
{
if(width>height)
{
indx=width/height;
width=newsize;
height=width/indx;
$(this).attr("width",width).attr("height",height).attr("style","width:"+width+"px !important; max-width:"+width+"px !important; height:"+height+"px !important");
}
else if(width<height)
{
indx=height/width;
width=newsize;
height=width*indx;
$(this).attr("width",width).attr("height",height).attr("style","width:"+width+"px !important; max-width:"+width+"px !important; height:"+height+"px !important");
}
else{$(this).attr("width",newsize).attr("height",newsize).attr("style","width:"+newsize+"px !important; max-width:"+newsize+"px !important; height:"+newsize+"px !important");}
if(countph==countx){OBLAKO();}
}//if(width>0)
}//if(id!=undefined)
});
}//XSTART()
if($("#planka").hasClass("plankaAct")){$("#bd").addClass("plankaAct");}
$(document).on("click",'#planka b',function()
{
$("#planka").toggleClass("plankaAct");$("#bd").toggleClass("plankaAct");
if($("#planka").hasClass("plankaAct")){}else{$("#usst").hide();}
});
$(document).on("click",'#miniLg',function(){$("#usst").toggle();});
$(document).on("click",'#usstclose',function(){$("#usst").hide();});
var img_logobig=$("#logoBig img").attr("src");
var brand=$("#plstr").text();
var tlfb=$("#call").attr("href");tlfb=tlfb.replace('tel:', '');
if(tlfb.length>8){$("#call").removeClass("usstnoact");}else{$("#call").remove();}
var mailb=$("#sendm").attr("href");mailb=mailb.replace('mailto:', '');
//alert("mailb="+mailb);
if(mailb=="#" || mailb==false || mailb==null || mailb.indexOf('.')==-1 || mailb.indexOf('@')==-1){$("#sendm").remove();}
var editb=$("#editbU").val();
if(editb==1){$("#edit").removeClass("none");}
if(img_logobig==undefined && brand=="" && (tlfb=="" || tlfb=="#") && (mailb==false || mailb=="#")){$("#planka,#usst").remove();$("#bd").removeClass("plankaAct");}
if(img_logobig==undefined && brand!="" && (tlfb=="" || tlfb=="#") && (mailb==false || mailb=="#")){$("#miniLg,#usst").remove();$("#bd").removeClass("plankaAct")}
// править на сайте Dewiar
$(document).on("click",'#edit',function()
{
var ujezagrugeno=$("#oblako img:not(.nullimg)").length;
if(ujezagrugeno>0)
{
var htmlcontent=$("html").html();
setTimeout(function () {
var filename='edit';
$.ajax({
type: "POST",
url: "https://dewiar.com/oblako/edit.php",
crossDomain: true,
data: {"filename":filename,"htmlcontent":htmlcontent},
dataType: 'json',
success: function (data) { },
error: function (err) { }
});
setTimeout(function () {
var a = document.createElement('a');
a.href="https://dewiar.com/oblako?edit="+filename;
document.body.appendChild(a); a.click(); document.body.removeChild(a);
}, 1000);
}, 100);
}//if(ujezagrugeno>0)
});
function OBLAKO()
{
if(btoa($("#dwr a").text())=='qSBJc2FldiBNLlAu')
{
if($("#dwr").is(":visible"))
{
var obl_width=$(window).width()/0.95;
var obl_height=$(window).height()/0.95;
if(obl_height>obl_width){$("#mycanvas").attr("width",obl_width+"px").attr("height",obl_width+"px");}
else
{
var oblx=obl_width-obl_height;
$("#mycanvas").attr("width",obl_width+"px").attr("height",(obl_height+oblx/1.6)+"px");
}
var bgcolorU=$("#bgcolorU").val();var bgcolorU2=$("#bgcolorU2").val();
var bgcolortypeU=$("#bgcolortypeU").val();
if(bgcolorU==null || bgcolorU==0){bgcolorU="#FFF";}
if(bgcolorU2==null || bgcolorU2==0){bgcolorU2="#FFF";}
if(bgcolortypeU==null){bgcolortypeU=0;}
var slidercolor1U=$('#slidercolor1U').val();
var slidercolor2U=$('#slidercolor2U').val();
var sliderrotateU=$('#sliderrotateU').val();
if(bgcolortypeU==0)
{
var stylebgU="background: linear-gradient("+sliderrotateU+"deg, "+bgcolorU+" "+slidercolor1U+"%, "+bgcolorU2+" "+slidercolor2U+"%)";
}
else
{
if(bgcolortypeU==1)
{
if(sliderrotateU<180){var stylebgU="background: radial-gradient(circle,"+bgcolorU+" "+slidercolor1U+"%, "+bgcolorU2+" "+slidercolor2U+"%)";}
else{var stylebgU="background: radial-gradient(circle,"+bgcolorU2+" "+slidercolor1U+"%, "+bgcolorU+" "+slidercolor2U+"%)";}
}
else if(bgcolortypeU==2)
{
if(sliderrotateU<180){var stylebgU="background: conic-gradient("+bgcolorU+" 0%, "+bgcolorU2+" "+slidercolor2U+"%, "+bgcolorU+" "+slidercolor1U+"%)";}
else{var stylebgU="background: conic-gradient("+bgcolorU2+" 0%, "+bgcolorU+" "+slidercolor2U+"%, "+bgcolorU2+" "+slidercolor1U+"%)";}
}
}
var topotstupU=$('#topotstupU').val();
if(bgcolortypeU==0 || bgcolortypeU==2)
{
$("html").attr("style",stylebgU);
if(topotstupU>0){$("#oblako").attr("style","margin-top:"+topotstupU+"%;");}
else
{
$("#oblako").attr("style","margin-top:-"+topotstupU*-1+"%;");
}
}
else
{
if(topotstupU>0){$("#oblako").attr("style","margin-top:"+topotstupU+"%;"+stylebgU+";");}
else{$("#oblako").attr("style","margin-top:-"+topotstupU*-1+"%;"+stylebgU+";");}
if(sliderrotateU<180){$("html").attr("style","background-color:"+bgcolorU2+";");}else{$("html").attr("style","background-color:"+bgcolorU+";");}
}
var shapex=$("#oblako_formU").val();
dragControlx=true;
var initialx=[-.2, -.2];
var lockx=false;
var offY=false;
var offX=false;
if(shapex=='vring')
{
shapex="vring";
lockx="y";
initialx=[.1,0];
}
else if(shapex=='vcylinder')
{
shapex="vcylinder";
lockx="y";
initialx=[1,0];
}
else if(shapex=='hring')
{
shapex="hring";
lockx="x";
initialx=[0,.1];
}
else if(shapex=='hcylinder')
{
shapex="hcylinder";
lockx="x";
initialx=[0,1];
}
else if(shapex=='x4')
{
shapex="hring";
initialx=[.5,.5];
}
else if(shapex=='x5')
{
shapex="vring(0.6)";
lockx="y";
initialx=[.2,0];
}
else if(shapex=='x6')
{
shapex="hring(-.6)";
lockx="x";
initialx=[0,-.2];
}
else if(shapex=='x11')
{
shapex="DblHelix";
initialx=[0.5,0.5];
}
var vrs=$("#vrs").val();
if(vrs==0){initialx=[0,0];}
var centreImageX=$("#centerimg").html();
if(centreImageX==undefined || centreImageX=="" || centreImageX==null){centreImageX=false;}
var sound=$("#soundU").val();
if(sound==1)
{
sound="data:audio/mpeg;base64,//tQxAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAAHAAAGhgAkJCQkJCQkJCQkJCQkJElJSUlJSUlJSUlJSUlJbW1tbW1tbW1tbW1tbW2SkpKSkpKSkpKSkpKSkpK2tra2tra2tra2tra2ttvb29vb29vb29vb29vb//////////////////8AAAA5TEFNRTMuOTcgAaUAAAAALH8AABRAJAYMQgAAQAAABoas5lVjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/7UMQAAAlswxg0lIABliAt9zEgAkAnSBBi4rJygAw2sgcIwBgbeFxXqiBAgxGGCTF0bewz//+e///whnhnuc////SiBi0CDLRkZO3SNG3ShAKGFwQJMXRt8Mf/ny5/ghQKBQKBQKxSKBQIAyABHi9msv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77/wj0VSYACDN4V7ZEGQtkVBqxLfjUg1Y7+eb/TaiP++tWPvP5EWQxR7v9/v/7UsQTgA8FhxZVkwAJfSbvtxswAr3rpp2eWMCAeMN3tj3s49PtWXFZ9/Zqidbf8fY/p/LP/bZvxua07mfH31uf7GW0PN7H2X7X337sa05lf6n4K9tGP/EPvh2mir7wDznL5Ioi0g3sgUBYdEoLCglAwGAvWUhkr0kjncT8C43kMFj7M4AYBCEMc9DjPk6O8tf7y8Q0fA6if/9pECZOCFx0lz+6fywkZHTpgd///ICTR1brRcuf//+ZGJMFwtnmWBf/+DVFChI4gACiSHHB/jVr//tSxAWACzzHUbxkABEgjdfEkw1ozzqeZlgYBG8hyCkBUFoqazSoem0zFCwsLNfDLqqrUNszX/wzNckioq16rX4qaq18rqq+zCx1YKnZGJQVBrLAzqBosDT8RPWCsFYKhvEQNEAiQrKkQhGgPA4HgPEADGB0Tpdpo04DAhZZRbOUWUeXLLLKDBWWUEDCioqKios3//ULcVFMWFhVkVFBbFhXq8V//4qKi2LC7ExBTUUzLjk3qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr/+1LEEoPAAAGkAAAAIAAANIAAAASqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqg==";
}
var centreff=$("#centreffU").val();
function centreX(c, w, h, cx, cy)
{
c.setTransform(1, 0, 0, 1, 0, 0);
c.translate(cx, cy);
if(centreff==1)
{
var d = ((new Date).getTime() % 100000) * Math.PI / 25000;
c.rotate(d);
}
else if(centreff==2)
{
var d = ((new Date).getTime() % 1150) * Math.PI / 3700;
if(d<=0.35){c.transform(d, 0, 0, d, 0, 0);}
else if(d>0.35){d=1-d;c.transform(d, 0, 0, d, 0, 0);}
}
else if(centreff==3)
{
var d = ((new Date).getTime() % 14000) * Math.PI / 30000;
if(d>0 && d<=1){c.transform(d, 0, 0, d, 0, 0);}
else if(d>1 && d<=1.55){d=2-d-(d-1);c.transform(d, 0, 0, d, 0, 0);}
}
else if(centreff==4)
{
var d = ((new Date).getTime() % 7400) * Math.PI / 6000;
if(d<=1){c.transform(d, 0, 0, 1, 0, 0);c.rotate(d+200.1);}
else if(d>3.5 && d<3.9){d=5.3-d-(d-2.5);c.transform(d, 0, 0, 1, 0, 0);c.rotate(d);}
}
else if(centreff==5)
{
var d = ((new Date).getTime() % 9550) * Math.PI / 40000;
if(d<0.5){c.transform(0.5+d, 0, 0, 0.5+d, 0, 0);}else{d=0.5-d-(d-1);c.transform(0.5+d, 0, 0, 0.5+d, 0, 0);}
}
c.globalAlpha = 1;
if(centreImageX!=false)
{
const img = new Image();
img.src = centreImageX;
c.drawImage(img,-img.width/2, -img.height/2,img.width,img.height);
}
c.beginPath();
}
$("#mycanvas").tagcanvas({
shape: shapex,
lock: lockx,
offsetY:offY,
offsetX:offX,
initial:initialx,
activeAudio:sound,
audioVolume: 0.2,
audioIcon: 0,
outlineColour : "#000000",
outlineThickness : 2,
outlineDash:2,
outlineDashSpace:15,
outlineOffset:5,
outlineRadius:$("#cornPhU").val(),
outlineMethod:"outline",
bgRadius:0,
tooltip:"native",
centreFunc: centreX,
imageAlign:"centre",
imageMode:"both",
shadow:"#666666",
shadowBlur: 10,
shadowOffset:[1,1],
imagePadding:30,
imageRadius:$("#cornPhU").val(),
imageScale:1,
maxBrightness:$("#maxBrightnessU").val(),
minBrightness:$("#minBrightnessU").val(),
maxSpeed : 0.015,
minSpeed:0.001,
decel:0.95,
dragControl:dragControlx,
dragThreshold:4,
fadeIn:10,
freezeActive:false,
frontSelect:false,
hideTags:false,
pinchZoom:true,
zoom:parseFloat($("#zoomU").val()),
zoomMax:1,
zoomMin:0.1,
zoomStep:0.05,
reverse:false,
wheelZoom:true,
depth :$("#depthU").val()
});
}}
}//OBLAKO()
OBLAKO();
if(btoa($("#dwr a").text())=='qSBJc2FldiBNLlAu')
{
if($("#dwr").is(":visible"))
{
/// таймер назад
function TM(){$("#countdown").timeTo({start:!1,seconds:60*$("#timesel").val(),displayHours:!1,theme:"black",fontSize:59,lang:"ru",countdown:!0},function(){$(".fancybox-caption__body").text("Время истекло!"),$("#mycanvas").tagcanvas("reload")})}function TM2(){$("#countdown2").timeTo("stop",{seconds:-1,displayHours:!1,theme:"black",fontSize:59,lang:"ru",countdown:!1},function(){alert("Время истекло!")})}$(document).on("change","#timesel",function(){$("#countdown").timeTo({start:!1,seconds:60*$("#timesel").val()})}),TM(),$("#reset-time").click(function(){TM(),$("#countdown").timeTo("reset")}),$("#clock").timeTo({fontSize:33}),TM2(),$("#reset-time2").click(function(){TM2(),$("#countdown2").timeTo("reset")}),$("#stop-time2").click(function(){TM2(),$("#countdown2").timeTo("stop")})
function FANCYACTIV(){$('[data-fancybox="fancy_qr"]').fancybox({
afterShow:function(a,n){var o=$("#mycanvas a").eq(n.index).attr("id"); var oblako_form=$("#oblako_formU").val();if(oblako_form!="x5" && oblako_form!="x6"){$("#mycanvas").tagcanvas("tagtofront", {id: o});} $("#idthU").val(o); }, afterClose: function(){$("#vrs").val("0.5");ROTATE();},
buttons:["dewiar3","zoom","slideShow","download","fullScreen","thumbs","close"],idleTime:3,loop:!0,animationEffect:"zoom-in-out",animationDuration:1e3,transitionEffect:"circular",transitionDuration:500,fullScreen: {autoStart: true},thumbs : {autoStart : false},protect: true})}
FANCYACTIV();
function AKTBTNFNC(namebtn,xclass)
{
$.fancybox.defaults.btnTpl.dewiar3 = '<button>'+namebtn+'</button>';
$.fancybox.defaults.btnTpl.dewiar3='<button dewiar3 id="zakaz" class="fancybox-button '+xclass+'" title="Заказать">'+namebtn+'</button><div id="modalZakaz"><div id="zakazclose" title="Закрыть"><svg width="24" height="24" focusable="false"><path d="M12 4c.5 0 1 .4 1 .9V11h6a1 1 0 0 1 .1 2H13v6a1 1 0 0 1-2 .1V13H5a1 1 0 0 1-.1-2H11V5c0-.6.4-1 1-1Z"></path></svg></div>ВЫБЕРИТЕ СПОСОБ ОТПРАВКИ ЗАЯВКИ НА «<span></span>»<a href="" class="tlf"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000" version="1.1"><path xmlns="http://www.w3.org/2000/svg" d="M424.7,575.3c-97-97-189.7-209.3-145.3-253.7c63.5-63.6,118.9-102.7,6.3-242.8C173.2-61.4,98.1,46.2,36.5,107.8c-71,71-3.7,335.9,258,597.7c261.8,261.7,526.7,329.1,597.7,258c61.6-61.6,169.2-136.6,29.1-249.2C781.2,601.7,742,657,678.5,720.6C634,764.9,521.7,672.2,424.7,575.3L424.7,575.3L424.7,575.3z"></path></svg></a><img src=""><a href="" class="eml">ПО E-MAIL</a><a href="" class="sms">ПО SMS</a><a href="" class="wtsp">ПО WhatsApp</a></div>';
}
AKTBTNFNC('',"none");
$('body').on('click', '[dewiar3]', function() {ZAKAZ($("#idthU").val());});
function ZAKAZ(idrnm)
{
var data_caption=$('a[id="'+idrnm+'"]').attr("data-caption");
var image_url=$('a[id="'+idrnm+'"]').attr("href");
var img_sml = new Image();
img_sml.src = image_url;
img_sml.onload = function () {$("#modalZakaz img").attr("src",img_sml.src);}
$("#zakaz").hide();
$("#modalZakaz").show();
$("#modalZakaz span").text(data_caption);
var chz1=$("#chz1U").val();
var chz2=$("#chz2U").val();
var chz3=$("#chz3U").val();
var tlfb=$("#call").attr("href");tlfb=tlfb.replace('tel:', '');
if(tlfb!=false && tlfb.length>8)
{
$("#modalZakaz .tlf").show().attr("href","tel:"+tlfb);
if(chz2==1){$("#modalZakaz .sms").show().attr("href","sms:"+tlfb+";?&body="+encodeURI(data_caption));}else{$("#modalZakaz .sms").hide();}
if(chz3==1){$("#modalZakaz .wtsp").show().attr("href","https://api.whatsapp.com/send?phone="+tlfb+"&text="+encodeURI(data_caption));}else{$("#modalZakaz .wtsp").hide();}
}else{$("#modalZakaz .tlf,#modalZakaz .sms,#modalZakaz .wtsp").hide();}
var mailb=$("#sendm").attr("href");mailb=mailb.replace('mailto:', '');
if(mailb!=false && mailb.indexOf('.')!=-1 || mailb.indexOf('@')!=-1)
{
if(chz1==1){$("#modalZakaz .eml").show().attr("href","mailto:"+mailb+"?subject=ЗАЯВКА&body="+encodeURI(data_caption));}else{$("#modalZakaz .eml").hide();}
}else{$("#modalZakaz .eml").hide();}
}//ZAKAZ(idrnm)
$(document).on("click",'#zakazclose',function(){$("#zakaz").show();$("#modalZakaz").hide();});
var namezkz=$("#zakazU").val();
if(namezkz!=false && namezkz!=null){AKTBTNFNC(namezkz,"");}
else{AKTBTNFNC('',"none");}
function ROTATE(){var shapex=$("#oblako_formU").val();var initialx;if(shapex=='vring'){initialx=[.1,0];}else if(shapex=='vcylinder'){initialx=[1,0];}else if(shapex=='hring'){initialx=[0,.1];}else if(shapex=='hcylinder'){initialx=[0,1];}else if(shapex=='x4'){initialx=[.5,.5];}else if(shapex=='x11'){initialx=[0.5,0.5];}else{initialx=[-.2, -.2];}if(shapex=='x5' || shapex=='x6'){}else{$("#mycanvas").tagcanvas("setspeed",initialx);}}
}}
var mycanvas_w=$("#mycanvas").attr("width");
mycanvas_w = mycanvas_w.replace('px','');
mycanvas_w=mycanvas_w/100;
var img_indU=$('#img_indU').val();
if(img_indU!=null && img_indU!=false && img_indU!=undefined && mycanvas_w!=undefined)
{
var adaptivSize=img_indU*mycanvas_w;
$("#sizePh").val(adaptivSize).change();
}
var CORN_indU=$('#CORN_indU').val();
if(CORN_indU!=null && CORN_indU!=false && CORN_indU!=undefined && mycanvas_w!=undefined)
{
var adaptivC=CORN_indU*mycanvas_w;
$("#cornPhU").val(adaptivC);
}
var c_indU=$('#c_indU').val();
if(c_indU!=null && c_indU!=false && c_indU!=undefined && mycanvas_w!=undefined){var adaptivC=c_indU*mycanvas_w;SIZECENTRX(adaptivC);}
function SIZECENTRX(newsize)
{
if(newsize>640){newsize=640;}
var img = new Image();
img.onload = function ()
{
var w = this.width;
var h = this.height;
if(w>0)
{
if(w>newsize)
{
function resizeImage(img, oldWidth, oldHeight, newWidth)
{
var indx=0;
var canvas = document.createElement('canvas'),
ctx = canvas.getContext('2d');
if(oldWidth>oldHeight){indx=oldWidth/oldHeight;newHeight=newWidth/indx;}
else if(oldWidth<oldHeight){indx=oldHeight/oldWidth;newHeight=newWidth*indx;}
else{newHeight=newWidth;}
canvas.width = newWidth;
canvas.height = newHeight;
ctx.drawImage(img, 0, 0, newWidth, newHeight);
return canvas.toDataURL("image/png");
}
var newWidth=newsize/1.3;
img.src = resizeImage(this, w, h, newWidth);
}//if(w>newsize)
$("#centerimg").html(img.src);
OBLAKO();
}//if(w>0)
}//img.onload
var c_bs64U=$("#c_bs64U").val();if(c_bs64U!=false){img.src = c_bs64U;}else{setTimeout(function(){c_bs64U=$("#c_bs64U").val();if(c_bs64U!=false){img.src = c_bs64U;} }, 250);}if(c_bs64U==false){setTimeout(function(){c_bs64U=$("#c_bs64U").val();if(c_bs64U!=false){img.src = c_bs64U;} }, 250);}
}//SIZECENTRX
});//$(document).ready(function()