<script type="text/javascript" src="{webroot:plugins/expresswaybill/history/history.js}"></script>
<script type="text/javascript" src="{webroot:plugins/expresswaybill/print_express.js}"></script>
<script type="text/javascript" src="{webroot:plugins/expresswaybill/swfobject.js}"></script>
<link rel="stylesheet" type="text/css" href="{webroot:plugins/expresswaybill/history/history.css}" />

<script type="text/javascript">
    var swfVersionStr = "10.0.0";
    var xiSwfUrlStr = "{webroot:plugins/expresswaybill/playerProductInstall.swf}";
    var flashvars = {};
    var params = {};
    params.quality = "high";
    params.bgcolor = "#ffffff";
    params.allowscriptaccess = "sameDomain";
    params.allowfullscreen = "true";

    var attributes = {};
    attributes.id = "printExpress";
    attributes.name = "printExpress";
    attributes.align = "left";

    swfobject.embedSWF(
        "{webroot:plugins/expresswaybill/main.swf}", "flashContent",
        "100%", "100%",
        swfVersionStr, xiSwfUrlStr,
        flashvars, params, attributes);

	swfobject.createCSS("#flashContent", "display:block;text-align:left;");
</script>

<div style='height:{$this->expressRow['height']}px;'>

	<div id='flashContent'></div>

	<div>
		<input type='button' class='btn_print noprint' onclick="printObj.printStart();" value='开始打印' /> &nbsp;&nbsp;
		<input type='button' class='btn_print noprint' onclick='window.history.go(-1);' value='返回上一级' />
	</div>

</div>

<script type='text/javascript'>
	printObj = null;

	//初始化
	function init()
	{
		printObj = new printExpress();
		printObj.setModeByJS('scan');
		var elementObj = new Array({echo:join(',',$this->config_conver)});

		for(elementPro in elementObj)
		{
			printObj.createText(elementObj[elementPro]);
		}

		var backgroundPic = "{webroot:}{$this->expressRow['background']}";

		if(backgroundPic != '')
		{
			printObj.backgroundPic(backgroundPic);
		}
	}
</script>