var Estimation={};
var imageCnt=0;
var randomStore=0
Estimation.init=function()
{
	var shopPath=0;
	randomStore=Math.floor(Math.random()*Estimation.shopData.length);
	document.body.style.backgroundImage="url('images/scene1_background.png')";
	Estimation.setCustImg();
	setTimeout(function()
	{
		document.getElementById('levelDiv').style.display="none";		
		shopPath=Estimation.shopData[randomStore].filePath;
		window.open(shopPath, "_self");
	},5000);
}

Estimation.setCustImg=function()
{ 
	setTimeout(function()
	{
		imageCnt++;
		if(imageCnt<=3)
		{
			Estimation.setCustImg();	
			document.getElementById('cust').src="images/customer"+imageCnt+".png";
		}
		else
			Estimation.setDiceImg();
	},500);
}

Estimation.setDiceImg=function()
{
	document.getElementById('responseBoxDiv').style.display="block";
	document.getElementById('custDiv').style.display="none";
	document.getElementById('diceImage').src="images/dice.gif";
	setTimeout(function()
	{
		document.getElementById('diceImage').src="images/"+Estimation.shopData[randomStore].diceImage;
	},1500);
}
