var Pause1 =30; var Pause2 =5000; var Step =2; var NumberOfPanels =25; var StartPosition =138; var SafeHeight =138; var HigherPanel ; var LowerPanel ; var CurrentPanelNumber ; var InnerHTML = "
"; function HelpOn() { document.getElementById('HelpPanel').style.visibility = 'visible'; } function HelpOff() { document.getElementById('HelpPanel').style.visibility = 'hidden'; } function MovePanels() { var Finished = 1; // Higher Panel var CurrentTop = parseInt(HigherPanel.style.top); if (CurrentTop>-1*SafeHeight) { HigherPanel.style.top=(CurrentTop - Step) + "px"; Finished = 0; } // lower panel CurrentTop = parseInt(LowerPanel.style.top) if (CurrentTop > 0) { var NewTop = CurrentTop - Step; if (NewTop<0) { NewTop = 0; } LowerPanel.style.top=NewTop + "px"; Finished = 0; } if (Finished ==0) { setTimeout("MovePanels()", Pause1); } else { setTimeout("NextPanelPlease()", Pause2); } } function NextPanelPlease() { HigherPanel = document.getElementById("Testimonial"+CurrentPanelNumber); if (CurrentPanelNumber == NumberOfPanels) {CurrentPanelNumber = 1;} else {CurrentPanelNumber +=1;} LowerPanel = document.getElementById("Testimonial"+CurrentPanelNumber); LowerPanel.style.top = StartPosition + "px"; //alert ('new panel top' + LowerPanel.style.top+ LowerPanel); MovePanels() } function StartScrolling() { var TestimonialsPanel = document.getElementById("Testimonials"); if (!TestimonialsPanel) {alert("Scrolling system cannot find element with id =Testimonials"); } else { TestimonialsPanel.style.margin='0 0 0 0'; TestimonialsPanel.style.padding='23px 14px 39px 12px'; TestimonialsPanel.innerHTML = InnerHTML; TestimonialsPanel.style.width='310px'; TestimonialsPanel.style.height='138px'; TestimonialsPanel.style.backgroundImage='url(http://procustomer.net/MyImages/ResourcesLibrary/ScrollBoxes/Scroll_Blue_200.gif)'; TestimonialsPanel.style.position = "relative"; TestimonialsPanel.style.backgroundRepeat = "no-repeat"; TestimonialsPanel.style.backgroundPosition = "left top"; TestimonialsPanel.style.border='0px'; CurrentPanelNumber = 1; setTimeout("NextPanelPlease()", 2*Pause2);}}StartScrolling()