
function Search(){var searchform=document.forms['search'];if(searchform){var submitform=searchform.ssubmit;submitform.onclick=function(){submitform.value="Wait...";if(searchform.q.value==""){alert('Please enter one or more words to search for');searchform.q.focus();searchform.q.style.border="1px solid red";submitform.value="Try again";return false;}
return true;}}}
function SandG(){if(!document.getElementById)return false;var disgo=document.getElementById("disgo");if(disgo){disgo.style.display="none";}
if(document.forms['SandG']){var whereto=document.forms['SandG'].jumpto;whereto.onmousewheel=function(){return(false);}
whereto.onchange=function(){newpage=whereto.options[whereto.selectedIndex].value;if(newpage=="idiot"){return false;}
else{location.href="http://www.picotech.com/distribl/"+newpage+".html";}}}}
function JLinks(){var imgs=document.getElementsByTagName("img");for(var i=0;i<imgs.length;i++){if(imgs[i].className.match("jlink")){imgs[i].style.cursor="pointer";imgs[i].onclick=function(){var gourl=this.getAttribute("title");document.location.href=gourl;}}}}
function LogoLink(){var logo=document.getElementById("logo");logo.onclick=function(){document.location.href="http://www.picotech.com/";}}
function Zebra(){var even=false;var evenColor=arguments[1]?arguments[1]:"#FBF9F9";var oddColor=arguments[2]?arguments[2]:"#EBF5FF";var tables=document.getElementsByTagName("table");for(var i=0;i<tables.length;i++){if(tables[i].className.match("specs")){var tbodies=tables[i].getElementsByTagName("tbody");for(var h=0;h<tbodies.length;h++){var trs=tbodies[h].getElementsByTagName("tr");for(var k=0;k<trs.length;k++){var tds=trs[k].getElementsByTagName("td");var ths=trs[k].getElementsByTagName("th");for(var j=0;j<tds.length;j++){var mytd=tds[j];mytd.style.backgroundColor=even?evenColor:oddColor;}
for(var j=0;j<ths.length;j++){var mytd=ths[j];mytd.style.backgroundColor=even?evenColor:oddColor;}
even=!even;}}}}}
function FlashFix(){if(document.getElementsByTagName("object")){theObjects=document.getElementsByTagName("object");for(var i=0;i<theObjects.length;i++){theObjects[i].outerHTML=theObjects[i].outerHTML;}}}
function Zoom(){var links=document.getElementsByTagName("a");for(var i=0;i<links.length;i++){if(links[i].className.match("zoom")){links[i].onclick=function(){var imgId=this.getAttribute("href");var divvy=/(.*)\/(.*)/;var result=imgId.match(divvy);var image=result[2];var imgStats=this.getAttribute("rel");var fivvy=/(\d*)#(\d*)/;var imgresult=imgStats.match(fivvy);var imgWidth=imgresult[1];var imgHeight=imgresult[2];var imgAlt=this.getAttribute("alt");var zoomed='<div class="zoom" id="closeform"><img src="./images/'+image+'" width="'+imgWidth+'" height="'+imgHeight+'" alt="'+imgAlt+'" title="Click to close" /></div>';var imgWidth=parseInt(imgWidth);var booWidth=imgWidth+40;var lefty=(document.body.clientWidth-booWidth)/2;if(lefty<=0){lefty=0;}
var imgHeight=parseInt(imgHeight);var booHeight=imgHeight+20;var topy=(document.body.clientHeight-booHeight)/2;if(topy<=0){topy=0;}
var boo=document.getElementById("zoomed");boo.style.position='absolute';boo.style.left=lefty+'px';boo.style.background='url("http://www.picoauto.com/images/closex.png") top right no-repeat #F1F1F1';boo.innerHTML=zoomed;boo.style.display="block";var closeform=document.getElementById("closeform");closeform.onclick=function(){boo.style.display="none";return false;}
return false;}}}}
function WaveZoom(){var links=document.getElementsByTagName("a");for(var i=0;i<links.length;i++){if(links[i].className.match("wavezoom")){links[i].onclick=function(){var imgId=this.getAttribute("href");var divvy=/(.*)\/(.*)/;var result=imgId.match(divvy);var image=result[2];var imgStats=this.getAttribute("rel");var fivvy=/(\d*)#(\d*)/;var imgresult=imgStats.match(fivvy);var imgWidth=imgresult[1];var imgHeight=imgresult[2];var imgAlt=this.getAttribute("alt");var zoomed='<div class="zoom" id="closeform"><img src="http://www.picoauto.com/waveforms/images/zoom/'+image+'" width="'+imgWidth+'" height="'+imgHeight+'" alt="'+imgAlt+'" title="Click to close" /></div>';var imgWidth=parseInt(imgWidth);var booWidth=imgWidth+40;var lefty=(document.body.clientWidth-booWidth)/2;if(lefty<=0){lefty=0;}
var imgHeight=parseInt(imgHeight);var booHeight=imgHeight+20;var topy=(document.body.clientHeight-booHeight)/2;if(topy<=0){topy=0;}
var boo=document.getElementById("zoomed");boo.style.position='absolute';boo.style.left=lefty+'px';boo.style.background='url("http://www.picoauto.com/images/closex.png") top right no-repeat #F1F1F1';boo.innerHTML=zoomed;boo.style.display="block";var closeform=document.getElementById("closeform");closeform.onclick=function(){boo.style.display="none";return false;}
return false;}}}}
function Rnotes(){if(!document.getElementById)return false;var rnotesgo=document.getElementById("rnotesgo");if(rnotesgo){rnotesgo.style.display="none";}
if(document.forms['rnotesform']){var rnotesto=document.forms['rnotesform'].plist;rnotesto.onmousewheel=function(){return(false);}
rnotesto.onchange=function(){rpage=rnotesto.options[rnotesto.selectedIndex].value;location.href="http://www.picoauto.com/release-notes"+rpage+".html";}}}
var http=createRequestObject();function ShareMe(){if(!document.getElementById('share')){return false;}
var share=document.getElementById('share');share.onclick=function(){var sharex=1;ShareFadeIn();function ShareFadeIn(){var content=document.getElementById('page');try{content.style.opacity=sharex;}catch(e){}
try{content.style.MozOpacity=sharex;}catch(e){}
var opacy=sharex*100;try{content.style.filter='alpha(opacity='+opacy+')';}catch(e){}
try{content.style.KhtmlOpacity=sharex;}catch(e){}
sharex-=0.05;sharex=sharex.toFixed(2);if(sharex>=0.20){setTimeout(ShareFadeIn,10);}else{share.style.display="block";}}
http.open('get','http://www.picoauto.com/cgi-bin/autoshare.pl');http.onreadystatechange=handleShare;http.send(null);return false;}}
function createRequestObject(){var request;if(!request){try{request=new XMLHttpRequest();}
catch(e){try{request=new ActiveXObject('MSXML2.XMLHTTP');}
catch(e){try{request=new ActiveXObject('Microsoft.XMLHTTP');}
catch(e)
{return false;}}}}
return request;}
function handleShare(){if(http.readyState==1){var response='<div class="c gap"><img src="http://www.picotech.com/images/loading.gif" width="32" height="32" alt="" /> &#160; Loading...</div>';document.getElementById('shareme').innerHTML=response;var lefty=(screen.availWidth-400)/2;var sharemez=document.getElementById('shareme');sharemez.style.display='block';sharemez.style.position='absolute';sharemez.style.left=lefty+'px';sharemez.style.top='150px';sharemez.style.width='300px';sharemez.style.background='#fff';}
if(http.readyState==4){var response=http.responseText;document.getElementById('shareme').innerHTML=response;var lefty=(screen.availWidth-400)/2;var sharemez=document.getElementById('shareme');sharemez.style.display='block';sharemez.style.position='absolute';sharemez.style.left=lefty+'px';sharemez.style.top='120px';sharemez.style.width='300px';sharemez.style.background='#fff';if(document.getElementById("sharecloseform")){var sharecloseform=document.getElementById("sharecloseform");sharecloseform.onclick=function(){var sharez=0.05;ShareFadeOut();function ShareFadeOut(){var content=document.getElementById('page');try{content.style.opacity=sharez;}catch(e){}
try{content.style.MozOpacity=sharez;}catch(e){}
var opacy=sharez*100;try{content.style.filter='alpha(opacity='+opacy+')';}catch(e){}
try{content.style.KhtmlOpacity=sharez;}catch(e){}
sharez+=0.05;if(sharez<1){setTimeout(ShareFadeOut,10);}}
document.getElementById('shareme').style.display='none';}}
if(document.forms['shareform']){var shareform=document.forms['shareform'];var submitshare=shareform.sharesubmit;submitshare.onclick=function(){submitshare.value="Wait...";}}}}
defaultStatus='Pico Technology - automotive lab scopes and diagnostic equipment';window.onload=StartUp;function StartUp(){JLinks();Zebra();SandG();LogoLink();FlashFix();Zoom();WaveZoom();Search();Rnotes();ShareMe();}