
function querySt(ji){hu=window.location.search.substring(1);gy=hu.split("&");for(i=0;i<gy.length;i++){ft=gy[i].split("=");if(ft[0]==ji){return ft[1];}}}
if(querySt("source")){var source=querySt("source");setCookie('source',source,90);}
function setCookie(c_name,value,expiredays)
{var exdate=new Date()
exdate.setDate(exdate.getDate()+expiredays)
document.cookie=c_name+"="+escape(value)+
((expiredays==null)?"":";expires="+exdate.toGMTString())}
if(document.images)
{image0=new Image(117,149);image0.src="./ir/img0.jpg";image1=new Image(117,149);image1.src="./ir/img1.jpg";image2=new Image(117,149);image2.src="./ir/img2.jpg";image3=new Image(117,149);image3.src="./ir/img3.jpg";image4=new Image(117,149);image4.src="./ir/img4.jpg";image5=new Image(117,149);image5.src="./ir/img4.jpg";image6=new Image(117,149);image6.src="./ir/img4.jpg";}
function JLinks(){var imgs=document.getElementsByTagName("img");for(var i=0;i<imgs.length;i++){if(imgs[i].className.match("jlink")){imgs[i].onclick=function(){var gourl=this.getAttribute("title");document.location.href=gourl;}}}
var divs=document.getElementsByTagName("div");for(var i=0;i<divs.length;i++){if(divs[i].className.match("jlink")){divs[i].onclick=function(){var gourl=this.getAttribute("title");document.location.href=gourl;}}}}
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.drdaq.com/cgi-bin/share.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.drdaq.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='120px';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...";}}}}
function PhoneNum(evt){evt=(evt)?evt:window.event;var charCode=(evt.which)?evt.which:evt.keyCode
return(charCode<=31||(charCode>=48&&charCode<=57)||(charCode==43)||(charCode==32)||(charCode==45)||(charCode==120))}
function LogoLink(){var logo=document.getElementById("logo");logo.onclick=function(){document.location.href="http://www.drdaq.com/";}}
function Boxes(){if(document.getElementById("box1")){var box1=document.getElementById("box1");box1.onclick=function(){document.location.href="http://www.drdaq.com/datalogger.html";}}
if(document.getElementById("box2")){var box2=document.getElementById("box2");box2.onclick=function(){document.location.href="http://www.drdaq.com/sensors.html";}}}
function Rotator(){var tator=document.getElementById('tator');var rand_no=Math.floor((7)*Math.random());tator.setAttribute('src','./ir/img'+[rand_no]+'.jpg');}
function BooIt(){setInterval(Rotator,2500);}
function BooBoo(){if(!document.getElementById){return;}
var boo=document.getElementById("askthedr");var ho=document.getElementById("help");if(navigator.appName=='Microsoft Internet Explorer'){var bnorm='2px solid #FF8E3D';var bhigh='2px solid #FF7D1D';}
else{var bnorm='border:2px solid rgba(255, 142, 61, 0.5)';var bhigh='border:2px solid rgba(255, 142, 61, 1);';}
ho.onclick=function(){var x=1;var z=0.05;FadeIn();function FadeIn(){var content=document.getElementById('page');content.style.background='#fff';try{content.style.opacity=x;}catch(e){}
try{content.style.MozOpacity=x;}catch(e){}
var opacy=x*100;try{content.style.filter='alpha(opacity='+opacy+')';}catch(e){}
try{content.style.KhtmlOpacity=x;}catch(e){}
x-=0.05;x=x.toFixed(2);if(x>=0.05){setTimeout(FadeIn,10);}else{boo.style.display="block";}}
function FadeOut(){var content=document.getElementById('page');try{content.style.opacity=z;}catch(e){}
try{content.style.MozOpacity=z;}catch(e){}
var opacy=z*100;try{content.style.filter='alpha(opacity='+opacy+')';}catch(e){}
try{content.style.KhtmlOpacity=z;}catch(e){}
z+=0.05;if(z<1){setTimeout(FadeOut,10);}else{boo.style.display="none";boovis=0;}}
var lefty=(screen.availWidth/2)-650;boo.style.position='absolute';boo.style.left=lefty+'px';boo.style.top='150px';boo.style.width='650px';boo.style.background='#fff';boo.innerHTML=askpico;boo.style.display="none";var askform=document.forms['askform'];if(askform){askform.askphone.onkeypress=PhoneNum;}
var asksubmit=askform.asksubmit;asksubmit.onclick=function(){asksubmit.value="Wait...";if(askform.askname.value==""){alert('Please enter your name');askform.askname.focus();askform.askname.style.border="2px solid red";asksubmit.value="Try again";asksubmit.disabled=false;return false;}else{askform.askname.style.border=bnorm;}
if((askform.askemail.value=="")&&(askform.askphone.value=="")){alert('Please enter either your email address or phone number');askform.askemail.focus();askform.askemail.style.border="2px solid red";asksubmit.value="Try again";asksubmit.disabled=false;return false;}else{askform.askemail.style.border=bnorm;}
if(askform.question.value==""){alert('Please enter your question');askform.question.focus();askform.question.style.border="2px solid red";asksubmit.value="Try again";asksubmit.disabled=false;return false;}else{askform.question.style.border=bnorm;}}
var closedeform=document.getElementById("closedeform");closedeform.onclick=function(){FadeOut();return false;}
if(!document.getElementsByTagName)return false;var forminput=document.getElementsByTagName("input");for(var i=0;i<forminput.length;i++){if(forminput[i].className.match("input")){forminput[i].onfocus=function(){this.style.border=bhigh;}
forminput[i].onblur=function(){this.style.border=bnorm;}}}
var formselect=document.getElementsByTagName("select");for(var i=0;i<formselect.length;i++){if(formselect[i].className.match("input")){formselect[i].onfocus=function(){this.style.border=bhigh;}
formselect[i].onblur=function(){this.style.border=bnorm;}}}
var formtext=document.getElementsByTagName("textarea");for(var i=0;i<formtext.length;i++){if(formtext[i].className.match("input")){formtext[i].onfocus=function(){this.style.border=bhigh;}
formtext[i].onblur=function(){this.style.border=bnorm;}}}
return false;}}
function PlusOne(){if(!document.getElementById('plusone')){return;}
var plusone=document.getElementById('plusone');plusone.innerHTML='<g:plusone size="medium" count="false"></g:plusone>';}
var referer=document.location.href;var askpico='<div id="askpop"><div class="l"><div class="r p" id="closedeform">close <img src="./images/closex.png" width="16" height="16" alt="close" id="closeform" class="m" /></div><img src="./images/daqman.gif" width="150" height="252" alt="Doctor DAQ" id="drdaq" class="fr" />  <h2 class="c">Ask The Doc</h2><p>The Doc is always happy to give advice on the USB DrDAQ Data Logger, DrDAQ sensors and accessories, or any other Pico product.<br /><br />Simply complete your details and Doctor DAQ or one of his assistants will get back to you.</p><p class="red gap">* must be completed</p><form action="http://www.picotech.com/cgi-bin/advice.pl" method="post" id="askform"><div><table border="0" cellpadding="6" cellspacing="0" width="570" summary="enquiry form"><colgroup><col width="200" /><col /><colgroup><tr><td><label for="askname">Name:<span class="red">*</span></label></td><td><input type="text" id="askname" name="name" size="30" maxlength="100" class="input" /></td></tr><tr><td><label for="askemail">Email:<span class="red">*</span></label></td><td><input type="text" id="askemail" name="email" size="30" maxlength="100" class="input" /></td></tr><tr><td><label for="askphone">Phone:</label></td><td><input type="text" id="askphone" name="phone" size="30" maxlength="20" class="input" /></td></tr><tr><td><label for="product">Product:</label></td><td><input type="text" id="product" name="product" size="30" maxlength="100" class="input" value="USB DrDAQ Data Logger" /></td></tr><tr><td valign="top"><label for="question">How can I help?<span class="red">*</span></label></td><td colspan="2"><textarea name="question" id="question" rows="4" cols="50"  class="input"></textarea></td></tr><tr><td></td><td></td><td><div class="r"><input type="hidden" name="referer" value="'+referer+'" /><input class="green" type="submit" value="Ask the Doc" id="asksubmit" name="submit" /></div></td></tr></table></div></form></div></div>';var http=createRequestObject();window.onload=StartUp;defaultStatus="The DrDAQ Data Logger - making data logging fun";function StartUp(){BooIt();LogoLink();BooBoo();JLinks();ShareMe();Boxes();PlusOne();}
