// JavaScript Document

header0 = document.getElementById("flashHeader");
header0Daro = document.getElementById("flashHeaderImg1");
headerE = document.getElementById("flashHeaderSubE");
headerD = document.getElementById("flashHeaderSubD");
headerA = document.getElementById("flashHeaderSubA");
headerH = document.getElementById("flashHeaderSubH");
headerC = document.getElementById("flashHeaderSubC");
headerCimg = document.getElementById("flashHeaderSubCimg");
history0 = document.getElementById("historyFocus0");

villaDisplay0 = document.getElementById("villaDisplay");

madamDisplay0 = document.getElementById("madamDisplay");
daroDisplay0 = document.getElementById("daroRight0");
	

/* navigation mouse capture */

nav1 = document.getElementById("nav1");
nav2 = document.getElementById("nav2");
nav3 = document.getElementById("nav3");     
nav4 = document.getElementById("nav4");
nav5 = document.getElementById("nav5");
nav6 = document.getElementById("nav6");
nav7 = document.getElementById("nav7");
nav8 = document.getElementById("nav8");
nav9 = document.getElementById("nav9");
nav10 = document.getElementById("nav10");

// this function will periodically change the header. this is for the introduction page

function headerChange()
{
	window.clearTimeout(timer0);
	if(count0 >= 4)
	{
		count0 = 1;
	}
	else
	{
	count0++;
	}
	   
	header0.style.background="url(./data/java"+count0+".jpg)";
	timer0 = window.setTimeout("headerChange();",6000);
}

function headerChange1()
{
	window.clearTimeout(timer0);
	if(count0Daro >= 4)
	{
		count0Daro = 0;
	}
	else
	{
	count0Daro++;
	}
	   
	header0Daro.src="/data/java-daro"+count0Daro+".jpg";
	timer0 = window.setTimeout("headerChange1();",5000);
}

function headerChangeEntertainment()
{
	window.clearTimeout(timer0E);
	if(count0E >= 4)
	{
		count0E = 1;
	}
	else
	{
	count0E++;
	}
	   
	headerE.style.background="url(./data/java-enter"+count0E+".jpg)";
	timer0E = window.setTimeout("headerChangeEntertainment();",6000);
}

function headerChangeDining()
{
	window.clearTimeout(timer0D);
	if(count0D >= 4)
	{
		count0D = 1;
	}
	else
	{
	count0D++;
	}
	   
	headerD.style.background="url(./data/java-dining"+count0D+".jpg)";
	timer0D = window.setTimeout("headerChangeDining();",6000);
}

function headerChangeAcc()
{
	window.clearTimeout(timer0A);
	if(count0A >= 4)
	{
		count0A = 1;
	}
	else
	{
	count0A++;
	}
	   
	headerA.style.background="url(./data/java-hotel"+count0A+".jpg)";
	timer0A = window.setTimeout("headerChangeAcc();",6000);
}


function headerChangeHist()
{
	window.clearTimeout(timer0H);
	if(count0H >= 4)
	{
		count0H = 1;
	}
	else
	{
	count0H++;
	}
	   
	headerH.style.background="url(./data/java-hist"+count0H+".jpg)";
	timer0H = window.setTimeout("headerChangeHist();",6000);
}

function headerChangeCities()
{
	window.clearTimeout(timer0C);
	if(count0C >= 4)
	{
		count0C = 1;
	}
	else
	{
	count0C++;
	}
	   
	headerC.style.background="url(./data/java-city"+count0C+".jpg)";
	timer0C = window.setTimeout("headerChangeCities();",6000);
}

function headerChangeCities1()
{
	window.clearTimeout(timer0Cimg);
	if(count0Cimg >= 3)
	{
		count0Cimg = 0;
	}
	else
	{
	count0Cimg++;
	}
	   
	headerCimg.src="./data/java-city"+count0Cimg+".jpg";
	timer0Cimg = window.setTimeout("headerChangeCities1();",6000);
}

function RightImg0()
{
	window.clearTimeout(timer1);
	if(count1 >= 4)
	{
		count1 = 1;
	}
	else
	{
	count1++;
	}
	   
	villaDisplay0.src="./data/villa"+count1+".jpg";
	timer1 = window.setTimeout("RightImg0();",8000);
}

function RightImg1()
{
	window.clearTimeout(timerR2);
	if(countR2 >= 3)
	{
		countR2 = 1;
	}
	else
	{
	countR2++;
	}
	   
	madamDisplay0.src="./data/right-madam"+countR2+".jpg";
	timerR2 = window.setTimeout("RightImg1();",8000);
}

function RightImg2()
{
	window.clearTimeout(timerR3);
	if(countR3 >= 3)
	{
		countR3 = 0;
	}
	else
	{
	countR3++;
	}
	   
	daroDisplay0.src="./data/d-right"+countR3+".jpg";
	timerR3 = window.setTimeout("RightImg2();",4600);
}


// this function will control the mouse over for the main navigation

function navigationMouseOver(target_id,count_id)
{
target_id.src="./data/nav"+count_id+"a.jpg";
}

function navigationMouseOut(target_id,count_id)
{
target_id.src="./data/nav"+count_id+".jpg";
}

advertBanner0 = document.getElementById("leftTowerB-phantom");
advertBanner1 = document.getElementById("leftTowerB-img");

function headerChangeHistory2()
{
	window.clearTimeout(timer1H);
	if(count1H >= 3)
	{
		count1H = 1;
	}
	else
	{
	count1H++;
	}
	   
	history0.style.background="url(./data/hist-display"+count1H+".jpg)";
	timer1H = window.setTimeout("headerChangeHistory2();",3000);
}


