
var clink;function Comments(){var commdiv=document.getElementById("comments");var tut=commdiv.getAttribute("title");var comments=document.getElementById("commentlink");if(clink){httpcomments.open('get','http://www.picoauto.com/cgi-bin/tutnumcomments.pl?tut='+tut);httpcomments.onreadystatechange=HowMany;httpcomments.send(null);;}else{return false;}
comments.onclick=function(){http.open('get','http://www.picoauto.com/cgi-bin/tutcomments.pl?tut='+tut);http.onreadystatechange=handleProducts;http.send(null);return false;}}
function createRequestObject(){var request;if(!request){try{request=new XMLHttpRequest();clink=true;}
catch(e){try{request=new ActiveXObject('MSXML2.XMLHTTP');clink=true;}
catch(e){try{request=new ActiveXObject('Microsoft.XMLHTTP');clink=true;}
catch(e)
{clink=false;return false;}}}}
return request;}
var http=createRequestObject();var httpshare=createRequestObject();var httpcomments=createRequestObject();function handleProducts(){if(http.readyState==1){var response='<div class="c gap"><img src="http://www.picoauto.com/images/loading.gif" width="32" height="32" alt="" /> &#160; Loading...</div>';document.getElementById('comments').innerHTML=response;}
if(http.readyState==4){var response=http.responseText;document.getElementById('comments').innerHTML=response;}}
function HowMany(){if(httpcomments.readyState==1){document.getElementById("commentlink").innerHTML="Loading...";}
if(httpcomments.readyState==4){var response=httpcomments.responseText;document.getElementById("commentlink").innerHTML=response;}}
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 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 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 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";}}
httpshare.open('get','http://www.picoauto.com/cgi-bin/autoshare.pl');httpshare.onreadystatechange=handleShare;httpshare.send(null);return false;}}
function handleShare(){if(httpshare.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(httpshare.readyState==4){var response=httpshare.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...";}}}}
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 findPosY(obj){var curtop=0;if(obj.offsetParent)
while(1)
{curtop+=obj.offsetTop;if(!obj.offsetParent)
break;obj=obj.offsetParent;}
else if(obj.y)
curtop+=obj.y;return curtop;}
function Fbackcheck(){if(document.createElement&&document.createTextNode){Feedback();}}
function Feedback(){var newli=document.createElement('li');var link=document.createElement('a');link.setAttribute('href','mypage.htm');link.setAttribute('id','feedme');var litext=document.createTextNode('Feedback');link.appendChild(litext);newli.appendChild(link);document.getElementById('bnav').appendChild(newli);var content=document.getElementById('content');var feedwindow=document.createElement('div');feedwindow.setAttribute('id','feedwin');content.appendChild(feedwindow);if(document.getElementById('feedme')){var feeder=document.getElementById('feedme');feeder.onclick=function(){var currentURL=window.location;var feedbackwindow=document.getElementById('feedwin');var text='<div><div class="bc"><div class="toplt"></div><div class="toprt"></div></div><div class="bd"><div class="be l"><div class="r p" id="closefback">close <img src="http://www.picoauto.com/images/closex.png" width="16" height="16" alt="close" id="closeform" class="m" /></div> <h3 class="c top">Feedback</h3><p class="top">Your views about our website and products are important to us. Thank you.</p><form action="http://www.picoauto.com/cgi-bin/feedback1.pl" method="post" class="top"><div>Name: <input type="text" class="m" name="name" size="30" maxlength="80" /><br />Comments:<textarea rows="6" cols="30" name="fback"></textarea><p class="small"><input type="checkbox" class="m" checked="checked" name="ok" /> Check this box if it\'s ok for us to use your comments for marketing puposes.</p><div class="r"><input type="submit" value="Send feedback" class="blu" /></div><input type="hidden" name="referer" value="'+currentURL+'" /> </div></form><p class="red">Please note: we are unable to reply to individual comments.</div><div class="be"></div></div><div class="bc"><div class="botlt"></div><div class="botrt"></div></div></div>';feedbackwindow.innerHTML=text;var fbackY=findPosY(this);var topy=(fbackY-screen.height);if(topy<=0){topy=0;}
var lefty=(screen.availWidth-400)/2;feedbackwindow.style.display='block';feedbackwindow.style.position='absolute';feedbackwindow.style.left=lefty+'px';feedbackwindow.style.top=topy+'px';feedbackwindow.style.width='300px';feedbackwindow.style.background='#fff';if(document.getElementById('closefback')){var closefback=document.getElementById('closefback');closefback.onclick=function(){var feedbackwindow=document.getElementById('feedwin');feedbackwindow.innerHTML='';}}
return false;}}}
defaultStatus='Pico Technology - automotive lab scopes and diagnostic equipment';window.onload=StartUp;function StartUp(){Comments();JLinks();LogoLink();Search();Zoom();ShareMe();Zebra();Fbackcheck();}