
var seconds_to_change = 2;

var imagesx = new Array();
imagesx[0] = new Array ("images/slideshow/consipslide1.jpg", "Con Sip Wall System");
imagesx[1] = new Array ("images/slideshow/consipslide2.jpg", "Dowels Inserted and Bonded to Concrete Footer");
imagesx[2] = new Array ("images/slideshow/consipslide3.jpg", "Adhesive Bonds Dowel to Footer");
imagesx[3] = new Array ("images/slideshow/consipslide4.jpg", "Dowels Set into Place");
imagesx[4] = new Array ("images/slideshow/consipslide5.jpg", "Panels Inserted over Dowels onto Concrete Footer");
imagesx[5] = new Array ("images/slideshow/consipslide6.jpg", "Foam is Burned Away so Concrete can Filled In");
imagesx[6] = new Array ("images/slideshow/consipslide7.jpg", "Panels are Connected by a Layer of Wire Mesh");
imagesx[7] = new Array ("images/slideshow/consipslide8.jpg", "Assembled Panels Ready for Concrete Coating");
imagesx[8] = new Array ("images/slideshow/consipslide9.jpg", "Sylvia Brent & Alex Guzman Inspecting Wall Supports");
imagesx[9] = new Array ("images/slideshow/consipslide10.jpg", "Scratch Coat of Concrete Applied over Wire Mesh");
imagesx[10] = new Array ("images/slideshow/consipslide11.jpg", "Final Spray Coat of Concrete is Applied");
imagesx[11] = new Array ("images/slideshow/consipslide12.jpg", "Wall is Finished with a Knockdown or Sand Texture");
imagesx[12] = new Array ("images/slideshow/consipslide13.jpg", "Shot-Crete Application");
imagesx[13] = new Array ("images/slideshow/consipslide14.jpg", "Shot-Crete Process in Progress");
imagesx[14] = new Array ("images/slideshow/consipslide15.jpg", "Cap Detail Installation");
imagesx[15] = new Array ("images/slideshow/consipslide16.jpg", "Finished Gated Enclosure");
imagesx[16] = new Array ("images/slideshow/consipslide17.jpg", "Final Touches");
imagesx[17] = new Array ("images/slideshow/consipslide18.jpg", "Finished Product");


var current_image = 0;

function switchCallback()
{
	if (current_image < (imagesx.length - 1))
	{
		current_image++;
	}
	else
	{
		current_image=0;
	}

document.getElementById("supportTest").innerHTML = (current_image + 1) + " of " + imagesx.length;
document.slide_image.src = imagesx[current_image][0];
document.getElementById("caption").innerHTML = imagesx[current_image][1];
}

function switchIt()
{
document.getElementById("supportTest").innerHTML = (current_image + 1) + " of " + imagesx.length;
document.getElementById("caption").innerHTML = imagesx[current_image][1];
slideshow_interval = setInterval(switchCallback, (seconds_to_change * 1000));
}

function previous()
{
clearInterval(slideshow_interval);
if (current_image != 0)
{
current_image--;
}
else
{
current_image = imagesx.length - 1;
}

document.getElementById("supportTest").innerHTML = (current_image + 1) + " / " + imagesx.length;
document.slide_image.src = imagesx[current_image][0];
document.getElementById("caption").innerHTML = imagesx[current_image][1];
slideshow_interval = null;
}

function play_stop()
{
	if (slideshow_interval == null)
	{
	slideshow_interval = setInterval(switchCallback, (seconds_to_change * 1000));
	}
	else
	{
	clearInterval(slideshow_interval);
	slideshow_interval = null;
	}
}

function forward()
{
clearInterval(slideshow_interval);
if (current_image != imagesx.length - 1)
{
current_image++;
}
else
{
current_image = 0;
}

document.getElementById("supportTest").innerHTML = (current_image + 1) + " of " + imagesx.length;
document.slide_image.src = imagesx[current_image][0];
document.getElementById("caption").innerHTML = imagesx[current_image][1];
slideshow_interval = null;
}

function preloadImagesx()
{
var i;
var imageObj = new Image();
for(i=0; i < imagesx.length; i++)
{
imageObj.src=imagesx[i][0];
}
}

function hide_show()
{
if (document.getElementById("slideshow").style.visibility == "hidden")
{
document.getElementById("slideshow").style.visibility = "visible";
}
else
{
document.getElementById("slideshow").style.visibility = "hidden";
}

}

document.getElementById("slideshow").style.visibility = "hidden";
document.onload = preloadImagesx;