function openWindow(url, parm) 
{
  var myWind = "";
  var xOffset = (screen.width - 800) / 2;
  var yOffset = (screen.height - 600) / 2;
  yOffset = 0;
  winOpts = 'toolbar=no,menubar=yes,location=no,scrollbars=yes,resizable=no,width=815,height=600,screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+'';
  myWind = window.open(url+"?parm="+parm,"_blank", winOpts);
  myWind.focus();
}
function openCaseDetailsWindow(url, parm, county, indexNo, motion, docs, adate) 
{
  var myWind = "";
  var xOffset = (screen.width - 800) / 2;
  var yOffset = (screen.height - 600) / 2;
  yOffset = 0;
  winOpts = 'toolbar=no,menubar=yes,location=no,scrollbars=yes,resizable=no,width=815,height=600,screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+'';
  myWind = window.open(url+"?parm="+parm+"&index="+indexNo+"&county="+county+"&motion="+motion+"&docs="+docs+"&adate="+adate,"_blank", winOpts);
  myWind.focus();
}

function openAppearWindow(url, parm, appearDate, county, indexNo) 
{
  var myWind = "";
  var xOffset = (screen.width - 800) / 2;
  var yOffset = (screen.height - 600) / 2;
  yOffset = 0;
  winOpts = 'toolbar=no,menubar=yes,location=no,scrollbars=yes,resizable=no,width=815,height=600,screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+'';
  if(appearDate == "")
  {
    myWind = window.open(url+"?parm="+parm+"&index="+indexNo+"&county="+county,"_blank", winOpts);
  }
  else
  {
    myWind = window.open(url+"?parm="+parm+"&appearDate="+appearDate+"&index="+indexNo+"&county="+county,"_blank", winOpts);
  }
  myWind.focus();
}

function openLCCaseDetailsWindow(url, parm, courtId, indexNumber, motionCount, documentCount, appearanceDate) 
{
  var myWind = "";
  var xOffset = (screen.width - 800) / 2;
  var yOffset = (screen.height - 600) / 2;
  yOffset = 0;
  winOpts = 'toolbar=no,menubar=yes,location=no,scrollbars=yes,resizable=no,width=815,height=600,screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+'';
  myWind = window.open(url+"?parm="+parm+"&indexNumber="+indexNumber+"&courtId="+courtId+"&motionCount="+motionCount+"&documentCount="+documentCount+"&appearanceDate="+appearanceDate,"_blank", winOpts);
  myWind.focus();
}

function openLCAppearWindow(url, parm, appearanceDate, courtId, indexNumber) 
{
  var myWind = "";
  var xOffset = (screen.width - 800) / 2;
  var yOffset = (screen.height - 600) / 2;
  yOffset = 0;
  winOpts = 'toolbar=no,menubar=yes,location=no,scrollbars=yes,resizable=no,width=815,height=600,screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+'';
  if(appearanceDate == "")
  {
    myWind = window.open(url+"?parm="+parm+"&indexNumber="+indexNumber+"&courtId="+courtId,"_blank", winOpts);
  }
  else
  {
    myWind = window.open(url+"?parm="+parm+"&appearanceDate="+appearanceDate+"&indexNumber="+indexNumber+"&courtId="+courtId,"_blank", winOpts);
  }
  myWind.focus();
}

function openPDF(url, parm) 
{
  var myWind = "";
  var xOffset = (screen.width - 800) / 2;
  var yOffset = (screen.height - 600) / 2;
  yOffset = 0;
  winOpts = 'toolbar=no,menubar=yes,location=no,scrollbars=yes,resizable=yes,width=815,height=600,screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+'';
  myWind = window.open(url, "_blank", winOpts);
}

function openDocumentWindow(url, countyCode, indexNumber)
{
  var myWind = "";
  var xOffset = (screen.width - 800) / 2;
  var yOffset = (screen.height - 600) / 2;
  yOffset = 0;
  winOpts = 'toolbar=no,menubar=yes,location=no,scrollbars=yes,resizable=no,width=815,height=600,screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+'';
  myWind = window.open(url+"?county_code="+countyCode+"&txtIndexNo="+indexNumber+"&showMenu=no","_blank", winOpts);
  myWind.focus();
}

function openDocumentWindow(url, countyCode, indexNumber, isPreRji)
{
  var myWind = "";
  var xOffset = (screen.width - 800) / 2;
  var yOffset = (screen.height - 600) / 2;
  yOffset = 0;
  winOpts = 'toolbar=no,menubar=yes,location=no,scrollbars=yes,resizable=no,width=815,height=600,screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+'';
  myWind = window.open(url+"?county_code="+countyCode+"&txtIndexNo="+indexNumber+"&showMenu=no"+"&isPreRji="+isPreRji,"_blank", winOpts);
  myWind.focus();
}
