var intCounter = -1; //changed from 0 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.reload("http://www.roadpost.com/Iridium-Satellite-Phone-Rentals-P704C279.aspx");
		window.parent.location=("../Iridium-Extreme-P802C444.aspx");
	}
	else if (intCounter == 2)
	{ 
		window.parent.location=("../Iridium-Satellite-Phone-Rentals-P704C279.aspx");
		//window.parent.location=("http://www.roadpost.com/Iridium-9555-Satellite-Phone-Complete-Kit-P710C341.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();
}


