var intSectionCount;


// SHOW MAIN PHOTO
function ShowPhoto(fSRC, fCaption)
{

document.getElementById("img00").src = fSRC;
document.getElementById("img00").alt = fCaption;
}


function BorderChange(fID, fBorder)
{
document.getElementById(fID).style.border = fBorder;
}


// SHOW/HIDE ACCOMMODATION SECTION
function showSection(fID, fCount)
{

var State = document.getElementById("accommodation" + fID).style.display;
if (State == "none")
	{
	hideSections(fCount);
	document.getElementById("accommodation" + fID).style.display = "block";
	document.getElementById("expandicon" + fID).src = "images/header/iconminus.gif";
	document.getElementById("expandicon" + fID).alt = "Collapse section";
	}
	else
	{
	document.getElementById("accommodation" + fID).style.display = "none";
	document.getElementById("expandicon" + fID).src = "images/header/iconplus.gif";
	document.getElementById("expandicon" + fID).alt = "Expand section";
	}
}


// HIDE ALL ACCOMMODATION SECTIONS
function hideSections(fCount)
{


for (var x = 1; x < fCount+1; x++) {
	document.getElementById("accommodation" + x).style.display = "none";
	document.getElementById("expandicon" + x).src = "images/header/iconplus.gif";
	document.getElementById("expandicon" + x).alt = "Expand section";
	}
}

// SHOW PREVIEW IMAGE & DETAILS
function PreviewImageShow(fSRC, fTitle, fPageSource)
{
document.getElementById("imgPreview").src = fSRC; 
document.getElementById("divPreview").style.visibility = "visible"; 
document.getElementById("txtPreview").innerHTML = fTitle;
document.getElementById("txtPreviewType").innerHTML = fPageSource;
}


// HIDE PREVIEW IMAGE
function PreviewImageHide()
{
document.getElementById("divPreview").style.visibility = "hidden"; 
}


function PutIconTip(fTip)
{
document.getElementById("divIconTip").innerHTML = fTip;
}


function PreviewImageLink(fObj)
{
var txtPageSource = document.getElementById("txtPreviewType").innerHTML;
window.location = "http://www.mjmestates.co.uk/previewlink.asp?page=" + txtPageSource + "&src=" + fObj;

}





