<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/ExhibitorMaster.Master" Inherits="System.Web.Mvc.ViewPage<FamousFurnitureExpo.Models.Catalog>" %>

<%@ Import Namespace="FamousFurnitureExpo.Models" %>
<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server">
    <script  type="text/javascript" src="<%=FamousFurnitureExpo.Models.Helper.VRoot %>/Scripts/jquery-1.10.2.min.js"></script>
    <link rel='stylesheet' href='<%=FamousFurnitureExpo.Models.Helper.VRoot %>/Content/css/jquery.fancybox.css' type='text/css'/>
    <script src="<%=FamousFurnitureExpo.Models.Helper.VRoot %>/Scripts/CheckInfo.js" type="text/javascript"></script>
    <script src="<%=FamousFurnitureExpo.Models.Helper.VRoot %>/Scripts/jquery.fancybox.pack.js" type="text/javascript"></script>
    
    <script type="text/javascript">
        $(function () {
            iframeAutoFit();
            var curTime = new Date();
            var endTime = new Date(Date.parse($("#txtEndDate").text()));
            //console.log(curTime);
            //console.log(endTime);
            //console.log(curTime > endTime);
            if (curTime > endTime) {
                alert("会刊信息报名已经截止！");
                window.location.href = "http://localhost/FamousFurnitureExpo/Exhibitor/Index";
            }

            $("#CurrentPosition").html("会刊信息");
            $("#menu21").css("visibility", "visible");
            
            if ($("#hidPath").val() != "") {
                $("#AppShowStrImgPath").attr("display", "");
                $("#AppShowStrImgPath").css("display", "");
            }

            var country = $("#ClgCountry").val();
            var province = $("#Province").val();
            var city = $("#ClgCity").val();

            //如果已经提交，按钮隐藏
            //var IfSubmitCatalog = $("#IfSubmitCatalog").val();
            //if (IfSubmitCatalog==0) {
            //    $("#saveBtn").attr("display","none");
            //    $("#saveBtn").css("display","none");
            //}

            var countryCode = "";
            $("#selCountry option").each(function () {
                if ($(this).text() == country) {
                    $(this).attr("selected", true);
                    countryCode = $(this).val();
                }
            });
            if (countryCode == "86") {
                GetProvice(province);
                GetCity(province, city);
            }
            //国家/地区
            if (countryCode != "") {
                if (countryCode == "852" || countryCode == "853") {
                    $("#tel1").css("display", "none");
                    $("#fax1").css("display", "none");
                }
                else {
                    $("#tel1").css("display", "");
                    $("#fax1").css("display", "");
                }
                $("#tel0").val(countryCode);
                $("#fax0").val(countryCode);
            }
            //验证邮箱正则
            var regEmail = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
            //电话
            var tel = $("#ClgTel").val();
            if (tel != "") {
                $("#tel0").val(tel.split("-")[0]);
                $("#tel1").val(tel.split("-")[1]);
                $("#tel2").val(tel.split("-")[2]);
                $("#tel3").val(tel.split("-")[3]);
                //传真国家号
                $("#fax0").val(tel.split("-")[0]);
            }
            //传真
            var fax = $("#ClgFax").val();
            if (fax != "") {
                $("#fax0").val(fax.split("-")[0]);
                $("#fax1").val(fax.split("-")[1]);
                $("#fax2").val(fax.split("-")[2]);
                $("#fax3").val(fax.split("-")[3]);
            }

            checkAll();

            $("#ClgComName").blur(function () {
                checkComName();
            });
            $("#ClgComEName").blur(function () {
                checkComEName();
            });
            $("#ClgAddress").blur(function () {
                checkAddress();
            });
            //$("#ClgEAddress").blur(function () {
            //    checkEAddress();
            //});
            //$("#ClgZipCode").blur(function () {
            //    checkZipCode();
            //});
            $("#tel1").blur(function () {
                checkTel();
            });
            $("#tel2").blur(function () {
                checkTel();
            });
            $("#tel3").blur(function () {
                checkTel();
            });
            $("#fax1").blur(function () {
                checkFax();
            });
            $("#fax2").blur(function () {
                checkFax();
            });
            $("#fax3").blur(function () {
                checkFax();
            });
            $("#ClgEmail").blur(function () {
                checkEmail();
            });
            $("#ClgWebUrl").blur(function () {
                checkWebUrlByRE();
            });
            $("#ClgLinkMan").blur(function () {
                checkMan();
            });
            $("#ClgMobile").blur(function () {
                checkMobile();
            });
            $("#ClgBrand").blur(function () {
                checkBrand();
            });
            $("#ClgRemark").blur(function () {
                checkRemark();
            });
            
            $("#ClgPdtIntro").blur(function () {
                checkPdtIntro();
            });

            $("#ClgIntro").blur(function () {
                checkIntro();
            });
            $("#ClgEIntro").blur(function () {
                checkEIntro();
            });

            //给主营产品重新赋值
            var selectID = $("#resultClgPdtType").val();
            //console.log("selectID:" + selectID);
            //selectID != undefined || 
            if (selectID != "") {
                //多个展位号
                if (selectID.indexOf(';') > 0) {
                    var result = selectID.split(';');
                    for (var j = 0; j < result.length; j++) {
                        var typeIDList = result[j].split(':')[1];
                        if (typeIDList.indexOf(',') > 0) {
                            var aa = typeIDList.split(',');
                            for (var i = 0; i < aa.length; i++) {
                                $("#" + j + " input[type=checkbox][name=ClgPdtTypeCheck" + aa[i] + "]").prop("checked", true);
                            }
                        }
                        else {
                            $("#" + j + " input[type=checkbox][name=ClgPdtTypeCheck" + typeIDList+ "]").prop("checked", true);
                        }
                    }
                }
                //一个展位号
                else {
                    var typeIDList = selectID.split(':')[1];
                        if (typeIDList.indexOf(',') > 0) {
                            var aa = typeIDList.split(',');
                            for (var i = 0; i < aa.length; i++) {
                                $("#0 input[type=checkbox][name=ClgPdtTypeCheck" + aa[i] + "]").prop("checked", true);
                            }
                        }
                        else {
                            $("#0 input[type=checkbox][name=ClgPdtTypeCheck" + typeIDList+ "]").prop("checked", true);
                        }
                }
                
            }            


            var temp = $("#ClgIntro").val().replace(/<br>/g, "\n"); //将<br>转为换行符
            $("#ClgIntro").val(temp);
            temp = $("#ClgEIntro").val().replace(/<br>/g, "\n"); //将<br>转为换行符
            $("#ClgEIntro").val(temp);

            $("#ShowUploadDiv").css("width", $("#ImgUploadDiv").width());
            $("#ShowUploadDiv").css("height", $("#ImgUploadDiv").height());

            $("#ImgUploadDiv").css("left", $("#ShowUploadDiv").offset().left);
            $("#ImgUploadDiv").css("top", $("#ShowUploadDiv").offset().top);

        });
        
        $(function () {
            $(".myimg").fancybox({
                title: "填写模板",

                openEffect: 'elastic',
                openSpeed: 150,

                closeEffect: 'elastic',
                closeSpeed: 150,
                
                helpers: {
                    title: {
                        type: 'inside'
                    }
                },
                overlay: {
                    css: {
                        'background': 'url(/FamousFurnitureExpo/Content/img/allbgs.png)'
                    }
                }
            });
            
        });
        
        function checkAll() {
            checkComName(); checkComEName(); checkAddress(); //checkEAddress();
            checkArea(); checkTel(); checkFax(); //checkZipCode();
            checkEmail(); checkIntro(); checkEIntro(); checkMan(); checkMobile(); checkBrand(); checkRemark(); checkPdtIntro();
            //checkWebUrlByRE();
        }

        function isNum(num) {
            var reg = /\D/g;
            if (num != "") {
                if (reg.test(num)) {
                    return true;
                }
                else {
                    return false;
                }
            } else {
                return false;
            }
        }
        function checkPhoneNum(phoneNum) {
            //验证电话号码/传真号码合法性
            var reg = /^\d{7,}$/g;
            if (phoneNum != "") {
                if (reg.test(phoneNum)) {
                    return true;
                } else {
                    return false;
                }
            } else {
                return false;
            }
        }
        function showCheckTag(id, ispass, message) {
            if (ispass == true) {
                $("#" + id).html('<font color="green">√</font>');
            } else {
                if (message == null) {
                    message = "";
                }
                $("#" + id).html('<font color="red">※' + message + '</font>');
            }
        }


        function GetSubmitInfo() {
            //var Str = '[{"expoid":"927","extid":"999"';
            var Str = '[{"expoid":"927","extid":"<%=Session["atrID"] %>"';
            Str += ',"exhibitorname_cn":"' + $("#ClgComName").val() + '"';
            Str += ',"exhibitorname_en":"' + $("#ClgComEName").val() + '"';
            var temp = $("#ClgIntro").val().replace(/\n/g, "<br>"); //将换行符转为<br>
            $("#ClgIntro").val(temp);
            temp = $("#ClgEIntro").val().replace(/\n/g, "<br>"); //将换行符转为<br>
            $("#ClgEIntro").val(temp);
            Str += ',"description_cn":"' + valueReplace($("#ClgIntro").val()) + '"';
            Str += ',"description_en":"' + valueReplace($("#ClgEIntro").val()) + '"';
            Str += ',"email":"' + $("#ClgEmail").val() + '"';
            Str += ',"websiteurl":"' + $("#ClgWebUrl").val() + '"';
            Str += ',"phone":"' + $("#ClgTel").val() + '"';
            Str += ',"fax":"' + $("#ClgFax").val() + '"';
            Str += ',"man":"' + $("#ClgLinkMan").val() + '"';
            Str += ',"mobile":"' + $("#ClgMobile").val() + '"';
            Str += ',"pingpai":"' + $("#ClgBrand").val() + '"';
            Str += ',"address1_cn":"' + $("#ClgAddress").val() + '"';
            Str += ',"address1_en":"' + $("#ClgEAddress").val() + '"';
            Str += ',"postcode":"' + $("#ClgZipCode").val() + '"';
            Str += ',"subregion":"' + $("#selProvince").val() + '"';
            Str += ',"city":"' + $("#selCity").val() + '"';
            Str += ',"countryid":"' + $("#selCountry").find("option:selected").text() + '"';
            Str += ',"stand":"' + $("#ClgBthCode").val() + '"';
            Str += ',"categories":"' + GetAtrPdtType() + '"';
            Str += ',"imageid":"' + $("#AppShowStr").val() + '"';
            Str += '}]';                                                                                             
                                  
            return Str;
        }

        function valueReplace(v) {
            v = v.toString().replace(new RegExp('(["\"])', 'g'), "\\\"");
            return v;
        }   

        function Save() {
            if (checkSaveInfo()) {
                $("#ApiStr").val(GetSubmitInfo());
                //onLogin();

                //if (!$("#hidPath").val()) {
                //    $('#hidAppShowStr').val($("#hidPath").val());
                //} 

                $("#f1").submit();
            }
        }
        function checkSaveInfo() {
            //var imagelogo = $("#ImageLogoShow").attr("src");
            //if (imagelogo.indexOf("default") > 0) {
            //    if (parent) {
            //        $(parent).scrollTop(340);
            //        //MsgTip.show({ msg: "请上传公司LOGO！", ico: "warning", top: 340 });
            //        showMessage("请上传公司LOGO！");
            //    }
            //    return false;
            //}

            if (!checkComName()) {
                //MsgTip.show({ msg: "请输入公司中文名称！", ico: "warning", top: 340 });
                showMessage("请输入公司中文名称！");
                $("#ClgComName").focus().select();
                return false;
            }
            //if (!checkComEName()) {
            //    //MsgTip.show({ msg: "请输入公司英文名称！", ico: "warning", top: 340 });
            //    showMessage("请输入公司英文名称！");
            //    $("#ClgComEName").focus().select();
            //    return false;
            //}
            //if (!checkAddress()) {
            //    //MsgTip.show({ msg: "请输入中文地址！", ico: "warning", top: 340 });
            //    showMessage("请输入中文地址！");
            //    $("#ClgAddress").focus().select();
            //    return false;
            //}
            //if (!checkEAddress()) {
            //    //MsgTip.show({ msg: "请输入英文地址！", ico: "warning", top: 340 });
            //    showMessage("请输入英文地址！");
            //    $("#ClgEAddress").focus().select();
            //    return false;
            //}
            //if (!checkArea()) {
            //    //MsgTip.show({ msg: "请正确选择国家城市！", ico: "warning", top: 340 });
            //    showMessage("请正确选择国家城市！");
            //    $("#selCountry").focus();
            //    return false;
            //}
            //if (!checkZipCode()) {
            //    //MsgTip.show({ msg: "请输入邮编！", ico: "warning", top: 340 });
            //    showMessage("请输入邮编！");
            //    $("#ClgZipCode").focus().select();
            //    return false;
            //}
            
            var BthCount = $("#hidBthCount").val();
            //$('div input[type=checkbox]:checked').length
            for (var i = 0; i < BthCount; i++){
                //获取展位号有几个，根据其对应编号下面的div进行数据查询
                // $("#k").find("div:eq(1)")
                var checkItem =  $("#"+i).find("input[type=checkbox][tag=ClgPdtTypeCheck]:checked");
                if (checkItem.length <= 0) {
                    if (parent) {
                        $(parent).scrollTop(950);
                        //MsgTip.show({ msg: "请选择主营产品！", ico: "warning", top: 940 });
                        showMessage("请选择主营产品！");
                    }
                    return false;
                }

                //if ($('#ClgPdtType690').attr("checked") && ($('#TypRemark').val() ==""))
                //{
                //    showMessage("请注明主营产品中 [其他] 的信息！");
                //    return false;
                //}
            }
            
            if (!checkTel()) {
                //MsgTip.show({ msg: "请输入电话！", ico: "warning", top: 340 });
                showMessage("请输入电话！");
                $("#Tel2").focus().select();
                return false;
            }
            //邮箱提示           
            if ($("#ClgEmail").val() == "") {
                alert("请填写电子邮箱！");
                $("#ClgEmail").focus();
                return false;
            }
            if (regEmail.test($("#ClgEmail").val()) == false) {
                alert("请正确填写电子邮箱！");
                $("#ClgEmail").select();
                return false;
            }
            //网址验证          
            //if ($("#ClgWebUrl").val() == "") {
            //    alert("请填写网址！");
            //    $("#ClgWebUrl").focus();
            //    return false;
            //}

            //if ($("#ClgLinkMan").val() == "") {
            //    alert("请填写负责人！");
            //    $("#ClgLinkMan").focus();
            //    return false;
            //}
            //if ($("#ClgMobile").val() == "") {
            //    alert("请填写负责人手机！");
            //    $("#ClgMobile").focus();
            //    return false;
            //}
            if ($("#ClgBrand").val() == "") {
                alert("请填写品牌！");
                $("#ClgBrand").focus();
                return false;
            }
            //if ($("#ClgRemark").val() == "") {
            //    alert("请填写观展地图简称！");
            //    $("#ClgRemark").focus();
            //    return false;
            //}
            if ($("#ClgPdtIntro").val() == "") {
                alert("请填写观展地图简称！");
                $("#ClgPdtIntro").focus();
                return false;
            }
            

            //if (!checkFax()) {
            //    //MsgTip.show({ msg: "请输入传真！", ico: "warning", top: 340 });
            //    showMessage("请输入传真！");
            //    $("#Fax2").focus().select();
            //    return false;
            //}
            
            //if (!checkIntro()) {
            //    //MsgTip.show({ msg: "请输入公司中文介绍！", ico: "warning", top: 340 });
            //    showMessage("请输入公司中文介绍！");
            //    $("#ClgIntro").focus().select();
            //    return false;
            //}


            //if ($("#ClgIntro").val().length>200) {
            //    //MsgTip.show({ msg: "公司中文描述不能超过200字！", ico: "warning", top: 340 });
            //    showMessage("公司中文描述不能超过200字！");
            //    $("#ClgIntro").focus().select();
            //    return false;
            //}


            //if (!checkEIntro()) {
            //    //MsgTip.show({ msg: "请输入公司英文介绍！", ico: "warning", top: 340 });
            //    showMessage("请输入公司英文介绍！");
            //    $("#ClgEIntro").focus().select();
            //    return false;
            //}

            //if ($("#ClgEIntro").val().length > 500) {
            //    //MsgTip.show({ msg: "公司英文描述不能超过500字！", ico: "warning", top: 340 });
            //    showMessage("公司英文描述不能超过500字！");
            //    $("#ClgEIntro").focus().select();
            //    return false;
            //}

            var temp = $("#ClgIntro").val().replace(/\n/g, "<br>"); //将换行符转为<br>
            $("#ClgIntro").val(temp);
            temp = $("#ClgEIntro").val().replace(/\n/g, "<br>"); //将换行符转为<br>
            $("#ClgEIntro").val(temp);


            return true;
        }
        //保存主营产品

        function GetAtrPdtType() {
            
            //获取有几个展位号
            var BthCount =  $("#hidBthCount").val();
            
            var ClgPdtType = "";
            for (var j = 0; j < BthCount; j++) {
                var result = "";
               //获取对应div下面的主营产品对象
                $("#"+j).find($("input[type=checkbox][tag='ClgPdtTypeCheck']:checked")).each(function () {
                    //alert(this.value);
                    result += this.value + ",";
                     //$('#hidClgPdtType').append(this.value + ",");
                });

                //var ArrClgPdtTypeCheck = document.getElementsByName("ClgPdtTypeCheck");

                //var ArrClgPdtTypeCheck =  $("#"+j).find("input[type=checkbox][name=ClgPdtTypeCheck]");
                //for (var i = 0; i < ArrClgPdtTypeCheck.length; i++) {

                //    if (ArrClgPdtTypeCheck[i].checked) {
                //        result += ArrClgPdtTypeCheck[i].title + ",";//title
                //    }
                //}
                ClgPdtType += result.substring(0, result.length - 1) + ";";
            }
            if (ClgPdtType.length > 0) {
                ClgPdtType = ClgPdtType.substring(0, ClgPdtType.length - 1);
            }
            $("#hidClgPdtType").val(ClgPdtType);
            return ClgPdtType;
        }


        function checkComName() {
            var comName = $("#ClgComName").val();
            var error = CompanyName_Check("公司中文名称", comName);
            if (error != "") {
                showCheckTag("checkComName", false, error);
                return false;
            }
            showCheckTag("checkComName", true, "");
            return true;
        }
        function checkMan() {
            var comName = $("#ClgLinkMan").val();
            var error = CompanyName_Check("负责人", comName);
            if (error != "") {
                showCheckTag("checkMan", false, error);
                return false;
            }
            showCheckTag("checkMan", true, "");
            return true;
        }

        function checkMobile() {
            var comName = $("#ClgMobile").val();
            var error = CompanyName_Check("负责人电话", comName);
            if (error != "") {
                showCheckTag("checkMobile", false, error);
                return false;
            }
            showCheckTag("checkMobile", true, "");
            return true;
        }

        function checkBrand() {
            var comName = $("#ClgBrand").val();
            var error = CompanyName_Check("品牌", comName);
            if (error != "") {
                showCheckTag("checkBrand", false, error);
                return false;
            }
            showCheckTag("checkBrand", true, "");
            return true;
        }
        function checkRemark() {
            var comName = $("#ClgRemark").val();
            var error = CompanyName_Check("观展地图简称", comName);
            if (error != "") {
                showCheckTag("checkRemark", false, error);
                return false;
            }
            showCheckTag("checkRemark", true, "");
            return true;
        } 
        function checkPdtIntro() {
            var comName = $("#ClgPdtIntro").val();
            var error = CompanyName_Check("观展地图简称", comName);
            if (error != "") {
                showCheckTag("checkPdtIntro", false, error);
                return false;
            }
            showCheckTag("checkPdtIntro", true, "");
            return true;
        }
        

        function checkComEName() {
            var comEName = $("#ClgComEName").val();
            var error = CompanyEName_Check("公司英文名称", comEName);
            if (error != "") {
                showCheckTag("checkComEName", false, error);
                return false;
            }
            if (!checkEnglish(comEName)) {
                showCheckTag("checkComEName", false, "只能输入英文！");
                return false;
            }
            showCheckTag("checkComEName", true, "");
            return true;
        }
        function checkAddress() {
            var address = $("#ClgAddress").val();
            var error = Address_Check("中文地址", address);
            if (error != "") {
                showCheckTag("checkAddress", false, error);
                return false;
            }
            showCheckTag("checkAddress", true, "");
            return true;
        }
        function checkEAddress() {
            var address = $("#ClgEAddress").val();
            var error = EAddress_Check("英文地址", address);
            if (error != "") {
                showCheckTag("checkEAddress", false, error);
                return false;
            }
            if (!checkEnglish(address)) {
                showCheckTag("checkEAddress", false, "只能输入英文！");
                return false;
            }
            showCheckTag("checkEAddress", true, "");
            return true;
        }
        function checkArea() {
            var countryCode = $("#selCountry").val();
            var country = $("#selCountry").find("option:selected").text();
            var province = $("#selProvince").val();
            var city = $("#selCity").val();
            if (countryCode == "") {
                showCheckTag("checkArea", false, "请选择国家！");
                return false;
            }
            if (countryCode == "86") {
                if (province == "") {
                    showCheckTag("checkArea", false, "请选择省份！");
                    return false;
                }
                if (city == "") {
                    showCheckTag("checkArea", false, "请选择城市！");
                    return false;
                }
            }
            showCheckTag("checkArea", true, "");
            var SCity = $("#selCity").find("option:selected").text();
         
            GetCityCode(SCity);
            $("#ClgCountry").val(country);
            $("#ClgCity").val(city);
            return true;
        }
        //function checkZipCode() {
        //    var zipCode = $("#ClgZipCode").val();
        //    var error = ZipCode_Check("邮编", zipCode);
        //    if (error != "") {
        //        showCheckTag("checkZipCode", false, error);
        //        return false;
        //    }
        //    showCheckTag("checkZipCode", true, "");
        //    return true;
        //}
        function checkTel() {
            var tel0 = $("#tel0").val();
            var tel1 = $("#tel1").val();
            var tel2 = $("#tel2").val();
            var tel3 = $("#tel3").val();
            if (tel1 == "" && tel0 != "852" && tel0 != "853" && tel0 != "886") {
                showCheckTag("checkTel", false, "请输入电话区号！");
                return false;
            }
            if (isNum(tel1)) {
                showCheckTag("checkTel", false, "电话区号必须为数字！");
                return false;
            }
            if (tel2 == "") {
                showCheckTag("checkTel", false, "请输入电话号码！");
                return false;
            }
            if (!checkPhoneNum(tel2)) {
                showCheckTag("checkTel", false, "电话号码至少7位数字！");
                return false;
            }
            if (isNum(tel3)) {
                showCheckTag("checkTel", false, "电话分机必须为数字！");
                return false;
            }
            showCheckTag("checkTel", true, "");
            //电话
            $("#ClgTel").val($("#tel0").val() + "-" + $("#tel1").val() + "-" + $("#tel2").val() + "-" + $("#tel3").val());
            return true;
        }
        function checkFax() {
            var fax0 = $("#fax0").val();
            var fax1 = $("#fax1").val();
            var fax2 = $("#fax2").val();
            var fax3 = $("#fax3").val();
            if (fax1 != "" || fax2 != "" || fax3 != "") {
                if (fax1 == "" && fax0 != "852" && fax0 != "853") {
                    showCheckTag("checkFax", false, "请输入传真区号！");
                    return false;
                }
                if (isNum(fax1)) {
                    showCheckTag("checkFax", false, "传真区号必须为数字！");
                    return false;
                }
                if (fax2 == "") {
                    showCheckTag("checkFax", false, "请输入传真号码！");
                    return false;
                }
                if (!checkPhoneNum(fax2)) {
                    showCheckTag("checkFax", false, "传真号码至少7位数字！");
                    return false;
                }
                if (isNum(fax3)) {
                    showCheckTag("checkFax", false, "传真分机必须为数字！");
                    return false;
                }
                showCheckTag("checkFax", true, "");
                //传真
                $("#ClgFax").val(fax0 + "-" + fax1 + "-" + fax2 + "-" + fax3);
                return true;
            } else {
                $("#checkFax").html('');
                $("#ClgFax").val("");
                return true;
            }
        }
        function checkEmail() {
            var email = $("#ClgEmail").val();
            var error = Email_Check("电子邮箱", email);
            if (error != "") {
                showCheckTag("checkEmail", false, error);
                return false;
            }
            showCheckTag("checkEmail", true, "");
            return true;
        }
        function checkWebUrlByRE() {
            var webUrl = $("#ClgWebUrl").val();            
            if (!checkUrl(webUrl)) {
                showCheckTag("checkWebUrlTips", false, "请正确输入网址以 www 开头");
                return false;
            }
            showCheckTag("checkWebUrlTips", true, "");
            return true;
        }
        function checkIntro() {
            var intro = $("#ClgIntro").val();
            if ($.trim(intro) == "") {
                showCheckTag("checkIntro", false, "请输入公司中文介绍！");
                return false;
            }
            showCheckTag("checkIntro", true, "");
            return true;
        }
        function checkEIntro() {
            var intro = $("#ClgEIntro").val(); 
            if ($.trim(intro) == "") {
                showCheckTag("checkEIntro", false, "请输入公司英文介绍！");
                return false;
            }
            if (!checkEnglish(intro)) {
                showCheckTag("checkEIntro", false, "只能输入英文！");
                return false;
            }
            showCheckTag("checkEIntro", true, "");
            return true;
        }

        //选择国家
        function CountryChange() {
            var countryCode = $("#selCountry").val();
            if (countryCode == "86") {//选择中国大陆，省份、城市下拉列表联动
                GetProvice();
                $("#divCity").html("<select style='height: 22px;width:160px;font-size:12px'><option>请选择</option></select>");
            } else {
                $("#divProvince").html("");
                $("#divCity").html("");
            }

            if (countryCode != "") {
                if (countryCode == "852" || countryCode == "853") {
                    $("#tel1").css("display", "none");
                    $("#fax1").css("display", "none");
                    $("#tel1").val("");
                    $("#fax1").val("");
                }
                else {
                    $("#tel1").css("display", "");
                    $("#fax1").css("display", "");
                }
                $("#tel0").val("");
                $("#tel0").val(countryCode);
                $("#fax0").val("");
                $("#fax0").val(countryCode);
            }
            else {
                $("#tel1").css("width", "30px");
                $("#fax1").css("width", "30px");
                $("#tel0").val("");
                $("#fax0").val("");
            }
            checkArea();
        }
        //获得中国大陆省份
        function GetProvice(province) {
            $.ajax({
                type: "POST",
                data: "",
                async: false,
                url: "<%=FamousFurnitureExpo.Models.Helper.VRoot %>/Exhibitor/SelectProvinces",
                success: function (data) {
                    if (data != "") {
                        var array = eval(data);
                        var varOption = "";
                        for (var i = 0; i < array.length; i++) {
                            varOption += "<option value='" + array[i] + "'>" + array[i] + "</option>";
                        }
                        $("#divProvince").html("<select id='selProvince' onchange='GetCity($(this).val())' onkeyup='this.blur();this.focus();' name='selProvice' style='height: 22px;width:100px;font-size:12px'><option value=''>请选择</option>" + varOption + "</select>");
                        if (province != null && province != "") {
                            $("#selProvince").val(province);
                        }
                    } else {
                        $("#divProvince").html("<select id='selProvince' onchange='GetCity($(this).val())' onkeyup='this.blur();this.focus();' name='selProvice' style='height: 22px;width:100px;font-size:12px'><option value=''>请选择</option></select>");
                    }
                }
            });
            checkArea();
        }
        //得到城市
        function GetCity(zptProvince,city) {
            $.ajax({
                type: "POST",
                data: "province=" + escape(zptProvince),
                async: false,
                url: "<%=FamousFurnitureExpo.Models.Helper.VRoot %>/Exhibitor/SelectCitys",
                success: function (data) {
                    if (data != "") {
                        var array = eval(data);
                       
                        var varOption = "";
                        for (var i = 0; i < array.length; i++) {
                            varOption += "<option value='" + array[i] + "'>" + array[i] + "</option>";
                        }
                        $("#divCity").html("<select id='selCity' name='selCity' onchange='checkArea()' style='height: 22px;width:160px;font-size:12px'><option value=''>请选择</option>" + varOption + "</select>");
                        if (city != null && city != "") {
                            $("#selCity").val(city);
                        }
                    } else {//选择的省份为“请选择”
                        $("#divCity").html("<select id='selCity' name='selCity' onchange='checkArea()' style='height: 22px;width:160px;font-size:12px'><option value=''>请选择</option></select>");
                    }
                }
            });
            checkArea();
           
           
        }


        function UploadOK() {
            MsgTip.hide();
        }

        function GetCityCode(SCity) {
            $.ajax({
                type: "POST",
                data: "SCity=" + SCity,
                async: false,
                url: "<%=FamousFurnitureExpo.Models.Helper.VRoot %>/Exhibitor/GetCityCode",
                success: function (data) {
                    if (data != "") {
                        $("#tel1").val(data);
                        $("#fax1").val(data);
                    }
                }
            });
        }
        function UploadLogo() {
            var fileName = $("#UploadLogoFile").val();
            if (checkLogoFileType(fileName)) {
                //MsgTip.show({ ico: 'loading', during: 0, msg: '正在上传，请稍等...' });
                $("#f3").submit();
            }
        }

        function in_array(stringToSearch, arrayToSearch) {
             for (s = 0; s < arrayToSearch.length; s++) {
                  thisEntry = arrayToSearch[s].toString();
                      if (thisEntry == stringToSearch) {
                        return true;
                  }
             }
             return false;
        }

        function checkLogoFileType(fileName) {
            var fileType = fileName.substring(fileName.lastIndexOf('.') + 1, fileName.length).toLocaleLowerCase();

            var imagSize = document.getElementById("UploadLogoFile").files[0].size;
            var nImageSize = imagSize / (1024 * 1024);
            nImageSize = nImageSize.toFixed(2);
            //var arr = ["png","jpg", "bmp", "cdr", "ai", "wmf", "eps", "tif", "gif", "pcx", "tga", "exif", "fpx", "svg", "psd", "pcd", "dxf", "ufo", "raw", "webp"];
            var arr = ["png"];

            if (fileType!="png")
            {
                showMessage("只能上传png格式的图片文件！");
                return false;
            }

            //if (fileType != 'png' && fileType != 'jpg' && fileType != 'jpg') {
            //    showMessage("请上传PNG或JPG格式公司logo！");
            //    return false;
            //}
            if (imagSize > (1024 * 1024 * 3)) {
                showMessage("图片大小在3M以内，当前图片大小为："+nImageSize+"M");
                return false;
            }
            $("#UploadLogoFileFormat").val(fileType);

            //if (fileType != 'jpg') {
            //    showMessage("请上传JPG格式公司logo！");
            //    return false;
            //}
            return true;
        }

        function showMessage(message) {
            showMsg(message);
        }



        function GoTo(str) {
            window.location = "<%=FamousFurnitureExpo.Models.Helper.VRoot %>/Exhibitor/" + str;
        }

        //控制其他输入框
        function changeInputStatus() {
            if ($('#ClgPdtType690').attr("checked")) {
                $("#TypRemark").attr("disabled", false);
            }
            else {
                $('#TypRemark').val('');
                $("#TypRemark").attr("disabled", true);
            }

        }
        //拉去往届数据
        function pullPastData()
        {
            
            $.ajax({
                type: "POST",
                data: { "comID" : $("#hidComID").val(),atrID:$("#hidAtrID").val() },
                async: false,
                url: "<%=FamousFurnitureExpo.Models.Helper.VRoot %>/Exhibitor/getCatalogInfo",
                success: function (data) {
                    if (data != "") {
                        var result = JSON.parse(data);
                        $("#ClgComName").val(result.ClgComName);//公司中文名
                        $("#ClgComEName").val(result.ClgComEName);//公司英文名
                        $("#ClgIntro").val(result.ClgIntro);//公司中文介绍
                        $("#ClgEIntro").val(result.ClgEIntro);//公司英文介绍
                        $("#ClgLinkMan").val(result.ClgLinkMan);//联系人
                        $("#ClgMobile").val(result.ClgMobile);//联系电话
                        $("#ClgAddress").val(result.ClgAddress);//地址                        
                        $("#ClgEmail").val(result.ClgEmail);//邮箱
                        $("#ClgWebUrl").val(result.ClgWebUrl);//网址
                        $("#ClgBrand").val(result.ClgBrand);//品牌名称

                        $("#ClgRemark").val(result.ClgRemark);//备注
                        $("#ClgPdtIntro").val(result.ClgBoard);//观展地图简介
                        $("#selCountry").val(result.ClgCountry);//国家
                        var select = document.getElementById("selCountry");
                        for (var i = 0; i < select.options.length; i++) {
                            if (select.options[i].text == result.ClgCountry) {
                                select.options[i].selected = true;
                                break;
                            }
                        }
                        $("#selProvice").val(result.ClgProvince);//省份
                        $("#selCity").val(result.ClgCity);//城市


                        if (result.ClgTel != null && result.ClgTel != "") {

                            var tel = result.ClgTel.split("-");
                            if (tel.length > 0) {
                                $("#tel0").val(tel[0]);//国家编号
                                $("#tel1").val(tel[1]);//城市编号
                                $("#tel2").val(tel[2]);//电话
                                if (tel.length == 4) {
                                    $("#tel3").val(tel[3]);//电话
                                }
                            }
                        }
                        if (result.ClgFax != null && result.ClgFax != "") {
                            var fax = result.ClgFax.split("-");
                            if (fax.length > 0) {
                                $("#fax0").val(fax[0]);//国家编号
                                $("#fax1").val(fax[1]);//城市编号
                                $("#fax2").val(fax[2]);//电话
                                if (tel.length == 4) {
                                    $("#fax3").val(fax[3]);//电话
                                }
                            }
                        }
                        alert("拉取往届信息成功！");
                        // $("#ImageLogoShow").val(result.Image);//图片                       

                    }
                    else {
                        alert("拉取往届信息失败！");
                    }
                }
            });
        }

    </script>

    <style type="text/css">
        input{ vertical-align:middle; margin:0; padding:0}
        .file-box{ position:relative;width:340px}
        .txt{ height:22px; border:1px solid #cdcdcd; width:180px;}
        .btn{ background-color:#FFF; border:1px solid #CDCDCD;height:24px; width:70px;}
        .file{ position:absolute; top:0; right:80px; height:24px; filter:alpha(opacity:0);opacity: 0;width:250px }
        .myimg {
            font-weight:bold;
            color:blue;
        }
    </style>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <div>
        <center style="height: 1335px;">
            <form id="f1" action="" method="post">
                
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td align="right">
                        <table border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td align="left" style="width:80px;">截止日期：</td>
                                <td align="left" style="width:80px;" id="txtEndDate"><%=ViewData["EndDate"] %></td>
                                <td align="left" style="width:80px;">提交日期：</td>
                                <td align="left" style="width:80px;"><%=ViewData["SubDate"] %></td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <%--<tr><td>&nbsp;</td></tr>--%>
                <tr>
                    <td align="right">
                        <table border="0" cellpadding="0" cellspacing="0" style="margin-top:10px;">
                            <tr>
                                <td align="left" style="width:80px;"></td>                                
                                <td align="left"><a href="/FamousFurnitureExpo/Content/img/model.jpg" data-fancybox-group="gallery" title="填写模板" class="myimg" style="color:blue;font-size:18px;">填写模板</a></td>
                                <td align="left" style="width:80px;"></td>
                                <td align="left" style="width:80px;"></td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td align="left"  style="height:400px;">
                        <table border="0" cellpadding="0" cellspacing="10" width="100%">
                            <tr>
                                <td align="right" style="width:15%"><strong>公司基本信息</strong></td>
                                <td align="left">
                                    
                                </td>
                            </tr>
                            <tr>
                                <td width="100%" align="left" colspan="2">
                                
                                 <div id="ShowUploadDiv"></div>
                                
                                </td>
                                
                            </tr>
                            
                            <tr>
                                <td align="left" style=" width: 125px; padding-right: 5px;padding-left: 14px;text-align: right;">
                                    <input class="button" style="float: none;" type="button" onclick="pullPastData()" value="拉取往届数据"/>
                                </td>
                            </tr>
                            <tr>                                
                                <td align="right"><font color="red" style="font-weight:bold;"><span style="font-size:20px;color:red;"><strong>*</strong></span></font>公司中文名称：</td>
                                <td align="left">
                                    <input type="text" class="text" id="ClgComName" name="ClgComName" value="<%=Server.HtmlEncode(Model.ClgComName) %>" />
                                    <span id="checkComName"><font color="red">※</font></span>
                                    <input type="hidden" id="hidComName" name="hidComName" value="<%=Server.HtmlEncode(Model.ClgComName) %>" />
                                </td>
                            </tr>

                            <tr>
                                <td align="right">公司英文名称：</td>
                                <td align="left">
                                    <input type="text" class="text" id="ClgComEName" name="ClgComEName" value="<%=Server.HtmlEncode(Model.ClgComEName) %>" onkeyup="this.value=this.value.replace(/[^\x00-\xff]/g,'')" />
                                    <span id="checkComEName"><font color="red">※</font></span>
                                    <input type="hidden" id="hidClgComEName" name="hidClgComEName" value="<%=Server.HtmlEncode(Model.ClgComEName) %>" />
                                </td>
                            </tr>
                            <tr>
                                <td align="right" valign="top"></td>
                                <td align="left" valign="top">
                                    （单词首位大写）
                                </td>                               
                              
                            </tr>
                             <%
                                 var result = Model.ClgBthCode.Split(',');
                                 //var aa = result.Count();
                                 for (var i = 0; i < result.Count(); i++)
                                 {
                                     var BthCode = result[i];
                                        %>
                            <tr>
                               
                                <td align="right">展位号：</td>
                                <td align="left">
                                    <%=Server.HtmlEncode(BthCode) %>
                                    <input type="hidden" class="text" id="ClgBthCode<%=i %>" name="ClgBthCode" value="<%=Server.HtmlEncode(BthCode) %>" />
                                </td>
                            </tr>
                             <tr>
                                <td align="right"><span style="font-size:20px;color:red;"><strong>*</strong></span>主营产品：<br /><div style="margin-left:-20px;">(可多选)</div></td>
                                <td align="left" style="width:100%">

                                    <div style="width:100%" id="<%=i %>" title="<%=Server.HtmlEncode(BthCode) %>">
                                    <%
                                        List<FamousFurnitureExpo.Models.TypeInfo> liTypeInfo = ViewData["TypeInfo"] as List<FamousFurnitureExpo.Models.TypeInfo>;
                                        foreach (FamousFurnitureExpo.Models.TypeInfo typeInfo in liTypeInfo)
                                        {
                                            if (typeInfo.TypID == 690)
                                            {
                                     %>
                                                <div style="float:left;width:48%" >
                                                    <input type="checkbox" name="ClgPdtTypeCheck<%=typeInfo.TypID %>" id="ClgPdtType<%=typeInfo.TypID %>" tag="ClgPdtTypeCheck" value="<%=typeInfo.TypID %>" title="<%=typeInfo.TypName %>" onclick="changeInputStatus();" /><label for="ClgPdtType<%=typeInfo.TypID %>"><%=typeInfo.TypName%></label>                                        
                                                    <input type="text" class="text" style="width:150px;"  name="TypRemark" disabled="disabled" id="TypRemark" value="<%=Server.HtmlEncode(Model.ClgRank) %>" />
                                                </div>
                                    <%
                                            }
                                            else
                                            { 
                                    %>
                                                <div style="float:left;width:48%">
                                                    <label ><input type="checkbox" name="ClgPdtTypeCheck<%=typeInfo.TypID %>" id="ClgPdtType<%=typeInfo.TypID %>" tag="ClgPdtTypeCheck" value="<%=typeInfo.TypID %>" title="<%=typeInfo.TypName %>" /><%=typeInfo.TypName%></label>                                        
                                                </div>
                                    <%     
                                            }
                                        }
                                    %>
                                        
                                    </div>
                                   <%--<%=Model.ClgID %> --%>
                                    <input type="hidden" class="text" id="resultClgPdtType" name="ClgPdtType" value="<%=Server.HtmlEncode(Model.ClgPdtType) %>" />

                                </td>
                            </tr>
                              <%
                                    }
                                    %>

                            <tr>
                                <td align="right" valign="top"></td>
                                <td align="left" valign="top">
                                    <p style="color:red">备注：请参展商根据不同的进驻展馆，勾选各自的主营产品。</p>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" valign="top">公司中文介绍：</td>
                                <td align="left" valign="top">
                                    <textarea rows="5" cols="40" id="ClgIntro" name="ClgIntro"><%=Server.HtmlEncode(Model.ClgIntro) %></textarea>
                                    <span id="checkIntro" style="vertical-align:top"><font color="red">※</font></span>
                                    <input type="hidden" id="hidClgIntro" name="hidClgIntro" value="<%=Server.HtmlEncode(Model.ClgIntro) %>" />
                                </td>
                            </tr>
                            <tr>
                                <td align="right" valign="top"></td>
                                <td align="left" valign="top">
                                    （字数限制200字以内）
                                </td>
                            </tr>
                            <tr>
                                <td align="right" valign="top">公司英文介绍：</td>
                                <td align="left" valign="top">
                                    <textarea rows="5" cols="40" id="ClgEIntro" name="ClgEIntro" onkeyup="this.value=this.value.replace(/[^\x00-\xff]/g,'')"><%=Server.HtmlEncode(Model.ClgEIntro) %></textarea>
                                    <span id="checkEIntro" style="vertical-align:top"><font color="red">※</font></span>
                                    <input type="hidden" id="hidClgEIntro" name="hidClgEIntro" value="<%=Server.HtmlEncode(Model.ClgEIntro) %>" />
                                </td>
                            </tr>
                            <tr>
                                <td align="right" valign="top"></td>
                                <%--<td align="left" valign="top">
                                    （只能输入英文字母和英文符号，500字符以内）
                                </td>--%>
                            </tr>
                           
                            <%--<tr>
                                <td align="right"></td>
                                <td align="left" style="line-height:25px">
                                </td>
                            </tr>--%>
                            <tr>
                                <td align="right"><strong>联系方式</strong></td>
                                <td align="left">
                                    
                                </td>
                            </tr>
                            <%--<tr>
                                <td align="right">公司负责人：</td>
                                <td align="left">
                                    <input type="text" class="text" id="ClgLinkMan" name="ClgLinkMan" value="<%=Server.HtmlEncode(Model.ClgLinkMan) %>" />
                                    <span id="checkMan"><font color="red">※</font></span>
                                    <input type="hidden" id="hidClgLinkMan" name="hidClgLinkMan" value="<%=Server.HtmlEncode(Model.ClgLinkMan) %>" />
                                </td>
                            </tr>
                             <tr>
                                <td align="right">负责人手机：</td>
                                <td align="left">
                                    <input type="text" class="text" id="ClgMobile" name="ClgMobile" value="<%=Server.HtmlEncode(Model.ClgMobile) %>" />
                                    <span id="checkMobile"><font color="red">※</font></span>
                                    <input type="hidden" id="hidClgMobile" name="hidClgMobile" value="<%=Server.HtmlEncode(Model.ClgMobile) %>" />
                                </td>
                            </tr>
                            <tr>
                                <td align="right" valign="top"></td>
                                <td align="left" valign="top">
                                    （工作联系用，不上会刊）
                                </td>
                            </tr>--%>
                            <tr>
                                <td align="right">中文地址：</td>
                                <td align="left">
                                    <input type="text" class="text" id="ClgAddress" name="ClgAddress" value="<%=Server.HtmlEncode(Model.ClgAddress) %>" />
                                    <span id="checkAddress"><font color="red">※</font></span>
                                    <input type="hidden" id="hidClgAddress" name="hidClgAddress" value="<%=Server.HtmlEncode(Model.ClgAddress) %>" />
                                </td>
                            </tr>
                            <tr>
                                <td align="right" valign="top"></td>
                                <td align="left" valign="top">
                                    （仅作为组委会发送资料用，不上会刊）
                                </td>
                            </tr>
                            <%--<tr>
                                <td align="right">英文地址：</td>
                                <td align="left">
                                    <input type="text" class="text" id="ClgEAddress" name="ClgEAddress" value="<%=Server.HtmlEncode(Model.ClgEAddress) %>" onkeyup="this.value=this.value.replace(/[^\x00-\xff]/g,'')" />
                                    <span id="checkEAddress"><font color="red">※</font></span><br />（只能输入英文字母和英文符号）
                                </td>
                            </tr>--%>
                            <tr>
                                <td align="right">国家城市：</td>
                                <td align="left">
                                    <div style="float: left">
                                        <select id="selCountry" name="selCountry" onchange="CountryChange()" onkeyup='this.blur();this.focus();'
                                            style="height: 22px; width: 130px;font-size:12px">
                                            <option value="">请选择</option>
                                            <option value="86">中国</option>
                                            <% 
                                                List<FamousFurnitureExpo.Models.ZipTel> countryLi = FamousFurnitureExpo.Models.ZipTel.GetZtpCountry();
                                                foreach (FamousFurnitureExpo.Models.ZipTel zipTel in countryLi)
                                                {
                                            %>
                                                <option value="<%=zipTel.ZtpCountryCode %>"><%=zipTel.ZtpCountry %></option>
                                            <%        
                                                }
                                            %>
                                        </select>
                                    </div>
                                    <div id="divProvince" style="float: left">
                                    </div>
                                    <div id="divCity" style="float: left">
                                    </div>
                                    <span id="checkArea"><font color="red">※</font></span>
                                    <input type="hidden" id="ClgCountry" name="ClgCountry" value="<%=Server.HtmlEncode(Model.ClgCountry) %>" />
                                    <input type="hidden" id="Province" name="Province" value="<%=ViewData["Province"] %>" />
                                    <input type="hidden" id="ClgCity" name="ClgCity" value="<%=Server.HtmlEncode(Model.ClgCity) %>" />
                                    <input type="hidden" id="hidBthCount" name="hidBthCount" value="<%=Server.HtmlEncode(Model.ClgBthCode.Split(',').Count().ToString()) %>" />
                                 
                                </td>
                            </tr>
                            <%--<tr>
                                <td align="right">邮编：</td>
                                <td align="left">
                                    <input type="text" class="text" id="ClgZipCode" name="ClgZipCode" value="<%=Server.HtmlEncode(Model.ClgZipCode) %>" />
                                    <span id="checkZipCode"><font color="red">※</font></span>
                                </td>
                            </tr>--%>
                            <tr>
                                <td align="right"><font style="font-size:20px;color:red;"><strong>*</strong></font>固定电话：</td>
                                <td align="left">
                                    <input id="tel0" type="text" class="text" style="width: 30px;" readonly="readonly"
                                        value="" name="tel0" onkeyup="value=value.replace(/[^\d]/g,'')" />-
                                    <input id="tel1" type="text" class="text" style="width: 30px;" maxlength="5"
                                        value="" name="tel1" onkeyup="value=value.replace(/[^\d]/g,'')" />-
                                    <input id="tel2" type="text" class="text" style="width: 80px;" maxlength="10"
                                        value="" name="tel2" onkeyup="value=value.replace(/[^\d]/g,'')" />-
                                    <input id="tel3" type="text" class="text" style="width: 30px;" maxlength="6"
                                        value="" name="tel3" onkeyup="value=value.replace(/[^\d]/g,'')" />
                                    <span id="checkTel"><font color="red">※</font></span>
                                    <input type="hidden" id="ClgTel" name="ClgTel" value="<%=Server.HtmlEncode(Model.ClgTel) %>" />
                                </td>
                            </tr>
                            <tr>
                                <td align="right">传真：</td>
                                <td align="left">
                                    <input id="fax0" type="text" class="text" style="width: 30px;" readonly="readonly"
                                        value="" name="fax0" onkeyup="value=value.replace(/[^\d]/g,'')" />-
                                    <input id="fax1" type="text" class="text" style="width: 30px;" maxlength="5"
                                        value="" name="fax1" onkeyup="value=value.replace(/[^\d]/g,'')" />-
                                    <input id="fax2" type="text" class="text" style="width: 80px;" maxlength="10"
                                        value="" name="fax2" onkeyup="value=value.replace(/[^\d]/g,'')" />-
                                    <input id="fax3" type="text" class="text" style="width: 30px;" maxlength="10"
                                        value="" name="fax3" onkeyup="value=value.replace(/[^\d]/g,'')" />
                                    <span id="checkFax"><font color="red">※</font></span>
                                    <input type="hidden" id="ClgFax" name="ClgFax" value="<%=Server.HtmlEncode(Model.ClgFax) %>" />
                                </td>
                            </tr>
                            <tr>
                                <td align="right"><font style="font-size:20px;color:red;"><strong>*</strong></font>电子邮箱：</td>
                                <td align="left">
                                    <input type="text" class="text" id="ClgEmail" name="ClgEmail" value="<%=Server.HtmlEncode(Model.ClgEmail) %>" />
                                    <span id="checkEmail"><font color="red">※</font></span>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">网址：</td>
                                <td align="left">
                                    <input type="text" class="text" id="ClgWebUrl" name="ClgWebUrl" value="<%=Server.HtmlEncode(Model.ClgWebUrl) %>" />
                                    <span id="checkWebUrlTips"><font color="red">※</font></span><br />（例：www.baidu.com）
                                </td>
                            </tr>
                             
                             <tr>
                                <td align="right"><font style="font-size:20px;color:red;"><strong>*</strong></font>品牌名称：</td>
                                <td align="left">
                                    <input type="text" class="text" id="ClgBrand" name="ClgBrand" value="<%=Server.HtmlEncode(Model.ClgBrand) %>" />
                                    <span id="checkBrand"><font color="red">※</font></span><br />（多品牌用'/'隔开）
                                </td>
                            <tr>
                                <td align="right"><font style="font-size:20px;color:red;"><strong>*</strong></font>观展地图简称(中英文)：</td>
                                <td align="left">
                                    <input type="text" class="text" id="ClgPdtIntro" name="ClgPdtIntro" value="<%=Server.HtmlEncode(Model.ClgBoard) %>" />
                                    <span id="checkPdtIntro"><font color="red">※</font></span>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" valign="top"></td>
                                <td align="left" valign="top">
                                    （可填公司简称或品牌名称）
                                </td>
                            </tr>
                            <tr>
                                <td align="right"><font style="font-size:20px;color:red;"><strong></strong></font>备注：</td>
                                <td align="left">
                                    <input type="text" class="text" id="ClgRemark" name="ClgRemark" value="<%=Server.HtmlEncode(Model.ClgRemark) %>" />
                                </td>
                            </tr>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td align="left">
                        <table border="0" cellpadding="0" cellspacing="0" id="saveBtn">
                            <tr>
                                <td style="padding-left:150px"><div class="button" onclick="Save()">确认提交</div></td>
                                <%--<% if (ViewData["Type"] == null)
                                   { %>
                                <td><div class="button" onclick="GoTo('CatalogInfo')">返回</div></td>
                                <% } %>--%>
                            </tr>
                        </table>
                    </td>
                </tr>
              <%--  <tr>
                    <td align="left">
                        <table border="0" cellpadding="0" cellspacing="0" >
                            <tr>
                                <td style="padding-left:50px"><span style="font-size:16px;font-weight:900">确认提交后，如需修改请联系组委会翟小姐。</span></td>
                            </tr>
                        </table>
                    </td>
                </tr>--%>
                <tr>
                    <td>
                        <input type="hidden" id="ClgID" name="ClgID" value="<%=Model.ClgID %>" />
                        <input type="hidden" id="Type" name="Type" value="<%=ViewData["Type"]%>" />
                        <input type="hidden" id="ApiStr" name="ApiStr" />
                        <input type="hidden" id="Message" name="Message" value="<%=ViewData["Message"] %>" />
                        <input type="hidden" id="hidClgPdtType" name="hidClgPdtType" value="" />
                        <input type="hidden" id="IfSubmitCatalog" name="IfSubmitCatalog" value="<%=ViewData["IfSubmitCatalog"]  %>" />
                        <input type="hidden" id="hidAppShowStr" name="hidAppShowStr" value="<%=ViewData["ImgLogo"] %>" />
                        
                        
                    </td>
                </tr>
            </table>
            <script type="text/javascript">
                $(function () {
                    var message = $("#Message").val();
                    if (message != "") {
                        showMsg(message);
                    }
                    if ($("#hidPath").val() != "") {
                        $("#AppShowStrImgPath").attr("display", "");
                    }
                });
            </script>
                <input type="hidden" id="hidPath" value="<%=ViewData["ImgLogo"] %>"/>
                
            </form>
            <div id="ImgUploadDiv" style="position:absolute;width:550px ">
            <form id="f3" name="f3" action="<%=FamousFurnitureExpo.Models.Helper.VRoot %>/Exhibitor/LogoUploadImage" method="post" enctype="multipart/form-data" target="hidden_frame2">
            <%
                string imgLogo = FamousFurnitureExpo.Models.Helper.VRoot + "/Content/Images/default.jpg";
                string imgLogoSmall = FamousFurnitureExpo.Models.Helper.VRoot + "/Content/Images/default.jpg";
                if (ViewData["ImgLogoSmall"] != null)
                {
                    imgLogoSmall = FamousFurnitureExpo.Models.Helper.GetWebConfig("ActorImageVRoot") + ViewData["ImgLogoSmall"].ToString();
                }
            %>
            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                        
               <%-- <tr>
                    <td colspan="2" align="center" valign="middle" style="height:180px;">
                        <img alt="" id="ImageLogoShow" name="ImageLogoShow" src="<%=imgLogoSmall %>" />
                    </td>
                </tr>--%>
                <tr>
                    <td align="right" style="width:125px;padding-right:5px;padding-left:14px">
                        上传公司logo：
                    </td>
                    <td align="left" style="padding-left:0px">
                        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                            <tr>
                                <td align="left">
                                
                                    <div class="file-box" style="margin-left:5px">
                                        <input type='text' class='txt' id='UploadLogoFileShow' name='UploadLogoFileShow' disabled="disabled" />  
                                        <input type='button' class="btn" value='选择图片' />
                                        <input type="file" class="file" id="UploadLogoFile" name="UploadLogoFile" size="28" onchange="document.getElementById('UploadLogoFileShow').value=this.value" />
                                        <input type="hidden"  id="UploadLogoFileFormat" name="UploadLogoFileFormat"  />
                                        <input type="button" class="btn" value="上传" onclick="UploadLogo()" />
                                        <br />
                                        <a id="AppShowStrImgPath" style="display:none" target="_blank" data-fancybox-group="gallery" href="<%= FamousFurnitureExpo.Models.Helper.ActorImageVRoot %><%=ViewData["ImgLogo"] %>" >图片已上传</a>
                                        <input type="hidden" id="AppShowStr" name="AppShowStr"  />
                                    
                                    </div>
                                </td>
                            </tr>
                        </table>
                        <iframe name='hidden_frame2' id="hidden_frame2" style="display: none;"></iframe>
                    </td>
                </tr>
                <tr>
                    <td align="right" valign="top"></td>
                    <td align="left" valign="top">
                        （PNG矢量文件，图片请控制在3M以内）
                    </td>
                </tr>
                            
            </table>

                <input type="hidden" id="hidExhid" value="<%=ViewData["exhID"]  %>" />
                <input type="hidden" id="hidComID" value="<%=ViewData["comID"]  %>" />
                <input type="hidden" id="hidAtrID" value="<%=ViewData["atrID"]  %>" />
            </form>
            </div>
            
        </center>
    </div>
</asp:Content>


