// Play-Pause Slide show
showRunning = true;
// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 5000;
// Duration of crossfade (seconds)
var crossFadeDuration = 2;
// Specify the image files
NewImg = new Array( 	"slideshow/indexpage/images/slide-1R.jpg", "/slideshow/indexpage/images/slide-2R.jpg",
		 	"slideshow/indexpage/images/slide-3RN.jpg", "/slideshow/indexpage/images/slide-4R.jpg",
			"slideshow/indexpage/images/slide-5R.jpg" );
// Specify the image links
ImageLink = new Array( 	"http://www.instanthmi.com/ihmisoftware.htm", "http://www.instanthmi.com/featuresandbenefits.htm",
		 	"http://www.instanthmi.com/ihmiruntimes.htm", "http://www.instanthmi.com/brochure/index.htm",
			"http://www.instanthmi.com/download/index.htm" );
// Specify the message titles
Titles = new Array( "Welcome to InstantHMI - HMI / SCADA Software", "New Project Wizard - Build HMI Application Lightning Fast", "Runtime Engines (PC, CE, PDA)", "Applications", "Breathe new life into any HMI" );
// Specify the messages 
Messages = new Array(  	"InstantHMI provides ‘Anytime, Anyplace’ connectivity to the process and machine control information taking advantage of the unique features of the various platforms: mobility, wireless connectivity and barcoding capabilities of the PDA, compactness and power of the CE, and full-featured functionality of the PC platforms.", 
		       	"1: Define New Project (Identify Platform and Screen Resolution)<BR>2: Create Data Source (Comm Driver connects to  your controller)<BR>3: Identify Tags (Variables of interest to operator in your application)<BR>4: Design Screens (Object Assemblies, Watch List, Alarm Viewer)<BR>5: Test Screen (Ease of monitoring & control of critical/useful data )",
		       	"InstantHMI is the HMI/SCADA solution for your target language.<BR>Take advantage of the unique features of various platforms:<BR>Mobility, Wireless connectivity and Barcoding capabilities of PDA,<BR>Compactness and power of CE, and full-featured functionality of PC.<BR>Comm links: RS232, RS485, Infrared, Wi-Fi, Bluetooth, TCP/IP, OPC.",
		       	"Water/Waste Water, Steel Production, Plastic Colorization,<BR>Engine Control, Off-Shore Oil Rigs, Power Systems, Automotive<BR>Transmission Testing, Training Pendants, Semiconductor Tools,<BR>Textiles, Electron Microscopy, Agriculture, Wine Making, Utilities,<BR>Manufacturing, Tank Farm Monitoring & Control, Snow Making, ...",
		       	"Enhance your existing PC based HMI by adding features such as Barcoding/RFID, Infrared and wireless connectivity using InstantHMI on a PDA (Pocket PC and Palm). <BR>Design your HMI application the old way, the hard way, <BR>the wrong way OR the InstantHMI way."  );


//3: InstantHMI 5.2 is the HMI/SCADA solution for your target language and runtime platforms.
//3: Stand-alone wireless/wired interface for your controller is scalable.

// do not edit anything below this line
var slideTimer;
var dispIdx = 0;
var curIdx = dispIdx
var totalImages = NewImg.length;
var preLoad = new Array();
for( workIdx = 0; workIdx < totalImages; workIdx++ ) 
{
preLoad[workIdx] = new Image();
preLoad[workIdx].src = NewImg[workIdx];
}

function runSlideShow() 
{
if( document.all ) 
	{
	document.images.SlideShow.style.filter="blendTrans(duration=2)";
	document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
	document.images.SlideShow.filters.blendTrans.Apply();
	}

document.images.SlideShow.src = preLoad[dispIdx].src;
document.getElementById('msgtitle').innerHTML=Titles[dispIdx];
document.getElementById('msgtxt').innerHTML=Messages[dispIdx];
document.getElementById('imagelink').href = ImageLink[dispIdx];
if( document.all ) 
	{
	document.images.SlideShow.filters.blendTrans.Play();
	}

curIdx = dispIdx;
dispIdx = dispIdx + 1;
if( dispIdx > (totalImages - 1) ) 
	{
	dispIdx = 0;
	}

document.images.play.src = "http://www.instanthmi.com/slideshow/indexpage/images/button-pause.jpg";

slideTimer = setTimeout( 'runSlideShow()', slideShowSpeed );
}

function playSlideShow()
{
document.images.play.src = "http://www.instanthmi.com/slideshow/indexpage/images/button-pause.jpg";
stopSlideShow();
runSlideShow();
}

function stopSlideShow()
{
document.images.play.src = "http://www.instanthmi.com/slideshow/indexpage/images/button-play.jpg";
clearTimeout( slideTimer );
}

function pauseSlideShow()
{
clearTimeout( slideTimer );
}


function playPauseSlideShow() 
{
if( showRunning )
	{
	showRunning = false;
	document.images.play.src = "http://www.instanthmi.com/slideshow/indexpage/images/button-play.jpg";
	clearTimeout( slideTimer );
	}
else
	{
	showRunning = true;
	document.images.play.src = "http://www.instanthmi.com/slideshow/indexpage/images/button-pause.jpg";
	runSlideShow();
	}
}


function moveNext() 
{
curIdx = curIdx + 1;
dispIdx = curIdx;
if( dispIdx > (totalImages - 1) ) 
	{
	dispIdx = 0;
	}

if( document.all ) 
	{
	document.images.SlideShow.style.filter="blendTrans(duration=2)";
	document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
	document.images.SlideShow.filters.blendTrans.Apply();
	}

document.images.SlideShow.src = preLoad[dispIdx].src;
document.getElementById('msgtitle').innerHTML=Titles[dispIdx];
document.getElementById('msgtxt').innerHTML=Messages[dispIdx];
document.getElementById('imagelink').href = ImageLink[dispIdx];
if( document.all ) 
	{
	document.images.SlideShow.filters.blendTrans.Play();
	}
}

function movePrev() 
{
if( curIdx > 0 )
	{
	curIdx = curIdx - 1;
	dispIdx = curIdx;
	}
else
	{
	dispIdx = totalImages - 1;
	}

if( document.all ) 
	{
	document.images.SlideShow.style.filter="blendTrans(duration=2)";
	document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
	document.images.SlideShow.filters.blendTrans.Apply();
	}

document.images.SlideShow.src = preLoad[dispIdx].src;
document.getElementById('msgtitle').innerHTML=Titles[dispIdx];
document.getElementById('msgtxt').innerHTML=Messages[dispIdx];
document.getElementById('imagelink').href = ImageLink[dispIdx];
if( document.all ) 
	{
	document.images.SlideShow.filters.blendTrans.Play();
	}
}
