<!--
//rptparm values
//1 = Lots In Work
//2 = Finished inventory
//3 = Greige inventory
//4 = Lot Entry
//5 = Print Invoices
  
function doWin(rptparm) {
//  var winl = (screen.width - 640) / 2;
//  var wint = (screen.height - 480) / 2;
//  winprops = 'scrollbars =yes,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,width=640,height=480,top=' + wint + ',left=' + winl;
  var winl = (screen.width - 700) / 2;
  var wint = (screen.height - 560) / 2;
  var winl2 = (screen.width - 800) / 2;
  var wint2 = (screen.height - 710) / 2;
  winprops = 'scrollbars =yes,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,width=700,height=560,top=' + wint + ',left=' + winl;
  winprops2 = 'scrollbars =no,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,width=800,height=665,top=' + wint2 + ',left=' + winl2;
  if (rptparm == 1) {
    rptwin = window.open('Reports.aspx?rptno=' + rptparm,'rptwin',winprops);
    if (parseInt(navigator.appVersion) >= 4) { rptwin.window.focus(); }
  }
  if (rptparm == 2) {
    var rptvalue = showModalDialog("Selection.aspx",0,"dialogWidth:400px;dialogHeight:400px;center:yes");
    if (rptvalue == -1 || rptvalue == null) {
//      return false;
    } else {
      if (rptvalue == 1) {
        rptwin = window.open('reports.aspx?rptno=' + rptparm +'&choice=' + rptvalue,'rptwin',winprops);
        if (parseInt(navigator.appVersion) >= 4) { rptwin.window.focus(); }
      }
      if (rptvalue == 2) {
        var lotvalue = showModalDialog("lotselect.aspx",0,"dialogWidth:400px;dialogHeight:400px;center:yes");
        if (lotvalue == -1 || lotvalue == null) {
//          return false;
        } else {
          rptwin = window.open('reports.aspx?rptno=' + rptparm + '&choice=' + rptvalue + '&lot_no=' + lotvalue,'rptwin',winprops);
          if (parseInt(navigator.appVersion) >= 4) { rptwin.window.focus(); }
        }
      }
      if (rptvalue == 3) {
        //var datevalue = showModalDialog("dateselect.aspx?choice=1",0,"dialogWidth:700px;dialogHeight:560px;center:yes");
        rptwin = window.open('dateselect.aspx?&choice=1','rptwin',winprops);
        if (parseInt(navigator.appVersion) >= 4) { rptwin.window.focus(); }
//        if (datevalue == -1 || datevalue == null) {
//          return false;
//        } else {
//          var c_date = datevalue.split(",");
//          rptwin = window.open('reports.aspx?rptno=' + rptparm + '&choice=' + rptvalue + '&beg_date=' + c_date[0] + '&end_date=' + c_date[1],'rptwin',winprops);
//          if (parseInt(navigator.appVersion) >= 4) { rptwin.window.focus(); }
//        }
      }
      
      
      if (rptvalue == 4) {
          rptwin = window.open('psSelection.aspx?rptno=' + rptparm,'rptwin',winprops);
          if (parseInt(navigator.appVersion) >= 4) { rptwin.window.focus(); }
      }
      
      if (rptvalue == 5) {
          rptwin = window.open('blSelection.aspx?rptno=' + rptparm,'rptwin',winprops);
          if (parseInt(navigator.appVersion) >= 4) { rptwin.window.focus(); }
      }
      
    }
  }
  if (rptparm == 3) {
    rptwin = window.open('reports.aspx?rptno=' + rptparm,'rptwin',winprops);
    if (parseInt(navigator.appVersion) >= 4) { rptwin.window.focus(); }
  }
  if (rptparm == 4) {
//      window.parent.frames(2).location.replace(locsectext + 'lotscreen1.htm');
    var newprops = 'toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,width=640,height=480,top=' + wint + ',left=' + winl;
    lotwin = window.open(locsectext + 'lotentry.htm','lotwin',newprops);
//    if (parseInt(navigator.appVersion) >= 4) { lotwin.window.focus(); }
  }
  if (rptparm == 5) {
      rptwin = window.open('invSelection.aspx?rptno=' + rptparm,'rptwin',winprops);
      if (parseInt(navigator.appVersion) >= 4) { rptwin.window.focus(); }
  }
  if (rptparm == 6) {
      rptwin = window.open('ViewLog.aspx','rptwin',winprops);
      if (parseInt(navigator.appVersion) >= 4) { rptwin.window.focus(); }
  }
  if (rptparm == 7) {
      rptwin = window.open('Capabilities.aspx','rptwin',winprops2);
      if (parseInt(navigator.appVersion) >= 4) { rptwin.window.focus(); }
  }
}

//  End -->