/***********************************************
* Memory Ticker script- � Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

//configure tickercontents[] to set the messges you wish be displayed (HTML codes accepted)
//Backslash any apostrophes within your text (ie: I\'m the king of the world!)
var tickercontents=new Array()
tickercontents[0]='<a href="http://www.autobadges.com">AutoBadges</a> &ndash; Your #1 Source for V6 Mustang Emblems and V8 Mustang Emblems'
tickercontents[1]='<a href="http://www.stangsuspension.com">StangSuspension</a> &ndash; Suspension and Performance Parts for Your Ford Mustang'
tickercontents[2]='<a href="http://www.vmptuning.com">VMP Tuning</a> &ndash; Specialize in Tuning of All Ford Vehicles, Including V6 Mustangs'
tickercontents[3]='<a href="http://www.meguiars.com">Meguiars</a> &ndash; Offering the Leading Surface Care Products for Your Mustang'
tickercontents[4]='<a href="http://www.stangmods.com">StangMods.com</a> &ndash; Aftermarket Parts for the Late Model Mustang'
tickercontents[5]='<a href="http://www.sprayedinla.com">Sprayed in LA</a> &ndash; Auto Custom Paint and Body'
tickercontents[6]='<a href="http://www.lamustangclub.com">Sinergy Motorsports</a> &ndash; Thousands of Parts, Most Brands Carried'
tickercontents[7]='<a href="http://www.speedconcepts.net">SpeedConcepts</a> &ndash; High Quality Aftermarket &amp; OEM Mustang Parts'
tickercontents[8]='<a href="http://www.americanmuscle.com">American Muscle</a> &ndash; The Best, Most Reliable Online Aftermarket Retailer'
tickercontents[9]='<a href="http://www.trufiber.com">TruFiber</a> &ndash; Aerodynamic Parts and Auto Accessories'
tickercontents[10]='<a href="http://www.redlinegoods.com">Redline Accessories</a> &ndash; Specializing in Shift and Brake Boots'
tickercontents[11]='<a href="http://www.fly-ford.com">Marlos Frame &amp; Alignment</a> &ndash; Work On All Mustangs and Fords'

var persistlastviewedmsg=1 //should messages' order persist after users navigate away (1=yes, 0=no)?
var persistmsgbehavior="onload" //set to "onload" or "onclick".

//configure the below variable to determine the delay between ticking of messages (in miliseconds):
var tickdelay=3000

////Do not edit pass this line////////////////

var divonclick=(persistlastviewedmsg && persistmsgbehavior=="onclick")? 'onClick="savelastmsg()" ' : ''
var currentmessage=0

function changetickercontent(){
if (crosstick.filters && crosstick.filters.length>0)
crosstick.filters[0].Apply()
crosstick.innerHTML=tickercontents[currentmessage]
if (crosstick.filters && crosstick.filters.length>0)
crosstick.filters[0].Play()
currentmessage=(currentmessage==tickercontents.length-1)? currentmessage=0 : currentmessage+1
var filterduration=(crosstick.filters&&crosstick.filters.length>0)? crosstick.filters[0].duration*1000 : 0
setTimeout("changetickercontent()",tickdelay+filterduration)
}

function beginticker(){
if (persistlastviewedmsg && get_cookie("lastmsgnum")!="")
revivelastmsg()
crosstick=document.getElementById? document.getElementById("memoryticker") : document.all.memoryticker
changetickercontent()
}

function get_cookie(Name) {
var search = Name + "="
var returnvalue = ""
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset)
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function savelastmsg(){
document.cookie="lastmsgnum="+currentmessage
}

function revivelastmsg(){
currentmessage=parseInt(get_cookie("lastmsgnum"))
currentmessage=(currentmessage==0)? tickercontents.length-1 : currentmessage-1
}

if (persistlastviewedmsg && persistmsgbehavior=="onload")
window.onunload=savelastmsg

if (document.all||document.getElementById)
document.write('<div id="memoryticker" '+divonclick+'></div>')
if (window.addEventListener)
window.addEventListener("load", beginticker, false)
else if (window.attachEvent)
window.attachEvent("onload", beginticker)
else if (document.all || document.getElementById)
window.onload=beginticker