//turn debug on/off
var debug = 0;

var debug_win;
var lookup_win;

log("Debugging ON");

//this is called to write to the JavaScript stdout (there is none other than what we have created here)
//if debugging is on, it will write the text to the debug window, if not it just swallows it so funcs
//can call log('something') without worrying about it. Intended to stop having to alert() everywhere
//since that can mess up timing and cannot be toggled
function log(txt)
{
  if(debug)
  {
    if(!top.debug_win)
    {
      if(window.showModelessDialog)       
       top.debug_win = top.showModelessDialog('debug.html','debug_win','dialogWidth:500px;dialogHeight:250px');
      else {
        top.debug_win = top.open('debug.html','debug_win','width=500,height=250,top=100,left=200,status=no,location=no,toolbar=no,resize');
      }
      setTimeout("writeLogTxt('"+txt+"')",200);
    }
    else
      setTimeout("writeLogTxt('"+txt+"')",200);
    
  }
}

function writeLogTxt(txt) { 
  top.debug_win.addText(txt);
  top.debug_win.focus();}

//#######################################
//prototype contains and sort methods
//#######################################

Array.prototype.push = function(obj) {
  this[this.length] = obj;
}

//checks if the array contains the given argument
Array.prototype.contains = function(obj) {
  log("checking "+this.length+" items");
  for(var i = 0;i < this.length;i++) {
    if(this[i].equals) {
      if(this[i].equals(obj)) {
        log("got a match");
        return true;
      }
    } else {
      var eq = (this[i] == obj)
      log("basic data comparison, "+this[i]+" == "+obj+" returning "+eq)
      if(this[i] == obj)
        return true;
    }
  }
  log("no match, returning false");
  return false;
}

//will sort using a comparitor object (an object that has a sort() method)
Array.prototype.sort  = function(sortBy) {
  if(sortBy.sort) {
    log("is a comparitor");
    return sortBy.sort(this);
  }
  return this;
}
  
//###############################
//Category and Model objects
//###############################

function Category(name) {
  this.name = name;
  
  var models = new Array();
  
  this.getModels = function() {
    return models;
  }
  
  this.addModel = function(mod) {
    if(mod) {
      if(!models.contains(mod)) {
        models.push(mod);
        mod.setCategory(this);
      }
    }
  }
  
  this.equals = function(obj) {
    if(obj.name)
      return this.name == obj.name;
    return false;
  }
}

function Model(itemNumber,Item2,Item3,linerSize,gauge,units,color,gallons,maxLoad,palletSize,cube,minOrder) {
  this.itemNumber = itemNumber;
  this.Item2 = Item2;
  this.Item3 = Item3;
  this.linerSize = linerSize;
  this.gauge = gauge;
  this.units = units;
  this.color = color;
  this.gallons = gallons;
  this.maxLoad = maxLoad;
  this.palletSize = palletSize;
  this.cube = cube;
  this.minOrder = minOrder;
  
  var cat = 0;
  
  this.setCategory = function(cat) {
    this.cat = cat;
  }
  
  this.getCategory = function() {
    return this.cat;
  }
  
  this.equals = function(obj) {
    if(!obj)
      return false;
    if(obj.itemNumber)
      return obj.itemNumber == this.itemNumber;
    return false;
  }
  
}

//#####################
//Comparitor objects
//#####################
function ModelCategorySort() {
  this.sort = function(list) {
    //build a new array by looping through the list and ordering each object
    return list;
  }
}

function ModelItemNumberSort() {
  this.sort = function(list) {
    return list;
  }
}

function NativeSort() {
  this.sort = function(list) {
    var sortedList = new Array();
    sortedList.length = list.length;
    for(var i = 0; i < list.length;i++) {
      if(i == 0) {
        sortedList[i] = list[i];
      } else {
        var prev = sortedList[i-1];
        var curr = list[i];
        var currInt = parseInt(curr);
        var prevInt = parseInt(prev);
        //native comparison will consider everything as strings.  We need to
        //be a little smarter about splitting up numbers from strings when possible
        //first check on a string level
        var goesHere = curr > prev;
        //now lets see if we actually have at least one number
        if(currInt) {
          //we do, so see if prev is actually a number too
          if(prevInt) {
            //aha! two numbers, compare them again
            goesHere = currInt > prevInt;
          } else {
            //only current is number, which means it goes higher
            goesHere = false;
          }
        //first one wasn't a number, see if previous is a number
        } else if(prevInt) {
          //it is, so our string goes here
          goesHere = true;
        }
        if(goesHere) {
          sortedList[i] = curr;
        } else {
          var cnt = i;
          while(!goesHere && cnt > 0) {
            //alert("move it up");
            sortedList[cnt] = prev;
            cnt--;
            prev = sortedList[cnt-1];
            prevInt = parseInt(prev);
            goesHere = curr > prev;
            //same as before, numbers first
            if(currInt) {
              if(prevInt) {
                goesHere = currInt > prevInt;
              } else {
                goesHere = false;
              }
            } else if(prevInt) {
              goesHere = true;
            }
          }
          sortedList[cnt] = curr;
        }
      }
    }
    return sortedList;
  }
}


//###############
//UI Methods
//###############

var modelsMatchingGallons = new Array();

function getAllGallonCapacities() {
  galArray = new Array();
 
  for(var c = 0;c < categories.length;c++) {
    var cat = categories[c];
    for(var m = 0;m < cat.getModels().length;m++) {
      var myGals = cat.getModels()[m].gallons;
      if(!galArray.contains(myGals)) {
        galArray.push(myGals);
      }
    }
  }
  /*
  for(var i = 12;i < 80;i+=5) {
    galArray.push(i);
  }
  */
  galArray = galArray.sort(new NativeSort());
  return galArray;
}

function getMaxLoads(galCap) {
  maxLoads = new Array();
  //store the matching models so we only have to search on these
  modelsMatchingGallons = new Array();
  for(var c = 0;c < categories.length;c++) {
    var cat = categories[c];
    for(var m = 0;m < cat.getModels().length;m++) {
      var myModel = cat.getModels()[m];
      if(myModel.gallons == galCap) {
        if(!maxLoads.contains(myModel.maxLoad))
          maxLoads.push(myModel.maxLoad);
        if(!modelsMatchingGallons.contains(myModel))
          modelsMatchingGallons.push(myModel);
      }
    }
  }
  return maxLoads.sort(new NativeSort());
}

function fillGallonCapacities() {
  var ele = document.forms['model_name'].elements['gallons'];
  var opts = getAllGallonCapacities();
  ele.options.length = opts.length + 1;
  for(var i = 0;i < opts.length;i++) {
    ele.options[i+1].text = opts[i];
    ele.options[i+1].value = opts[i];
  }
  ele.selectedIndex = 0;
}

function fillMaxLoad() {
  var basedOn = document.forms['model_name'].elements['gallons'];
  var ele = document.forms['model_name'].elements['maxLoad'];
  var sel = basedOn.options[basedOn.selectedIndex].value;
  if(sel == "") {
    ele.options.length = 1;
    ele.options[0].value = "";
    ele.options[0].text = "Choose a Gallon Capacity";
    ele.disabled = true;
  } else {
    var newOpts = getMaxLoads(sel);
    ele.options.length = newOpts.length;
    for(var i =0;i < ele.options.length;i++) {
      ele.options[i].text = newOpts[i];
      ele.options[i].value = newOpts[i];
    }
    ele.disabled = false;
  }
  ele.selectedIndex = 0;
}

function resetForm() {
  document.forms['model_name'].elements['gallons'].selectedIndex = 0;
  fillMaxLoad();
}

//###################
//Searching Methods
//###################

function searchForModels() {
  if(modelsMatchingGallons.length == 0) {
    alert("Please select Gallon Capacity.");
    return;
  }
  var maxLoadEle = document.forms['model_name'].elements['maxLoad'];
  var maxLoad = maxLoadEle.options[maxLoadEle.selectedIndex].value;
  var results = new Array();
  for(var i = 0;i < modelsMatchingGallons.length;i++) {
    var checkm = modelsMatchingGallons[i];
    var hit = (parseInt(checkm.maxLoad)) ? (parseInt(checkm.maxLoad) >= parseInt(maxLoad) && parseInt(checkm.maxLoad) <= parseInt(maxLoad)+12) : checkm.maxLoad == maxLoad;
    if(hit)
      results.push(modelsMatchingGallons[i]);
  }
  buildResultsTable(results);
}

function buildResultsTable(results) {
  var div = document.getElementById("resultsDiv");
  var tbl = document.createElement("TABLE");
  tbl.setAttribute("width","100%");
  drawResultsRow(results,tbl);
  tbl.setAttribute("cellPadding",0);
  tbl.setAttribute("cellSpacing",0);
  tbl.setAttribute("id","results");
  var tr = tbl.insertRow(-1);
  var td = tr.insertCell(-1);
  var tbl2 = document.createElement("TABLE");
  tbl2.className = "resultTable";
  tbl2.setAttribute("border",1);
  tbl2.setAttribute("cellPadding",0);
  tbl2.setAttribute("cellSpacing",0);
  td.appendChild(tbl2);
  buildHeaderRows(tbl2);
  //sort our array
  results = results.sort(new ModelItemNumberSort());
  results = results.sort(new ModelCategorySort());
  var lastCat = 0;
  for(var i=0;i < results.length;i++) {
    var myModel = results[i];
    if(!myModel.getCategory().equals(lastCat)) {
      drawCategoryHeading(myModel.getCategory(),tbl2);
      lastCat = myModel.getCategory();
    }
    drawItemRow(results[i],tbl2,i%2==0);
  }
  //mozilla adds 3 child nodes, IE will only have 1
  var oldNode = (div.childNodes.length > 1) ? div.childNodes[1] : div.childNodes[0];
  log("replace child");
  div.replaceChild(tbl,oldNode);
    
}

function drawResultsRow(results,tbl) {
  var tr = tbl.insertRow(-1);
  var td = tr.insertCell(-1);
  td.setAttribute("colSpan",12);
  td.setAttribute("class","results");
  td.setAttribute("align","center");
  var maxLoadEle = document.forms['model_name'].elements['maxLoad'];
  var maxLoad = maxLoadEle.options[maxLoadEle.selectedIndex].value;
  var galEle = document.forms['model_name'].elements['gallons'];
  var gals = galEle.options[galEle.selectedIndex].value;
  td.innerHTML = "<H4><i><br>Your search for a <font color='blue'>Gallon Capacity<font color='#000000'> of &nbsp;<b>"+gals+"</b> and <font color='blue'>Maximum Load<font color='#000000'> of &nbsp;<b>"+maxLoad+"</b> returned <b><font color='blue'>"+results.length+"</font color> items.</i><H4><i>The following liners will handle loads up to <font color='blue'>" + (parseInt(maxLoad) + 12 )+ "<font color='#000000'> lbs.<br>Mil/Mic with (*) indicates strength equivalent. Minimum order for coreless rolls is 27 cases.<br>\"Brute\", \"Glutton\" and \"Slim Jim\" containers are registered trademarks of Rubbermaid Commercial Products, Inc.<br><br><font color='blue'>Click Item Numbers below to request samples of specific liners.</font color></i></H4>";
 // var tr2 = tbl.insertRow(-1);
 // var td2 = tr2.insertCell(-1);
 // td2.setAttribute("colSpan",10);
 // td2.setAttribute("align","center");
 // td2.innerHTML += "<H4><i>The following liners will handle loads up to " + (parseInt(maxLoad) + 10 )+ " lbs.</i></H4>";
}

function drawCategoryHeading(cat,tbl) {
  var catRow = tbl.insertRow(-1);
  var catTd = catRow.insertCell(-1);
  catTd.setAttribute("colSpan",12);
  catTd.className = "resultCategory";
  catTd.innerHTML = "<H4>"+cat.name;
}

function drawItemRow(m,tbl,isAlt) {
  var tr = tbl.insertRow(-1);
  if(isAlt)
    tr.className = "alt";
  
  var td1 = tr.insertCell(-1);
  td1.innerHTML = "<H5><a href=\"locatorRequest.html?sampleCat="+m.getCategory().name+"&sampleItem="+m.itemNumber+"\">"+m.itemNumber+"</a>";
  
  var td2 = tr.insertCell(-1);
  td2.innerHTML = "<H5>"+m.linerSize;
  
  var td3 = tr.insertCell(-1);
  td3.innerHTML = "<H5>"+m.gauge;
  
  var td4 = tr.insertCell(-1);
  td4.innerHTML = "<H5>"+m.color;
  
  var td5 = tr.insertCell(-1);
  td5.innerHTML = "<H5>"+m.units;
  
  var td6 = tr.insertCell(-1);
  td6.innerHTML = "<H5>"+m.gallons;
  
  var td7 = tr.insertCell(-1);
  td7.innerHTML = "<H5>"+m.maxLoad;
  
  var td8 = tr.insertCell(-1);
  td8.innerHTML = "<H5>"+m.palletSize;
  
  var td9 = tr.insertCell(-1);
  td9.innerHTML = "<H5>"+m.cube;
  
  var td10 = tr.insertCell(-1);
  td10.innerHTML = "<H5>"+m.minOrder;
}  

function buildHeaderRows(tbl) {
  var headRow = tbl.insertRow(-1);
  headRow.className = "resultHeader";
  
  var td1 = headRow.insertCell(-1);  
  td1.className = "resultHeader";
  td1.innerHTML = "<H3>Product Number</H3>";
  
  var td2 = headRow.insertCell(-1);
  td2.className = "resultHeader";
  td2.innerHTML = "<H3>Liner Size (inches)</H3>";
  
  var td3 = headRow.insertCell(-1);
  td3.className = "resultHeader";
  td3.innerHTML = "<H3>Gauge Mic/Mil</H3>";
  
  var td4 = headRow.insertCell(-1);
  td4.className = "resultHeader";
  td4.innerHTML = "<H3>Case Pack</H3>";
  
  var td5 = headRow.insertCell(-1);
  td5.className = "resultHeader";
  td5.innerHTML = "<H3>Color</H3>";
  
  var td6 = headRow.insertCell(-1);
  td6.innerHTML = "<H3>Gallon Capacity</H3>";
  td6.className = "resultHeader";
  
  var td7 = headRow.insertCell(-1);
  td7.className = "resultHeader";
  td7.innerHTML = "<H3>Max Load</H3>";
  
  var td8 = headRow.insertCell(-1);
  td8.className = "resultHeader";
  td8.innerHTML = "<H3>Cases/<br>Pallet</H3>";
  
  var td9 = headRow.insertCell(-1);
  td9.className = "resultHeader";
  td9.innerHTML = "<H3>Cube</H3>";
  
  var td10 = headRow.insertCell(-1);
  td10.className = "resultHeader";
  td10.innerHTML = "<H3>Min. Order</H3>";
}
  
    

//##################
//Populate data
//##################

var categories = new Array();

var cat1 = new Category("Hi/Lo Blended Technology");
cat1.addModel(new Model("HL39XH* ","-","-","33 x 39 ","1.5 Mil/Mic*","Black ","100","33","100","117",".38","9","8.9"));
cat1.addModel(new Model("HL46XH* ","-","-","40 x 46 ","1.5 Mil/Mic*","Black ","100","40-45","100","117",".38","9","12.4"));
cat1.addModel(new Model("HL47XH* ","-","-","43 x 47 ","1.5 Mil/Mic*","Black ","100","56 Glutton*","100","90",".54","9","13.7"));
cat1.addModel(new Model("HL50XH* ","-","-","46 x 50 ","1.5 Mil/Mic*","Black ","100","50 Big Wheel*","100","90",".54","9","15.7"));
cat1.addModel(new Model("HL58XH* ","-","-","38 x 58 ","1.5 Mil/Mic*","Black ","100","60","100","90",".54","9","14.7"));
cat1.addModel(new Model("HL39XXH*","-","-","33 x 39","2 Mil/Mic+*","Black ","100","33","150","117",".38","9","10.9"));
cat1.addModel(new Model("HL46XXH*","-","-","40 x 46","2 Mil/Mic+*","Black ","100","40-45","150","90",".54","9","15.5"));
cat1.addModel(new Model("HL47XXH* ","-","-","43 x 47","2 Mil/Mic+*","Black ","100","56 Glutton*","150","90",".54","9","17.2"));
cat1.addModel(new Model("HL4255XXH*","-","-","42 x 55","2 Mil/Mic+*","Black ","100","55 Brute *","150","90",".54","9","19.6"));
cat1.addModel(new Model("HL58XXH* ","-","-","38 x 58","2 Mil/Mic+*","Black ","100","60","150","90",".54","9","18.4"));
cat1.addModel(new Model("HLC58XXH*","-","-","38 x 58","2 Mil/Mic+*","Clear ","100","60","150","90",".54","9","18.4"));


var cat2 = new Category("Super Hex Coreless Rolls");
cat2.addModel(new Model("CRG3615EQ","-","-","30 x 36","1.0 Mil","Gray","10/25's","20-30","60","90",".54","27","17.4"));
cat2.addModel(new Model("CRG39125EQ","-","-","33 x 39",".90 Mil","Gray","10/25's","33","50","90",".54","27","18.0"));
cat2.addModel(new Model("CRG3915EQ","-","-","33 x 39","1.0 Mil","Gray","10/15's","33","65","117",".38","27","12.7"));
cat2.addModel(new Model("CRG3917EQ","-","-","33 x 39","1.1 Mil","Gray","10/15's","33","75","117",".38","27","13.9"));
cat2.addModel(new Model("CRG392EQ","-","-","33 x 39","1.3 Mil","Gray","10/10's","33","90","117",".38","27","11.0"));
cat2.addModel(new Model("CRG46125EQ","-","-","40 x 46",".90 Mil","Gray","5/25's","40-45","50","117",".38","27","12.7"));
cat2.addModel(new Model("CRG4615EQ","-","-","40 x 46","1.0 Mil","Gray","10/10's","40-45","65","117",".38","27","12.0"));
cat2.addModel(new Model("CRG4617EQ","-","-","40 x 46","1.1 Mil","Gray","10/10's","40-45","75","117",".38","27","13.2"));
cat2.addModel(new Model("CRG462EQ","-","-","40 x 46","1.3 Mil","Gray","10/10's","40-45","90","117",".38","27","15.5"));
cat2.addModel(new Model("CRG4715EQ","-","-","43 x 47","1.0 Mil","Gray","10/10's","56 Glutton*","65","117",".38","27","13.4"));
cat2.addModel(new Model("CRG472EQ","-","-","43 x 47","1.3 Mil","Gray","10/10's","56 Glutton*","90","90",".54","27","15.5"));
cat2.addModel(new Model("CRG58125EQ","-","-","38 x 58",".90 Mil","Gray","5/20's","60","50","117",".38","27","12.3"));
cat2.addModel(new Model("CRG5815EQ","-","-","38 x 58","1.0 Mil","Gray","10/10's","60","65","117",".38","27","14.4"));
cat2.addModel(new Model("CRG5817EQ","-","-","38 x 58","1.1 Mil","Gray","10/10's","60","75","90",".54","27","15.9"));
cat2.addModel(new Model("CRG582EQ","-","-","38 x 58","1.3 Mil","Gray","10/10's","60","90","90",".54","27","18.8"));


var cat3 = new Category("Custom Fit Liners");
cat3.addModel(new Model("CRB23GAL","-","-","29 x 50","1.2 Mil","Black","5/20's","Slim Jim*","75","108",".38","27","11.6"));
cat3.addModel(new Model("CRC23GAL","-","-","29 x 50","1.2 Mil","Clear","5/20's","Slim Jim*","75","108",".38","27","11.4"));
cat3.addModel(new Model("CRB32GAL","-","-","32.5 x 45","1.2 Mil","Black","5/20's","32 Brute*","75","108",".38","27","11.7"));
cat3.addModel(new Model("CRC32GAL","-","-","32.5 x 45","1.2 Mil","Clear","5/20's","32 Brute*","75","108",".38","27","11.7"));
cat3.addModel(new Model("CRB44GAL","-","-","36 x 50","1.2 Mil","Black","5/20's","44 Brute*","75","108",".38","27","14.4"));
cat3.addModel(new Model("CRC44GAL","-","-","36 x 50","1.2 Mil","Clear","5/20's","44 Brute*","75","108",".38","27","14.4"));
cat3.addModel(new Model("CRB96GAL","-","-","52 x 75","1.8 Mil","Black","10/5's","96 Tote*","100","72",".70","9","22.3"));


var cat4 = new Category("Linear Low Density - Black & Clear");
cat4.addModel(new Model("CBB17L","-","-","13 x 4 x 17",".35 Mil","Black","1000","4","15","117",".38","9","6.7"));
cat4.addModel(new Model("CBC17L","-","-","13 x 4 x 17",".35 Mil","Clear","1000","4","15","117",".38","9","6.7"));
cat4.addModel(new Model("CBB21L","-","-","12 x 8 x 21",".35 Mil","Black","1000","7","15","117",".38","9","9.6"));
cat4.addModel(new Model("CBC21L","-","-","12 x 8 x 21",".35 Mil","Clear","1000","7","15","117",".38","9","9.6"));
cat4.addModel(new Model("CXB23L","-","-","24 x 23",".35 Mil","Black","1000","10","15","90",".54","9","12.3"));
cat4.addModel(new Model("CXC23L","-","-","24 x 23",".35 Mil","Clear","1000","10","15","90",".54","9","12.3"));
cat4.addModel(new Model("CXB23M","-","-","24 x 23",".45 Mil","Black","500","10","20","117",".38","9","7.9"));
cat4.addModel(new Model("CXC23M","-","-","24 x 23",".45 Mil","Clear","500","10","20","117",".38","9","7.9"));
cat4.addModel(new Model("CXB23H","-","-","24 x 23",".60 Mil","Black","500","10","30","117",".38","9","10.6"));
cat4.addModel(new Model("CXC23H","-","-","24 x 23",".60 Mil","Clear","500","10","30","117",".38","9","10.6"));
cat4.addModel(new Model("CRB23L","-","-","24 x 23",".35 Mil","Black","20/50's","10","15","90",".54","27","12.3"));
cat4.addModel(new Model("CRC23L","-","-","24 x 23",".35 Mil","Clear","20/50's","10","15","90",".54","27","12.3"));
cat4.addModel(new Model("CRB23M","-","-","24 x 23",".45 Mil","Black","20/25's","10","20","117",".38","27","7.9"));
cat4.addModel(new Model("CRC23M","-","-","24 x 23",".45 Mil","Clear","20/25's","10","20","117",".38","27","7.9"));
cat4.addModel(new Model("CRB23H","-","-","24 x 23",".60 Mil","Black","20/25's","10","30","117",".38","27","10.6"));
cat4.addModel(new Model("CRC23H","-","-","24 x 23",".60 Mil","Clear","20/25's","10","30","117",".38","27","10.6"));
cat4.addModel(new Model("CXB32L","-","-","24 x 32",".35 Mil","Black","1000","15","15","72",".70","9","16.7"));
cat4.addModel(new Model("CXC32L","-","-","24 x 32",".35 Mil","Clear","1000","15","15","72",".70","9","16.6"));
cat4.addModel(new Model("CXB32M","-","-","24 x 32",".45 Mil","Black","500","15","20","117",".38","9","10.7"));
cat4.addModel(new Model("CXC32M","-","-","24 x 32",".45 Mil","Clear","500","15","20","117",".38","9","10.7"));
cat4.addModel(new Model("CXB32H","-","-","24 x 32",".60 Mil","Black","500","15","30","90",".54","9","14.3"));
cat4.addModel(new Model("CXC32H","-","-","24 x 32",".60 Mil","Clear","500","15","30","90",".54","9","14.3"));
cat4.addModel(new Model("CRB32L","-","-","24 x 32",".35 Mil","Black","20/50's","15","15","72",".70","27","16.7"));
cat4.addModel(new Model("CRC32L","-","-","24 x 32",".35 Mil","Clear","20/50's","15","15","72",".70","27","16.6"));
cat4.addModel(new Model("CRB32M","-","-","24 x 32",".45 Mil","Black","20/25's","15","20","117",".38","27","10.7"));
cat4.addModel(new Model("CRC32M","-","-","24 x 32",".45 Mil","Clear","20/25's","15","20","117",".38","27","10.7"));
cat4.addModel(new Model("CRB32H","-","-","24 x 32",".60 Mil","Black","20/25's","15","30","90",".54","27","14.3"));
cat4.addModel(new Model("CRC32H","-","-","24 x 32",".60 Mil","Clear","20/25's","15","30","90",".54","27","14.3"));
cat4.addModel(new Model("CXB36M","-","-","30 x 36",".45 Mil","Black","250","20-30","30","117",".38","9","7.9"));
cat4.addModel(new Model("CXC36M","-","-","30 x 36",".45 Mil","Clear","250","20-30","30","117",".38","9","7.9"));
cat4.addModel(new Model("CXB36H","-","-","30 x 36",".60 Mil","Black","250","20-30","40","117",".38","9","10.6"));
cat4.addModel(new Model("CXC36H","-","-","30 x 36",".60 Mil","Clear","250","20-30","40","117",".38","9","10.6"));
cat4.addModel(new Model("CRB36M","-","-","30 x 36",".45 Mil","Black","10/25's","20-30","30","117",".38","27","7.9"));
cat4.addModel(new Model("CRC36M","-","-","30 x 36",".45 Mil","Clear","10/25's","20-30","30","117",".38","27","7.9"));
cat4.addModel(new Model("CRB36H","-","-","30 x 36",".60 Mil","Black","10/25's","20-30","40","117",".38","27","10.6"));
cat4.addModel(new Model("CRC36H","-","-","30 x 36",".60 Mil","Clear","10/25's","20-30","40","117",".38","27","10.6"));
cat4.addModel(new Model("CXB39M","-","-","33 x 39",".45 Mil","Black","250","33","30","117",".38","9","9.5"));
cat4.addModel(new Model("CXC39M","-","-","33 x 39",".45 Mil","Clear","250","33","30","117",".38","9","9.5"));
cat4.addModel(new Model("CXB39H","-","-","33 x 39",".60 Mil","Black","250","33","40","90",".54","9","12.7"));
cat4.addModel(new Model("CXC39H","-","-","33 x 39",".60 Mil","Clear","250","33","40","90",".54","9","12.7"));
cat4.addModel(new Model("CB2-40X","-","-","33 x 39",".80 Mil","Black","250","33","55","90",".54","9","16.1"));
cat4.addModel(new Model("CB1-40X","-","-","33 x 39",".80 Mil","Clear","250","33","55","90",".54","27","15.8"));
cat4.addModel(new Model("CRB39M","-","-","33 x 39",".45 Mil","Black","10/25's","33","30","117",".38","27","9.5"));
cat4.addModel(new Model("CRC39M","-","-","33 x 39",".45 Mil","Clear","10/25's","33","30","117",".38","27","9.5"));
cat4.addModel(new Model("CRB39H","-","-","33 x 39",".60 Mil","Black","10/25's","33","40","90",".54","27","12.7"));
cat4.addModel(new Model("CRC39H","-","-","33 x 39",".60 Mil","Clear","10/25's","33","40","90",".54","27","12.7"));
cat4.addModel(new Model("CRCB2-40X","-","-","33 x 39",".80 Mil","Black","10/25's","33","55","90",".54","27","16.1"));
cat4.addModel(new Model("CRCB1-40X","-","-","33 x 39",".80 Mil","Clear","10/25's","33","55","90",".54","27","15.8"));
cat4.addModel(new Model("CXB46M","-","-","40 x 46",".45 Mil","Black","250","40-45","30","90",".54","27","13.4"));
cat4.addModel(new Model("CXC46M","-","-","40 x 46",".45 Mil","Clear","250","40-45","30","90",".54","27","13.4"));
cat4.addModel(new Model("CXB46H","-","-","40 x 46",".65 Mil","Black","125","40-45","45","117",".38","9","9.7"));
cat4.addModel(new Model("CXC46H","-","-","40 x 46",".65 Mil","Clear","125","40-45","45","117",".38","9","9.7"));
cat4.addModel(new Model("CB2-46X","-","-","40 x 46",".80 Mil","Black","250","40-45","55","117",".38","18","22.4"));
cat4.addModel(new Model("CB1-46X","-","-","40 x 46",".80 Mil","Clear","250","40-45","55","117",".38","18","22.4"));
cat4.addModel(new Model("CRB46M","-","-","40 x 46",".45 Mil","Black","10/25's","40-45","30","90",".54","27","13.4"));
cat4.addModel(new Model("CRC46M","-","-","40 x 46",".45 Mil","Clear","10/25's","40-45","30","90",".54","27","13.4"));
cat4.addModel(new Model("CRB46H","-","-","40 x 46",".65 Mil","Black","5/25's","40-45","45","117",".38","27","9.7"));
cat4.addModel(new Model("CRC46H","-","-","40 x 46",".65 Mil","Clear","5/25's","40-45","45","117",".38","27","9.7"));
cat4.addModel(new Model("CRCB2-46X","-","-","40 x 46",".80 Mil","Black","10/25'S","40-45","55","117",".38","27","22.4"));
cat4.addModel(new Model("CRCB2-46X","-","-","40 x 46",".80 Mil","Clear","10/25'S","40-45","55","117",".38","27","22.4"));
cat4.addModel(new Model("CXB47H","-","-","43 x 47",".65 Mil","Black","200","56 Glutton*","45","72",".70","9","17.5"));
cat4.addModel(new Model("CXC47H","-","-","43 x 47",".65 Mil","Clear","200","56 Glutton*","45","72",".70","27","17.5"));
cat4.addModel(new Model("CB2-47X","-","-","43 x 47",".80 Mil","Black","200","56 Glutton*","55","72",".70","27","21.6"));
cat4.addModel(new Model("CXB50H","-","-","46 x 50",".65 Mil","Black","100","50 Big Wheel*","45","117",".38","27","10.0"));
cat4.addModel(new Model("CXC50H","-","-","46 x 50",".65 Mil","Clear","100","50 Big Wheel*","45","117",".38","27","10.0"));
cat4.addModel(new Model("CB2-50X","-","-","46 x 50",".80 Mil","Black","100","50 Big Wheel*","55","117",".38","27","12.3"));
cat4.addModel(new Model("CRB47H","-","-","43 x 47",".65 Mil","Black","10/20's","56 Glutton*","45","72",".70","27","17.5"));
cat4.addModel(new Model("CRC47H","-","-","43 x 47",".65 Mil","Clear","10/20's","56 Glutton*","45","72",".70","27","17.5"));
cat4.addModel(new Model("CRCB2-47X","-","-","43 x 47",".80 Mil","Black","10/20'S","56 Glutton*","55","72",".70","27","21.6"));
cat4.addModel(new Model("CRB50H","-","-","46 x 50",".65 Mil","Black","10/10's","50 Big Wheel*","45","117",".38","27","10.0"));
cat4.addModel(new Model("CRC50H","-","-","46 x 50",".65 Mil","Clear","10'10's","50 Big Wheel*","45","117",".38","27","10.0"));
cat4.addModel(new Model("CRCB2-50X","-","-","46 x 50",".80 Mil","Black","5/20's","50 Big Wheel*","55","117",".38","27","12.3"));
cat4.addModel(new Model("CXB58M","-","-","36 x 58",".45 Mil","Black","200","55","30","90",".54","27","12.3"));
cat4.addModel(new Model("CXC58M","-","-","36 x 58",".45 Mil","Clear","200","55","30","90",".54","27","12.3"));
cat4.addModel(new Model("CXB58H","-","-","36 x 58",".65 Mil","Black","200","55","45","90",".54","9","17.8"));
cat4.addModel(new Model("CXC58H","-","-","36 x 58",".65 Mil","Clear","200","55","45","90",".54","9","17.8"));
cat4.addModel(new Model("CXB58AH","-","-","38 x 58",".65 Mil","Black","200","60","45","72",".70","27","18.8"));
cat4.addModel(new Model("CXC58AH","-","-","38 x 58",".65 Mil","Clear","200","60","45","72",".70","27","18.8"));
cat4.addModel(new Model("CB2-62X","-","-","38 x 58",".80 Mil","Black","200","60","55","117",".38","18","21.7"));
cat4.addModel(new Model("CB1-62X","-","-","38 x 58",".80 Mil","Clear","200","60","55","117",".38","27","21.7"));
cat4.addModel(new Model("CRB58H","-","-","36 x 58",".65 Mil","Black","10/20's","55","45","90",".54","27","17.8"));
cat4.addModel(new Model("CRC58H","-","-","36 x 58",".65 Mil","Clear","10/20's","55","45","90",".54","27","17.8"));
cat4.addModel(new Model("CRB58AH","-","-","38 x 58",".65 Mil","Black","10/20's","60","45","72",".70","27","18.8"));
cat4.addModel(new Model("CRC58AH","-","-","38 x 58",".65 Mil","Clear","10/20's","60","45","72",".70","27","18.8"));
cat4.addModel(new Model("CRCB2-62X","-","-","38 x 58",".80 Mil","Black","10/20'S","60","55","117",".38","27","21.7"));
cat4.addModel(new Model("CRCB1-62X","-","-","38 x 58",".80 Mil","Clear","10/20'S","60","55","117",".38","27","21.7"));


var cat5 = new Category("Super Tuff White - Coreless Rolls");
cat5.addModel(new Model("CRW32M","-","-","24 x 32",".50 Mil","White","20/25'S","15","20","117",".38","27","11.9"));
cat5.addModel(new Model("CRW36X","-","-","30 x 36",".75 Mil","White","8/25's","20-30","50","117",".38","27","10.6"));
cat5.addModel(new Model("CRW39X","-","-","33 x 39",".75 Mil","White","6/25's","33","50","117",".38","27","9.6"));
cat5.addModel(new Model("CRW42X","-","-","26 x 42",".75 Mil","White","5/20's","30","50","117",".38","27","5.4"));
cat5.addModel(new Model("CRW46X","-","-","40 x 46",".75 Mil","White","5/20's","40-45","50","117",".38","27","9.0"));
cat5.addModel(new Model("CRW47X","-","-","43 x 47",".75 Mil","White","5/20's","56 Glutton*","50","117",".38","27","10.1"));
cat5.addModel(new Model("CRW50X","-","-","46 x 50",".75 Mil","White","5/20's","50 Big Wheel*","50","117",".38","27","11.5"));
cat5.addModel(new Model("CRW3658X","-","-","36 x 58",".75 Mil","White","10/10's","55","50","117",".38","27","10.3"));
cat5.addModel(new Model("CRW58X","-","-","38 x 58",".75 Mil","White","10/10's","60","50","117",".38","27","10.8"));
cat5.addModel(new Model("CRW39ST","-","-","33 x 39","1.0 Mil","White","10/15's","33","65","90",".54","27","12.7"));
cat5.addModel(new Model("CRW42ST","-","-","26 x 42","1.0 Mil","White","10/10's","30","65","117",".38","27","7.3"));
cat5.addModel(new Model("CRW46ST","-","-","40 x 46","1.0 Mil","White","10/10's","40-45","65","90",".54","27","12.0"));
cat5.addModel(new Model("CRW47ST","-","-","43 x 47","1.0 Mil","White","10/10's","56 Glutton*","65","90",".54","27","13.5"));
cat5.addModel(new Model("CRW58ST","-","-","38 x 58","1.0 Mil","White","10/10's","60","65","90",".54","27","14.4"));


var cat6 = new Category("Blue Recycling Liners - Unprinted");
cat6.addModel(new Model("CCB15GAL","-","-","24 x 32",".80 Mil","Blue","10/25's","15","40","117",".38","9","10.2"));
cat6.addModel(new Model("CCB30GAL","-","-","30 x 36","1.1 Mil","Blue","10/20's","20-30","65","90",".54","9","15.3"));
cat6.addModel(new Model("CCB33GAL","-","-","33 x 40","1.2 Mil","Blue","10/15's","33","70","90",".54","9","15.8"));
cat6.addModel(new Model("CCB44GAL","-","-","38 x 48","1.3 Mil","Blue","10/10's","44","75","90",".54","9","15.8"));
cat6.addModel(new Model("CCB55GAL","-","-","38 x 58","1.4 Mil","Blue","8/10's","60","80","90",".54","9","15.6"));


var cat7 = new Category("Premium Black Liners - Flat Pack");
cat7.addModel(new Model("TGG23","-","-","24 x 23","1.0 Mil","Black","500","10","50","72",".70","9","15.9"));
cat7.addModel(new Model("TGG32","-","-","24 x 32","1.0 Mil","Black","250","15","50","117",".38","9","10.7"));
cat7.addModel(new Model("TGG36X","-","-","30 x 36","1.0 Mil","Black","250","20-30","65","90",".54","9","17.4"));
cat7.addModel(new Model("TGG36XH","-","-","30 x 36","1.35 Mil","Black","250","20-30","80","72",".70","9","23.4"));
cat7.addModel(new Model("TGG39X","-","-","33 x 40","1.0 Mil","Black","250","33","65","72",".70","9","21.6"));
cat7.addModel(new Model("TGG39XH","-","-","33 x 40","1.35 Mil","Black","100","33","80","117",".38","9","11.3"));
cat7.addModel(new Model("TGG39XXH","-","-","33 x 40","1.8 Mil","Black","100","33","100","117",".38","27","14.7"));
cat7.addModel(new Model("CXB42H+","-","-","26 x 42","1.2 Mil","Black","100","30","70","117",".38","9","8.4"));
cat7.addModel(new Model("CXB45H+","-","-","30 x 45","1.2 Mil","Black","100","35","70","117",".38","9","10.0"));
cat7.addModel(new Model("TGG46X","-","-","40 x 46","1.0 Mil","Black","125","40-45","65","90",".54","9","15.0"));
cat7.addModel(new Model("TGG46XH","-","-","40 x 46","1.35 Mil","Black","100","40-45","80","90",".54","9","15.5"));
cat7.addModel(new Model("TGG46XXH","-","-","40 x 46","1.8 Mil","Black","100","40-45","100","72",".70","9","20.3"));
cat7.addModel(new Model("TGG47X","-","-","43 x 47","1.0 Mil","Black","100","56 Glutton*","65","117",".38","9","13.5"));
cat7.addModel(new Model("TGG47XH","-","-","43 x 47","1.35 Mil","Black","100","56 Glutton*","80","90",".54","9","17.5"));
cat7.addModel(new Model("TGG47XXH","-","-","43 x 47","1.8 Mil","Black","100","56 Glutton*","100","72",".70","9","22.9"));
cat7.addModel(new Model("TGG3658X","-","-","36 x 58","1.0 Mil","Black","100","55","65","117",".38","9","13.7"));
cat7.addModel(new Model("TGG58X","-","-","38 x 58","1.0 Mil","Black","100","60","65","117",".38","9","14.4"));
cat7.addModel(new Model("TGG58XH","-","-","38 x 58","1.35 Mil","Black","100","60","80","90",".54","9","18.8"));
cat7.addModel(new Model("TGG58XXH","-","-","38 x 58","1.8 Mil","Black","100","60","100","72",".70","9","24.5"));
cat7.addModel(new Model("TGG50X","-","-","46 x 50","1.0 Mil","Black","100","50 Big Wheel*","65","90",".54","9","15.3"));
cat7.addModel(new Model("TGG50XH","-","-","46 x 50","1.35 Mil","Black","100","50 Big Wheel*","80","72",".70","9","19.9"));
cat7.addModel(new Model("TGG4455","-","-","44 x 55","1.25 Mil","Black","100","50 Square Brute*","75","72",".70","9","19.3"));
cat7.addModel(new Model("TGG5044","-","-","50 x 44","1.25 Mil","Black","100","King Can**","75","72",".70","9","18.3"));
cat7.addModel(new Model("TGG55XH","-","-","40 x 55","1.35 Mil","Black","100","55 Brute*","80","72",".70","9","19.1"));
cat7.addModel(new Model("TGG55XXH","-","-","40 x 55","1.8 Mil","Black","100","55 Brute*","100","72",".70","9","24.9"));


var cat8 = new Category("Premium Black Liners - Coreless Rolls");
cat8.addModel(new Model("CRTGG23","-","-","24 x 23","1.0 Mil","Black","20/25's","10","50","72",".70","27","15.9"));
cat8.addModel(new Model("CRTGG32","-","-","24 x 32","1.0 Mil","Black","10/25's","15","50","117",".38","27","10.7"));
cat8.addModel(new Model("CRTGG39X","-","-","33 x 40","1.0 Mil","Black","10/25's","33","65","72",".70","27","21.6"));
cat8.addModel(new Model("CRTGG39HP","-","-","33 x 40","1.2 Mil","Black","5/20's","33","75","117",".38","27","10.0"));
cat8.addModel(new Model("CRTGG39XH","-","-","33 x 40","1.35 Mil","Black","5/20's","33","80","117",".38","27","11.3"));
cat8.addModel(new Model("CRB42H+","-","-","26 x 42","1.2 Mil","Black","5/20's","30","80","117",".38","27","8.4"));
cat8.addModel(new Model("CRB45H+","-","-","30 x 45","1.2 Mil","Black","5/20's","35","80","117",".38","27","10.0"));
cat8.addModel(new Model("CRTGG46X","-","-","40 x 46","1.0 Mil","Black","5/25's","40-45","65","90",".54","27","15.0"));
cat8.addModel(new Model("CRTGG46HP","-","-","40 x 46","1.2 Mil","Black","5/20's","40-45","75","90",".54","27","13.7"));
cat8.addModel(new Model("CRTGG46XH","-","-","40 x 46","1.35 Mil","Black","10/10's","40-45","80","90",".54","27","15.5"));
cat8.addModel(new Model("CRTGG46XXH","-","-","40 x 46","1.8 Mil","Black","10/10's","40-45","100","72",".70","27","20.3"));
cat8.addModel(new Model("CRTGG47X","-","-","43 x 47","1.0 Mil","Black","5/20's","56 Glutton*","65","117",".38","27","13.5"));
cat8.addModel(new Model("CRTGG47HP","-","-","43 x 47","1.2 Mil","Black","10/10's","56 Glutton*","75","90",".54","27","15.5"));
cat8.addModel(new Model("CRTGG47XH","-","-","43 x 47","1.35 Mil","Black","10/10's","56 Glutton*","80","90",".54","27","17.5"));
cat8.addModel(new Model("CRTGG47XXH","-","-","43 x 47","1.8 Mil","Black","10/10's","56 Glutton*","100","72",".70","27","22.9"));
cat8.addModel(new Model("CRTGG3658X","-","-","36 x 58","1.0 Mil","Black","10/10's","55","65","117",".38","27","13.7"));
cat8.addModel(new Model("CRTGG58X","-","-","38 x 58","1.0 Mil","Black","5/20's","60","65","117",".38","27","14.4"));
cat8.addModel(new Model("CRTGG58HP","-","-","38 x 58","1.2 Mil","Black","10/10's","60","75","90",".54","27","16.6"));
cat8.addModel(new Model("CRTGG58XH","-","-","38 x 58","1.35 Mil","Black","10/10's","60","80","90",".54","27","18.8"));
cat8.addModel(new Model("CRTGG58XXH","-","-","38 x 58","1.8 Mil","Black","10/10's","60","100","72",".70","27","24.5"));
cat8.addModel(new Model("CRTGG50X","-","-","46 x 50","1.0 Mil","Black","10/10's","50 Big Wheel*","65","90",".54","27","15.3"));
cat8.addModel(new Model("CRTGG50XH","-","-","46 x 50","1.35 Mil","Black","10/10's","50 Big Wheel*","80","72",".70","27","19.9"));
cat8.addModel(new Model("CRTGG55XXH","-","-","40 x 55","1.8 Mil","Black","10/10's","55 Brute","100","72",".70","27","24.9"));


var cat9 = new Category("Premium Clear Liners");
cat9.addModel(new Model("PXC36X","-","-","30 x 36","1.0 Mil","Clear","250","20-30","65","90",".54","9","16.8"));
cat9.addModel(new Model("PXC39X","-","-","33 x 40","1.0 Mil","Clear","250","33","65","72",".70","27","20.1"));
cat9.addModel(new Model("PXC39XH","-","-","33 x 40","1.35 Mil","Clear","100","33","80","117",".38","9","11.0"));
cat9.addModel(new Model("CXC42H+","-","-","26 x 42","1.2 Mil","Clear","100","30","70","117",".38","9","8.0"));
cat9.addModel(new Model("CXC45H+","-","-","30 x 45","1.2 Mil","Clear","100","35","70","117",".38","9","10.0"));
cat9.addModel(new Model("PXC46X","-","-","40 x 46","1.0 Mil","Clear","125","40-45","65","90",".54","9","14.9"));
cat9.addModel(new Model("PXC46XH","-","-","40 x 46","1.35 Mil","Clear","100","40-45","80","90",".54","9","15.6"));
cat9.addModel(new Model("PXC46XXH","-","-","40 x 46","1.8 Mil","Clear","100","40-45","100","72",".70","9","20.3"));
cat9.addModel(new Model("PXC47X","-","-","43 x 47","1.0 Mil","Clear","100","56 Glutton*","65","117",".38","27","12.8"));
cat9.addModel(new Model("PXC47XH","-","-","43 x 47","1.35 Mil","Clear","100","56 Glutton*","80","90",".54","9","17.5"));
cat9.addModel(new Model("PXC47XXH","-","-","43 x 47","1.8 Mil","Clear","100","56 Glutton*","100","72",".70","9","22.9"));
cat9.addModel(new Model("PXC58X","-","-","38 x 58","1.0 Mil","Clear","100","60","65","117",".38","9","13.7"));
cat9.addModel(new Model("PXC58XH","-","-","38 x 58","1.35 Mil","Clear","100","60","80","90",".54","9","18.8"));
cat9.addModel(new Model("PXC58XXH","-","-","38 x 58","1.8 Mil","Clear","100","60","100","72",".70","9","24.6"));
cat9.addModel(new Model("PXC50X","-","-","46 x 50","1.0 Mil","Clear","100","50 Big Wheel*","65","90",".54","9","14.6"));
cat9.addModel(new Model("PXC50XH","-","-","46 x 50","1.35 Mil","Clear","100","50 Big Wheel*","80","72",".70","9","19.9"));


var cat10 = new Category("Premium Clear Liners - Coreless Rolls");
cat10.addModel(new Model("CRPXC23","-","-","24 x 23","1.0 Mil","Clear","20/25's","10","50","72",".70","27","15.9"));
cat10.addModel(new Model("CRPXC32","-","-","24 x 32","1.0 Mil","Clear","10/25's","15","50","117",".38","27","10.7"));
cat10.addModel(new Model("CRPXC36X","-","-","30 x 36","1.0 Mil","Clear","10/25's","20-30","65","90",".54","27","16.7"));
cat10.addModel(new Model("CRPXC36XH","-","-","30 x 36","1.35 Mil","Clear","10/25's","20-30","75","72",".70","27","22.1"));
cat10.addModel(new Model("CRPXC39X","-","-","33 x 40","1.0 Mil","Clear","10/25's","33","65","72",".70","27","20.1"));
cat10.addModel(new Model("CRPXC39XH","-","-","33 x 40","1.35 Mil","Clear","5/20's","33","80","117",".38","27","11.0"));
cat10.addModel(new Model("CRC42H+","-","-","26 x 42","1.2 Mil","Clear","5/20's","30","70","117",".38","27","8.4"));
cat10.addModel(new Model("CRC45H+","-","-","30 x 45","1.2 Mil","Clear","5/20's","35","70","117",".38","27","10.0"));
cat10.addModel(new Model("CRPXC46X","-","-","40 x 46","1.0 Mil","Clear","5/25's","40-45","65","90",".54","27","14.9"));
cat10.addModel(new Model("CRPXC46XH","-","-","40 x 46","1.35 Mil","Clear","10/10's","40-45","80","90",".54","27","15.6"));
cat10.addModel(new Model("CRPXC46XXH","-","-","40 x 46","1.8 Mil","Clear","10/10's","40-45","100","72",".70","27","20.3"));
cat10.addModel(new Model("CRPXC47X","-","-","43 x 47","1.0 Mil","Clear","10/10's","56 Glutton*","65","117",".38","27","12.8"));
cat10.addModel(new Model("CRPXC47XH","-","-","43 x 47","1.35 Mil","Clear","10/10's","56 Glutton*","80","90",".54","27","16.6"));
cat10.addModel(new Model("CRPXC47XXH","-","-","43 x 47","1.8 Mil","Clear","10/10's","56 Glutton*","100","72",".70","27","22.9"));
cat10.addModel(new Model("CRPXC58X","-","-","38 x 58","1.0 Mil","Clear","10/10's","60","65","117",".38","27","14.4"));
cat10.addModel(new Model("CRPXC58XH","-","-","38 x 58","13.35 Mil","Clear","10/10's","60","80","90",".54","27","18.8"));
cat10.addModel(new Model("CRPXC58XXH","-","-","38 x 58","1.8 Mil","Clear","10/10's","60","100","72",".70","27","24.6"));
cat10.addModel(new Model("CRPXC50X","-","-","46 x 50","1.0 Mil","Clear","10/10's","50 Big Wheel*","65","90",".54","27","15.3"));
cat10.addModel(new Model("CRPXC50XH","-","-","46 x 50","1.35 Mil","Clear","10/10's","50 Big Wheel*","80","72",".70","27","19.9"));
cat10.addModel(new Model("CRPXC55X","-","-","40 x 55","1.0 Mil","Clear","10/10's","55 Square Brute*","65","90",".54","27","13.9"));
cat10.addModel(new Model("CRPXC55XH","-","-","40 x 55","1.35 Mil","Clear","10/10's","55 Square Brute*","80","90",".54","27","19.1"));
cat10.addModel(new Model("CRPXC55XXH","-","-","40 x 55","1.8 Mil","Clear","10/10's","55 Square Brute*","100","72",".70","27","26.4"));


var cat11 = new Category("High Density Liners - Coreless Rolls");
cat11.addModel(new Model("HCR24LC","-","-","24 x 24","6 Mic","Clear","20/50's","10","15","108",".38","9","8.6"));
cat11.addModel(new Model("HCR24MC","-","-","24 x 24","8 Mic","Clear","20/50's","10","20","108",".38","9","10.1"));
cat11.addModel(new Model("HCR33LC","-","-","24 x 33","6 Mic","Clear","20/50's","15","15","90",".54","9","11.7"));
cat11.addModel(new Model("HCR33MC","-","-","24 x 33","8 Mic","Clear","20/50's","15","20","90",".54","9","15.3"));
cat11.addModel(new Model("HCR37MC","-","-","30 x 37","8 Mic","Clear","20/25's","20-30","20","117",".38","9","9.8"));
cat11.addModel(new Model("HCR37/10C","-","-","30 x 37","10 Mic","Clear","20/25's","20-30","30","90",".54","9","12.6"));
cat11.addModel(new Model("HCR37HC","-","-","30 x 37","12 Mic","Clear","20/25's","20-30","45","90",".54","9","15.5"));
cat11.addModel(new Model("HCR37XC","-","-","30 x 37","16 Mic","Clear","20/25's","20-30","70","72",".70","9","21.3"));
cat11.addModel(new Model("HCR37STC","-","-","30 x 37","22 Mic","Clear","10/25's","20-30","90","72",".70","9","15.3"));
cat11.addModel(new Model("HCR40MC","-","-","33 x 40","10 Mic","Clear","20/25's","33","30","90",".54","9","15.5"));
cat11.addModel(new Model("HCR40HC","-","-","33 x 40","12 Mic","Clear","20/25's","33","45","72",".70","9","18.6"));
cat11.addModel(new Model("HCR40XC","-","-","33 x 40","16 Mic","Clear","10/25's","33","70","90",".54","9","13.1"));
cat11.addModel(new Model("HCR40STC","-","-","33 x 40","22 Mic","Clear","10/25's","33","90","72",".70","9","17.7"));
cat11.addModel(new Model("HCR48MC","-","-","40 x 48","11 Mic","Clear","10/25's","40-45","35","117",".38","9","12.1"));
cat11.addModel(new Model("HCR48HC","-","-","40 x 48","13 Mic","Clear","10/25's","40-45","50","90",".54","9","14.0"));
cat11.addModel(new Model("HCR48/14C","-","-","40 x 48","14 Mic","Clear","10/25's","40-45","55","90",".54","9","16.3"));
cat11.addModel(new Model("HCR48XC","-","-","40 x 48","16 Mic","Clear","10/25's","40-45","70","90",".54","9","18.7"));
cat11.addModel(new Model("HCR48STC","-","-","40 x 48","22 Mic","Clear","10/15's","40-45","90","90",".54","9","15.0"));
cat11.addModel(new Model("HCR3648XC","-","-","36 x 48","16 Mic","Clear","10/25's","44","70","90",".54","9","17.6"));
cat11.addModel(new Model("HCR47MC","-","-","43 x 48","12 Mic","Clear","8/25's","56 Glutton*","45","117",".38","9","11.5"));
cat11.addModel(new Model("HCR47HC","-","-","43 x 48","14 Mic","Clear","8/25's","56 Glutton*","55","90",".54","9","13.7"));
cat11.addModel(new Model("HCR47XC","-","-","43 x 48","17 Mic","Clear","10/20's","56 Glutton*","75","90",".54","9","16.7"));
cat11.addModel(new Model("HCR47STC","-","-","43 x 48","22 Mic","Clear","10/15's","56 Glutton*","90","90",".54","9","16.5"));
cat11.addModel(new Model("HCR60HC","-","-","36 x 58","13 Mic","Clear","10/20's","55","50","90",".54","9","12.6"));
cat11.addModel(new Model("HCR60XC","-","-","36 x 58","17 Mic","Clear","10/20's","55","75","90",".54","9","17.0"));
cat11.addModel(new Model("HCR62HC","-","-","38 x 58","13 Mic","Clear","10/20's","60","50","90",".54","9","13.2"));
cat11.addModel(new Model("HCR62XC","-","-","38 x 58","17 Mic","Clear","10/20's","60","75","90",".54","9","17.8"));
cat11.addModel(new Model("HCR62STC","-","-","38 x 58","22 Mic","Clear","10/15's","60","90","72",".70","9","17.3"));


var cat12 = new Category("High Density Liners - Black");
cat12.addModel(new Model("HCR24LB","-","-","24 x 24","6 Mic","Black","20/50's","10","15","108",".38","9","8.6"));
cat12.addModel(new Model("HCR24MB","-","-","24 x 24","8 Mic","Black","20/50's","10","20","90",".54","9","10.1"));
cat12.addModel(new Model("HCR33LB","-","-","24 x 33","6 Mic","Black","20/50's","15","15","72",".70","9","11.7"));
cat12.addModel(new Model("HCR33MB","-","-","24 x 33","8 Mic","Black","20/50's","15","20","90",".54","9","15.3"));
cat12.addModel(new Model("HCR37/10B","-","-","30 x 37","10 Mic","Black","20/25's","20-30","30","90",".54","9","12.6"));
cat12.addModel(new Model("HCR37HB","-","-","30 x 37","12 Mic","Black","20/25's","20-30","45","90",".54","9","15.5"));
cat12.addModel(new Model("HCR37XB","-","-","30 x 37","16 Mic","Black","20/25's","20-30","70","72",".70","9","21.3"));
cat12.addModel(new Model("HCR37STB","-","-","30 x 37","22 Mic","Black","10/25's","20-30","90","72",".70","9","15.0"));
cat12.addModel(new Model("HCR40HB","-","-","33 x 40","12 Mic","Black","20/25's","33","45","72",".70","9","18.6"));
cat12.addModel(new Model("HCR40XB","-","-","33 x 40","16 Mic","Black","10/25's","33","70","90",".54","9","13.1"));
cat12.addModel(new Model("HCR40STB","-","-","33 x 40","22 Mic","Black","10/25's","33","90","72",".70","9","18.8"));
cat12.addModel(new Model("HCR48HB","-","-","40 x 48","13 Mic","Black","10/25's","40-45","50","90",".54","9","14.0"));
cat12.addModel(new Model("HCR48XB","-","-","40 x 48","16 Mic","Black","10/25's","40-45","70","90",".54","9","18.7"));
cat12.addModel(new Model("HCR48STB","-","-","40 x 48","22 Mic","Black","10/15's","40-45","90","90",".54","9","15.0"));
cat12.addModel(new Model("HCR47HB","-","-","43 x 48","14 Mic","Black","8/25's","56 Glutton*","55","90",".54","9","13.7"));
cat12.addModel(new Model("HCR47XB","-","-","43 x 48","17 Mic","Black","10/20's","56 Glutton*","70","90",".54","9","16.7"));
cat12.addModel(new Model("HCR47STB","-","-","43 x 48","22 Mic","Black","10/15's","56 Glutton*","90","90",".54","9","16.5"));
cat12.addModel(new Model("HCR62XB","-","-","38 x 58","17 Mic","Black","10/20's","60","70","90",".54","9","17.8"));
cat12.addModel(new Model("HCR62STB","-","-","38 x 58","22 Mic","Black","10/15's","60","90","72",".70","9","17.3"));


var cat13 = new Category("High Density Liners - Flat Pack Clear"); 
cat13.addModel(new Model("CHD18LC","-","-","17 x 18","6 Mic","Clear","2000","4","15","90",".54","9","9.0"));
cat13.addModel(new Model("CHD22LC","-","-","20 x 22","6 Mic","Clear","2000","7","15","72",".70","9","13.1"));
cat13.addModel(new Model("CHD24LC","-","-","24 x 24","6 Mic","Clear","1000","10","15","90",".54","9","8.6"));
cat13.addModel(new Model("CHD24MC","-","-","24 x 24","8 Mic","Clear","1000","10","20","90",".54","9","10.1"));
cat13.addModel(new Model("CHD33LC","-","-","24 x 33","6 Mic","Clear","1000","15","15","72",".70","9","11.7"));
cat13.addModel(new Model("CHD33MC","-","-","24 x 33","8 Mic","Clear","1000","15","20","72",".70","9","14.3"));
cat13.addModel(new Model("CHD243311","-","-","24 x 33","11 Mic","Clear","1000","15","30","50","1.05","9","23.1"));
cat13.addModel(new Model("CHD37MC","-","-","30 x 37","8 Mic","Clear","500","20-30","20","117",".38","9","9.7"));
cat13.addModel(new Model("CHD37/10C","-","-","30 x 37","10 Mic","Clear","500","20-30","30","90",".54","9","12.6"));
cat13.addModel(new Model("CHD37HC","-","-","30 x 37","12 Mic","Clear","500","20-30","45","90",".54","9","15.5"));
cat13.addModel(new Model("CHD37XC","-","-","30 x 37","16 Mic","Clear","500","20-30","70","72",".70","9","21.3"));
cat13.addModel(new Model("CHD40MC","-","-","33 x 40","10 Mic","Clear","500","33","30","90",".54","9","15.5"));
cat13.addModel(new Model("CHD40HC","-","-","33 x 40","12 Mic","Clear","500","33","45","72",".70","9","18.6"));
cat13.addModel(new Model("CHD40XC","-","-","33 x 40","16 Mic","Clear","250","33","70","90",".54","9","13.1"));
cat13.addModel(new Model("CHD40STC","-","-","33 x 40","22 Mic","Clear","250","33","90","72",".70","9","18.8"));
cat13.addModel(new Model("CHD48MC","-","-","40 x 48","11 Mic","Clear","250","40-45","35","117",".38","9","12.1"));
cat13.addModel(new Model("CHD48HC","-","-","40 x 48","13 Mic","Clear","250","40-45","50","90",".54","9","14.0"));
cat13.addModel(new Model("CHD48XC","-","-","40 x 48","16 Mic","Clear","250","40-45","70","90",".54","9","18.7"));
cat13.addModel(new Model("CHD48STC","-","-","40 x 48","22 Mic","Clear","150","40-45","90","90",".54","9","15.0"));
cat13.addModel(new Model("CHD3648HC","-","-","36 x 48","13 Mic","Clear","250","44","50","90",".54","9","13.0"));
cat13.addModel(new Model("CHD47MC","-","-","43 x 48","12 Mic","Clear","200","56 Glutton*","45","90",".54","9","11.5"));
cat13.addModel(new Model("CHD47HC","-","-","43 x 48","14 Mic","Clear","200","56 Glutton*","55","90",".54","9","13.7"));
cat13.addModel(new Model("CHD47XC","-","-","43 x 48","17 Mic","Clear","200","56 Glutton*","75","90",".54","9","16.7"));
cat13.addModel(new Model("CHD47STC","-","-","43 x 48","22 Mic","Clear","150","56 Glutton*","90","90",".54","9","16.5"));
cat13.addModel(new Model("CHD60HC","-","-","36 x 58","13 Mic","Clear","200","55","50","90",".54","9","12.6"));
cat13.addModel(new Model("CHD60XC","-","-","36 x 58","17 Mic","Clear","200","55","75","90",".54","9","17.0"));
cat13.addModel(new Model("CHD62HC","-","-","38 x 58","13 Mic","Clear","200","60","50","90",".54","9","13.2"));
cat13.addModel(new Model("CHD62XC","-","-","38 x 58","17 Mic","Clear","200","60","75","90",".54","9","17.8"));
cat13.addModel(new Model("CHD62STC","-","-","38 x 58","22 Mic","Clear","150","60","90","72",".70","9","17.3"));
cat13.addModel(new Model("CHD4058XC","-","-","40 x 58","17 Mic","Clear","150","55 Brute*","75","90",".54","9","14.4"));
cat13.addModel(new Model("CHD465017C","-","-","46 x 50","17 Mic","Clear","200","50 Big Wheel*","75","72",".70","9","19.1"));


var cat14 = new Category("Healthcare Isolation Liners - Linear Low Density");
cat14.addModel(new Model("HDR1114","-","-","8 x 3 x 14","1.25 Mil","Red","1000","4","None","117",".38","NO","12.8"));
cat14.addModel(new Model("CXR 23M","-","-","24 x 23",".50 Mil","Red","500","10","None","117",".38","NO","8.8"));
cat14.addModel(new Model("CXR 36H","-","-","30 x 36",".70 Mil","Red","250","20-30","None","90",".54","NO","12.1"));
cat14.addModel(new Model("CXR 39H","-","-","33 x 39",".70 Mil","Red","250","33","None","90",".54","NO","15.0"));
cat14.addModel(new Model("CXR 46H","-","-","40 x 46",".70 Mil","Red","125","40-45","None","117",".38","NO","10.7"));
cat14.addModel(new Model("PXR-24","-","-","24 x 24","1.1 Mil","Red","200/roll","10","Infectious Waste","100",".44","NO","8.4"));
cat14.addModel(new Model("PXR-36","-","-","30 x 36","1.7 Mil","Red","80/roll","20-30","Infectious Waste","100",".44","Yes","9.8"));
cat14.addModel(new Model("PXR-43","-","-","31 x 43","1.7 Mil","Red","70/roll","33","Infectious Waste","100",".44","Yes","10.4"));
cat14.addModel(new Model("PXR-46","-","-","40 x 46","1.7 Mil","Red","60/roll","40-45","Infectious Waste","100",".44","Yes","12.5"));
cat14.addModel(new Model("HXR-24","-","-","24 x 24","1.2 Mil","Red","10/25's","10","Infectious Waste","117",".38","Yes","11.5"));
cat14.addModel(new Model("HXR-33","-","-","24 x 33","1.2 Mil","Red","10/25's","15","Infectious Waste","72",".70","Yes","15.8"));
cat14.addModel(new Model("HXR-36","-","-","30 x 36","1.2 Mil","Red","10/25's","20-30","Infectious Waste","72",".70","Yes","20.9"));
cat14.addModel(new Model("HXR-40","-","-","33 x 40","1.2 Mil","Red","8/25's","33","Infectious Waste","72",".70","Yes","20.2"));
cat14.addModel(new Model("HXR-43","-","-","31 x 43","1.2 Mil","Red","10/20's","33","Infectious Waste","72",".70","Yes","21.3"));
cat14.addModel(new Model("HXR-46","-","-","40 x 46","1.2 Mil","Red","10/10's","40-45","Infectious Waste","90",".54","Yes","14.4"));
cat14.addModel(new Model("HXR46-3","-","-","40 x 46","3.0 Mil","Red","50","40-45","Infectious Waste","90",".54","Yes","16.1"));
cat14.addModel(new Model("HXR-50","-","-","37 x 50","1.2 Mil","Red","10/10's","45","Infectious Waste","90",".54","Yes","14.8"));
cat14.addModel(new Model("HXR-58","-","-","38 x 58","1.2 Mil","Red","10/10's","60","Infectious Waste","90",".54","Yes","17.3"));
cat14.addModel(new Model("HXY-43","-","-","31 x 43","1.2 Mil","Yellow","10/10's","33","Infectious Linen","117",".38","Yes","10.6"));
cat14.addModel(new Model("HXY-46","-","-","40 x 46","1.2 Mil","Yellow","10/10's","40-45","Infectious Linen","90",".54","Yes","14.7"));
cat14.addModel(new Model("HXY-50","-","-","37 x 50","1.2 Mil","Yellow","10/10's","45","Infectious Linen","90",".54","Yes","14.8"));
cat14.addModel(new Model("HXB-43","-","-","31 x 43","1.2 Mil","Blue","10/20's","33","Soiled Linen","72",".70","Yes","21.3"));


var cat15 = new Category("Healthcare Isolation Liners - High Density");
cat15.addModel(new Model("HDR242411","-","-","24 x 24","11 Mic","Red","20/50's","10","Infectious Waste","90",".54","-","16.8"));
cat15.addModel(new Model("HDR24","-","-","24 x 24","13 Mic","Red","20/50's","10","Infectious Waste","72",".70","-","20.0"));
cat15.addModel(new Model("HDR243311","-","-","24 x 33","11 Mic","Red","20/25's","15","Infectious Waste","117",".38","-","11.5"));
cat15.addModel(new Model("HDR334014","-","-","33 x 40","14 Mic","Red","10/25's","33","Infectious Waste","117",".38","-","12.3"));
cat15.addModel(new Model("HDR304314","-","-","30-1/2 x 43","14 Mic","Red","10/25's","33","Infectious Waste","117",".38","-","12.2"));
cat15.addModel(new Model("HDR404817","-","-","40 x 48","17 Mic","Red","10/25's","40-45","Infectious Waste","72",".70","-","21.8"));
cat15.addModel(new Model("HDB43","-","-","31 x 43","17 Mic","Blue","10/25's","33","Soiled Linen","90",".54","-","15.2"));
cat15.addModel(new Model("HDY304314","-","-","30-1/2 x 43","14 Mic","Yellow","10/25's","33","Infectious Linen","117",".38","-","12.2"));


var cat16 = new Category("Food & Storage Bags"); 
cat16.addModel(new Model("CB68","-","-","4 x 2 x 8",".70 Mil","Pint Freezer","1000","-","-","117",".38","-","2.2"));
cat16.addModel(new Model("CB612","-","-","4 x 2 x 12",".70 Mil","Quart Freezer","1000","-","-","117",".38","-","3.4"));
cat16.addModel(new Model("CB815","-","-","5 x 3 x 15",".70 Mil","Broiler-Chicken","1000","-","-","100",".46","-","5.6"));
cat16.addModel(new Model("CB912","-","-","6 x 3 x 12",".70 Mil","Large Fryer","1000","-","-","100",".46","-","5.0"));
cat16.addModel(new Model("CB915","-","-","6 x 3 x 15",".70 Mil","Broiler-Meat","1000","-","-","100",".46","-","6.3"));
cat16.addModel(new Model("CB918A","-","-","6 x 3-1/2 x 18",".70 Mil","Produce","1000","-","-","100",".46","-","8.5"));
cat16.addModel(new Model("CB1115","-","-","8 x 3 x 15",".70 Mil","Ice Bucket","1000","-","-","100",".46","-","7.7"));
cat16.addModel(new Model("CB1120","-","-","8 x 3 x 20",".70 Mil","Produce","1000","-","-","117",".38","-","11.7"));
cat16.addModel(new Model("CB1215","-","-","8 x 4 x 15",".70 Mil","Poultry","1000","-","-","100",".46","-","8.4"));
cat16.addModel(new Model("CB1218","-","-","8 x 4 x 18",".70 Mil","Poultry/Hams","1000","-","-","100",".46","-","10.0"));
cat16.addModel(new Model("CB1218H","-","-","8 x 4 x 18",".90 Mil","Poultry/Hams","1000","-","-","117",".38","-","13.0"));
cat16.addModel(new Model("CB1420","-","-","10 x 4 x 20",".80 Mil","Large Poultry","500","-","-","117",".38","-","7.5"));
cat16.addModel(new Model("CB10824","-","-","10 x 8 x 24",".80 Mil","Turkey/Hams","500","-","-","117",".38","-","11.5"));
cat16.addModel(new Model("CB10824A","-","-","10 x 8 x 24","1.1 Mil","Turkey/Hams","250","-","-","117",".38","-","7.9"));
cat16.addModel(new Model("CB2030","-","-","12 x 8 x 30",".80 Mil","Lg. Poultry/Hams","250","-","-","100",".46","-","8.0"));
cat16.addModel(new Model("CB2030H","-","-","12 x 8 x 30","1.1 Mil","Lg. Poultry/Hams","250","-","-","100",".46","-","11.0"));
cat16.addModel(new Model("CB122","-","-","6-3/4 x 6-1/4 x 1-1/2 x -1/2",".80 Mil","Sandwich","2000","-","-","275",".23","-","6.2"));
cat16.addModel(new Model("CB1014","-","-","10 x 14",".80 Mil","Utility","1000/roll","-","-","100",".44","-","7.5"));
cat16.addModel(new Model("CB1824","-","-","18 x 24",".80 Mil","Large Utility","250/roll","-","-","50",".83","-","5.8"));
cat16.addModel(new Model("CB2735","-","-","21 x 6 x 35",".80 Mil","Bun Pan Cover","200/roll","-","-","50",".83","-","10.0"));
cat16.addModel(new Model("S915B","-","-","5 x 4 x 15",".75 Mil","Med. Bread Bag","1000","-","-","100",".46","-","6.3"));
cat16.addModel(new Model("S918B","-","-","5 x 4 x 18",".75 Mil","Lg. Bread Bag","1000","-","-","100",".46","-","8.5"));
cat16.addModel(new Model("S115","-","-","5-1/2 x 4-3/4 x 15",".75 Mil","Med. Bread Bag","1000","-","-","100",".46","-","6.3"));
cat16.addModel(new Model("S1019","-","-","5-1/2 x 4-3/4 x 19",".75 Mil","Lg. Bread Bag","1000","-","-","100",".46","-","8.5"));
cat16.addModel(new Model("CB5280","-","-","52 x 80","15 Mic","Bun Rack Cover","50/roll","-","-","100",".28","-","8.3"));

categories.push(cat1);
categories.push(cat2);
categories.push(cat3);
categories.push(cat4);
categories.push(cat5);
categories.push(cat6);
categories.push(cat7);
categories.push(cat8);
categories.push(cat9);
categories.push(cat10);
categories.push(cat11);
categories.push(cat12);
categories.push(cat13);
categories.push(cat14);
categories.push(cat15);
categories.push(cat16);
