function $fsget(el) {
	return document.getElementById(el);
}

var aboutStr = 'Farrellsoft is a software company based in the UK. We develop software applications that are designed to automate and organise repetitive and time-consuming activities.<BR><BR>Our solutions range from tailor-made databases to hosted applications and are widely recognised for the innovation and value they provide. Ultimately, our solutions save our customers time and money.';
var servicesStr = 'Farrellsoft builds Windows and web-based applications for small and medium sized businesses. We specialise in solutions that address particular pain points in those businesses.<BR><BR>If you need a database driven system - perhaps to run your order management, or to collate and report business data - Farrellsoft will deliver a professional but affordable solution for your needs.';
var howStr = 'Our software is built using Microsoft .NET development technologies and SQL Server databases. Using cutting-edge development tools enables us to deploy world-class software at speed.<BR><BR>Many of our competitors are still developing on outdated platforms and that has enabled us to benefit from a sure foothold as innovators in the software development marketplace meaning our customers get better software, quicker and for a fraction of the costs.';
var benefitsStr = 'Until now, you\'ve had to deploy software in your organization that has a \'fairly good match\' with your processes. The software is 75% right and the 25% disparity you\'ve just had to \'cope with\'. There used to be simply no other option. The development of software was expensive and extremely time-consuming.<BR><BR>Times have changed. You no longer have to contort your business to cope with that incongruent 25%, or indeed if you have an innovative business and your unique processes are what differentiate you from your competition – you now have an alternative.<BR><BR>By designing your own system with us, your software can fit your business like a well-tailored suit. The benefits speak for themselves. Why force generic software into your business when it can be tailored to meet your needs?';
var contactStr = 'Farrellsoft can be contacted at:<BR><BR>Farrellsoft Ltd.<BR>Shepherds Building<BR>Rockley Road<BR>London<BR>W14 0DA<BR>United Kingdom<BR><BR>Email: <A href="mailto:contactus@farrellsoft.co.uk">contactus@farrellsoft.co.uk</A>';
var careersStr = 'Farrellsoft employs talented people who share our philosophy of professional excellence, integrity and delivering solutions that exceed our customers\' expectations.<BR><BR>If you are interested in opportunities at Farrellsoft, then please send us an electronic copy of your CV and contact details together with a covering note outlining the qualities you feel you can bring to our company. You can send us this by email to <A href="mailto:careers@farrellsoft.co.uk">careers@farrellsoft.co.uk</A>.';

function initPage() {
	loadTab(0);
	loadBigTab(0);
	resetCase();
}
		
function loadTab(tab) {
	$fsget('divTopArrowAbout').style.display='none';
	$fsget('divTopArrowServices').style.display='none';
	$fsget('divTopArrowHow').style.display='none';
	$fsget('divTopArrowBenefits').style.display='none';
	$fsget('divTopArrowContact').style.display='none';
	$fsget('divTopArrowCareers').style.display='none';
	switch (tab) {
		case 0:
			$fsget('divTopContent').innerHTML = aboutStr;
			$fsget('divTopArrowAbout').style.display='';		
			break;
		case 1:
			$fsget('divTopContent').innerHTML = servicesStr;
			$fsget('divTopArrowServices').style.display='';
			break;
		case 2:
			$fsget('divTopContent').innerHTML = howStr;
			$fsget('divTopArrowHow').style.display='';
			break;
		case 3:
			$fsget('divTopContent').innerHTML = benefitsStr;
			$fsget('divTopArrowBenefits').style.display='';
			break;
		case 4:
			$fsget('divTopContent').innerHTML = contactStr;
			$fsget('divTopArrowContact').style.display='';
			break;
		case 5:
			$fsget('divTopContent').innerHTML = careersStr;
			$fsget('divTopArrowCareers').style.display='';
			break;
	}
}

function loadBigTab(tab) {
	resetCase();
	$fsget('divContentArrowBio').style.display='none';
	$fsget('divContentArrowSoftware').style.display='none';
	switch (tab) {
		case 0:
			$fsget('divContentBio').style.display=''; 
			$fsget('divContentSoftware').style.display='none';
			$fsget('divContentArrowBio').style.display='';
			break;
		case 1:
			$fsget('divContentBio').style.display='none'; 
			$fsget('divContentSoftware').style.display='';
			$fsget('divContentArrowSoftware').style.display='';
			break;
	}
}

function flipCase(url,h) {
	$fsget('ifrmCaseStudies').src=url; 
	$fsget('ifrmCaseStudies').style.height=h+'px';
	$fsget('divSoftwareMain').style.display='none'; 
	$fsget('divSoftwareDetail').style.display='';
	$fsget('divSoftwareMainText').style.display='none'; 
	$fsget('divSoftwareDetailText').style.display='';
}

function resetCase() {
	$fsget('ifrmCaseStudies').src=''; 
	$fsget('ifrmCaseStudies').style.height='100px';
	$fsget('divSoftwareMain').style.display=''; 
	$fsget('divSoftwareDetail').style.display='none';
	$fsget('divSoftwareMainText').style.display=''; 
	$fsget('divSoftwareDetailText').style.display='none';
}


