var faqQuestions = [ //Questions and answers go here.  If you add only one or the other it will break.

'What are the end user terms of service?',
'Message and Data Rates May Apply. All messages are standard rate and will users be charged according to their mobile phone plan. Reply STOP to cancel or reply HELP for help information. Users may also email support@tagga.com for HELP or general questions. Users will be subscribed indefinitely (Reply STOP to cancel) and may receive up to two messages per week.',
					
'Are end users charged when they text something to 82442, 365247, or 47170?',
'Message and Data Rates May Apply. This means that the end-user is charged according to their mobile phone plan.',

'How often can I expect to receive SMS messages?',
'End users can expect to receive up to two messages per week.',

'How do I unsubscribe from Tagga alerts?',
'To unsubscribe from all Tagga SMS text messages, reply STOP to 82442, 365247, or 47170.',

'Where can I get help?',
'To receive help reply HELP to 82442, 365247, or 47170.  Users may also send an email to support@tagga.com.  We respond within two business days.',

'Do you use mobile numbers for your own marketing or sell them to someone else who will?',
'No, we respect your privacy and will not send you unsolicited messages or share your number with anyone else. We do not sell or use your number for any marketing or sales purposes.',

'What wireless networks and devices is your service compatible with?',
'Our service is compatible with all devices capable of sending and receiving SMS messages on all of our supported wireless networks.  In the USA, we support Alltel, AT&T, Boost, Cellular One, Nextel, Sprint, T-Mobile, US Cellular, Verizon Wireless, Virgin Mobile US, Cincinnati Bell, Appalachian Wireless, Bluegrass Cellular, Dobson, Cellcom, Cellular South, Centennial Wireless, Immix Wireless, Revol Wireless, Unicel (Rural Cellular), West Central Wireless, nTelos Wireless, ACS Wireless, GCI Communications, Illinois Valley Cellular, Inland Cellular, Nex-Tech Wireless, Thumb Cellular, and United Wireless.  In Canada we support Bell Mobility (including Aliant, NorthernTel, and Telebec), FIDO, MTS Mobility, Rogers Wireless, Sasktel, Telus (including Koodo), and Virgin Mobile. In the rest of the world, our coverage is inclusive of the Clickatell coverage list.',

'Are there data charges for visiting mobile sites?',
'Message and Data Rates May Apply.  This means you might be charged when visiting mobile websites linked from Tagga SMS messages. Whether or not you are charged and how much depends on your agreement with your wireless service provider.',

'Do you filter out inappropriate content?',
'Yes, Tagga monitors all content and will remove inappropriate content from our system. Please refrain from sending inappropriate content through Tagga.',

'Where is 82442 available?',
'The shortcode 82442 is only available in the USA and Canada.  For SMS communication outside the USA and Canada, we use the number +447624803802.',

'Where is 47170 available?',
'The shortcode 47170 is only available in the USA.',

'Where is 365247 available?',
'The shortcode 365247 is only available in the Canada.',

'Where can I get Tagga program info?',
'To receive info about the Tagga program reply INFO to 82442, 365247, or 47170, or send an email to info@tagga.com.  We respond within two business days.',

'Where can I find your terms of service and privacy policy?',
'The Tagga terms of service and privacy policy are linked in the footer of every taggga page.  You can also click on these links to go directly to our privacy policy.',

'Is Tagga compatible with AT&T products and services?',
'Yes, Tagga is compatible with AT&T products and services capable of sending and receiving text messages.',

'How do I learn about the Tagga Agency Platform?',
'To learn about our features and case studies, click on http://tagga.com/platform. To speak with an account executive, contact us at sales@tagga.com. We are looking forward to talking to you.'

];




Event.observe(window, 'load', function() {
									   
	arrayCounter = 0; //Used to move through the array by 2 each time it loops so that we can access the question right away.
	questionCounter = 1; //Used to assign integers to the href and name attributes of the question/answer anchors.  Steps by one.
	
	//get the array length and divide it by two to obtain correct number of questions/answer combinations
	var check = (faqQuestions.length / 2);
	
	faqQuestions.each(function(question) {
							   
		if (check > (arrayCounter-check)) {	//Check to make sure we don't loop more times than there are questions/answer combinations  
		
			var qDiv = document.getElementById('faq-questions');
			
			var qAnchor = new Element('a', { 'class': 'faq question', href: '#a'+questionCounter })

			qDiv.appendChild(qAnchor);
			qAnchor.innerHTML = faqQuestions[arrayCounter]; //inject the question into the link
	
			
			var aDiv = document.getElementById('faq-answers');
		
			var aHeader = document.createElement('h2');
	
			var aAnchor = new Element('a', { 'class': 'faq answer', name: 'a'+questionCounter })
					
			var topAnchor = new Element('a', { 'class': 'faq top', href: '#top' })
			
			aDiv.appendChild(aHeader);
			aDiv.appendChild(aAnchor);
			aDiv.appendChild(topAnchor);
			aHeader.innerHTML = faqQuestions[arrayCounter]; //inject the question into the answer title
			aAnchor.innerHTML = faqQuestions[arrayCounter+1]; //inject the answer
			
		}
		
		arrayCounter=(arrayCounter+2);
		++questionCounter;
	});

});
