function qd(){var e=getObjectURL(this.files[0]);obUrl=e,console.log("objUrl = "+e),e?$("#img0").attr("src",e).show():$("#img0").hide()}function getObjectURL(e){var t=null;return void 0!=window.createObjectURL?t=window.createObjectURL(e):void 0!=window.URL?t=window.URL.createObjectURL(e):void 0!=window.webkitURL&&(t=window.webkitURL.createObjectURL(e)),t}function setImagePreview(){var e,t,i,l=document.getElementById("file_head"),n=l.value;if(!n.match(/.jpg|.gif|.png|.bmp/i))return alert("您上传的图片格式不正确，请重新选择！"),!1;if(e=document.getElementById("preview"),l.files&&l.files[0])e.style.display="block",e.style.width="100px",e.style.height="100px",e.src=window.navigator.userAgent.indexOf("Chrome")>=1||window.navigator.userAgent.indexOf("Safari")>=1?window.webkitURL.createObjectURL(l.files[0]):window.URL.createObjectURL(l.files[0]);else{l.select(),l.blur(),t=document.selection.createRange().text,i=document.getElementById("localImag"),i.style.width="100px",i.style.height="100px";try{i.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale)",i.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src=t}catch(e){return alert("您上传的图片格式不正确，请重新选择！"),!1}e.style.display="none",document.selection.empty()}return document.getElementById("DivUp").style.display="block",!0}$(function(){$("#logoBox,#s_dpage").click(function(){$(".htmleaf-container").fadeIn(300),$("#dpage").addClass("show")}),$("#clipBtn").click(function(){$("#logoBox").empty(),$("#logoBox").append('<img src="'+imgsource+'" align="absmiddle" style=" width:100%;">'),$(".htmleaf-container").hide(),$("#dpage").removeClass("show")})}),$(function(){$(".mask").click(function(){$(".mask").hide(),$(".all").hide()}),$(".right input").blur(function(){""==$.trim($(this).val())?$(this).addClass("place").html():$(this).removeClass("place")})}),$("#file0").change(function(){var e=getObjectURL(this.files[0]);obUrl=e,console.log("objUrl = "+e),e?$("#img0").attr("src",e).show():$("#img0").hide()});var subUrl="";$(function(){$(".file-3").bind("change",function(){subUrl=$(this).val(),$(".yulan").show(),$(".file-3").val("")}),$(".file-3").each(function(){""==$(this).val()&&$(this).parents(".uploader").find(".filename").val("营业执照")}),$(".btn-3").click(function(){$("#img-1").attr("src",obUrl),$(".yulan").hide(),$(".file-3").parents(".uploader").find(".filename").val(subUrl)}),$(".btn-2").click(function(){$(".yulan").hide()})});