/**
 * scrollingtext
 * 
 * Javascript to run the scroller
 * 
 * @version		
 * 
 * @author		vbarsan.com
 * @copyright		Copyright vbarsan.com
 */

/**************************************
* http://vertical-scroller.vbarsan.com/
*    This notice may not be removed 
**************************************/

//-- Begin Scroller's Parameters and messages -->
//scroller's width - set from XML
var swidth=180;

//scroller's height- set from XML
var sheight=150;


//scroller's speed 
var sspeed=2;
var restart=sspeed;
var rspeed=sspeed;

//scroller's pause 
var spause=2000;

//scroller's background - set from XML
//var sbcolor="#ffffff";
var sbcolor="";

//messages - set from XML
var singletext=new Array();
singletext[0]='<table CELLSPACING="0" CELLPADDING="0" align="center"><tr><td valign="right" class="tabb">Sirena G. Gulfport, MS</td></tr><tr><td valign="right" class="tan">"I just wanted to let you know how much I appreciate Tarrance. His easy going, no pressure sale tactic is so refreshing. And it does not stop there. Last Fall, Tarrance brought my 2008 Pilot to my office so we could handle all the paperwork. Just recently he came to my house, picked up my auto, took it to the dealership so that i did not have to bring my 2 small children. Tarrance is the reason I have purchased 3 new autos from Pat Peck Honda. This letter is to Thank Tarrance for his commitment to service."</td></tr></table>';
singletext[1]='<table CELLSPACING="0" CELLPADDING="0" align="center"><tr><td valign="right" class="tabb">Robin P. Gulfport, Ms</td></tr><tr><td valign="right" class="tan">"I have been a customer of Peck Peck for over 3 years and the service has ALWAYS been outstanding! Thank you!"</td></tr></table>';
singletext[2]='<table CELLSPACING="0" CELLPADDING="0" align="center"><tr><td valign="right" class="tabb">Michael D. Gulfport, MS</td></tr><tr><td valign="right" class="tan">"Everything was great the service person is always friendly and remembered me from months ago. 5 Star service and employees..."</td></tr></table>';
singletext[3]='<table CELLSPACING="0" CELLPADDING="0" align="center"><tr><td valign="right" class="tabb">Glenda F. Ocean Springs, MS</td></tr><tr><td valign="right" class="tan">"This is the first time I purchased a car and left the lot knowing about the car. John Caranna showed me everything from the keys, to the getting out of the trunk, if locked in, wippers, trip mileage, windows, and just everything. Thank you Pat Peck for the great experience."</td></tr></table>';
singletext[4]='<table CELLSPACING="0" CELLPADDING="0" align="center"><tr><td valign="right" class="tabb">Robert F. Ocean Springs, MS</td></tr><tr><td valign="right" class="tan">"Great bunch of folks you have in your service department. Work was completed quickly and efficiently. Thanks to all of them."</td></tr></table>';
singletext[5]='<table CELLSPACING="0" CELLPADDING="0" align="center"><tr><td valign="right" class="tabb">Sherry R. Gulfport, MS</td></tr><tr><td valign="right" class="tan">"Mena Davis is a great asset to your team at Pat Peck Honda. She was wonderful to work with. She was not pushy but she was very informative. I hope she is there when it is time for me to purchase my next Honda."</td></tr></table>';
singletext[6]='<table CELLSPACING="0" CELLPADDING="0" align="center"><tr><td valign="right" class="tabb">Lydia L. Houma, LA</td></tr><tr><td valign="right" class="tan">"The Service Department at Pat Peck Honda is great! They are prompt and courteous and happy to answer all questions and explain everything. I got both an email and a phone call to remind me of my appointment as well as a call to let me know when my vehicle was ready to be picked up. I am very pleased with my experience. Thank you!"</td></tr></table>';
singletext[7]='<table CELLSPACING="0" CELLPADDING="0" align="center"><tr><td valign="right" class="tabb">Mark S. Perkinston, MS</td></tr><tr><td valign="right" class="tan">"Lee and John made this the easiest car purchase I have ever made. They went out of there way to get the vehicle  I wanted. I will definitley recommend Pat Peck Honda to anyone for there next vehicle purchase. Thanks"</td></tr></table>';
singletext[8]='<table CELLSPACING="0" CELLPADDING="0" align="center"><tr><td valign="right" class="tabb">Bailey C. D Iberville, MS</td></tr><tr><td valign="right" class="tan">"I did not go in with the intent of purchasing a car. However your sales reps are great at their jobs and extremely courteous as well. They were all very friendly and talkative, especially my personal sales rep Trisha. She and Melissa were wonderful. Thanks."</td></tr></table>';
singletext[9]='<table CELLSPACING="0" CELLPADDING="0" align="center"><tr><td valign="right" class="tabb">Walter H. Perkinston, MS</td></tr><tr><td valign="right" class="tan">"My complements to our salesperson Xuyen Nguyen. She was excellent at her job. She took the time to familiarize us with the different vehicles worked with us as we went through a number of choices of vehicles and was patient throughout the entire process. I will definitely recommend her to anyone seeking a Honda. Thanks to everyone else who helped make this an enjoyable experience in the purchase of our new car. I look forward to using Pat Peck in the future to help me maintain out vehicle."</td></tr></table>';

//singletext[...]='...';
//-- end Parameters and message -->


//-- begin: Scroller's Algorithm -->
var ii=0;
function goup(){if(sspeed!=rspeed*16){sspeed=sspeed*2;restart=sspeed;}}

function startscrolling(){
if(document.getElementById){ns6div=document.getElementById('iens6div');ns6div.style.top=sheight+"px";ns6div.innerHTML=singletext[0];sizeup=ns6div.offsetHeight;ns6scroll();}
else 
if(document.layers){ns4layer=document.ns4div.document.ns4div1;ns4layer.top=sheight;ns4layer.document.write(singletext[0]);ns4layer.document.close();sizeup=ns4layer.document.height;ns4scroll();}
else 
if(document.all){iediv=iens6div;iediv.style.pixelTop=sheight+"px";iediv.innerHTML=singletext[0];sizeup=iediv.offsetHeight;iescroll();}}
function iescroll(){if(iediv.style.pixelTop>0&&iediv.style.pixelTop<=sspeed){iediv.style.pixelTop=0;setTimeout("iescroll()",spause);}else 
if(iediv.style.pixelTop>=sizeup*-1){iediv.style.pixelTop-=sspeed+"px";setTimeout("iescroll()",100);}else{if(ii==singletext.length-1)ii=0;else ii++;iediv.style.pixelTop=sheight+"px";iediv.innerHTML=singletext[ii];sizeup=iediv.offsetHeight;iescroll();}}
function ns4scroll(){if(ns4layer.top>0&&ns4layer.top<=sspeed){ns4layer.top=0;setTimeout("ns4scroll()",spause);}else 
if(ns4layer.top>=sizeup*-1){ns4layer.top-=sspeed;setTimeout("ns4scroll()",100);}else{if(ii==singletext.length-1)ii=0;else ii++;ns4layer.top=sheight;ns4layer.document.write(singletext[ii]);ns4layer.document.close();sizeup=ns4layer.document.height;ns4scroll();}}
function ns6scroll(){if(parseInt(ns6div.style.top)>0&&parseInt(ns6div.style.top)<=sspeed){ns6div.style.top=0;setTimeout("ns6scroll()",spause);}else 
if(parseInt(ns6div.style.top)>=sizeup*-1){ns6div.style.top=parseInt(ns6div.style.top)-sspeed+"px";setTimeout("ns6scroll()",100);}
else{if(ii==singletext.length-1)ii=0;else ii++;
ns6div.style.top=sheight+"px";ns6div.innerHTML=singletext[ii];sizeup=ns6div.offsetHeight;ns6scroll();}}
//-- end Algorithm -->
