// ----------------------------------------
// Create Variables and Arrays
// ----------------------------------------

var CrossFadeDuration = 1;		// Set Crossfade - In Seconds
var showHot = false;       		// Prevent Accidental Code Calls

// Create Property Info Arrays
var image = new Array();		// Image
var price = new Array();		// Price
var bedBath = new Array();		// Bed / Bath
var area = new Array();			// Area
var island = new Array();		// Island
var caption = new Array(); 		// Caption


// ----------------------------------------
// Set Property Arrays
// ----------------------------------------

// Images
image[1]  = 'images/miniProperty_ocw3.jpg'; 			// Ocean Club West 3 Bedroom
image[2]  = 'images/miniProperty_nwp.jpg'; 				// North West Point
image[3]  = 'images/miniProperty_ocw1.jpg'; 			// Ocean Club West 1 Bedroom
image[4]  = 'images/miniProperty_alex.jpg'; 			// The Alexandra
image[5]  = 'images/miniProperty_richHill.jpg';			// Richmond Hill Land
image[6]  = 'images/miniProperty_bottleCreek.jpg';		// Bottle Creek
image[7]  = 'images/miniProperty_richCom.jpg';			// Richmond Commons
image[8]  = 'images/miniProperty_longBay.jpg';			// Long Bay
image[9]  = 'images/miniProperty_jubaSalina.jpg';		// Juba Salina
image[10]  = 'images/miniProperty_villaRen.jpg'; 		// Villa Rennisance
image[11]  = 'images/miniProperty_canalFront.jpg';		// Canal Front Open Concept

image[12]  = 'images/miniProperty_villaBalinese.jpg';	// Villa Balinese
image[13]  = 'images/miniProperty_casaGrande.jpg';		// Casa Grande

// Prices
price[1]  = "$1,050,000";
price[2]  = "$485,000";
price[3]  = "$275,000";
price[4]  = "$55,000";
price[5]  = "$395,000";
price[6]  = "$195,000";
price[7]  = "$175,000";
price[8]  = "SOLD";
price[9]  = "$480,000";
price[10]  = "SOLD";
price[11]  = "SOLD";

price[12]  = "$4,900,000";
price[13]  = "$3,950,000";

// Beds / Baths
bedBath[1]  = "3 / 3.5";
bedBath[2]  = "2 / 2";
bedBath[3]  = "Studio / 1";
bedBath[4]  = "2 / 2";
bedBath[5]  = "Land Parcel";
bedBath[6]  = "Land Parcel";
bedBath[7]  = "Land Parcel";
bedBath[8]  = "Land Parcel";
bedBath[9]  = "2 / 2";
bedBath[10]  = "2 / 2.5";
bedBath[11]  = "3 / 2";

bedBath[12]  = "3 / 3";
bedBath[13]  = "3 / 3.5";

// Areas
area[1]  = "Grace Bay Beach";
area[2]  = "North West Point";
area[3]  = "Grace Bay Beach";
area[4]  = "Grace Bay Beach";
area[5]  = "Richmond Hills North";
area[6]  = "Bottle Creek";
area[7]  = "Richmond Hills";
area[8]  = "Long Bay";
area[9]  = "Juba Salina";
area[10]  = "Grace Bay Beach";
area[11]  = "Discovery Bay";

area[12]  = "Turtle Tail";
area[13]  = "Grace Bay Beach";

// Islands
island[1]  = "Providenciales";
island[2]  = "Providenciales";
island[3]  = "Providenciales";
island[4]  = "Providenciales";
island[5]  = "Providenciales";
island[6]  = "North Caicos";
island[7]  = "Providenciales";
island[8]  = "Providenciales";
island[9]  = "Providenciales";
island[10]  = "Providenciales";
island[11]  = "Providenciales";

island[12]  = "Providenciales";
island[13]  = "Providenciales";

// Link
caption[1]  = "[&nbsp;<a href='turks-caicos-ocean-club-west-3.php'>View Current Property</a>&nbsp;]";
caption[2]  = "[&nbsp;<a href='turks-caicos-real-estate-north.php'>View Current Property</a>&nbsp;]";
caption[3]  = "[&nbsp;<a href='turks-caicos-ocean-club-west-1.php'>View Current Property</a>&nbsp;]";
caption[4]  = "[&nbsp;<a href='turks-caicos-time-share-alexandra.php'>View Current Property</a>&nbsp;]";
caption[5]  = "[&nbsp;<a href='turks-caicos-land-richmond-hills.php'>View Current Property</a>&nbsp;]";
caption[6]  = "[&nbsp;<a href='turks-caicos-land-bottle-creek.php'>View Current Property</a>&nbsp;]";
caption[7]  = "[&nbsp;<a href='turks-caicos-land-richmond-com.php'>View Current Property</a>&nbsp;]";
caption[8]  = "[&nbsp;<a href='turks-caicos-land-long-bay.php'>View Current Property</a>&nbsp;]";
caption[9]  = "[&nbsp;<a href='turks-caicos-real-estate-juba.php'>View Current Property</a>&nbsp;]";
caption[10]  = "[&nbsp;<a href='turks-caicos-real-estate-villa.php'>View Current Property</a>&nbsp;]";
caption[11]  = "[&nbsp;<a href='turks-caicos-canal-front.php'>View Current Property</a>&nbsp;]";

caption[12]  = "[&nbsp;<a href='turks-caicos-real-estate-balinese.php'>View Current Property</a>&nbsp;]";
caption[13]  = "[&nbsp;<a href='turks-caicos-casa-grande.php'>View Current Property</a>&nbsp;]";


// ----------------------------------------
// Property Navigation Functions
// ----------------------------------------

var tss;
var iss;
var jss = 0;
var pss = image.length-1;

// Preload Images
var preLoad = new Array();

for (iss = 1; iss < pss+1; iss++)
{
	preLoad[iss] = new Image();
	preLoad[iss].src = image[iss];
}

// Handle Property Navigation
function control(how)
{
	if (showHot)
	{
		if (how=="H") jss = 1;
		if (how=="F") jss = jss + 1;
		if (how=="B") jss = jss - 1;
		if (jss > (pss)) jss=1;
		if (jss < 1) jss = pss;
		
		if (document.all)
		{
			document.images.PictureBox.style.filter="blendTrans(duration=2)";
			document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
			document.images.PictureBox.filters.blendTrans.Apply();
		}
			
		document.images.PictureBox.src = preLoad[jss].src;
		
		if (document.getElementById) document.getElementById("priceBox").innerHTML= price[jss];
		if (document.getElementById) document.getElementById("bedBathBox").innerHTML= bedBath[jss];
		if (document.getElementById) document.getElementById("areaBox").innerHTML= area[jss];
		if (document.getElementById) document.getElementById("islandBox").innerHTML= island[jss];
		if (document.getElementById) document.getElementById("captionBox").innerHTML= caption[jss];
	
		if (document.all) document.images.PictureBox.filters.blendTrans.Play();
	}
}