var explorer_b = (navigator.appName.indexOf('Microsoft') != '-1');

var step_i = 0;
var image_a = new Array();
var text_a = new Array();

image_a.push('http://www.netground.nl/images/foto_tour/9_standby_generators_3.jpg');
image_a.push('http://www.netground.nl/images/foto_tour/cage_4.jpg');
image_a.push('http://www.netground.nl/images/foto_tour/entrance_hall_2.jpg');
image_a.push('http://www.netground.nl/images/foto_tour/inergen_gasstorage_2.jpg');
image_a.push('http://www.netground.nl/images/foto_tour/inergen_gasstorage_3.jpg');
image_a.push('http://www.netground.nl/images/foto_tour/man_trap_doors.jpg');
image_a.push('http://www.netground.nl/images/foto_tour/rack_3.jpg');
image_a.push('http://www.netground.nl/images/foto_tour/racks_1.jpg');
image_a.push('http://www.netground.nl/images/foto_tour/suite_2.jpg');

text_a.push('9 Standby generators');
text_a.push('Cage');
text_a.push('Entrance hall');
text_a.push('Inergen gasstorage');
text_a.push('Inergen gasstorage');
text_a.push('Man trap doors');
text_a.push('Rack');
text_a.push('Racks');
text_a.push('Suite');

var image_td = 0;
var next_button_td = 0;
var previous_button_td = 0;

function setImage()
{
	image_td.src = image_a[step_i];
	main_text_td.innerHTML = text_a[step_i];
}

function setControl()
{
	previous_button_td.innerHTML = step_i ? '<a href="javascript:setPrevious();" title="&lsaquo; Vorige" class="t-1">&lsaquo; Vorige Foto</a>' : '';
	next_button_td.innerHTML = ((image_a.length - 1) == step_i) ? '' : '<a href="javascript:setNext();" title="Volgende &rsaquo;" class="t-1">Volgende Foto &rsaquo;</a>';

	setImage();
}

function setNext()
{
	step_i++;
	setControl();
}

function setPrevious()
{
	step_i--;
	setControl();
}

function __constructor()
{
	
	
	image_td = explorer_b ? document.all['tour_img'] : document.getElementById('tour_img');

	next_button_td = explorer_b ? document.all['next_td'] : document.getElementById('next_td');
	previous_button_td = explorer_b ? document.all['last_td'] : document.getElementById('last_td');

	main_text_td = explorer_b ? document.all['text_td'] : document.getElementById('text_td');

	setControl();
}

