var strPath='';var objXmlHttpRequest=null;var objXmlHttpRequestVendorAvailability=null;var objXmlHttpRequestOrder=null;var objXmlHttpRequest_dtl=null;var objXmlHttpRequest_nte=null;var objXmlHttpRequest_altItm=null;var objXmlHttpRequest_cnt=null;var objXmlHttpRequest_cntDtl=null;var objXmlHttpRequest_cntUdt=null;function doPB(str_doPB_btn,str_doPB_sel){if(bolCustomerItemNumbersExist==true){if(document.theform.searchCustomerItemNumber.value!=''){document.getElementById('search'+strFormKey).value='';document.theform.mweight.value='';document.theform.basisweight.value='';document.theform.caliper.value='';document.theform.size.value='';document.theform.bygrade.value='';document.theform.mycatalog.value='';document.theform.mycatalogtype.value='';}}if(typeof str_doPB_sel!='undefined'){document.getElementById('hidSel').value=str_doPB_sel}if(typeof str_doPB_btn!='undefined'){document.getElementById('hidbtn').value=str_doPB_btn}document.theform.submit()}function doPBnext(){doPB('next')}function doScrollToItemDetail(){var skroll = new Fx.ScrollWindow({duration:500,wait:false,transition:Fx.Transitions.sineInOut});skroll.toElement('divItmDtlContainer'+doCnCbGrppntr('itm'));var objTimer;objTimer=setTimeout("var skroll = new Fx.ScrollWindow({duration:500,wait:false,transition:Fx.Transitions.sineInOut});skroll.toElement('divItmDtlContainer'+doCnCbGrppntr('itm'))",4000);}function doScrollToContent(){var skroll = new Fx.ScrollWindow({duration:500,wait:false,transition:Fx.Transitions.sineInOut});skroll.toElement('divContent');}function checkBasisWeightonfocus(){if(document.getElementById('txtBoxCaliper').value==''){document.getElementById('txtBoxBasisWeight').className='textboxfocus'}else{document.getElementById('txtBoxBasisWeight').className='textboxunavailable';document.theform.size.focus()}}function checkBasisWeightonblur(){if(document.getElementById('txtBoxBasisWeight').value==''&&document.getElementById('txtBoxCaliper').value==''){document.getElementById('txtBoxBasisWeight').className='textbox';document.getElementById('txtBoxCaliper').className='textbox';}else{checkCaliperonfocus()}}function checkCaliperonfocus(){if(document.getElementById('txtBoxBasisWeight').value==''){document.getElementById('txtBoxCaliper').className='textboxfocus'}else{document.getElementById('txtBoxCaliper').className='textboxunavailable';document.theform.size.focus()}}function checkCaliperonblur(){if(document.theform.caliper.value==''&&document.getElementById('txtBoxBasisWeight').value==''){document.getElementById('txtBoxCaliper').className='textbox';document.getElementById('txtBoxBasisWeight').className='textbox';}else{checkBasisWeightonfocus()}}function doConfimDeleteMyCatalog(){if(confirm('Delete this catalog ?')){document.theform.mycatalogdelete.value=true;doPB()}}function doConfimDeleteSelectedItems(){if(confirm('Remove selected items ?')){doPB()}}function doFormatNumber(strFormatNumberNumber){intFormatNumberAnswer='';for(intFormatNumberLoop=0;intFormatNumberLoop=1){document.getElementById('sndBackgound').src='/snd/navigationstart.wav';objXmlHttpRequest_dtl=getXMLHttpRequest();objXmlHttpRequest_dtl.open('GET',strPath+'itemDetail.asp?options=nohead,'+str_doGetItmDtl_options+','+strOptions+'&itemId='+encodeURIComponent(int_doGetItmDtl_itemId)+'&warehouseId='+encodeURIComponent(intWarehouseID)+'&vendorInventoryScript='+encodeURIComponent('doGetItmDtlToReplace('+int_doGetItmDtl_itemId+',\''+strOptions2+';viewvendoravailability\''+')'),true);objXmlHttpRequest_dtl.send(null);objXmlHttpRequest_dtl.onreadystatechange=doUpdateItmDtlToReplace;}}function doUpdateItmDtlToReplace(){try{if(objXmlHttpRequest_dtl.readyState==4){if(objXmlHttpRequest_dtl.status==200){if(objXmlHttpRequest_dtl.responseText!=null&&objXmlHttpRequest_dtl.responseText!=''){var animArgs = {node: 'divItmDtlCntnr',duration: 125,delay: 250};var anim = dojo.fadeOut(animArgs);var animArgs = {node: 'divItmDtlCntnr',duration: 125,delay: 250};var anim2 = dojo.fadeIn(animArgs);dojo.fx.chain([anim,anim2]).play();var objTimer;objTimer=setTimeout("document.getElementById('divItmDtlCntnr').innerHTML=objXmlHttpRequest_dtl.responseText",250);doScrollToContent();}}}}catch(err){}}function doGetItmDtlToReplace2(intRowId,int_doGetItmDtl_itemId,str_doGetItmDtl_options,strGroupId){var strOptions='';if(bolWidthNarrow==true){strOptions=strOptions+',widthnarrow'}if(bolIsUserAuthenticated==true){strOptions=strOptions+',auth'}var objRegExp = new RegExp(',','g');var strOptions2=strOptions.replace(objRegExp,';');strOptions2=strOptions+';'+str_doGetItmDtl_options.replace(objRegExp,';');if(strBrowserClass>=1){document.getElementById('sndBackgound').src='/snd/navigationstart.wav';objXmlHttpRequest_dtl=getXMLHttpRequest();objXmlHttpRequest_dtl.open('GET',strPath+'itemDetail.asp?options=nohead,'+str_doGetItmDtl_options+','+strOptions+'&itemId='+encodeURIComponent(int_doGetItmDtl_itemId)+'&warehouseId='+encodeURIComponent(intWarehouseID)+'&groupId='+encodeURIComponent(strGroupId)+'&vendorInventoryScript='+encodeURIComponent('doGetItmDtlToReplace('+int_doGetItmDtl_itemId+',\''+strOptions2+';viewvendoravailability\''+')'),true);objXmlHttpRequest_dtl.send(null);objXmlHttpRequest_dtl.onreadystatechange=function(){doUpdateItmDtlToReplace2(intRowId)};}}function doUpdateItmDtlToReplace2(intRowId){try{if(objXmlHttpRequest_dtl.readyState==4){if(objXmlHttpRequest_dtl.status==200){if(objXmlHttpRequest_dtl.responseText!=null&&objXmlHttpRequest_dtl.responseText!=''){setTabContent('divCntnrItm'+intRowId,'','detail',objXmlHttpRequest_dtl.responseText);}}}}catch(err){}}function doGetItmDtl2(int_doGetItmDtl_rowId,int_doGetItmDtl_itemId,intGradeId,str_doGetItmDtl_options,str_doGetItmDtl_groupId){var dateNow= new Date();var intDiff=0;var strOptions='nohead,';if(bolWidthNarrow==true){strOptions=strOptions+',widthnarrow'}if(bolIsUserAuthenticated==true){strOptions=strOptions+',auth'}var objRegExp = new RegExp(',','g');var strOptions2=strOptions.replace(objRegExp,';');strOptions2=strOptions+str_doGetItmDtl_options.replace(objRegExp,';');if(strBrowserClass>=1){if(aryItemDetailUpdatedRows[int_doGetItmDtl_rowId]!=false){var datStored= new Date(aryItemDetailUpdatedRows[int_doGetItmDtl_rowId]);intDiff= dateNow.getTime()-datStored.getTime().toString()*1;}if(intDiff==0||intDiff>=intItemStoreSeconds*1000){document.getElementById('sndBackgound').src='/snd/navigationstart.wav';objXmlHttpRequest_dtl=getXMLHttpRequest();objXmlHttpRequest_dtl.open('GET',strPath+'itemDetail.asp?groupId='+encodeURIComponent(str_doGetItmDtl_groupId)+'&options='+str_doGetItmDtl_options+','+strOptions+'&itemId='+encodeURIComponent(int_doGetItmDtl_itemId)+'&warehouseId='+encodeURIComponent(intWarehouseID)+'&vendorInventoryScript='+encodeURIComponent('doGetItmDtlToReplace2('+int_doGetItmDtl_rowId+','+int_doGetItmDtl_itemId+',\''+strOptions2+';viewvendoravailability\''+',\''+str_doGetItmDtl_groupId+'\')'),true);objXmlHttpRequest_dtl.send(null);objXmlHttpRequest_dtl.onreadystatechange=function(){doUpdateItmDtl2(int_doGetItmDtl_rowId,int_doGetItmDtl_itemId,intGradeId)};}}}function doUpdateItmDtl2(intRowId,intItemId,intGradeId){try{if(objXmlHttpRequest_dtl.readyState==4){if(objXmlHttpRequest_dtl.status==200){if(objXmlHttpRequest_dtl.responseText!=null&&objXmlHttpRequest_dtl.responseText!=''){aryItemDetailUpdatedRows[intRowId]=Date();if(document.getElementById('imgDtl3Ldg'+intRowId)){document.getElementById('imgDtl2Ldg'+intRowId).src='/img/oth/spacer.gif';}setTabContent('divCntnrItm'+intRowId,'','detail','
'+objXmlHttpRequest_dtl.responseText+'
');var skroll = new Fx.ScrollWindow({duration:1000,wait:false,transition:Fx.Transitions.sineInOut});skroll.toElement('skrlToItm'+intRowId);if(bolIsUserAuthenticated&&!bolIsUserEmployee){doGetNotes(intRowId,intItemId,intGradeId);}}}}}catch(err){}}function doGetNotes(intRowId,intItemId,intGradeId){if(strBrowserClass>=1&&document.getElementById('divItemDetailNotes'+intRowId)){if(document.getElementById('divItemDetailNotes'+intRowId).innerHTML!=''){document.getElementById('divItemDetailNotes'+intRowId).innerHTML='\'\'';}objXmlHttpRequest_nte=getXMLHttpRequest();objXmlHttpRequest_nte.open('GET','searchAssistant.asp?reqCls=getcustomernotesdetailhtml&responseType=readonly&key=Idtl&indexid=-1&columns=1&rowid='+encodeURIComponent(intRowId)+'&itemid='+encodeURIComponent(intItemId)+'&gradeid='+encodeURIComponent(intGradeId)+'&apluswarehouse='+encodeURIComponent(strAplusWarehouse)+'&refreshJavaFunction='+encodeURIComponent('doGetNotes('+intRowId+','+intItemId+','+intGradeId+')'),true);objXmlHttpRequest_nte.send(null);objXmlHttpRequest_nte.onreadystatechange=function(){doUpdateNotes(intRowId)};}}function doUpdateNotes(intRowId){try{if(objXmlHttpRequest_nte.readyState==4){if(objXmlHttpRequest_nte.status==200){if(objXmlHttpRequest_nte.responseText!=null&&objXmlHttpRequest_nte.responseText!=''){document.getElementById('divItemDetailNotes'+intRowId).innerHTML=objXmlHttpRequest_nte.responseText;}}}}catch(err){}}function doGetItmDtl3(int_doGetItmDtl_rowId,int_doGetItmDtl_itemId){var dateNow= new Date();var intDiff=0;var strOptions='';if(bolWidthNarrow==true){strOptions=strOptions+',widthnarrow'}if(bolIsUserAuthenticated==true){strOptions=strOptions+',auth'}if(strBrowserClass>=1){if(aryItemAlternatesUpdatedRows[int_doGetItmDtl_rowId]!=false){var datStored= new Date(aryItemAlternatesUpdatedRows[int_doGetItmDtl_rowId]);intDiff= dateNow.getTime()-datStored.getTime().toString()*1;}if(intDiff==0||intDiff>=intItemStoreSeconds*1000){document.getElementById('sndBackgound').src='/snd/navigationstart.wav';objXmlHttpRequest_altItm=getXMLHttpRequest();objXmlHttpRequest_altItm.open('GET',strPath+'searchAssistant.asp?reqCls=getAlternateItems&options=useTabs&itemId='+encodeURIComponent(int_doGetItmDtl_itemId)+'&rowId='+encodeURIComponent(int_doGetItmDtl_rowId)+'&warehouseId='+encodeURIComponent(intWarehouseID),true);objXmlHttpRequest_altItm.send(null);objXmlHttpRequest_altItm.onreadystatechange=doUpdateItmDtl3;intItemRowId=int_doGetItmDtl_rowId;}}}function doUpdateItmDtl3(){try{if(objXmlHttpRequest_altItm.readyState==4){if(objXmlHttpRequest_altItm.status==200){if(objXmlHttpRequest_altItm.responseText!=null&&objXmlHttpRequest_altItm.responseText!=''){aryItemAlternatesUpdatedRows[intItemRowId]=Date();if(document.getElementById('imgDtl3Ldg'+intItemRowId)){document.getElementById('imgDtl3Ldg'+intItemRowId).src='/img/oth/spacer.gif';}var aryResponse=objXmlHttpRequest_altItm.responseText.split('|~|');if(aryResponse[0].substr(0,3)=='ok:'){if(aryResponse[1]=='true'||aryResponse[2]=='true'){if(aryResponse[1]=='true'&&aryResponse[2]=='true'){strTabTitle='Larger size and alternate items';}else if(aryResponse[1]=='true'){strTabTitle='Larger size items';}else if(aryResponse[2]=='true'){strTabTitle='Alternate items';}var strIndex='';if(bolAlternateItems){strIndex=-1;}doUtilsTabsCreateNewTab('divCntnrItm'+intItemRowId,strIndex,strTabTitle,'alternateItems',aryResponse[3]);}}}}}}catch(err){}}function doGetItmDtl5(int_doGetItmDtl_rowId,int_doGetItmDtl_itemId,str_doGetItmDtl_options,str_doGetItmDtl_groupId){var dateNow= new Date();var intDiff=0;var strOptions='';if(bolWidthNarrow==true){strOptions=strOptions+',widthnarrow'}if(bolIsUserAuthenticated==true){strOptions=strOptions+',auth'}if(strBrowserClass>=1){document.getElementById('sndBackgound').src='/snd/navigationstart.wav';if(aryItemUpdatedRows[int_doGetItmDtl_rowId]!=false){var datStored= new Date(aryItemUpdatedRows[int_doGetItmDtl_rowId]);intDiff= dateNow.getTime()-datStored.getTime().toString()*1;}if(intDiff==0||intDiff>=intItemStoreSeconds*1000){document.getElementById('divItmDtl'+int_doGetItmDtl_rowId).innerHTML="";objXmlHttpRequest=getXMLHttpRequest();objXmlHttpRequest.open('GET',strPath+'itemDetail.asp?groupId='+encodeURIComponent(str_doGetItmDtl_groupId)+'&options=nohead,'+str_doGetItmDtl_options+','+strOptions+'&itemId='+encodeURIComponent(int_doGetItmDtl_itemId)+'&warehouseId='+encodeURIComponent(intWarehouseID),true);objXmlHttpRequest.send(null);objXmlHttpRequest.onreadystatechange=doUpdateItmDtl5;intItemRowId=int_doGetItmDtl_rowId;}}}function doUpdateItmDtl5(){try{if(objXmlHttpRequest.readyState==4){if(objXmlHttpRequest.status==200){if(objXmlHttpRequest.responseText!=null&&objXmlHttpRequest.responseText!=''){aryItemUpdatedRows[intItemRowId]=Date();document.getElementById('divItmDtl'+intItemRowId).innerHTML=objXmlHttpRequest.responseText;}}}}catch(err){}}function doGetVendorInventory(int_doGetVendorInventory_rowId,int_doGetVendorInventory_itemId){if(strBrowserClass>=1){if(!bolVndrAvailInProg){bolVndrAvailInProg=true;document.getElementById('sndBackgound').src='/snd/navigationstart.wav';objXmlHttpRequestVendorAvailability=getXMLHttpRequest();objXmlHttpRequestVendorAvailability.open('GET',strPath+'searchAssistant.asp?reqCls=vendorinventory&responseType=string&allDistributionCenters='+encodeURIComponent(boolViewEmployee)+'&itemId='+encodeURIComponent(int_doGetVendorInventory_itemId)+'&warehouseId='+encodeURIComponent(intWarehouseID)+'&shipToIndex='+encodeURIComponent(intShipToIndex)+'&rowId='+encodeURIComponent(int_doGetVendorInventory_rowId),true);objXmlHttpRequestVendorAvailability.send(null);objXmlHttpRequestVendorAvailability.onreadystatechange=doUpdateVendorInventory;intItemRowId=int_doGetVendorInventory_rowId;}}else{alert('Your browser does not support this feature.');}}function doUpdateVendorInventory(){try{if(objXmlHttpRequestVendorAvailability.readyState==4&&objXmlHttpRequestVendorAvailability.status==200){if(objXmlHttpRequestVendorAvailability.status==200){if(objXmlHttpRequestVendorAvailability.responseText!=null&&objXmlHttpRequestVendorAvailability.responseText!=''){var bolError=true;var aryResponse=objXmlHttpRequestVendorAvailability.responseText.split('|,');var objDomTblVendorInventory=document.getElementById('tblInventory'+intItemRowId);var objInventoryLink=document.getElementById('trInventoryLink'+intItemRowId);objInventoryLink.parentNode.removeChild(objInventoryLink);if(aryResponse.length==1){var objTrNew=document.createElement('tr');var objTdNew1=document.createElement('td');objTdNew1.setAttribute('colSpan','4');objTdNew1.className='rowcl';objTdNew1.innerHTML='call, no mill availability to display';objTrNew.appendChild(objTdNew1);objDomTblVendorInventory.appendChild(objTrNew);}else{bolError=false;var intLoop;for(intLoop=0; intLoop'+aryResponse[intLoop+1]+'';objTdNew2.innerHTML=''+aryResponse[intLoop+2]+'';objTdNew3.innerHTML=''+aryResponse[intLoop+3]+'';objTdNew4.innerHTML=''+aryResponse[intLoop+4]+'';objTrNew.appendChild(objTdNew1);objTrNew.appendChild(objTdNew2);objTrNew.appendChild(objTdNew3);objTrNew.appendChild(objTdNew4);objDomTblVendorInventory.appendChild(objTrNew);}}if(!bolError){document.getElementById('divVendorAvailCntrl'+intItemRowId).style.display='none';}if(document.getElementById('divVendorAvailEstimated'+intItemRowId)){document.getElementById('divVendorAvailEstimated'+intItemRowId).style.display='none';}document.getElementById('divVendorAvail'+intItemRowId).style.display='';document.getElementById('sndBackgound').src='/snd/balloon.wav';bolVndrAvailInProg=false;}}}}catch(err){}}function doExtendedOptions(bol_doExtendedOptions_searchWithinGroupItems){if(strBrowserClass>=1){var strParams='reqCls=getSearchExtendedOptionsHtml&searchWithinGroupItems='+encodeURIComponent(bol_doExtendedOptions_searchWithinGroupItems);objXmlHttpRequest=getXMLHttpRequest();objXmlHttpRequest.onreadystatechange=doHandlerExtendedOptions;objXmlHttpRequest.open('POST',strPath+'searchAssistant.asp',true);objXmlHttpRequest.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');objXmlHttpRequest.setRequestHeader('Content-length', strParams.length);objXmlHttpRequest.setRequestHeader('Connection', 'close');objXmlHttpRequest.send(strParams)}}function doHandlerExtendedOptions(){if(objXmlHttpRequest.readyState==4){if(objXmlHttpRequest.status==200){if(objXmlHttpRequest.responseText!=null){var aryResponse=objXmlHttpRequest.responseText.split('|~|');if(aryResponse[0].substr(0,3)=='ok:'){if(aryResponse[1]=='true'){document.getElementById('divSearchCustomerItem').style.display='';}if(bolIsUserAuthenticated){if(aryResponse[2]=='true'){doCnCbChk('chkBoxViewInventory');}else{doCnCbClr('chkBoxViewInventory');}if(aryResponse[3]=='true'){doCnCbChk('chkBoxViewCWTprice');}else{doCnCbClr('chkBoxViewCWTprice');}if(aryResponse[4]=='true'){doCnCbChk('chkBoxViewCaliper');}else{doCnCbClr('chkBoxViewCaliper');}if(aryResponse[5]=='true'){doCnCbChk('chkBoxOrderCWT');}else{doCnCbClr('chkBoxOrderCWT');}if(aryResponse[6]=='true'){doCnCbChk('chkBoxOrderFull');}else{doCnCbClr('chkBoxOrderFull');}if(aryResponse[7]=='true'){doCnCbChk('chkBoxViewItemNumber');}else{doCnCbClr('chkBoxViewItemNumber');}if(aryResponse[8]=='true'){doCnCbChk('chkBoxOrderShowItemDetailInOwnPage');}else{doCnCbClr('chkBoxOrderShowItemDetailInOwnPage');}if(document.getElementById('divRecentSearchesContainer')){document.getElementById('divRecentSearchesContainer').innerHTML=aryResponse[9]};if(document.getElementById('divMyCatalogContainer')){document.getElementById('divMyCatalogContainer').innerHTML=aryResponse[10]};if(aryResponse[11]!='0'&&aryResponse[11]!=''){document.getElementById('lblCartItemsCount').innerHTML=aryResponse[11];document.getElementById('lblCartOrderValue').innerHTML=aryResponse[12];document.getElementById('lblCartOrderWeight').innerHTML=aryResponse[13];if(document.getElementById('divCartHtmlContainer')){document.getElementById('divCartHtmlContainer').innerHTML=aryResponse[14];}if(document.getElementById('divLinksCartHtmlContainer')){document.getElementById('divLinksCartHtmlContainer').innerHTML=aryResponse[14];}document.getElementById('divCart').style.display='';}}else{if(document.getElementById('divRecentSearchesContainer')){document.getElementById('divRecentSearchesContainer').innerHTML=aryResponse[1]};if(document.getElementById('divMyCatalogContainer')){document.getElementById('divMyCatalogContainer').innerHTML=aryResponse[2]};}}else{if(aryResponse[0].substr(1,3)=='er:'){}else{}}}}}}function doXmlUdt(strRowId,strRecId,strFldVal){if(strBrowserClass>=1){var strParams='reqCls=multipleqty&id='+encodeURIComponent(strRecId)+'&qty='+encodeURIComponent(strFldVal)+'&rowId='+encodeURIComponent(strRowId)+'&warehouseId='+encodeURIComponent(intWarehouseID);objXmlHttpRequest=getXMLHttpRequest();document.getElementById('sndBackgound').src='/snd/navigationstart.wav';objXmlHttpRequest.onreadystatechange=doHandlerUptMultipleQty;objXmlHttpRequest.open('POST',strPath+'searchAssistant.asp',true);objXmlHttpRequest.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');objXmlHttpRequest.setRequestHeader('Content-length', strParams.length);objXmlHttpRequest.setRequestHeader('Connection', 'close');objXmlHttpRequest.send(strParams)}}function doHandlerUptMultipleQty(){if(objXmlHttpRequest.readyState==4){if(objXmlHttpRequest.status==200){if(objXmlHttpRequest.responseText!=null){var aryResponse=objXmlHttpRequest.responseText.split("','");var intItemRowId=aryResponse[1];if(aryResponse[0].substr(1,3)=='ok:'){document.getElementById('sndBackgound').src='/snd/balloon.wav';document.getElementById('txtBoxOrdrQty'+strFormKey+intItemRowId).value=aryResponse[2];document.getElementById('lstBoxOrdrQtyUnit'+intItemRowId).selectedIndex=aryResponse[3];document.getElementById('lblOmsg'+intItemRowId).innerHTML=aryResponse[4];}else{if(aryResponse[0].substr(1,3)=='er:'){document.getElementById('lblOmsg'+intItemRowId).innerHTML=''+aryResponse[2];}else{document.getElementById('lblOmsg'+intItemRowId).innerHTML='unknown error'; }}document.getElementById('sndBackgound').src='/snd/balloon.wav';}}}}function doGetOrdrItm(int_doGetOrdrItm_rowId,int_doGetOrdrItm_itemId){var dateNow= new Date();var intDiff=0;if(strBrowserClass>=1){if(aryItemOrderUpdatedRows[int_doGetOrdrItm_rowId]==false){document.getElementById('sndBackgound').src='/snd/navigationstart.wav';objXmlHttpRequestOrder=getXMLHttpRequest();objXmlHttpRequestOrder.open('GET',strPath+'searchAssistant.asp?reqCls=order&id='+encodeURIComponent(int_doGetOrdrItm_itemId)+'&rowId='+encodeURIComponent(int_doGetOrdrItm_rowId)+'&warehouseId='+encodeURIComponent(intWarehouseID),true);objXmlHttpRequestOrder.send(null);objXmlHttpRequestOrder.onreadystatechange=doUpdateOrder;intItemRowId=int_doGetOrdrItm_rowId;}}}function doUpdateOrder(){try{if(objXmlHttpRequestOrder.readyState==4){if(objXmlHttpRequestOrder.status==200){clearTimeout(objRequestItemTimer);if(objXmlHttpRequestOrder.responseText!=null&&objXmlHttpRequestOrder.responseText!=''){aryItemOrderUpdatedRows[intItemRowId]=true;document.getElementById('imgOrdrLdg'+intItemRowId).src='/img/oth/spc.gif';setTabContent('divCntnrItm'+intItemRowId,0,'',objXmlHttpRequestOrder.responseText);var objOrdrTimer;clearTimeout(objOrdrTimer);objOrdrTimer=setTimeout("if(document.getElementById('txtBoxOrdrQty'+strFormKey+intItemRowId)){document.getElementById('txtBoxOrdrQty'+strFormKey+intItemRowId).focus()}else{if(document.getElementById('lstBoxPackOrderQuantity'+strFormKey+intItemRowId)){document.getElementById('lstBoxPackOrderQuantity'+strFormKey+intItemRowId).focus()}}",500)}}}}catch(err){}}function doGetOrdrItm2(int_doGetOrdrItm_rowId,int_doGetOrdrItm_itemId){var dateNow= new Date();var intDiff=0;if(strBrowserClass>=1){document.getElementById('divOrderItem'+int_doGetOrdrItm_rowId).style.display='';document.getElementById('sndBackgound').src='/snd/navigationstart.wav';if(aryItemOrderUpdatedRows[int_doGetOrdrItm_rowId]==false){objXmlHttpRequestOrder=getXMLHttpRequest();objXmlHttpRequestOrder.open('GET',strPath+'searchAssistant.asp?reqCls=order&id='+encodeURIComponent(int_doGetOrdrItm_itemId)+'&rowId='+encodeURIComponent(int_doGetOrdrItm_rowId)+'&warehouseId='+encodeURIComponent(intWarehouseID),true);objXmlHttpRequestOrder.send(null);objXmlHttpRequestOrder.onreadystatechange=doUpdateOrder2;intItemRowId=int_doGetOrdrItm_rowId;}}}function doUpdateOrder2(){try{if(objXmlHttpRequestOrder.readyState==4){if(objXmlHttpRequestOrder.status==200){clearTimeout(objRequestItemTimer);if(objXmlHttpRequestOrder.responseText!=null&&objXmlHttpRequestOrder.responseText!=''){aryItemOrderUpdatedRows[intItemRowId]=true;document.getElementById('imgOrdrLdg'+intItemRowId).src='/img/oth/spc.gif';document.getElementById('divOrderItem'+intItemRowId).innerHTML=objXmlHttpRequestOrder.responseText;var objOrdrTimer;clearTimeout(objOrdrTimer);objOrdrTimer=setTimeout("if(document.getElementById('txtBoxOrdrQty'+strFormKey+intItemRowId)){document.getElementById('txtBoxOrdrQty'+strFormKey+intItemRowId).focus()}else{if(document.getElementById('lstBoxPackOrderQuantity'+strFormKey+intItemRowId)){document.getElementById('lstBoxPackOrderQuantity'+strFormKey+intItemRowId).focus()}}",500)}}}}catch(err){}}function doUpdateOrderQtyUnitPref(str_doUpdateOrderQtyUnitPref_browserClass,str_doUpdateOrderQtyUnitPref_unit,str_doUpdateOrderQtyUnitPref_index){if(str_doUpdateOrderQtyUnitPref_browserClass>=1&&bolNotViewMsgSetOrderQtyUnit==false){bolNotViewMsgSetOrderQtyUnit=true;switch(str_doUpdateOrderQtyUnitPref_index){case 0:var msg = new DOMAlert({title: ' ',text: 'I always order in '+str_doUpdateOrderQtyUnitPref_unit+' (base unit).
Set this as my default ordering unit.',width: 450,height: 75,ok: {value: true, text: 'Yes', onclick: doUpdateOrderQtyUnitPrefBase},cancel: {value: false, text: 'No', onclick: doUpdateOrderQtyUnitPrefBase}});msg.show();break;case 1:var msg = new DOMAlert({title: ' ',text: 'I always order in '+str_doUpdateOrderQtyUnitPref_unit+' (full packaing unit).
Set this as my default ordering unit.',width: 450,height: 75,ok: {value: true, text: 'Yes', onclick: doUpdateOrderQtyUnitPrefFull},cancel: {value: false, text: 'No', onclick: doUpdateOrderQtyUnitPrefFull}});msg.show();break;}}}function doUpdateOrderQtyUnitPrefFull(sender,value){sender.close();if(value==true){doXmlUdtPref('preforderqtyunit','full');doCnCbChk('chkBoxOrderFull');}}function doUpdateOrderQtyUnitPrefBase(sender,value){sender.close();if(value==true){doXmlUdtPref('preforderqtyunit','base');doCnCbClr('chkBoxOrderFull');}}function doUpdateOrderPriceUnitPref(str_doUpdateOrderPriceUnitPref_browserClass,str_doUpdateOrderPriceUnitPref_unit,str_doUpdateOrderPriceUnitPref_index){if(str_doUpdateOrderPriceUnitPref_browserClass>=1&&bolNotViewMsgSetOrderPriceUnit==false){bolNotViewMsgSetOrderPriceUnit=true;switch(str_doUpdateOrderPriceUnitPref_index){case 0:var msg = new DOMAlert({title: ' ',text: 'I always order in '+str_doUpdateOrderPriceUnitPref_unit+'.
Set this as my default ordering unit.',width: 450,height: 75,ok: {value: true, text: 'Yes', onclick: doUpdateOrderPriceUnitPrefBase},cancel: {value: false, text: 'No', onclick: doUpdateOrderPriceUnitPrefBase}});msg.show();break;case 1:var msg = new DOMAlert({title: ' ',text: 'I always order in '+str_doUpdateOrderPriceUnitPref_unit+'.
Set this as my default ordering unit.',width: 450,height: 75,ok: {value: true, text: 'Yes', onclick: doUpdateOrderPriceUnitPrefCWT},cancel: {value: false, text: 'No', onclick: doUpdateOrderPriceUnitPrefCWT}});msg.show();break;}}}function doUpdateOrderPriceUnitPrefCWT(sender,value){sender.close();if(value==true){doXmlUdtPref('preforderpriceunit','cwt');doCnCbChk('chkBoxOrderCWT');}}function doUpdateOrderPriceUnitPrefBase(sender,value){sender.close();if(value==true){doXmlUdtPref('preforderpriceunit','base');doCnCbClr('chkBoxOrderCWT');}}function doXmlUdtPref(strPref,strUnitType){if(strBrowserClass>=1){var strParams='reqCls='+encodeURIComponent(strPref)+'&unitType='+encodeURIComponent(strUnitType);objXmlHttpRequest=getXMLHttpRequest();document.getElementById('sndBackgound').src='/snd/navigationstart.wav';objXmlHttpRequest.open('POST',strPath+'searchAssistant.asp',true);objXmlHttpRequest.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');objXmlHttpRequest.setRequestHeader('Content-length', strParams.length);objXmlHttpRequest.setRequestHeader('Connection', 'close');objXmlHttpRequest.send(strParams)}}function doAddToSearch(strExpression,bolUseQuotes){if(document.getElementById('search'+strFormKey).value.indexOf(strExpression,0)==-1){if(bolUseQuotes==true){document.getElementById('search'+strFormKey).value=document.getElementById('search'+strFormKey).value+' '+' \"'+strExpression+'\"';}else{document.getElementById('search'+strFormKey).value=document.getElementById('search'+strFormKey).value+' '+strExpression;}}}function doRemoveFromSearch(strExpression){document.getElementById('search'+strFormKey).value=document.getElementById('search'+strFormKey).value.replace('\"'+strExpression+'\"','');}function doGetPriceSheetUrl(int_doGetPriceSheetUrl_gradeId,str_doGetPriceSheetUrl_type){if(strBrowserClass>=1){document.getElementById('sndBackgound').src='/snd/navigationstart.wav';objXmlHttpRequest=getXMLHttpRequest();objXmlHttpRequest.open('GET','searchAssistant.asp?reqCls=pricesheeturl&id='+encodeURIComponent(int_doGetPriceSheetUrl_gradeId)+'&type='+encodeURIComponent(str_doGetPriceSheetUrl_type)+'&apluswarehouse='+encodeURIComponent(strAplusWarehouse),true);objXmlHttpRequest.send(null);objXmlHttpRequest.onreadystatechange=doUpdatePriceSheetUrl;}}var strPriceSheetUrl;function doUpdatePriceSheetUrl(){try{if(objXmlHttpRequest.readyState==4){if(objXmlHttpRequest.status==200){if(objXmlHttpRequest.responseText!=null&&objXmlHttpRequest.responseText!=''){var aryResponse = objXmlHttpRequest.responseText.split('|');if(aryResponse[0].toString().substr(1,2)=='er'){if(aryResponse[0].toString().indexOf('selectAccount',0)>=1){location.href='/eaccount/mycompany/default.asp?targetUrl='+strThisPageUrl;}if(aryResponse[0].toString().indexOf('noAccount',0)>=1){alert('This feature requires a customer account. None has been assigned.');}if(aryResponse[0].toString().indexOf('authenticateFirst',0)>=1){location.href='/logon/default.asp?origin='+strThisPageUrl;}}else{strSecurity=aryResponse[0];strPriceSheetUrl=aryResponse[2];if(strSecurity=='public'){location.href=strPriceSheetUrl;}else{var msg = new DOMAlert({title: ' ',text: 'The document you are opening is password protected.

The password is '+aryResponse[1]+'

You will be promted to enter the password after cliking OK.',width: 550,height: 135,ok: {value: true, text: 'Ok', onclick: doOpenPriceSheet},cancel: {value: false, text: 'Cancel', onclick: doOpenPriceSheet}});msg.show();}}}}}}catch(err){}}function doOpenPriceSheet(sender,value){sender.close();if(value==true){location.href=strPriceSheetUrl;}}function doUpdateCustomerPartNumber(intRowId,intItemId,strCustomerPartNumber,strLabelDomId,strStatusImgDomId){if(strBrowserClass>=1){document.getElementById(strStatusImgDomId).src='/img/oth/spc.gif';var strParams='reqCls=updateCustomerPartNumber&rowId='+encodeURIComponent(intRowId)+'&itemId='+encodeURIComponent(intItemId)+'&customerPartNumber='+encodeURIComponent(strCustomerPartNumber);objXmlHttpRequest=getXMLHttpRequest();document.getElementById('sndBackgound').src='/snd/navigationstart.wav';objXmlHttpRequest.onreadystatechange=function(){doHandlerUpdateCustomerPartNumber(strLabelDomId,strStatusImgDomId,strCustomerPartNumber)};objXmlHttpRequest.open('POST',strPath+'searchAssistant.asp',true);objXmlHttpRequest.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');objXmlHttpRequest.setRequestHeader('Content-length', strParams.length);objXmlHttpRequest.setRequestHeader('Connection', 'close');objXmlHttpRequest.send(strParams)}}function doHandlerUpdateCustomerPartNumber(strLabelDomId,strStatusImgDomId,strCustomerPartNumber){if(objXmlHttpRequest.readyState==4){if(objXmlHttpRequest.status==200){if(objXmlHttpRequest.responseText!=null){var aryResponse=objXmlHttpRequest.responseText.split("','");if(aryResponse[0].substr(0,3)=='ok:'){document.getElementById('sndBackgound').src='/snd/balloon.wav';document.getElementById(strStatusImgDomId).src='/img/blt/checksuccess.gif';if(strCustomerPartNumber==''){document.getElementById(strLabelDomId).innerHTML='';}else{document.getElementById(strLabelDomId).innerHTML='
'+strCustomerPartNumber;}eval(aryResponse[1]);}else{if(aryResponse[0].substr(1,3)=='er:'){document.getElementById(strStatusImgDomId).src='/img/blt/checkfailed.gif';}else{document.getElementById(strStatusImgDomId).src='/img/blt/checkfailed.gif';}}document.getElementById('sndBackgound').src='/snd/balloon.wav';}}}}function doGetItmCustNte(int_doGetItmDtl_rowId,int_doGetItmDtl_itemId,intGradeId,intIndexId,bolShared,bolUseCache){if(window.console){console.log('called function doGetItmCustNte(',int_doGetItmDtl_rowId,',',int_doGetItmDtl_itemId,',',intGradeId,',',intIndexId,',',bolShared,',',bolUseCache,') // rowId,itemId,gradeId,indexId,shared,useCache')};var intRowId2;if(int_doGetItmDtl_itemId=='0'||int_doGetItmDtl_itemId==''){intRowId2=0;}else{intRowId2=int_doGetItmDtl_rowId+1;}if(strBrowserClass>=1&&(((!aryItemUpdatedCustomerNotes[intRowId2]&&bolShared)||(!aryItemUpdatedCustomerNotesMy[intRowId2]&&!bolShared))||!bolUseCache)){if(document.getElementById('scriptCustomerNotes'+bolShared+int_doGetItmDtl_rowId)){try{document.getElementsByTagName('body')[0].removeChild(document.getElementById('scriptCustomerNotes'+bolShared+int_doGetItmDtl_rowId));}catch(ex){}}}var objElementScript=document.createElement('script');objElementScript.src=strPath+'searchAssistant.asp?reqCls=getCustomerNotesJavaScript&itemId='+encodeURIComponent(int_doGetItmDtl_itemId)+'&gradeId='+encodeURIComponent(intGradeId)+'&indexId='+encodeURIComponent(intIndexId)+'&rowId='+encodeURIComponent(int_doGetItmDtl_rowId)+'&shared='+encodeURIComponent(bolShared);objElementScript.type='text/javascript';objElementScript.id='scriptCustomerNotes'+bolShared+int_doGetItmDtl_rowId;document.getElementsByTagName('head')[0].appendChild(objElementScript);if(int_doGetItmDtl_itemId=='0'||int_doGetItmDtl_itemId==''){if(bolShared){setTabContent('divTabsContainer_grade','','customerNotes','');}else{setTabContent('divTabsContainer_grade','','myNotes','');}}else{if(bolShared){setTabContent('divCntnrItm'+intItemRowId,'','customerNotes','');}else{setTabContent('divCntnrItm'+intItemRowId,'','myNotes','');}}document.getElementById('sndBackgound').src='/snd/navigationstart.wav';objXmlHttpRequest_cnt=getXMLHttpRequest();objXmlHttpRequest_cnt.open('GET',strPath+'searchAssistant.asp?reqCls=getCustomerNotesHtml&itemId='+encodeURIComponent(int_doGetItmDtl_itemId)+'&gradeId='+encodeURIComponent(intGradeId)+'&indexId='+encodeURIComponent(intIndexId)+'&rowId='+encodeURIComponent(int_doGetItmDtl_rowId)+'&shared='+encodeURIComponent(bolShared),true);objXmlHttpRequest_cnt.send(null);objXmlHttpRequest_cnt.onreadystatechange=function(){doUpdateItmCustNte(int_doGetItmDtl_rowId,intGradeId,int_doGetItmDtl_itemId,bolShared)};}function doUpdateItmCustNte(intItemRowId,intGradeId,intItemId,bolShared){if(window.console){console.log('called function doUpdateItmCustNte(',intItemRowId,') // rowId')};try{if(objXmlHttpRequest_cnt.readyState==4){if(objXmlHttpRequest_cnt.status==200){if(objXmlHttpRequest_cnt.responseText!=null&&objXmlHttpRequest_cnt.responseText!=''){if(window.console){console.log('objXmlHttpRequest_cnt.response is valid')};if(intItemId=='0'||intItemId==''){if(bolShared){aryItemUpdatedCustomerNotes[0]=true;setTabContent('divTabsContainer_grade','','customerNotes',objXmlHttpRequest_cnt.responseText);}else{aryItemUpdatedCustomerNotesMy[0]=true;setTabContent('divTabsContainer_grade','','myNotes',objXmlHttpRequest_cnt.responseText);}}else{if(bolShared){aryItemUpdatedCustomerNotes[intItemRowId+1]=true;setTabContent('divCntnrItm'+intItemRowId,'','customerNotes',objXmlHttpRequest_cnt.responseText);}else{aryItemUpdatedCustomerNotesMy[intItemRowId+1]=true;setTabContent('divCntnrItm'+intItemRowId,'','myNotes',objXmlHttpRequest_cnt.responseText);}var skroll = new Fx.ScrollWindow({duration:1000,wait:false,transition:Fx.Transitions.sineInOut});skroll.toElement('skrlToItm'+intItemRowId);}var strOnLoadFunction='doSearchService_getCustomerNotes_onLoad'+bolShared+intItemRowId+'()';try{eval(strOnLoadFunction)}catch(ex){};}}}}catch(err){}}function doGetItmCustNteDtl(int_doGetItmDtl_rowId,int_doGetItmDtl_itemId,intGradeId,int_doGetItmDtl_indexId,bolShared,bolShowDeleted){if(strBrowserClass>=1){if(document.getElementById('scriptCustomerNotesDetail'+bolShared+int_doGetItmDtl_rowId)){try{document.getElementsByTagName('body')[0].removeChild(document.getElementById('scriptCustomerNotesDetail'+bolShared+int_doGetItmDtl_rowId));}catch(ex){}}var objElementScript=document.createElement('script');objElementScript.src=strPath+'searchAssistant.asp?reqCls=getCustomerNotesDetailJavaScript&indexId='+encodeURIComponent(int_doGetItmDtl_indexId)+'&aplusWarehouse='+encodeURIComponent(strAplusWarehouse)+'&itemId='+encodeURIComponent(int_doGetItmDtl_itemId)+'&gradeId='+encodeURIComponent(intGradeId)+'&rowId='+encodeURIComponent(int_doGetItmDtl_rowId)+'&showDeleted='+encodeURIComponent(bolShowDeleted)+'&shared='+encodeURIComponent(bolShared);objElementScript.type='text/javascript';objElementScript.id='scriptCustomerNotesDetail'+bolShared+int_doGetItmDtl_rowId;document.getElementsByTagName('head')[0].appendChild(objElementScript);document.getElementById('divItemCustomerNotesContainer'+bolShared+int_doGetItmDtl_rowId).innerHTML='';document.getElementById('sndBackgound').src='/snd/navigationstart.wav';objXmlHttpRequest_cntDtl=getXMLHttpRequest();objXmlHttpRequest_cntDtl.open('GET',strPath+'searchAssistant.asp?reqCls=getCustomerNotesDetailHtml&indexId='+encodeURIComponent(int_doGetItmDtl_indexId)+'&aplusWarehouse='+encodeURIComponent(strAplusWarehouse)+'&itemId='+encodeURIComponent(int_doGetItmDtl_itemId)+'&gradeId='+encodeURIComponent(intGradeId)+'&rowId='+encodeURIComponent(int_doGetItmDtl_rowId)+'&showDeleted='+encodeURIComponent(bolShowDeleted)+'&shared='+encodeURIComponent(bolShared),true);objXmlHttpRequest_cntDtl.send(null);objXmlHttpRequest_cntDtl.onreadystatechange=function(){doUpdateItmCustNteDtl(int_doGetItmDtl_rowId,int_doGetItmDtl_itemId,intGradeId,bolShared)};}}function doUpdateItmCustNteDtl(intItemRowId,intItemId,intGradeId,bolShared){try{if(objXmlHttpRequest_cntDtl.readyState==4){if(objXmlHttpRequest_cntDtl.status==200){if(objXmlHttpRequest_cntDtl.responseText!=null&&objXmlHttpRequest_cntDtl.responseText!=''){document.getElementById('divItemCustomerNotesContainer'+bolShared+intItemRowId).innerHTML=objXmlHttpRequest_cntDtl.responseText;var strOnLoadFunction='doSearchService_getCustomernotesDetail_onLoad'+bolShared+intItemRowId+'()';try{eval(strOnLoadFunction)}catch(ex){};}}}}catch(err){}}function doSaveCustomerItemNoteNew(int_doGetItmDtl_rowId,int_doGetItmDtl_itemId,intGradeId,int_doGetItmDtl_indexId,str_doGetItmDtl_noteText,strNoteColor,bolShared){if(strBrowserClass>=1){if(str_doGetItmDtl_noteText==''){document.getElementById('lblCustomerNoteNewStatus'+bolShared+int_doGetItmDtl_rowId).innerHTML='Can\'t save empty note.';}else if(str_doGetItmDtl_noteText.length>=513){document.getElementById('lblCustomerNoteNewStatus'+int_doGetItmDtl_rowId).innerHTML='Note is too long. Must be less than 513 characters.';}else{var strParams='reqCls=doSaveNote&indexId='+encodeURIComponent(int_doGetItmDtl_indexId);strParams=strParams+'&itemId='+encodeURIComponent(int_doGetItmDtl_itemId);strParams=strParams+'&gradeId='+encodeURIComponent(intGradeId);strParams=strParams+'&rowId='+encodeURIComponent(int_doGetItmDtl_rowId);strParams=strParams+'¬eText='+encodeURIComponent(str_doGetItmDtl_noteText);strParams=strParams+'¬eColor='+encodeURIComponent(strNoteColor);objXmlHttpRequest_cntUdt=getXMLHttpRequest();objXmlHttpRequest_cntUdt.onreadystatechange=function(){doHandlerSaveCustomerItemNoteNew(int_doGetItmDtl_rowId,int_doGetItmDtl_itemId,intGradeId,int_doGetItmDtl_indexId,bolShared)};objXmlHttpRequest_cntUdt.open('POST',strPath+'searchAssistant.asp',true);objXmlHttpRequest_cntUdt.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');objXmlHttpRequest_cntUdt.setRequestHeader('Content-length', strParams.length);objXmlHttpRequest_cntUdt.setRequestHeader('Connection', 'close');objXmlHttpRequest_cntUdt.send(strParams)}}}function doHandlerSaveCustomerItemNoteNew(intItemRowId,intItemId,intGradeId,intIndexId,bolShared){if(objXmlHttpRequest_cntUdt.readyState==4){if(objXmlHttpRequest_cntUdt.status==200){if(objXmlHttpRequest_cntUdt.responseText!=null){var aryResponse=objXmlHttpRequest_cntUdt.responseText.split('|~|');switch(aryResponse[0].substr(0,3)){case 'ok:':doGetItmCustNteDtl(intItemRowId,intItemId,intGradeId,intIndexId,bolShared);break;case 'er:':document.getElementById('lblCustomerNoteNewStatus'+bolShared+intItemRowId).innerHTML=aryResponse[1];break;default:document.getElementById('lblCustomerNoteNewStatus'+bolShared+intItemRowId).innerHTML='unknown error';break;}}else{document.getElementById('lblCustomerNoteNewStatus'+bolShared+intItemRowId).innerHTML='error (no response)'; }}}}function doUpdateCustomerItemNote(int_doGetItmDtl_rowId,int_doGetItmDtl_noteId,str_doGetItmDtl_noteText,strNoteColor,bolShared,strCollapseNoteFunction){if(strBrowserClass>=1){var strParams='reqCls=doUpdateNote¬eId='+encodeURIComponent(int_doGetItmDtl_noteId);strParams=strParams+'¬eText='+encodeURIComponent(str_doGetItmDtl_noteText);strParams=strParams+'¬eColor='+encodeURIComponent(strNoteColor);objXmlHttpRequest_cntUdt=getXMLHttpRequest();objXmlHttpRequest_cntUdt.onreadystatechange=function(){doHandlerUpdateCustomerItemNote(int_doGetItmDtl_rowId,int_doGetItmDtl_noteId,bolShared,strCollapseNoteFunction)};objXmlHttpRequest_cntUdt.open('POST',strPath+'searchAssistant.asp',true);objXmlHttpRequest_cntUdt.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');objXmlHttpRequest_cntUdt.setRequestHeader('Content-length', strParams.length);objXmlHttpRequest_cntUdt.setRequestHeader('Connection', 'close');objXmlHttpRequest_cntUdt.send(strParams)}}function doHandlerUpdateCustomerItemNote(intItemRowId,intNoteId,bolShared,strCollapseNoteFunction){if(objXmlHttpRequest_cntUdt.readyState==4){if(objXmlHttpRequest_cntUdt.status==200){if(objXmlHttpRequest_cntUdt.responseText!=null){var aryResponse=objXmlHttpRequest_cntUdt.responseText.split('|~|');switch(aryResponse[0].substr(0,3)){case 'ok:':eval(strCollapseNoteFunction);break;case 'er:':document.getElementById('lblCustomerNoteUpdateStatus'+bolShared+intItemRowId+'_'+intNoteId).innerHTML=aryResponse[1];break;default:document.getElementById('lblCustomerNoteUpdateStatus'+bolShared+intItemRowId+'_'+intNoteId).innerHTML='unknown error';break;}}else{document.getElementById('lblCustomerNoteUpdateStatus'+bolShared+intItemRowId+'_'+intNoteId).innerHTML='error (no response)';}}}}function doDeleteCustomerItemNote(int_doGetItmDtl_rowId,int_doGetItmDtl_noteId,strCollapseNoteFunction){if(strBrowserClass>=1){var strParams='reqCls=doDeleteNote¬eId='+encodeURIComponent(int_doGetItmDtl_noteId);objXmlHttpRequest_cntUdt=getXMLHttpRequest();objXmlHttpRequest_cntUdt.onreadystatechange=function(){doHandlerDeleteCustomerItemNote(int_doGetItmDtl_rowId,int_doGetItmDtl_noteId,strCollapseNoteFunction)};objXmlHttpRequest_cntUdt.open('POST',strPath+'searchAssistant.asp',true);objXmlHttpRequest_cntUdt.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');objXmlHttpRequest_cntUdt.setRequestHeader('Content-length', strParams.length);objXmlHttpRequest_cntUdt.setRequestHeader('Connection', 'close');objXmlHttpRequest_cntUdt.send(strParams)}}function doHandlerDeleteCustomerItemNote(intItemRowId,intNoteId,strCollapseNoteFunction){if(objXmlHttpRequest_cntUdt.readyState==4){if(objXmlHttpRequest_cntUdt.status==200){if(objXmlHttpRequest_cntUdt.responseText!=null){var aryResponse=objXmlHttpRequest_cntUdt.responseText.split('|~|');switch(aryResponse[0].substr(0,3)){case 'ok:':eval(strCollapseNoteFunction);break;case 'er:':document.getElementById('lblCustomerNoteUpdateStatus'+intItemRowId+'_'+intNoteId).innerHTML=aryResponse[1];break;default:document.getElementById('lblCustomerNoteUpdateStatus'+intItemRowId+'_'+intNoteId).innerHTML='unknown error';break;}}else{document.getElementById('lblCustomerNoteUpdateStatus'+intItemRowId+'_'+intNoteId).innerHTML='error (no response)';}}}}function doNotesNewFolder(int_doGetItmDtl_rowId,intItemId,intGradeId,strFolderName){if(strBrowserClass>=1){var strParams='reqCls=doNewFolder&folderName='+encodeURIComponent(strFolderName);objXmlHttpRequest_cntUdt=getXMLHttpRequest();objXmlHttpRequest_cntUdt.onreadystatechange=function(){doHandlerNotesNewFolder(int_doGetItmDtl_rowId,intItemId,intGradeId)};objXmlHttpRequest_cntUdt.open('POST',strPath+'searchAssistant.asp',true);objXmlHttpRequest_cntUdt.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');objXmlHttpRequest_cntUdt.setRequestHeader('Content-length', strParams.length);objXmlHttpRequest_cntUdt.setRequestHeader('Connection', 'close');objXmlHttpRequest_cntUdt.send(strParams)}}function doHandlerNotesNewFolder(intItemRowId,intItemId,intGradeId){if(objXmlHttpRequest_cntUdt.readyState==4){if(objXmlHttpRequest_cntUdt.status==200){if(objXmlHttpRequest_cntUdt.responseText!=null){var aryResponse=objXmlHttpRequest_cntUdt.responseText.split('|~|');switch(aryResponse[0].substr(0,3)){case 'ok:':doGetItmCustNte(intItemRowId,intItemId,intGradeId,'',true,false);break;case 'er:':document.getElementById('lblCustomerNotes_folders_status'+intItemRowId+'_'+intNoteId).innerHTML=aryResponse[1];break;default:document.getElementById('lblCustomerNotes_folders_status'+intItemRowId+'_'+intNoteId).innerHTML='unknown error';break;}}else{document.getElementById('lblCustomerNotes_folders_status'+intItemRowId+'_'+intNoteId).innerHTML='error (no response)';}}}}function doNotesRenameFolder(int_doGetItmDtl_rowId,intIndexId,intItemId,strFolderName){if(strBrowserClass>=1){var strParams='reqCls=doRenameFolder&folderName='+encodeURIComponent(strFolderName);strParams=strParams+'&indexId='+encodeURIComponent(intIndexId);objXmlHttpRequest_cntUdt=getXMLHttpRequest();objXmlHttpRequest_cntUdt.onreadystatechange=function(){doHandlerNotesRenameFolder(int_doGetItmDtl_rowId,intItemId,intIndexId)};objXmlHttpRequest_cntUdt.open('POST',strPath+'searchAssistant.asp',true);objXmlHttpRequest_cntUdt.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');objXmlHttpRequest_cntUdt.setRequestHeader('Content-length', strParams.length);objXmlHttpRequest_cntUdt.setRequestHeader('Connection', 'close');objXmlHttpRequest_cntUdt.send(strParams)}}function doHandlerNotesRenameFolder(intItemRowId,intItemId,intIndexId){if(objXmlHttpRequest_cntUdt.readyState==4){if(objXmlHttpRequest_cntUdt.status==200){if(objXmlHttpRequest_cntUdt.responseText!=null){var aryResponse=objXmlHttpRequest_cntUdt.responseText.split('|~|');switch(aryResponse[0].substr(0,3)){case 'ok:':doGetItmCustNte(intItemRowId,intItemId,intIndexId,true,false);break;case 'er:':document.getElementById('lblCustomerNotes_renameFolders_status'+intItemRowId).innerHTML=aryResponse[1];break;default:document.getElementById('lblCustomerNotes_renameFolders_status'+intItemRowId).innerHTML='unknown error';break;}}else{document.getElementById('lblCustomerNotes_renameFolders_status'+intItemRowId).innerHTML='error (no response)';}}}}function doNotesDeleteFolder(int_doGetItmDtl_rowId,intIndexId,intItemId){if(strBrowserClass>=1){var strParams='reqCls=doDeleteFolder&indexId='+encodeURIComponent(intIndexId);objXmlHttpRequest_cntUdt=getXMLHttpRequest();objXmlHttpRequest_cntUdt.onreadystatechange=function(){doHandlerNotesDeleteFolder(int_doGetItmDtl_rowId,intItemId)};objXmlHttpRequest_cntUdt.open('POST',strPath+'searchAssistant.asp',true);objXmlHttpRequest_cntUdt.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');objXmlHttpRequest_cntUdt.setRequestHeader('Content-length', strParams.length);objXmlHttpRequest_cntUdt.setRequestHeader('Connection', 'close');objXmlHttpRequest_cntUdt.send(strParams)}}function doHandlerNotesDeleteFolder(intItemRowId,intItemId){if(objXmlHttpRequest_cntUdt.readyState==4){if(objXmlHttpRequest_cntUdt.status==200){if(objXmlHttpRequest_cntUdt.responseText!=null){var aryResponse=objXmlHttpRequest_cntUdt.responseText.split('|~|');switch(aryResponse[0].substr(0,3)){case 'ok:':doGetItmCustNte(intItemRowId,intItemId,0,true,true,false);break;case 'er:':document.getElementById('lblCustomerNotes_deleteFolder_status'+intItemRowId).innerHTML=aryResponse[1];break;default:document.getElementById('lblCustomerNotes_deleteFolder_status'+intItemRowId).innerHTML='unknown error';break;}}else{document.getElementById('lblCustomerNotes_deleteFolder_status'+intItemRowId).innerHTML='error (no response)';}}}}function doNotesAgreement(int_doGetItmDtl_rowId,intItemId){if(strBrowserClass>=1){var strParams='reqCls=doSetPreference&key=ntTrm&value=True';objXmlHttpRequest_cntUdt=getXMLHttpRequest();objXmlHttpRequest_cntUdt.onreadystatechange=function(){doHandlerNotesAgreement(int_doGetItmDtl_rowId,intItemId)};objXmlHttpRequest_cntUdt.open('POST',strPath+'searchAssistant.asp',true);objXmlHttpRequest_cntUdt.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');objXmlHttpRequest_cntUdt.setRequestHeader('Content-length', strParams.length);objXmlHttpRequest_cntUdt.setRequestHeader('Connection', 'close');objXmlHttpRequest_cntUdt.send(strParams)}}function doHandlerNotesAgreement(intItemRowId,intItemId){if(objXmlHttpRequest_cntUdt.readyState==4){if(objXmlHttpRequest_cntUdt.status==200){if(objXmlHttpRequest_cntUdt.responseText!=null){switch(objXmlHttpRequest_cntUdt.responseText.substr(0,3)){case 'ok:':doGetItmCustNte(intItemRowId,intItemId,0,true,true,false);break;case 'er:':alert('error while attempting to set preference (doNotesAgreement)');break;default:alert('unknown error while attempting to set preference (doNotesAgreement)');break;}}else{alert('no response error while attempting to set preference (doNotesAgreement)');}}}}