var slideshow_timer = 0;
var slideshow_cur_idx = 0;
var slideshow_data = new Array();

slideshow_data[0] = new Array();

var curdate = new Date();

slideshow_data[1] = new Array();
slideshow_data[1][0] = new Image(875,309);
slideshow_data[1][0].src = 'skin/images/banner1.jpg';
slideshow_data[1][1] = '<p><font style="font-size:22px;font-weight:bold;">World Class</font><br />';
slideshow_data[1][1] += '<font style="font-size:30px;font-weight:bold;">Medical Transcription</font></p><hr />';
slideshow_data[1][1] += '<p>We are one of the pioneers in the outsourced medical transcription industry. Find out how we help individual practices, clinics and hospitals have accurate and on-time transcription without the headaches.</p>';
slideshow_data[1][1] += '<p><a href="Services.php">Learn more</a></p>';

slideshow_data[2] = new Array();
slideshow_data[2][0] = new Image(875,309);
slideshow_data[2][0].src = 'skin/images/banner2.jpg';
slideshow_data[2][1] = '<p><font style="font-size:22px;font-weight:bold;">Top-notch</font><br />';
slideshow_data[2][1] += '<font style="font-size:30px;font-weight:bold;">Legal Transcription</font></p><hr />';
slideshow_data[2][1] += '<p>We are committed to deliver unparalleled and judicious legal transcription services. Learn more how we support law firms, attorneys and solicitors in their practices.</p>';
slideshow_data[2][1] += '<p><a href="Services.php">Learn more</a></p>';

slideshow_data[3] = new Array();
slideshow_data[3][0] = new Image(875,309);
slideshow_data[3][0].src = 'skin/images/banner3.jpg';
slideshow_data[3][1] = '<p><font style="font-size:22px;font-weight:bold;">First-class</font><br />';
slideshow_data[3][1] += '<font style="font-size:30px;font-weight:bold;">Business<br />Transcription</font></p><hr />';
slideshow_data[3][1] += '<p>We provide cost effective business transcription solutions. Ask us how we answer transcription needs of private individuals and organizations.</p>';
slideshow_data[3][1] += '<p><a href="Services.php">Learn more</a></p>';

slideshow_data[4] = new Array();
slideshow_data[4][0] = new Image(875,309);
slideshow_data[4][0].src = 'skin/images/banner4.jpg';
slideshow_data[4][1] = '<p><font style="font-size:22px;font-weight:bold;">Quality</font><br />';
slideshow_data[4][1] += '<font style="font-size:30px;font-weight:bold;">Translation<br />Services</font></p><hr />';
slideshow_data[4][1] += '<p>We capture the true essence of conversions through our vast network of multi-linguists.  Take a look on how we can help you with your translation needs.</p>';
slideshow_data[4][1] += '<p><a href="Services.php">Learn more</a></p>';


function slideshow_rotate(force_idx)
{
	if (force_idx) {
		if (slideshow_timer) {
			clearTimeout(slideshow_timer);
		}
		slideshow_cur_idx = force_idx;
	}
	if (slideshow_cur_idx > 0 && slideshow_cur_idx < slideshow_data.length) {
		var data = slideshow_data[slideshow_cur_idx];
		// update text and images
		document.getElementById('slideshow').style.backgroundImage = 'url('+data[0].src+')';
		document.getElementById('slideshow_text').innerHTML = '<div class="slideshow_'+slideshow_cur_idx+'">'+data[1]+'</div>';
		// reset buttons
		var i;
		for (i=1;i<slideshow_data.length;i++) {
			button = document.getElementById('slideshow_button_'+i);
			if (button) {
				if (i==slideshow_cur_idx) {
					button.className = 'active';
				} else {				
					button.className = '';
				}
			}
		}
		// continue
		if (++slideshow_cur_idx==slideshow_data.length) {
			slideshow_cur_idx = 1;
		}
		slideshow_timer = setTimeout(function(){slideshow_rotate()},5000);
	}
}

document.getElementById('slideshow_button_1').innerHTML = '<a href="javascript:slideshow_rotate(1);">1</a>';
document.getElementById('slideshow_button_2').innerHTML = '<a href="javascript:slideshow_rotate(2);">2</a>';
document.getElementById('slideshow_button_3').innerHTML = '<a href="javascript:slideshow_rotate(3);">3</a>';
document.getElementById('slideshow_button_4').innerHTML = '<a href="javascript:slideshow_rotate(4);">4</a>';

slideshow_cur_idx = 1;
window.onload = function() {
	slideshow_rotate(0);	
}

