// JavaScript Document

var questions = [
	{ 
	"q":"Are you spending too much time on admin matters and do you need a part-time bookkeeper to prepare your payroll, vat returns etc monthly at a reasonable cost? ",
	"a":"OWA provides various levels of solutions to clients including an onsite bookkeeping service at a time that suits you and the needs of your business."
	}
	,{
	"q":"Has your business experienced growth during the past year(s) and has the services as provided by your accountant been in line with your business needs?",
	"a":"OWA specialise in tailor making the serivce level that suits your business and this service is reviewed annually to ensure that we are continue to meet your needs."
	}
	,{
	"q":"Do you need to have better vision regarding the financial performance of your business each month and are a qualified accountant to produce and present monthly management accounts?",
	"a":"Our premium clients receive full management reports each month by 15th of the following month with our analysis and highlights."
	}
	,{
	"q":"Are you looking for greater control of your business but cannot afford a financial controller",
	"a":"We provide our clients with up do date financial information on a monthly basis, which provides greater control and assuance to the business owners that the business is moving in the right direction"
	}
];

/*
COPY THIS TO ADD ITEM
,{
	"q":"Question text",
	"a":"Answer text"
	}
	
*/

var current = 0;
window.addEvent('domready', function(){

all = questions;
$('scroller').setStyle('padding-top',5);
$('scroller').innerHTML = "<strong class='fontBlack'>Q. </strong> "+all[0].q+"";
$('scroller').innerHTML += "<p><strong class='fontBlack'>A. </strong> "+all[0].a+"</p>";
slide = window.setInterval("scroller()",8000);

});

function scroller(){
	//alert("ddd");

	all = questions;			
	$('scroller').setStyle('opacity',0);
	$('scroller').setStyle('padding-top',10);
	var fx = new Fx.Styles($('scroller'),{duration:500,transition: Fx.Transitions.linear} ); 
	$('scroller').innerHTML = "<strong class='fontBlack'>Q. </strong> "+all[current].q+"";
	$('scroller').innerHTML += "<p><strong class='fontBlack'>A. </strong> "+all[current].a+"</p>";
	fx.start({
			 'opacity' : [0,1],
			 'padding-top' : [10,5]
			 });
	if (current==window.questions.length-1){
		current = 0;
		}
		else{
			current++;
			}
	}