
function getWindowHeight(){var windowHeight=0;if(typeof(window.innerHeight)=='number'){windowHeight=window.innerHeight;}
else{if(document.documentElement&&document.documentElement.clientHeight){windowHeight=document.documentElement.clientHeight;}
else{if(document.body&&document.body.clientHeight){windowHeight=document.body.clientHeight;}}}
return windowHeight;}
function setPhotoTourHeight(){if(document.getElementById){var windowHeight=getWindowHeight();if(windowHeight>0){var photoTourMainElement=document.getElementById('photo-details');photoTourMainElement.style.height=windowHeight+'px';}}}
function setCloseWindowHeight(){if(document.getElementById){var windowHeight=getWindowHeight();if(windowHeight>0){var closeWindowElement=document.getElementById('closeWindow');var closeWindowHeight=closeWindowElement.offsetHeight;closeWindowElement.style.top=(windowHeight-closeWindowHeight-25)+'px';}}}
function fixMacIE(classname){var divs=document.getElementsByTagName("DIV");for(var d=0;d<divs.length;d++){if(divs[d].className.indexOf(classname)==0){divs[d].innerHTML+="<div class='mac-clearfix'> </div>";}}}
function init(){if(navigator.appVersion.indexOf('Mac')!=-1&&document.all){fixMacIE("clearfix");}}
function viewAllPhotos(url)
{if(window.opener&&!window.opener.closed)
{window.opener.location.href=url;}
else
window.open(url);window.close();}
function setFocusOnPage(){var currentPage;var currentPage=window.location.href;var match=currentPage.match("hotels/photo-tours.mi?");if(match!=null){window.focus();}}
addLoadEvent(setPhotoTourHeight);addLoadEvent(setFocusOnPage);window.onresize=function(){setPhotoTourHeight();}
