$(function(){jsonData=JSON.parse(jsonData);var a=base_path+"lib/design/get.do";var b={};b.pk=jsonData.keycode;if(jsonData.keycode.indexOf("E_READERLOANTOP")>-1||jsonData.keycode.indexOf("E_BIBLOANTOP")>-1){$(".bar-chart").show()}$.post(a,b,function(c){if(c.status=="0"){onPerviewLabelDataBox(c)}else{alert(c.message)}},"json")});function onPerviewLabelDataBox(b){var c={};var a=base_path+"lib/"+vType+"/execute.do";c=jsonData;if(jsonData.supplementbookmarkflag){a=base_path+"lib/export/queryLabelByFile.do"}if(jsonData.barcodeintervalflag){getBarcodeSectionData(jsonData,b)}else{if(jsonData.printPerCheckList){$(".lold-div").hide();setLabelDisplayArea(b,jsonData.rows)}else{$.post(a,c,function(d){if(d.status=="0"){$(".lold-div").hide();setLabelDisplayArea(b,d)}else{alert(d.message)}},"json")}}}function getBarcodeSectionData(b,a){var c=[];if(b.begkeya){$(".lold-div").hide();var c={};c.rows=e;setLabelDisplayArea(b,c);return}else{e.push({barcode:d});d=addOne(d);addBarCodeAddOne(b,e,d,a)}}function addOne(b){if(!b){return}var d=b.split(/[^0-9]/);var e=d[d.length-1];if(e!=null&&e.length>0){var f=e.length;var a=parseInt(e)+1;var c=a.toString();f=Math.min(f,c.length);return b.substring(0,b.length-f)+c}else{return null}}function onPrintPerview(){$(".labelDisplayArea").jqprint()}function onCloseWin(){window.opener=null;window.open("","_self");window.close()}function _w_table_rowspan(a,b){_w_table_firsttd="";_w_table_currenttd="";_w_table_SpanNum=0;if(b==2){_w_table_Obj=$(a+" tr td:nth-child("+b+")");_w_table_Obj2=$(a+" tr td:nth-child(1)")}else{_w_table_Obj=$(a+" tr td:nth-child("+b+")")}_w_table_Obj.each(function(c){if(c==0){_w_table_firsttd=$(this);_w_table_SpanNum=1}else{_w_table_currenttd=$(this);if(b==2){if(_w_table_firsttd.text()==_w_table_currenttd.text()&&_w_table_Obj2[c-1].textContent==_w_table_Obj2[c].textContent){_w_table_SpanNum++;_w_table_currenttd.hide();_w_table_firsttd.attr("rowSpan",_w_table_SpanNum)}else{_w_table_firsttd=$(this);_w_table_SpanNum=1}}else{if(_w_table_firsttd.text()==_w_table_currenttd.text()){_w_table_SpanNum++;_w_table_currenttd.hide();_w_table_firsttd.attr("rowSpan",_w_table_SpanNum)}else{_w_table_firsttd=$(this);_w_table_SpanNum=1}}}})}function _w_table_colspan(b,a,c){if(c==void 0){c=0}_w_table_firsttd="";_w_table_currenttd="";_w_table_SpanNum=0;$(b+" tr:nth-child("+a+")").each(function(d){_w_table_Obj=$(this).children();_w_table_Obj.each(function(e){if(e==0){_w_table_firsttd=$(this);_w_table_SpanNum=1}else{if((c>0)&&(e>c)){return""}else{_w_table_currenttd=$(this);if(_w_table_firsttd.text()==_w_table_currenttd.text()){_w_table_SpanNum++;_w_table_currenttd.hide();_w_table_firsttd.attr("colSpan",_w_table_SpanNum)}else{_w_table_firsttd=$(this);_w_table_SpanNum=1}}}})})};