availability_image2 = new Image;

function toggleDiv(div, state){
// this function will toggle the state of a div
// if state = 0, the div will be set to be invisible
// and also to not have display space allocated
// if state = 1, the dive will be visible
// and display space will be allocated
// this function calls functions located in menubar.js
toggleDisplay(div, state);
toggleBox(div, state);
return;
}

var mapLoaded = false;

function displayPhotoGallery(){
// this function will disable div's used by the
// photo gallery when javascript not available.
// it will enable div's used by the javascript gallery
toggleDiv("large_no_script",0);
toggleDiv("thumbContainer_no_script",0);
toggleDiv("large_ieMac",0);
// insert delay before showing large container to allow loading process to complete
window.setTimeout('toggleDiv("large",1)', 1000);
toggleDiv("thumbContainer",1);
toggleDiv("avail",0);
if(mapLoaded == "loaded"){toggleDiv("showMap",0);}
//document.availability_image.src = availability_image2.src;
return;
}

/* old availability function
function showAvailability(){
toggleDiv("avail",1);
toggleDiv("showMap",0);
document.availability_image.src = availability_image2.src;
hidePhotoGallery();
return;
}
*/

function showAvailability(){
// log action
linkstat(property_aoCalendar);
// open availability calendar window
window.open(property_aoCalendar,"_blank");
return;
}

function showGoogleMap(){
toggleDiv("showMap",1);
map.checkResize;
toggleDiv("avail",0);
hidePhotoGallery();
return;
}


function hidePhotoGallery(){
toggleDiv("large",0);
toggleDiv("thumbContainer",0);
return;
}