<%@ page language="C#" autoeventwireup="true" inherits="Admin_SystemSet_PrintExpress, Huibo.Net" enableviewstatemac="false" enableEventValidation="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>ݶ</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <style type="text/css">
    <!--
    .STYLE1 {color: #FF0000}
    -->
    @media screen {   
	    input{border:1px solid black;background-color:transparent;}   
    }     
    @media print{   
	    input{border:0 none black;font-size:11pt;}   
	    select{display:none}
	    .NO{display:none}
    }   
    </style>

    <script type="text/javascript">
        var iMouseDown  = false;
        var dragObject  = null;
        Number.prototype.NaN0=function(){return isNaN(this)?0:this;}

        // Demo 0 variables
        var DragDrops   = [];
        var curTarget   = null;
        var lastTarget  = null;

        function makeDraggable(item){
	        if(!item) return;
	        item.onmousedown = function(ev){
		        dragObject  = this;
		        mouseOffset = getMouseOffset(this, ev);
		        return false;
	        }
        }

        function getMouseOffset(target, ev){
	        ev = ev || window.event;

	        var docPos    = getPosition(target);
	        var mousePos  = mouseCoords(ev);
	        return {x:mousePos.x - docPos.x, y:mousePos.y - docPos.y};
        }

        function getPosition(e){
	        var left = 0;
	        var top  = 0;
	        while (e.offsetParent){
		        left += e.offsetLeft + (e.currentStyle?(parseInt(e.currentStyle.borderLeftWidth)).NaN0():0);
		        top += e.offsetTop  + (e.currentStyle?(parseInt(e.currentStyle.borderTopWidth)).NaN0():0);
		        e = e.offsetParent;
	        }

	        left += e.offsetLeft + (e.currentStyle?(parseInt(e.currentStyle.borderLeftWidth)).NaN0():0);
	        top  += e.offsetTop  + (e.currentStyle?(parseInt(e.currentStyle.borderTopWidth)).NaN0():0);

	        return {x:left, y:top};
        }

        function mouseCoords(ev){
	        if(ev.pageX || ev.pageY){
		        return {x:ev.pageX, y:ev.pageY};
	        }
	        return {
		        x:ev.clientX + document.body.scrollLeft - document.body.clientLeft,
		        y:ev.clientY + document.body.scrollTop  - document.body.clientTop
	        };
        }

        function mouseDown(ev){
	        ev = ev || window.event;
	        var target = ev.target || ev.srcElement;

	        if(target.onmousedown || target.getAttribute('DragObj')){
		        return false;
	        }
        }

        function mouseUp(ev){
	        //dragObject = null;

	        if(dragObject){
		        ev           = ev || window.event;
		        var mousePos = mouseCoords(ev);

		        var dT = dragObject.getAttribute('droptarget');
		        if(dT){
			        var targObj = document.getElementById(dT);
			        var objPos  = getPosition(targObj);
			        if((mousePos.x > objPos.x) && (mousePos.y > objPos.y) 
        && (mousePos.x<(objPos.x+parseInt(targObj.offsetWidth)))
         && (mousePos.y<(objPos.y+parseInt(targObj.offsetHeight)))){
				        var nSrc = targObj.getAttribute('newSrc');
				        if(nSrc){
					        dragObject.src = nSrc;
					        setTimeout(function(){
						        if(!dragObject || !dragObject.parentNode) return;
						        dragObject.parentNode.removeChild(dragObject);
						        dragObject = null;
					        }, parseInt(targObj.getAttribute('timeout')));
				        } else {
					        dragObject.parentNode.removeChild(dragObject);
				        }
			        }
		        }
	        }
	        dragObject = null;

	        iMouseDown = false;
        }

        function mouseMove(ev){
	        ev  = ev || window.event;

	        /*
	        We are setting target to whatever item the mouse is currently on

	        Firefox uses event.target here, MSIE uses event.srcElement
	        */
	        var target   = ev.target || ev.srcElement;
	        var mousePos = mouseCoords(ev);

	        if(dragObject){
		        dragObject.style.position = 'absolute';
		        dragObject.style.top      = mousePos.y - mouseOffset.y;
		        dragObject.style.left     = mousePos.x - mouseOffset.x;
		        document.getElementById(dragObject.id + "tR").value = mousePos.y - mouseOffset.y;
		        document.getElementById(dragObject.id + "lR").value = mousePos.x - mouseOffset.x;
	        }

	        lMouseState = iMouseDown;
	        if(curTarget || dragObject) return false;
        }

        function addDropTarget(item, target){
	        item.setAttribute('droptarget', target);
        }

        document.onmousemove = mouseMove;
        document.onmousedown = mouseDown;
        document.onmouseup   = mouseUp;

        window.onload = function (){
	        makeDraggable(document.getElementById('f_name'));
	        makeDraggable(document.getElementById('f_youbian'));
	        makeDraggable(document.getElementById('f_address'));
	        makeDraggable(document.getElementById('f_comcity'));
	        makeDraggable(document.getElementById('f_phone'));
	        makeDraggable(document.getElementById('f_movephone'));
	        makeDraggable(document.getElementById('f_company'));
	        makeDraggable(document.getElementById('s_name'));
	        makeDraggable(document.getElementById('s_youbian'));
	        makeDraggable(document.getElementById('s_address'));
	        makeDraggable(document.getElementById('s_comcity'));
	        makeDraggable(document.getElementById('s_phone'));
	        makeDraggable(document.getElementById('s_movephone'));
	        makeDraggable(document.getElementById('s_company'));
        }

        var img=null;
        function s(imgsrc){ //жǷͼƬ  inpΪıid
	        if(img)img.removeNode(true);
	        img=document.createElement("img"); //img
	        img.style.position="absolute";
	        img.style.visibility="hidden";
	        img.attachEvent("onreadystatechange",orsc);
	        img.attachEvent("onerror",oe);
	        document.body.insertAdjacentElement("beforeend",img);
	        img.src=imgsrc;
        }
        function oe(){ //ͼƬʾϢ
	        alert("ѡĲͼƬļ");
        }
        function orsc(){ //ȡͼƬϢ
	        var t1,t2,t3
	        if(img.readyState!="complete")return false;
	        t1=img.offsetWidth
	        t2=img.offsetHeight
	        t3=img.fileSize
        	
	        document.getElementById("kddbox").style.width=t1;
	        document.getElementById("kddbox").style.height=t2;
	        document.getElementById("hdwidthR").value=t1+"px";
	        document.getElementById("hdheightR").value=t2+"px";
	        document.getElementById("kddbox").style.backgroundImage="url(" + img.src + ")";
        }

        function checkLength(which) {
            var oTextCount = document.getElementById("char");   
            iCount = which.value.replace(/[^\u0000-\u00ff]/g,"aa");
	        which.size=iCount.length+2;
        }
    </script>

</head>
<body style="font-size: 12px;">
<form id="form1" runat="server">
    <fieldset id="kddbox" style="height: <%=hdheight%>; width: <%=hdwidth%>;">
        <%if (f_name == 1)
          {%>
        <div id="f_name" style="position: absolute; top: <%=f_namet%>px; left: <%=f_namel%>px;">
            <input name="f_namef" id="f_namef" value="" size="12" readonly="readonly" style="cursor: move;" /></div>
        <% }%>
        <%if (f_zip == 1)
          {%>
        <div id="f_youbian" style="position: absolute; left: <%=f_youbianl%>px; top: <%=f_youbiant%>px;">
            <input name="f_youbianf" id="f_youbianf" value="ʱ" size="12" readonly="readonly"
                style="cursor: move;" /></div>
        <% }%>
        <%if (f_address == 1)
          {%>
        <div id="f_address" style="position: absolute; left: <%=f_addressl%>px; top: <%=f_addresst%>px;">
            <input name="f_addressf" id="f_addressf" value="˵ַ" size="12" readonly="readonly"
                style="cursor: move;" /></div>
        <% }%>
        <%if (f_tel == 1)
          {%>
        <div id="f_phone" style="position: absolute; left: <%=f_phonel%>px; top: <%=f_phonet%>px;">
            <input name="f_phonef" id="f_phonef" value="˵绰" size="12" readonly="readonly"
                style="cursor: move;" /></div>
        <% }%>
        <%if (s_name == 1)
          {%>
        <div id="s_name" style="position: absolute; left: <%=s_namel%>px; top: <%=s_namet%>px;">
            <input name="s_namef" id="s_namef" value="ջ" size="12" readonly="readonly" style="cursor: move;" /></div>
        <% } %>
        <%if (s_zip == 1)
          {%>
        <div id="s_youbian" style="position: absolute; left: <%=s_youbianl%>px; top: <%=s_youbiant%>px;">
            <input name="s_youbianf" id="s_youbianf" value="ջʱ" size="12" readonly="readonly"
                style="cursor: move;" /></div>
        <% } %>
        <%if (s_address == 1)
          {%>
        <div id="s_address" style="position: absolute; left: <%=s_addressl%>px; top: <%=s_addresst%>px;">
            <input name="s_addressf" id="s_addressf" value="ջ˵ַ" size="12" readonly="readonly"
                style="cursor: move;" /></div>
        <% }%>
        <%if (s_tel == 1)
          {%>
        <div id="s_phone" style="position: absolute; left: <%=s_phonel%>px; top: <%=s_phonet%>px;">
            <input name="s_phonef" id="s_phonef" value="ջ˵绰" size="12" readonly="readonly"
                style="cursor: move;" /></div>
        <% } %>
        <%if (s_phone == 1)
          {%>
        <div id="s_movephone" style="position: absolute; left: <%=s_movephonel%>px; top: <%=s_movephonet%>px;">
            <input name="s_movephonef" id="s_movephonef" value="ջֻ" size="12" readonly="readonly"
                style="cursor: move;" /></div>
        <% }%>
    </fieldset>
    <table class="no">
        <tr>
            <td>
                <asp:HiddenField runat="server" id="hdwidthR" value="23cm" />
                <asp:HiddenField runat="server" id="hdheightR" value="13cm" />
                <asp:HiddenField runat="server" id="f_namelR" value="" />
                <asp:HiddenField runat="server" id="f_nametR" value="" />
                <asp:HiddenField runat="server" id="f_youbianlR" value="" />
                <asp:HiddenField runat="server" id="f_youbiantR" value="" />
                <asp:HiddenField runat="server" id="f_addresslR" value="" />
                <asp:HiddenField runat="server" id="f_addresstR" value="" />
                <asp:HiddenField runat="server" id="f_movephonelR" value="" />
                <asp:HiddenField runat="server" id="f_movephonetR" value="" />
                <asp:HiddenField runat="server" id="f_phonelR" value="" />
                <asp:HiddenField runat="server" id="f_phonetR" value="" />
                <asp:HiddenField runat="server" id="f_companylR" value="" />
                <asp:HiddenField runat="server" id="f_companytR" value="" />
                <asp:HiddenField runat="server" id="f_comcitylR" value="" />
                <asp:HiddenField runat="server" id="f_comcitytR" value="" />
                <asp:HiddenField runat="server" id="s_namelR" value="" />
                <asp:HiddenField runat="server" id="s_nametR" value="" />
                <asp:HiddenField runat="server" id="s_youbianlR" value="" />
                <asp:HiddenField runat="server" id="s_youbiantR" value="" />
                <asp:HiddenField runat="server" id="s_addresslR" value="" />
                <asp:HiddenField runat="server" id="s_addresstR" value="" />
                <asp:HiddenField runat="server" id="s_comcitylR" value="" />
                <asp:HiddenField runat="server" id="s_comcitytR" value="" />
                <asp:HiddenField runat="server" id="s_phonelR" value="" />
                <asp:HiddenField runat="server" id="s_phonetR" value="" />
                <asp:HiddenField runat="server" id="s_movephonelR" value="" />
                <asp:HiddenField runat="server" id="s_movephonetR" value="" />
                <asp:HiddenField runat="server" id="s_companylR" value="" />
                <asp:HiddenField runat="server" id="s_companytR" value="" />
                ѡݵɨ
                <input type="file" name="fileField" id="fileField" onchange="javascript:s(this.value);" /><object id="WebBrowser" classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2" height="0"
                    width="0"></object><input type="button" value="ӡԤ" onclick="document.all.WebBrowser.ExecWB(7,1)" class="NO" />
                <input type="button" value="ӡ" onclick="document.all.WebBrowser.ExecWB(6,1)" class="NO" /><br />
                뽫ݵͼƬԭʼߴ硣
            </td>
            <td width="250" align="right" valign="top">
                ʣ
                <input name="yangshi" type="text" size="12" value="<%=Request.QueryString["ExpressName"]%>" />
                <asp:Button ID="UpdateStyle" runat="server" Text="" OnClick="UpdateStyle_Click" />
            </td>
        </tr>
    </table>
    <table border="0" cellspacing="0">
        <tr>
            <td>
                <span class="STYLE1">ѡб</span><br />
                <asp:CheckBox ID="Rf_address" Text="˵ַ" runat="server" />
                <asp:CheckBox ID="Rf_tel" Text="˵绰" runat="server" />
                <asp:CheckBox ID="Rf_zip" Text="ʱ࣬" runat="server" />
                <asp:CheckBox ID="Rf_name" Text="" runat="server" /><br />
                <asp:CheckBox ID="Rs_address" Text="ջ˵ַ" runat="server" />
                <asp:CheckBox ID="Rs_tel" Text="ջ˵绰" runat="server" />
                <asp:CheckBox ID="Rs_zip" Text="ջʱ࣬" runat="server" />
                <asp:CheckBox ID="Rs_name" Text="ջ" runat="server" />
                <asp:CheckBox ID="Rs_phone" Text="ջֻ" runat="server" />
            </td>
        </tr>
        <tr>
            <td>
                <div align="left">
                    <asp:Button ID="Update" runat="server" Text="" OnClick="Update_Click" />
                </div>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
