imageArr=[{"text":"The natural-rubber Euro: our all-time bestselling organic mattress","url":"http:\/\/www.lifekind.com\/index.php\/site_category_product\/11\/?from=3,5","image":"slideshow\/gfx\/Image4.jpg","thumb":"slideshow\/gfx\/Image4Thumb.jpg"},{"text":"Our all-natural laundry & cleaning products don't compromise on dirt. Keep your organic products organic","url":"http:\/\/www.lifekind.com\/index.php\/site_category_product_report\/10,12","image":"slideshow\/gfx\/Image5.jpg","thumb":"slideshow\/gfx\/Image5Thumb.jpg"},{"text":"Not too soft, not too firm...the Duet is the perfect natural organic mattress","url":"http:\/\/www.lifekind.com\/index.php\/site_category_product\/38\/?from=3,5","image":"slideshow\/gfx\/Image6.jpg","thumb":"slideshow\/gfx\/Image6Thumb.jpg"},{"text":"From the softest to the loftiest, an organic pillow for every sleeper","url":"http:\/\/www.lifekind.com\/index.php\/site_category_product_report\/8,17","image":"slideshow\/gfx\/Image7.jpg","thumb":"slideshow\/gfx\/Image7Thumb.jpg"},{"text":"Our organic pillow tops add softness to any organic mattress","url":"http:\/\/www.lifekind.com\/index.php\/site_category_product_report\/3,7","image":"slideshow\/gfx\/Image8.jpg","thumb":"slideshow\/gfx\/Image8Thumb.jpg"},{"text":"Personal-care products that nurture the body & soul","url":"http:\/\/www.lifekind.com\/index.php\/site_category_product_report\/10,11","image":"slideshow\/gfx\/Image9.jpg","thumb":"slideshow\/gfx\/Image9Thumb.jpg"},{"text":"Add style and elegance to your bedroom...organically","url":"http:\/\/www.lifekind.com\/index.php\/site_category_product\/173\/?from=6","image":"slideshow\/gfx\/Image10.jpg","thumb":"slideshow\/gfx\/Image10Thumb.jpg"},{"text":"Our four-legged companions deserve an organic bed, too. Check out our Lifekind®<\/sup> organic pet beds","url":"http:\/\/www.lifekind.com\/index.php\/site_category_product_report\/29","image":"slideshow\/gfx\/Image1.jpg","thumb":"slideshow\/gfx\/Image1Thumb.jpg"},{"text":"A new, affordable natural-rubber organic mattress made especially for children","url":"http:\/\/www.lifekind.com\/index.php\/site_category_product\/172\/?from=3,5","image":"slideshow\/gfx\/Image2.jpg","thumb":"slideshow\/gfx\/Image2Thumb.jpg"},{"text":"The purest organic crib mattress...guaranteed. Absolutely no fire retardants","url":"http:\/\/www.lifekind.com\/index.php\/site_category_product_report\/9,26","image":"slideshow\/gfx\/Image3.jpg","thumb":"slideshow\/gfx\/Image3Thumb.jpg"}]; // The variable "imageArr" will be initialized in prior to calling the Javascript below (see slideshow.js.php) //Specify the slider's width (in pixels) var sliderwidth="374px" //Specify the slider's height var sliderheight="65px" //Specify the slider's slide speed (larger is faster 1-10) var slidespeed=5 //configure background color: var slidebgcolor="#EAEAEA" var currImg = 0; // sets the starting image (hfref#) //Specify the slider's images var leftrightslide=new Array(); var bottomSlideOnMouseOver = "this.style.border=\'3px solid #8FB1B2\'; this.style.margin=\'3px 0px -3px 0px\'"; var bottomSlideOnMouseOut = "this.style.border=\'0px solid #ffffff\'; this.style.borderLeft=\'3px solid #ffffff\'; this.style.borderRight=\'3px solid #ffffff\'; this.style.margin=\'6px 0px 0px 0px\'"; for (var i = 0; i < imageArr.length; i++){ // preload the images if (document.images) { imgMain = new Image(); imgThumb = new Image(); imgMain.src = imageArr[i]['image']; imgThumb.src = imageArr[i]['thumb']; } leftrightslide[i] =''; } //Specify gap between each image (use HTML): var imagegap=''; //Specify pixels gap between each slideshow rotation (use integer): var slideshowgap=0; var copyspeed=slidespeed; leftrightslide=''+leftrightslide.join(imagegap)+''; var iedom=document.all||document.getElementById; if (iedom) document.write(''); var actualwidth=''; var cross_slide, ns_slide; function changeMainImg(direction){ var mainCell = document.getElementById('slideMain'); if(mainCell.style.opacity != 1) return false; if(direction == 'up'){ currImg++; if(currImg >= imageArr.length) currImg = 0; } else if(direction == 'down') { currImg--; if(currImg < 0) currImg = imageArr.length - 1; } else { currImg = parseInt(direction.replace('href', '')); } var hrefObj = document.getElementById('mainImgHref'); var imgObj = document.getElementById('mainImg'); imgObj.style.visibility = 'hidden'; imgObj.src = imageArr[currImg]['image']; hrefObj.href = (imageArr[currImg]['url']) ? imageArr[currImg]['url'] : 'javascript:;'; //DWS 20100625; added javascript to prevent empty link var textObj = document.getElementById('div_text'); textObj.innerHTML = imageArr[currImg]['text']; fade('slideMain'); } function fillup(){ if (iedom){ cross_slide=document.getElementById? document.getElementById("test2") : document.all.test2 cross_slide2=document.getElementById? document.getElementById("test3") : document.all.test3 cross_slide.innerHTML=leftrightslide cross_slide2.innerHTML=leftrightslide actualwidth=document.all? cross_slide.offsetWidth : document.getElementById("temp").offsetWidth if(!cross_slide.style.left){cross_slide.style.left = -6+"px";} if(!cross_slide2.style.left){cross_slide2.style.left = (actualwidth+slideshowgap)+"px";} } else if (document.layers){ ns_slide=document.ns_slidemenu.document.ns_slidemenu2 ns_slide2=document.ns_slidemenu.document.ns_slidemenu3 ns_slide.document.write(leftrightslide) ns_slide.document.close() actualwidth=ns_slide.document.width ns_slide2.left=actualwidth+slideshowgap ns_slide2.document.write(leftrightslide) ns_slide2.document.close() } var lefttime=setInterval("chooseScrollDirection(direction)",30); } var direction = ''; var alreadyrunflag=0; //flag to indicate whether target function has already been run if (document.addEventListener) document.addEventListener("DOMContentLoaded", function(){alreadyrunflag=1; fillup(); setSlideInterval(); fade('slideMain');}, false) else if (document.all && !window.opera){ document.write('