var intCounter = -1; //changed from 1 to -1 in order for the slideshow to start automatically upon page load.
var Timer;
var bolReset = 0;
slideshow();

function slideshow()
{
	if (bolReset == 0)	
	{
		if (intCounter == 4) //Change this value according to # of banner images
		{
			intCounter = 1;
		}
		else 
		{
			intCounter += 1;
		}
	}
	bolReset = 0;
	document.getElementById('divSlide').style.backgroundImage = 'url(img'+intCounter+'.jpg)';
	Timer = setTimeout('slideshow()',5000);
}

function slideImagelink ()
{
	if (intCounter == 1)
	{ 
		// does not work on FF: window.parent.location.replace("http://www.roadpost.ca/Iridium-Satellite-Phone-Rentals-P561C193.aspx");
		window.parent.location=("../Iridium-Extreme-P663C341.aspx");
	}
	else if (intCounter == 2)
	{ 
		window.parent.location=("../Iridium-Satellite-Phone-Rentals-P561C193.aspx");
		//window.parent.location=("http://www.roadpost.ca/Iridium-9555-Satellite-Phone-Complete-Kit-P565C243.aspx");
	}
	

	else if (intCounter == 3)
	{ 
		window.parent.location=("../geopro.aspx");
	}
	
	else if (intCounter == 4)
	{ 
		window.parent.location=("../isatphone_pro.aspx");
	}
	
/* IF MORE BUTTONS ARE ADDED CHANGE CODE BELOW AS NEEDED	
	else if (intCounter == 4)
	{ 
		window.parent.location=("http://www.roadpost.com");
	}
	else if (intCounter == 5)
	{ 
		window.parent.location=("http://www.roadpost.com");
	}
*/
}

function changeimage (intImg)
{
	clearTimeout(Timer);
	intCounter = intImg;
	bolReset = 1;
	slideshow();
}

