function createCookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires=";expires="+date.toGMTString()}else var expires="";document.cookie=name+"="+value+expires+";path=/"}function readCookie(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length)}return 0}function eraseCookie(name){createCookie(name,"",-1)}
function setFont(){var nameFont="Pauls Lab Font";var curSize=readCookie(nameFont);if(curSize!=0){document.getElementById("myBody").style.fontSize=curSize}}
function changeFontSize(inc){var nameFont="Pauls Lab Font";var sizeFont=readCookie(nameFont);if(sizeFont==0){sizeFont="16px"}var digFont=parseInt(sizeFont.substring(0,sizeFont.indexOf("px")));var newSize=digFont+=inc;sizeFont=newSize.toString()+"px";document.getElementById("myBody").style.fontSize=sizeFont;createCookie(nameFont,sizeFont,31)}
function printdiv(printpage){var printContent=document.getElementById(printpage);var windowUrl='about:blank';var windowName='Print'+new Date().getTime();var printWindow=window.open(windowUrl,windowName,'left=0,top=0,width=0,height=0');printWindow.document.write('<link rel="stylesheet" type="text/css" href="http://www.paulslab.com/css/style.css">'+printContent.innerHTML);printWindow.document.close();printWindow.focus();printWindow.print();printWindow.close()}
function mailThisUrl(){t=document.title;u=window.location;window.location="mailto:?subject=Check out this website...&body=Hello,%0D%0A%0D%0AYou should visit the following website: Pauls Lab "+t+"%0D%0A%0D%0AYou can find it here: "+u+"%0D%0A%0D%0A - Paul's Lab is THE source of self-made crystals, jewellery and chemicals. With information, experiments and articles. Take a look at the photo and video gallery for beautiful photos and videos and visit the webshop to buy crystals, jewellery, chemicals and art. There are also 3-D crystals, a webcam and a download section. - "}
function changepic(){var loc="http://www.paulslab.com/img/new/";var img_name=new Array(loc+"1-1-home.jpg",loc+"2-2-home.jpg",loc+"3-3-home.jpg",loc+"4-4-home.jpg",loc+"6-7-home.jpg",loc+"7-8-home.jpg",loc+"8-9-home.jpg",loc+"9-12-home.jpg",loc+"10-11-home.jpg");var l=img_name.length;var rnd_no=Math.floor(l*Math.random());document.getElementById("randomimage1").src=img_name[rnd_no];}
function popup(url,width,height,scrol){window.open(url,"Popup","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=,"+scrol+",resizable=0,width="+width+",height="+height+",top=60,left=20")}
function setPDF(status){if(status=='yes'){document.getElementById('nopdf').style.display='none';document.getElementById('pdf').style.display='inline';}}
function showPDF(){window.open("http://www.paulslab.com/pdf/"+document.title+".pdf","PDF","type=fullWindow,fullscreen,scrollbars=yes")}
function dutchPage(pagename){document.getElementById("dutchlink").href='http://www.paulslab.nl'+'/'+pagename+'.html'}
