/**
 * 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">Lowell B, Gretna LA</td></tr><tr><td valign="right" class="tan">I have been a customer for 20 years and every vehicle I have purchased at Don Bohn has been great!</td></tr></table>';
singletext[1]='<table CELLSPACING="0" CELLPADDING="0" align="center"><tr><td valign="right" class="tabb">Mr Greffer, Gretna LA</td></tr><tr><td valign="right" class="tan">Alonso was a terric sales consultant - a pleasure to do business with.</td></tr></table>';
singletext[2]='<table CELLSPACING="0" CELLPADDING="0" align="center"><tr><td valign="right" class="tabb">Michelle G, Marrero LA</td></tr><tr><td valign="right" class="tan">I always receive prompt courteous service when I bring my vehicle to Don Bohn GMC for service. The two service guys are always very helpful.</td></tr></table>';
singletext[3]='<table CELLSPACING="0" CELLPADDING="0" align="center"><tr><td valign="right" class="tabb">Mrs Butler, Westwego LA</td></tr><tr><td valign="right" class="tan">John was excellent.</td></tr></table>';
singletext[4]='<table CELLSPACING="0" CELLPADDING="0" align="center"><tr><td valign="right" class="tabb">Richie B, Metairie LA</td></tr><tr><td valign="right" class="tan">Great people that know what they are talking about - Bruce Miller.</td></tr></table>';
singletext[5]='<table CELLSPACING="0" CELLPADDING="0" align="center"><tr><td valign="right" class="tabb">Tanya G, Prairieville LA</td></tr><tr><td valign="right" class="tan">Everyone at Don Bohn GMC were extremely helpful and knowledgeable about the Terrain and helping me with financing it. From Terry Jones my salesperson to CJ Landry Finance Manager to Hugh Do General Manager who came out personally to thank me for purchasing a vehicle from them. I was very impressed with their professionalism and kindness and ethusiasm about selling me a car. I will refer friends and family to them always. Thanks again for all your help...</td></tr></table>';
singletext[6]='<table CELLSPACING="0" CELLPADDING="0" align="center"><tr><td valign="right" class="tabb">Gloria, LA</td></tr><tr><td valign="right" class="tan">"Michele, Thank you for all your help.  I was truly impressed by your system and your professionalism.  Your online process aided me in my decision when looking for a dealership and I plan on doing much more business in the future with your company.  I am very satisfied with my purchase.  Kudos to your department."</td></tr></table>';
singletext[7]='<table CELLSPACING="0" CELLPADDING="0" align="center"><tr><td valign="right" class="tabb">Kelli M, New Orleans LA</td></tr><tr><td valign="right" class="tan">"My salesperson Jay Johnson was extremely helpful and courteous. I have never liked the experience of buying a new car because most sales consultants are overbearing. Jay changed this experience my husband and I and we felt very comfortable and relaxed. I would definitely recommend Jay and Don Bohn to my family and friends."</td></tr></table>';
singletext[8]='<table CELLSPACING="0" CELLPADDING="0" align="center"><tr><td valign="right" class="tabb">Michael C, Harvey LA</td></tr><tr><td valign="right" class="tan">"Thank you for your honesty and bringing integrity back to the car buying experience. I have told others of my experience with you and have urged them, no matter how far away they might live, to visit you as it would be well worth it to take the ride."</td></tr></table>';
singletext[9]='<table CELLSPACING="0" CELLPADDING="0" align="center"><tr><td valign="right" class="tabb">George W, Marrero LA</td></tr><tr><td valign="right" class="tan">I was very happy with the purchase of my truck. The salesman, Derrick Woods, was very nice and answered all my questions and even told me things about my truck that I did not know. I will tell all my friends about Derrick and all the nice people at Don Bohn GMC.</td></tr></table>';
singletext[10]='<table CELLSPACING="0" CELLPADDING="0" align="center"><tr><td valign="right" class="tabb">Donald C, Kenner LA</td></tr><tr><td valign="right" class="tan">"My salesperson was great! He worked hard for me and got me the deal I wanted. It was definitely worth the drive to the Westbank."</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 -->

