/***********************************************
* 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]='Claim the Web&rsquo;s e-commerce software is super easy to use, and provides us with complete control over the look and feel of our website. <div class="testimonials-name">Kristen Kruchowski <br /> U North America Inc.<br /> Chicago, IL </div><br /><a href="testimonials.php"><img src="images/see-all-testimonials_off.gif" width="135" height="18" style="border: none;" alt="See all testimonials" /></a>';
	tickercontents[1]='If excellent work, great technical support and super friendly customer service, is what you are looking for, you must come to Claim the web.<br /><br /><div class="testimonials-name">Emiliana Barragan<br />Chica Activa Fitwear, LLC<br />Covington, LA</div><br /><a href="testimonials.php"><img src="images/see-all-testimonials_off.gif" width="135" height="18"  style="border: none;" alt="See all testimonials" /></a>';
	tickercontents[2]='We absolutely love our website! Claim the Web is wonderful to work with. They are very knowledgeable in their field, and make the start-up rather painless. <br /><br /><div class="testimonials-name">Blake Roye<br />American Wall Decor<br />National Sales Manager<br />Dallas, TX</div><br /><a href="testimonials.php"><img src="images/see-all-testimonials_off.gif" width="135" height="18"  style="border: none;" alt="See all testimonials" /></a>';
	tickercontents[3]='Claim The Web understood our need to create a search engine friendly shopping cart. We are extremely pleased with how smoothly and quickly the project was complete.<br /><br /><div class="testimonials-name">John Knox<br />Pest Products Online<br />Knoxville, TN</div><br /><a href="testimonials.php"><img src="images/see-all-testimonials_off.gif" width="135" height="18"  style="border: none;" alt="See all testimonials" /></a>';
	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=10000;
	
	////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;