// Copyright Channel Intelligence, Inc. 2003-2005 - Patent Pending function cii_CBL_DataService_API_version(){return '1.10';} function cii_ShowLowestPrice(rsSKU,rsPre,rsPost){ if(oCIICBLDataObject[rsSKU.toUpperCase()]&&oCIICBLDataObject[rsSKU.toUpperCase()].instockCount&&oCIICBLDataObject[rsSKU.toUpperCase()].instockCount > 0){ if(!rsPre){rsPre='';}else{rsPre+=' ';} if(!rsPost){rsPost='';}else{rsPost=' '+rsPost;} document.write(rsPre+oCIICBLDataObject[rsSKU.toUpperCase()].lowestInstockPrice+rsPost); } } function cii_ShowLowestInstockPrice(rsSKU,rsPre,rsPost){ if(oCIICBLDataObject[rsSKU.toUpperCase()]&&oCIICBLDataObject[rsSKU.toUpperCase()].dealerCount&&oCIICBLDataObject[rsSKU.toUpperCase()].dealerCount > 0){ if(!rsPre){rsPre='';}else{rsPre+=' ';} if(!rsPost){rsPost='';}else{rsPost=' '+rsPost;} document.write(rsPre+oCIICBLDataObject[rsSKU.toUpperCase()].lowestPrice+rsPost); } } function cii_ShowCBLButton(rsSKU,roPrime,roAlt,rnInst,rnRGID,rsLID){ var bOutputLink=true; var oLink; var aOut=new Array(); if(!rsSKU){return;} if(!rnRGID){rnRGID=-1;} if(!rsLID){rsLID='';} if(!oCIICBLDataObject[rsSKU.toUpperCase()]||!oCIICBLDataObject[rsSKU.toUpperCase()].dealerCount){return;} if(oCIICBLDataObject[rsSKU.toUpperCase()].dealerCount>0&&roPrime){ oLink=roPrime; }else if(oCIICBLDataObject[rsSKU.toUpperCase()].dealerCount<=0&&roAlt){ oLink=roAlt; }else{ return; } if(oLink["linkurl"]&&oLink["linkurl"]!=''){ aOut[aOut.length]=''; }else if(oLink["customlinkurl"]&&oLink["customlinkurl"]!=''){ aOut[aOut.length]=ciiPlcHldr(oLink["customlinkurl"],rsSKU,rnInst,rnRGID,rsLID); }else if(oCIICBLDataObject[rsSKU.toUpperCase()].dealerCount>0){ if(rnRGID>0){ aOut[aOut.length]=''; }else{ aOut[aOut.length]=''; } }else{ bOutputLink=false; } if(oLink["imageurl"]&&oLink["imageurl"]!=''){ aOut[aOut.length]='1&&oImage.height&&oImage.height>1){aOut[aOut.length]=' height="'+oImage.height+'" width="'+oImage.width+'"';} if(oLink["onmouseover"]&&oLink["onmouseover"]!=''){aOut[aOut.length]=' onMouseOver="'+oLink["onmouseover"]+'"';} if(oLink["onmouseout"]&&oLink["onmouseout"]!=''){aOut[aOut.length]=' onMouseOut="'+oLink["onmouseout"]+'"';} aOut[aOut.length]=' alt="'+oLink["alt"]+'" />'; }else if(oLink["customimagehtml"]&&oLink["customimagehtml"]!=''){ aOut[aOut.length]=ciiPlcHldr(oLink["customimagehtml"],rsSKU,rnInst,rnRGID,rsLID); }else if(oLink["linktext"]){ aOut[aOut.length]=ciiPlcHldr(oLink["linktext"],rsSKU,rnInst,rnRGID,rsLID); } if(bOutputLink){aOut[aOut.length]='';} document.write(aOut.join('')); } function ciiReplace(rsStr,rsOStr,rsNStr){ var nLen=rsStr.length; var nOLen=rsOStr.length; var nPos=rsStr.indexOf(rsOStr); if((nLen==0)||(nOLen==0)) return rsStr; if((!nPos)&&(rsOStr!=rsStr.substring(0,nOLen))) return rsStr; if(nPos==-1) return rsStr; var sStr=rsStr.substring(0,nPos)+rsNStr; if(nPos+nOLen",rsSKU); rsStr=ciiReplace(rsStr,"",rsSKU); rsStr=ciiReplace(rsStr,"",rsSKU); rsStr=ciiReplace(rsStr,"",rnInst); rsStr=ciiReplace(rsStr,"",rnInst); rsStr=ciiReplace(rsStr,"",rnInst); rsStr=ciiReplace(rsStr,"",rnRGID); rsStr=ciiReplace(rsStr,"",rnRGID); rsStr=ciiReplace(rsStr,"",rnRGID); rsStr=ciiReplace(rsStr,"",rsLID); rsStr=ciiReplace(rsStr,"",rsLID); rsStr=ciiReplace(rsStr,"",rsLID); return rsStr; }