//------------------------- START SLIDESHOW -------------------------------------------
currentIndx=0;

intImages=new Array();
intImages[0]='/images/home/intro_advantage.jpg';
intImages[1]='/images/home/intro_fuel_cell.jpg';
intImages[2]='/images/home/intro_injection.jpg';

Messages=new Array()
Messages[0]=a1();
Messages[1]=a2();
Messages[2]=a3();


function a1(){
x = '<h1>50 Ton Advantage Press</h1>Cost effective compression press and is built for molding small parts in thermoset material. <a href="/products/compression/" title="Compression Presses">More information</a>';
return x;
}
function a2(){
x = '<h1>700 Ton Fuel Cell Press</h1>This press is used to make fuel cells for the automotive industry. <a href="/products/compression/" title="Compression Presses">More information</a>';
return x;
}
function a3(){ 
x = '<h1>30 Ton Medi-Molder</h1>Products molded on the Medimolder include medical devices such as catheters, electrical coils, connectors and scissor handles.';
return x;
}

imagesPreloadedIntro = new Array(2) // Number of images to be displayed - 3

for (var i = 0; i < intImages.length ; i++)
{
imagesPreloadedIntro[i] = new Image(338,397)
imagesPreloadedIntro[i].src=intImages[i]
}

function Content(Indx) {
document.imgInt.src=imagesPreloadedIntro[currentIndx].src
dCONTENT('notes',Messages[currentIndx])

function dCONTENT(elementid,content){
	if (document.all)
		document.getElementById(elementid).innerHTML=content;
	else if (document.getElementById){
	rng = document.createRange();
	el = document.getElementById(elementid);
	rng.setStartBefore(el);
	htmlFrag = rng.createContextualFragment(content);
	while (el.hasChildNodes()) el.removeChild(el.lastChild);
	el.appendChild(htmlFrag);}
}
}

function Next(){
if (currentIndx<imagesPreloadedIntro.length-1){
	currentIndx=currentIndx+1;
	Content(currentIndx)
}
else {
	currentIndx=0
	Content(currentIndx)
}
}


function Back(){
if (currentIndx>0){
	currentIndx=currentIndx-1;
	Content(currentIndx)
}
else {
	currentIndx=1 // highest image to load when coming from zero
	Content(currentIndx)
}}


function automaticly() {
if (currentIndx<imagesPreloadedIntro.length){
	currentIndx=currentIndx
} else {
	currentIndx=0
}

	Content(currentIndx)
	currentIndx=currentIndx+1;
	var delay = setTimeout("automaticly()",4500)

}