/*  Copyright © 2001, 2002 OGMA Consulting Corp. */

function newWindowSm2(URL, type, itemNo, itemRelID, FrameName1, WindowName1) {
  sessionID     = getValueByName('sessionID');
  docType       = getValueByName('docType');
  importFrom    = getValueByName('importFrom');
  var hiddenMessage=''; // Anatoli added to process the progress screen
  var sendMessage = '';
  disID         = getRemoteValueByName('disID',        'parent._' + sessionID + '_' + docType + 'doc_content');
  IssuedBy      = getRemoteValueByName('IssuedBy',     'parent._' + sessionID + '_' + docType + 'doc_content');
  IssuedFor     = getRemoteValueByName('IssuedFor',    'parent._' + sessionID + '_' + docType + 'doc_content');
  docTypeQual   = getRemoteValueByName('docTypeQual',  'parent._' + sessionID + '_' + docType + 'doc_content');
  catalogueId   = getRemoteValueByName('catalogueId',  'parent._' + sessionID + '_' + docType + 'doc_content');
  fromDis       = getRemoteValueByName('fromDis',      'parent._' + sessionID + '_' + docType + 'doc_content');
  disReferID    = getRemoteValueByName('disReferID',   'parent._' + sessionID + '_' + docType + 'doc_content');
  addressTypes  = getRemoteValueByName('addressTypes', 'parent._' + sessionID + '_' + docType + 'doc_content');
  contactTypes  = getRemoteValueByName('contactTypes', 'parent._' + sessionID + '_' + docType + 'doc_content');

  if ((FrameName1 == 'doc_') && (newWindowSm2.arguments.length < 6)) {
    WindowName2 = '_' + sessionID + '_' + docType + 'DocSubWindow'
  } else if ((URL == 'showDisItems') || (newWindowSm2.arguments.length < 6)) {
    WindowName2 = '_' + sessionID + 'formSmall';
  } else if (docType == "") {
    WindowName2 = '_' + sessionID + WindowName1
  } else {
    WindowName2 = '_' + sessionID + '_' + docType + WindowName1
  }

  if (FrameName1 == 'doc_') {
      docCheckAllow = getRemoteValueByName('docCheckAllow', 'parent._' + sessionID + '_' + docType + 'doc_content');
  } else if (FrameName1 == 'opener') {
    docCheckAllow = eval('opener.document.forms[0].docCheckAllow.value')
  } else {
    docCheckAllow = eval('parent._' + sessionID + '_' + docType + 'menubar.document.forms[0].docCheckAllow.value') // does this actually work?? should be doc_menubar not menubar AdH 2002/03/01
  }

  if ((IssuedBy == '2933998') && (URL.indexOf('showOrgInvited') > -1)) {
    docCheckAllow = 'OK-To-Complete';  // let Hydro invite suppliers after notice is issued
  }

  // Anatoli added Special for progress screen
  if (URL.indexOf('??') > -1) {     
	index = URL.indexOf('??');
	len = URL.length - index - 2;
     	hiddenMessage = URL.substring(index+2, URL.length+1);
	// cut off a hidden message
	URL = URL.substring(0,index);
        pattern = /\s*;\s*/;
	// Get all fields hidden
	parameterList = hiddenMessage.split(pattern);
	sendMessage = '';
	for(i = 0; i<parameterList.length; i++){
	    param = parameterList[i];
	    disid = param.substring(5);
	    ready = false;
	    if((getValueByName('hcwithdraw'+disid)!='N')&&(getValueByName('hcamend'+disid)!='N')){
	        sendMessage = sendMessage+'&'+parameterList[i]+'='+ getValueByName(parameterList[i]);
	    } else {
	        // Anatoli added definite withdraw
	        if((getValueByName('hcwithdraw'+disid)=='Y')||(getValueByName('hcamend'+disid)=='Y')){
		   sendMessage = sendMessage+'&'+parameterList[i]+'=0';
		}
	    }
	    	    
	}
  }	

  //common to all URLs
  if (URL.indexOf('?') > -1) {
    URL = URL + '&'
  } else {
    URL = URL + '?'
  }

  // 19May2005(Stbro): if we are opening up attachments and itemno <> '' then we are opening up attachments for
  // a line item, new for iProcurement, itemno has the disid associated with the line item
  parentDis = disID
  if ((URL == 'showDisCharList?') && ((type == 'Download') || (type == 'InternalDownload')) && (itemNo != '')) {
    disID = itemNo;
  }

  // 22Oct2006(Stbro): make sure that we are NOT using SSL!  File uploads under IE6SP2 fail intermittently
  if ((isIE) && (URL == 'showDisCharList?') && ((type == 'Download') || (type == 'InternalDownload'))) {
    var b_version=navigator.appVersion;
    var version=parseFloat(b_version);
    var strHref = window.location.href;
    if (version < 7) {
      if (strHref.indexOf('https://www.bcbid') == 0) {
        URL = 'http://www.bcbid.gov.bc.ca/open.dll/showDisCharList?';
      }
      if (strHref.indexOf('https://test.bcbid') == 0) {
        URL = 'http://test.bcbid.gov.bc.ca/open.dll/showDisCharList?';
      }
    }
  }

// Nick { --UnverBidRes 
  if (type == 'UnverifiedBidRes') { 

    showSign     = getValueByName('showSign');

    // Output itemNo as DisID
    if (showSign == 'No') {
      // showSign = 'No' means that the we should hid signatures on the UnverifiedBidResponse window
      URL = (URL + 'sessionID=' + sessionID + '&disID=' + itemNo + '&docType=' + docType + '&docTypeQual=' + docTypeQual
            + '&IssuedBy=' + IssuedBy + '&IssuedFor=' + IssuedFor + '&docCheckAllow=' + docCheckAllow + '&disReferID=' + makeSafeURL(disReferID)
            + '&showSign=No&formname=MOTUnverified')
    } else {      
      URL = (URL + 'sessionID=' + sessionID + '&disID=' + itemNo + '&docType=' + docType + '&docTypeQual=' + docTypeQual
            + '&IssuedBy=' + IssuedBy + '&IssuedFor=' + IssuedFor + '&docCheckAllow=' + docCheckAllow + '&disReferID=' + makeSafeURL(disReferID) + '&formname=MOTUnverified')
    }
     // Anatoli added hidden message
    if(sendMessage.length>0){
	URL = URL + sendMessage;	
    }	
    
  } else {
     // 19May2005(Stbro): Added &parentDis and &importFrom
     URL = (URL + 'sessionID=' + sessionID + '&disID=' + disID + '&docType=' + docType + '&docTypeQual=' + docTypeQual
            + '&IssuedBy=' + IssuedBy + '&IssuedFor=' + IssuedFor + '&docCheckAllow=' + docCheckAllow + '&parentDis=' + parentDis 
            + '&disReferID=' + makeSafeURL(disReferID) + '&importFrom=' + importFrom)

  }
// Nick } --UnverBidRes 
  
  //special cases
  if ((type == 'DelContact') || (type == 'AdmContact') || (type == 'ResContact') || (type == 'AccContact') || (type == 'ToContact') || (type== 'ProjContact')) {
    var addOnExtra = ''
    if ((type == 'DelContact') || (type == 'AdmContact') || (type == 'AccContact')) {
      addOnExtra = '&contactTypes=' + contactTypes;
    }

    URL = URL + '&contactType=' + type + addOnExtra;
    
// Nick  --OAB, OPD, OAI, ACP - if
  } else if ((type == 'AdmAddr') || (type == 'AccAddr') || (type == 'DelAddr') || (type == 'ToAddr') || (type == 'SupAddr') || (type == 'OabAddr') || (type == 'OpdAddr') || (type == 'OaiAddr') || (type == 'AcpAddr')) {
    var addrRelID = ''
    var displayType = ''
    var addOnExtra = ''
    if (type == 'AdmAddr')  {
      addrRelID = getRemoteValueByName('admRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      admRelID  = getRemoteValueByName('admRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      accRelID  = getRemoteValueByName('accRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      delRelID  = getRemoteValueByName('delRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      oabRelID  = getRemoteValueByName('oabRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      opdRelID  = getRemoteValueByName('opdRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      oaiRelID  = getRemoteValueByName('oaiRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      acpRelID  = getRemoteValueByName('acpRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      displayType = 'mail';
      addOnExtra = '&addressTypes=' + addressTypes + '&admRelID=' + admRelID + '&accRelID=' + accRelID + '&delRelID=' + delRelID + '&oabRelID=' + oabRelID + '&opdRelID=' + opdRelID + '&oaiRelID=' + oaiRelID + '&acpRelID=' + acpRelID;
    } else if (type == 'AccAddr') {
      addrRelID  = getRemoteValueByName('accRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      admRelID  = getRemoteValueByName('admRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      accRelID  = getRemoteValueByName('accRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      delRelID  = getRemoteValueByName('delRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      oabRelID  = getRemoteValueByName('oabRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      opdRelID  = getRemoteValueByName('opdRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      oaiRelID  = getRemoteValueByName('oaiRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      acpRelID  = getRemoteValueByName('acpRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      displayType = 'acc';
      addOnExtra = '&addressTypes=' + addressTypes + '&admRelID=' + admRelID + '&accRelID=' + accRelID + '&delRelID=' + delRelID + '&oabRelID=' + oabRelID + '&opdRelID=' + opdRelID + '&oaiRelID=' + oaiRelID + '&acpRelID=' + acpRelID;
    } else if (type == 'DelAddr') {
      addrRelID  = getRemoteValueByName('delRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      admRelID  = getRemoteValueByName('admRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      accRelID  = getRemoteValueByName('accRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      delRelID  = getRemoteValueByName('delRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      oabRelID  = getRemoteValueByName('oabRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      opdRelID  = getRemoteValueByName('opdRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      oaiRelID  = getRemoteValueByName('oaiRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      acpRelID  = getRemoteValueByName('acpRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      displayType = 'ship';
      addOnExtra = '&addressTypes=' + addressTypes + '&admRelID=' + admRelID + '&accRelID=' + accRelID + '&delRelID=' + delRelID + '&oabRelID=' + oabRelID + '&opdRelID=' + opdRelID + '&oaiRelID=' + oaiRelID + '&acpRelID=' + acpRelID;

// Nick {  --OAB, OPD, OAI, ACP
    } else if (type == 'OabAddr') {
      addrRelID  = getRemoteValueByName('oabRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      admRelID  = getRemoteValueByName('admRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      accRelID  = getRemoteValueByName('accRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      delRelID  = getRemoteValueByName('delRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      oabRelID  = getRemoteValueByName('oabRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      opdRelID  = getRemoteValueByName('opdRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      oaiRelID  = getRemoteValueByName('oaiRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      acpRelID  = getRemoteValueByName('acpRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      displayType = 'oab';
      addOnExtra = '&addressTypes=' + addressTypes + '&admRelID=' + admRelID + '&accRelID=' + accRelID + '&delRelID=' + delRelID + '&oabRelID=' + oabRelID + '&opdRelID=' + opdRelID + '&oaiRelID=' + oaiRelID + '&acpRelID=' + acpRelID;
      //addrRelID  = '1113';

    } else if (type == 'OpdAddr') {
      addrRelID  = getRemoteValueByName('opdRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      admRelID  = getRemoteValueByName('admRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      accRelID  = getRemoteValueByName('accRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      delRelID  = getRemoteValueByName('delRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      oabRelID  = getRemoteValueByName('oabRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      opdRelID  = getRemoteValueByName('opdRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      oaiRelID  = getRemoteValueByName('oaiRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      acpRelID  = getRemoteValueByName('acpRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      displayType = 'opd';
      //addrRelID  = '1113';
      addOnExtra = '&addressTypes=' + addressTypes + '&admRelID=' + admRelID + '&accRelID=' + accRelID + '&delRelID=' + delRelID + '&oabRelID=' + oabRelID + '&opdRelID=' + opdRelID + '&oaiRelID=' + oaiRelID + '&acpRelID=' + acpRelID;

    } else if (type == 'OaiAddr') {
      addrRelID  = getRemoteValueByName('oaiRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      admRelID  = getRemoteValueByName('admRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      accRelID  = getRemoteValueByName('accRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      delRelID  = getRemoteValueByName('delRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      oabRelID  = getRemoteValueByName('oabRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      opdRelID  = getRemoteValueByName('opdRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      oaiRelID  = getRemoteValueByName('oaiRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      acpRelID  = getRemoteValueByName('acpRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      displayType = 'oai';
      addOnExtra = '&addressTypes=' + addressTypes + '&admRelID=' + admRelID + '&accRelID=' + accRelID + '&delRelID=' + delRelID + '&oabRelID=' + oabRelID + '&opdRelID=' + opdRelID + '&oaiRelID=' + oaiRelID + '&acpRelID=' + acpRelID;


    } else if (type == 'AcpAddr') {
      addrRelID  = getRemoteValueByName('acpRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      admRelID  = getRemoteValueByName('admRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      accRelID  = getRemoteValueByName('accRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      delRelID  = getRemoteValueByName('delRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      oabRelID  = getRemoteValueByName('oabRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      opdRelID  = getRemoteValueByName('opdRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      oaiRelID  = getRemoteValueByName('oaiRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      acpRelID  = getRemoteValueByName('acpRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      displayType = 'acp';
      addOnExtra = '&addressTypes=' + addressTypes + '&admRelID=' + admRelID + '&accRelID=' + accRelID + '&delRelID=' + delRelID + '&oabRelID=' + oabRelID + '&opdRelID=' + opdRelID + '&oaiRelID=' + oaiRelID + '&acpRelID=' + acpRelID;
// Nick }  --OAB, OPD, OAI, ACP

    } else if ((type == 'ToAddr') && (docType == 'Bid')) {
      addrRelID  = getRemoteValueByName('toRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      displayType = 'ship';
      addOnExtra = '&fromDis=' + fromDis;
    } else if (type == 'ToAddr') {
      addrRelID  = getRemoteValueByName('toRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      displayType = 'ship';
    } else if (type == 'SupAddr') {
      addrRelID  = getRemoteValueByName('supRelID', 'parent._' + sessionID + '_' + docType + 'doc_content');
      displayType = 'ship';
      addOnExtra = '&supplierNo=' + getRemoteValueByName('supplierNo', 'parent._' + sessionID + '_' + docType + 'doc_content');
    }

    URL = URL + '&addrRelID=' + addrRelID + '&addrType=' + type + '&displayType=' + displayType + addOnExtra

  } else if ((type == 'DisHdrCmt') || (type == 'DisSugCmt') || (type == 'DisAdmCmt')
              || (type == 'DisUserCmt') || (type == 'DisDescCmt') || (type == 'DisResultCmt') || (type == 'DisTlrCmt')
              || (type == 'BuyerCmt') || (type == 'SupplierCmt')) {

    var charTypeQual = '';
    if      (type == 'DisHdrCmt')    charTypeQual = 'Header';
    else if (type == 'DisSugCmt')    charTypeQual = 'SugSource';
    else if (type == 'DisAdmCmt')    charTypeQual = 'Admin';
    else if (type == 'DisUserCmt')   charTypeQual = 'User';
    else if (type == 'DisDescCmt')   charTypeQual = 'Desc';
    else if (type == 'DisResultCmt') charTypeQual = 'Results';
    else if (type == 'DisTlrCmt')    charTypeQual = 'Trailer';
    else charTypeQual = type;         // 17May2005(Stbro): added to handle new iProc comments on line items

    URL = URL + '&CharType=DisCommentTypes&CharTypeQualifier=' + charTypeQual;

    // 17May2005(Stbro): the new buyer and supplier comments are line item based pass the itemDisId in
    if ((type == 'BuyerCmt') || (type == 'SupplierCmt')) {
      URL = URL + '&itemDisID=' + itemNo;
    }

  } else if (type == 'add') {
    itemNum = getRemoteValueByName('itemCount', 'parent._' + sessionID + '_' + docType + 'doc_content');
    itemNum = parseInt(itemNum) + 1;

    URL = (URL + '&addEdit=add&catDisID=&catalogueId=' + catalogueId + '&Item_No=' + itemNum);

  } else if ((type == 'edit') && (URL.indexOf('showDisItems') == 0)) {
    if ((docType != 'Bid') && (docType != 'EvBid')) fromDis = '';
    if ((docType == 'Bid') || (docType == 'EvBid')) itemRelID = '';

/* Nick { --EvBid */
    /* Check if it is special Item Number */
    if (itemNo == '99901' ){
      itemNum = '99901';
    }
    else if (itemNo == '99902') {
      itemNum = '99902';
    }  
    else if (itemNo == '99903') {
      itemNum = '99903';
    }  
    else {
      itemNum = getRemoteValueByName('itemNo' + itemNo, 'parent._' + sessionID + '_' + docType + 'doc_content');
    }
/* Nick } --EvBid */

    URL = (URL + '&addEdit=edit&itemDisplaySeq=' + itemNo + '&Item_No=' + itemNum + '&Item_Rel_Id=' + itemRelID + '&itemStatus=' + WindowName1
        + '&fromDis=' + fromDis + '&catalogueId=' + catalogueId)

  } else if ((type == 'edit') || (type == 'editChild')) {
    if (type == 'editChild') {
      URL = (URL + '&fromDis=' + fromDis)
    }

    URL = (URL + '&addEdit=edit&Item_No=' + itemNo + '&Item_Rel_Id=' + itemRelID + '&catalogueId=' + catalogueId)

  } else if ((type == 'Control') || (type == 'Charges') || (type == 'PostInternally'))  {
    URL = (URL + '&disType=' + docType + '&disTypeQual=' + docTypeQual + '&Ref_Table=' + docType + docTypeQual + type
        + '&Ref_Str=' + docType + docTypeQual + 'Char|' + type + '||')

  } else if (type == 'NoticeType')  {
    URL = (URL + '&disType=' + docType + '&disTypeQual=' + docTypeQual + '&Ref_Table=Attributes&Ref_Str=Attributes|NoticeType||')

  } else if (type == 'Access')  {
    URL = (URL + '&entered=false')
    
/* NICK --Added 'FileBrowse' */
  } else if (type == 'FileBrowse' || type == 'Download' || type == 'InternalDownload' || type == 'FinancialDownload' || type == 'EnvelopeOneAttachment' || type == 'EnvelopeTwoAttachment'|| type == 'RelatedDocs'|| type == 'RelatedMasters') {
    if (itemRelID == '') itemRelID = '0';

    // 29Jun2005(Stbro): if this was imported from iProcurement and this is a line item attachment then the dis_char records will always be RqnPurchasing
    if ((importFrom = 'iProc') && (itemNo != ''))
      URL = (URL + '&disType=' + docType + '&disTypeQual=' + docTypeQual + '&Ref_Table=RqnPurchasing' + type
        + '&Ref_Str=RqnPurchasingChar|' + type + '||&relID=' + itemRelID)
    else
      URL = (URL + '&disType=' + docType + '&disTypeQual=' + docTypeQual + '&Ref_Table=' + docType + docTypeQual + type
            + '&Ref_Str=' + docType + docTypeQual + 'Char|' + type + '||&relID=' + itemRelID)

  } else if (type == 'FinancialCodes')  {
    URL = (URL + '&disType=' + docType + '&disTypeQual=' + docTypeQual + '&Ref_Table=' + docType + docTypeQual + 'FinCodes'
        + '&Ref_Str=' + docType + docTypeQual + 'Char|FinancialCodes||')

  } else if (type == 'docXRef') {
    URL = (URL + '&DisType=Catalogue&dis_type_qualifier=' + type + '&catalogueId=' + catalogueId)

  } else if (type == 'ClausedocXRef') {
    URL = (URL + '&DisType=Clause&dis_type_qualifier=docXRef&IssuedBy=' + IssuedBy)

  } else if (type == 'ClauseTrailerdocXRef') {
    URL = (URL + '&DisType=ClauseTrailer&dis_type_qualifier=docXRef&IssuedBy=' + IssuedBy)

  } else if (type == 'LocationdocXRef') {
    URL = (URL + '&DisType=Location&dis_type_qualifier=docXRef')

  } else if (type == 'Results') {
    editResults = getRemoteValueByName('editResults', 'parent._' + sessionID + '_' + docType + 'doc_content');
    URL = (URL + '&disType=' + docType + '&disTypeQual=' + docTypeQual + '&Ref_Table=' + docType + 'Results&Ref_Str='
               + docType + docTypeQual + 'Char|' + type + '||&editResults=' + editResults)

  } else if (type == 'ClauseInputdocXRef') {
    URL = (URL + '&DisType=ClauseInput&dis_type_qualifier=docXRef')
  }

  /* mgruber (2002/03/28)
   * appended sourceType of 'JavaScript' to URL so problem_content.html shows 'Close' button instead of 'Back'
   */
  URL += "&sourceType=JavaScript";

  /* dfisher (2002/08/30)
   * Set the width of comment windows to be larger so that the text will fill the document window.
   */
  var width  = '';
  if ((URL.indexOf('showDisComment') == 0) && (type != 'DisSugCmt')) {
    width = '740';
  } else {
    width = '620';
  }

  /* AR - 11/03/03 -> set the height more because we've got more to see
   */
  var height  = '';
  if (URL.indexOf('showDisItemsMultiple') == 0) {
    height = '600';
  } else {
    height = '500';
  }
  
/* Nick { --Set width and height for UnverifiedBidRes  */
  if (type == 'UnverifiedBidRes') {
    width = '800';
    height = '700';
  }
/* Nick } --Set width and height for UnverifiedBidRes  */
  var formWindow = window.open(URL, WindowName2, 'width=' + width + ',height=' + height + ',toolbar=no,location=no,menubar=no,status=yes,scrollbars=yes,resizable, left=0,top=0')
 
}
