if(typeof(octo_color_title)=='undefined')var octo_color_title = 'darkblue'; if(typeof(octo_color_border)=='undefined')var octo_color_border = 'darkblue'; if(typeof(octo_color_background)=='undefined')var octo_color_background = 'ghostwhite'; if(typeof(octo_color_break)=='undefined')var octo_color_break = 'black'; if(typeof(octo_client_height)=='undefined')var octo_client_height = 300; if(typeof(octo_client_width)=='undefined')var octo_client_width = 200; if(typeof(octo_color_link)=='undefined')var octo_color_link = '#0000CC'; if(typeof(octo_color_text)=='undefined')var octo_color_text = 'black'; if(typeof(octo_color_buy_text)=='undefined')var octo_color_buy_text = '#F5F5F5'; if(typeof(octo_color_buy_bg)=='undefined')var octo_color_buy_bg = '#1C58CC'; if(typeof(octo_color_buy_bg_over)=='undefined')var octo_color_buy_bg_over = '#0141BC'; var max_length = 16; var isCSS, isW3C, isIE4, isNN4, isIE6CSS; function initDHTMLAPI(){ if(document.images){ isCSS = (document.body && document.body.style)? true: false; isW3C = (isCSS && document.getElementById)? true: false; isIE4 = (isCSS && document.all)? true: false; isNN4 = (document.layers)? true: false; isIE6CSS = (document.compatMode && document.compatMode.indexOf("CSS1") >= 0)? true: false; } }; function getRawObject(obj) { var theObj; if(typeof obj == "string"){ if(isW3C){ theObj = document.getElementById(obj); } else if(isIE4) { theObj = document.all(obj); } else if(isNN4) { theObj = seekLayer(document,obj); } } else{ theObj = obj; } return theObj; }; function Octo__build(pdict,pDiv){ pDiv.style.fontFamily = 'arial'; pDiv.style.fontSize= '10pt'; pDiv.style.width = octo_client_width+'px'; var active = document.createElement("div"); active.style.backgroundColor=octo_color_background; active.style.border='1px solid '+octo_color_border; active.style.width =octo_client_width+'px'; var pld = document.createElement("div"); pld.style.margin='2px'; var pmb = document.createElement("div"); var ml = document.createElement("div"); ml.style.fontSize='11pt'; ml.style.marginLeft='5px'; ml.style.marginTop='5px'; ml.style.fontWeight='bold'; var tDiv = document.createElement("div"); var tLk = document.createElement('a'); tLk.href ='http://octopart.com/partlist/view?id='+pdict.pub; tLk.innerHTML = 'Microscale 2.5'; tLk.style.color = octo_color_title; tDiv.appendChild(tLk); ml.appendChild(tDiv); var creditDiv = document.createElement("div"); creditDiv.innerHTML = 'by: engunneer'; creditDiv.style.fontSize = '9pt'; creditDiv.style.marginLeft = '10px'; creditDiv.style.marginTop='2px'; creditDiv.style.marginBottom='5px'; creditDiv.style.color = octo_color_text; pmb.appendChild(ml); pmb.appendChild(creditDiv); pld.appendChild(pmb); var tbrk = document.createElement("div"); tbrk.style.backgroundColor=octo_color_break; tbrk.style.height='1px'; tbrk.style.lineHeight='1px'; tbrk.style.zIndex=9; tbrk.style.overflow='hidden'; pld.appendChild(tbrk); plb = document.createElement('div'); plb.style.fontSize='11pt'; plb.style.color='black'; plb.style.padding='5px 0px 0px 0px'; plb.style.height=octo_client_height+'px'; plb.style.overflow='auto'; pld.appendChild(plb); active.appendChild(pld); pDiv.appendChild(active); clrDiv = document.createElement('div'); clrDiv.style.clear = 'both'; pDiv.appendChild(clrDiv); Octo__bPList(pdict,plb); tbrk = document.createElement("div"); tbrk.style.backgroundColor=octo_color_break; tbrk.style.height='1px'; tbrk.style.lineHeight='1px'; tbrk.style.zIndex=9; tbrk.style.overflow='hidden'; pld.appendChild(tbrk); var infoDiv = document.createElement('div'); var lkDiv = document.createElement('div'); lkDiv.style.margin = '3px'; lkDiv.style.styleFloat = 'right'; lkDiv.style.cssFloat = 'right'; var infoLk = document.createElement('a'); infoLk.href= 'http://octopart.com/partlist/view?id='+pdict.pub; infoLk.innerHTML = 'details'; lkDiv.appendChild(infoLk); clrDiv = document.createElement('div'); clrDiv.style.clear = 'both'; infoDiv.appendChild(clrDiv); pld.appendChild(infoDiv); }; function Octo__bPList(dList,plb){ if(!dList.parts.length){ var noslct = document.createElement('table'); var plRow = noslct.insertRow(-1); var plcl = plRow.insertCell(0); noslct.style.color = '#003399'; noslct.style.padding = '0px 0px 0px 3px'; plcl.innerHTML = " no parts in partlist" plb.appendChild(noslct); } else{ var plTable = document.createElement("table"); plTable.style.width='100%'; plTable.cellPadding = '3'; plb.appendChild(plTable); for(var i=0; i1) manunumDiv.appendChild(document.createTextNode(' ')); if((num_lks+1)*max_length>=pDict.manu_number.length){ var end_index = pDict.manu_number.length; var this_string = pDict.manu_number.substring(num_lks*max_length,end_index); manLink.appendChild(document.createTextNode(this_string)); manLink.style.color = octo_color_link; manLink.style.fontSize= '11pt'; manunumDiv.appendChild(manLink); }else{ var end_index = (num_lks+1)*max_length; var this_string = pDict.manu_number.substring(num_lks*max_length,end_index); manLink.appendChild(document.createTextNode(this_string)); manLink.style.color = octo_color_link; manLink.style.fontSize= '11pt'; manunumDiv.appendChild(manLink); manunumDiv.appendChild(document.createTextNode('... ')); } num_lks +=1; } } nameCell.appendChild(manuDiv); nameCell.appendChild(manunumDiv); } var qtyCell = plRow.insertCell(1); qtyCell.align='right'; qtyCell.style.width = '25%'; qtyCell.style.color = octo_color_text; var qtyDiv = document.createElement('a'); qtyDiv.style.color = octo_color_text; qtyDiv.style.fontSize= '11pt'; pDict.qtyDiv = qtyDiv; qtyDiv.appendChild(document.createTextNode(pDict.quantity)); qtyCell.appendChild(qtyDiv); }; var pDiv = document.createElement("div"); document.write("
"); initDHTMLAPI(); Octo__build({"dsc": "Partlist for the microscale (incidental Rs and Cs left out)", "parts": [{"comment": "Quad Op-Amp", "manu": "STMicroelectronics", "info_url": "/info/STMicroelectronics/LM324N", "img_link": "http://cdn.sigma.octopart.com/308318/image/STMicroelectronics-LM324N.jpg", "manu_number": "LM324N", "swf_link": "", "pdf_link": "http://datasheet.octopart.com/LM324N-STMicroelectronics-datasheet-14332.pdf", "quantity": "1", "id": "3683", "thumb_img": "http://cdn.sigma.octopart.com/823167/image/STMicroelectronics-LM324N.jpg", "name": ""}, {"comment": "4kB of code space is just enough...", "manu": "Atmel", "info_url": "/info/Atmel/ATMEGA48-20PI", "img_link": "", "manu_number": "ATMEGA48-20PI", "swf_link": "", "pdf_link": "http://datasheet.octopart.com/ATMEGA48-20PI-Atmel-datasheet-4671.pdf", "quantity": "1", "id": "477311", "thumb_img": "", "name": ""}, {"comment": "Serial temperature sensor", "manu": "Dallas Semiconductor", "info_url": "/info/Dallas+Semiconductor/DS1620", "img_link": "http://cdn.sigma.octopart.com/5233429/image/Dallas-Semiconductor-DS1620.jpeg", "manu_number": "DS1620", "swf_link": "", "pdf_link": "http://datasheet.octopart.com/DS1620-Dallas-Semiconductor-datasheet-115644.pdf", "quantity": "1", "id": "43710", "thumb_img": "http://cdn.sigma.octopart.com/5233432/image/Dallas-Semiconductor-DS1620.jpeg", "name": ""}, {"comment": "Precision 5V reference", "manu": "Maxim", "info_url": "/info/Maxim/MAX675EPA", "img_link": "", "manu_number": "MAX675EPA", "swf_link": "", "pdf_link": "", "quantity": "1", "id": "3658621", "thumb_img": "", "name": ""}, {"comment": "16bit DAC 0-2.5V", "manu": "Maxim", "info_url": "/info/Maxim/MAX541CCPA%2B", "img_link": "", "manu_number": "MAX541CCPA+", "swf_link": "", "pdf_link": "http://datasheet.octopart.com/MAX541CCPA%2B-Maxim-datasheet-122804.pdf", "quantity": "1", "id": "438248", "thumb_img": "", "name": ""}, {"comment": "", "manu": "Maxim", "info_url": "/info/Maxim/MAX233EPP", "img_link": "http://cdn.sigma.octopart.com/172151/image/Maxim-MAX233EPP.jpg", "manu_number": "MAX233EPP", "swf_link": "", "pdf_link": "http://datasheet.octopart.com/MAX233EPP-Maxim-datasheet-17021.pdf", "quantity": "1", "id": "35145", "thumb_img": "http://cdn.sigma.octopart.com/823647/image/Maxim-MAX233EPP.jpg", "name": ""}], "id": 1306569, "pub": "NjkyMjIy", "title": "Microscale 2.5"},getRawObject('octo__pl'));