
function LogoLink(){var logo=document.getElementById("logo");logo.onclick=function(){document.location.href="http://www.picoauto.com/";}}
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 Search(){var searchform=document.forms['search'];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 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;}}}
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 Display(){var num=0;if(document.getElementById("msg")){var msg=document.getElementById("msg");var num=msg.getAttribute("title");}
http.open('get','http://www.picoauto.com/cgi-bin/kumiblahblah.pl?'+num);http.onreadystatechange=handleProducts;http.send(null);}
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;}
var http=createRequestObject();function handleProducts(){if(http.readyState==1){var response='loading&hellip;';document.getElementById('hotstuff').innerHTML='What&#8217;s Hot: ';}
if(http.readyState==4){var response=http.responseText;Pause(700);document.getElementById('hotstuff').innerHTML='What&#8217;s Hot: '+response;setTimeout("Display()",8000);}}
function Pause(milliseconds){var dt=new Date();while((new Date())-dt<=milliseconds){}}
window.onload=StartUp;function StartUp(){Display();LogoLink();JLinks();Search();Fbackcheck();}
defaultStatus='Pico Technology - award-winning Automotive Diagnostics. Find Faults Fast.';