function WLSearch() { $Words = szKeyWords.value; $URL = "/cgi-bin/htsearch?method=and&sort=score&restrict=/&words=" + $Words; document.location = $URL; } function Link($URL) { document.location = $URL; } function Linkout($URL) { if ($URL.substring(0,7) == "http://") MM_openBrWindow($URL,'','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes') else document.location = $URL; } function fnDelete(szURL,nID) { var bDelete; var szMessage; if (nID > 0) { szURL = szURL + nID; //alert(szURL); szMessage = "Are you sure you want to delete?\nThis will remove all associations in the database."; bDelete = confirm(szMessage); if (bDelete) { Link(szURL); } } } function fnAlert(szMessage,szURL,nID) { var bDelete; if (nID > 0) { szURL = szURL + nID; //alert(szURL); bDelete = confirm(szMessage); if (bDelete) { Link(szURL); } } } function fnFinalizeSpecial() { var szMessage = "Are you sure you want to finalize?\nYou will not be able to make changes after."; bDelete = confirm(szMessage); if (bDelete) { SupplierSpecialsForm.frmcmd2.value="finalize"; SupplierSpecialsForm.submit(); } } function MM_findObj(n, d) { //v3.0 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i'; break; case 1: oCell.innerHTML = ''; break; case 2: szHTML = ''; szHTML = '\n'; oCell.innerHTML = szHTML; break; } oCell = trNewRow.insertCell(); oCell.innerHTML = ''; } function fnDeleteSpecialsSpecialField(nID) { for (curr_row = 0; curr_row < tbExistingSpecial.rows.length; curr_row++) { oRow = tbExistingSpecial.rows[curr_row]; if (oRow.id == nID) { tbExistingSpecial.deleteRow(oRow.rowIndex); break; } } } function fnAddSpecialsShipping() { var szDate = new Date(); szDate = szDate.getTime() + Math.random(); trNewRow = tbExistingShipping.insertRow(); trNewRow.id = szDate; oCell = trNewRow.insertCell(); szHTML = ''; szHTML = SupplierSpecialsForm.szShippingType.options[SupplierSpecialsForm.szShippingType.selectedIndex].value.replace(/\|/g,''); szHTML += '\n'; oCell.innerHTML = szHTML; oCell = trNewRow.insertCell(); oCell.innerHTML = SupplierSpecialsForm.szShippingAmount.value.replace(/\|/g,''); oCell = trNewRow.insertCell(); szHTML = ''; szHTML += '\n'; szHTML += '\n'; szHTML += '\n'; szHTML += '\n'; szHTML += '
#Amount
'; szHTML += SupplierSpecialsForm.szQuantityDiscountQuantity.value.replace(/\|/g,''); szHTML += ''; szHTML += SupplierSpecialsForm.szQuantityDiscountPrice.value.replace(/\|/g,''); szHTML += '
\n'; oCell.innerHTML = szHTML; oCell = trNewRow.insertCell(); szHTML = ''; szHTML += '\n'; szHTML += '\n'; szHTML += '\n'; szHTML += '\n'; szHTML += '
$Amount
'; szHTML += SupplierSpecialsForm.szPriceDiscountAmount.value.replace(/\|/g,''); szHTML += ''; szHTML += SupplierSpecialsForm.szPriceDiscountPrice.value.replace(/\|/g,''); szHTML += '
\n'; oCell.innerHTML = szHTML; oCell = trNewRow.insertCell(); oCell.innerHTML = ''; } function fnDeleteSpecialsShipping(nID) { for (curr_row = 0; curr_row < tbExistingShipping.rows.length; curr_row++) { oRow = tbExistingShipping.rows[curr_row]; if (oRow.id == nID) { tbExistingShipping.deleteRow(oRow.rowIndex); break; } } } /* a function that opens a centered window. */ var newWin; function cWin(url,winname,w,h) { windowleft = (screen.width - w)/2; windowtop = (screen.height - h)/2; settings = '"toolbar=no,directories=no,menubar=no,scrollbars=no,resizable=no,status=no,width='+w+',height='+h+ ',left='+windowleft+',top='+windowtop+'"'; closeWindow(); newWin = window.open(url,winname,settings); newWin.focus(); } function closeWindow() { if (newWin && !newWin.closed) { newWin.close();} }