function clk_check_all(oForm) { var v = !oForm.chkAll.checked; oForm.chkAll.checked = v; var sobj = document.getElementsByName("lineNum"); for(var i = 0; i < sobj.length ; i ++){ sobj[i].checked = v; } } function clk_single_select(){ var line = 0; var sobj = document.getElementsByName("lineNum"); for(var i = 0; i < sobj.length ; i ++){ if(sobj[i].checked == true){ line=line +1;; } } if(line != 1){ return true; }else{ return false; } } function clk_multi_select(){ var line = 0; var sobj = document.getElementsByName("lineNum"); for(var i = 0; i < sobj.length ; i ++){ if(sobj[i].checked == true){ line=line +1;; } } if(line < 1){ return true; }else{ return false; } } function getItemListLabel(entifyName, itemCount) { var r = " entifyName list [itemCount]"; r = r.replace("entifyName", entifyName); r = r.replace("itemCount", itemCount); return r; } function WebResult(transport) { var tagSucceed = transport.responseXML.getElementsByTagName("isSucceed")[0].firstChild.nodeValue; this.succeed = tagSucceed == "true"; var msgErrors = ""; try {msgErrors = transport.responseXML.getElementsByTagName("errors")[0].firstChild.nodeValue;}catch(ex){} this.errors = msgErrors; } WebResult.prototype.toString = function() { var ret = ""; ret += "succeed : " + this.succeed + "\n"; ret += "errors : " + this.errors; return ret; } function WebGridList(transport) { var columnList = transport.responseXML.getElementsByTagName("columns")[0].firstChild.nodeValue; var record_count = transport.responseXML.getElementsByTagName("record_count")[0].firstChild.nodeValue; this.xml = transport.responseXML.getElementsByTagName("dataList")[0].firstChild.nodeValue; this.columns = columnList.split(","); this.recordCount = parseInt(record_count); } WebGridList.prototype.refreshGrid = function(grid, xmlIsLand) { var xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.loadXML(this.xml); xmlIsLand.documentElement = xmlDoc.documentElement; var table = new AW.XML.Table; table.setXML(xmlIsLand); grid.clear(); grid.setSelectionMode("multi-row"); grid.setSelectorVisible(true); grid.setSelectorWidth(24); grid.setSelectorTemplate(new AW.Templates.CheckedItem); grid.setColumnCount(this.columns.length); grid.setRowCount(this.recordCount); grid.setHeaderText(this.columns); grid.setCellModel(table); grid.refresh(); } WebGridList.prototype.toString = function() { var ret = ""; ret += "columns : " + this.columns + "\n"; ret += "recordCount : " + this.recordCount + "\n"; ret += "xml : " + this.xml; return ret; } function WebGridFull(transport) { var columnList = transport.responseXML.getElementsByTagName("columns")[0].firstChild.nodeValue; var row_num = transport.responseXML.getElementsByTagName("row_num")[0].firstChild.nodeValue; var page_size = transport.responseXML.getElementsByTagName("page_size")[0].firstChild.nodeValue; var page_step = transport.responseXML.getElementsByTagName("page_step")[0].firstChild.nodeValue; var page_num = transport.responseXML.getElementsByTagName("page_num")[0].firstChild.nodeValue; var record_count = transport.responseXML.getElementsByTagName("record_count")[0].firstChild.nodeValue; this.xml = transport.responseXML.getElementsByTagName("dataList")[0].firstChild.nodeValue; this.columns = columnList.split(","); this.rowNum = parseInt(row_num); this.pageSize = parseInt(page_size); this.pageStep = parseInt(page_step); this.pageNum = parseInt(page_num); this.recordCount = parseInt(record_count); } WebGridFull.prototype.refreshGrid = function(grid, xmlIsLand) { var xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.loadXML(this.xml); xmlIsLand.documentElement = xmlDoc.documentElement; var table = new AW.XML.Table; table.setXML(xmlIsLand); grid.clear(); grid.setSelectionMode("multi-row"); grid.setSelectorVisible(true); grid.setSelectorWidth(24); grid.setSelectorTemplate(new AW.Templates.CheckedItem); grid.setColumnCount(this.columns.length); grid.setRowCount(this.rowNum); grid.setHeaderText(this.columns); grid.setCellModel(table); grid.refresh(); } WebGridFull.prototype.toString = function() { var ret = ""; ret += "columns : " + this.columns + "\n"; ret += "rowNum : " + this.rowNum + "\n"; ret += "pageSize : " + this.pageSize + "\n"; ret += "pageStep : " + this.pageStep + "\n"; ret += "pageNum : " + this.pageNum + "\n"; ret += "recordCount : " + this.recordCount + "\n"; ret += "xml : " + this.xml; return ret; } function DrawImage(imgSrc , iwidth , iheight){ var newImage = new Image(); newImage.src = imgSrc.src; if(newImage.width > 0 && newImage.height > 0){ if(newImage.width / newImage.height >= iwidth / iheight){ if(newImage.width > iwidth){ imgSrc.width = iwidth; imgSrc.height = (newImage.height * iwidth) / newImage.width; }else{ imgSrc.width = newImage.width; imgSrc.height = newImage.height; } imgSrc.alt = newImage.width + "X" + newImage.height; } else{ if(newImage.height > iheight){ imgSrc.height = iheight; imgSrc.width = (newImage.width * iheight) / newImage.height; }else{ imgSrc.width = newImage.width; imgSrc.height = newImage.height; } imgSrc.alt = newImage.width + "X" + newImage.height; } } } function WebTable() { args = WebTable.arguments; argv = WebTable.arguments.length; this.tablePadding = "5px"; this.tableWidth = "100%"; this.tabsColumn = []; this.alignsColumn = []; this.widthsColumn = []; for(var i = 0; i < argv; i ++) { this.tabsColumn[this.tabsColumn.length] = args[i]; this.alignsColumn[this.alignsColumn.length] = ""; this.widthsColumn[this.widthsColumn.length] = ""; } } WebTable.prototype.setAlign = function(col, val) { if (col <= this.alignsColumn.length) this.alignsColumn[col -1] = val; } WebTable.prototype.setAlignForAll = function(val) { for(var i = 0; i < this.alignsColumn.length; i ++) this.alignsColumn[i] = val; } WebTable.prototype.setTableWidth = function(val) { this.tableWidth = val; } WebTable.prototype.setColumnWidth = function(values) { for(var i = 0; i < values.length; i ++) if (i < this.widthsColumn.length) this.widthsColumn[i] = values[i]; } WebTable.prototype.toString = function() { var r = ''; r += '