function getpage(category) {
 switch(category) {
 case 'cottages':
   document.getElementById('iframe1').src='category/accommodations/cottages/cottages.html';
   break;
 default:
   document.getElementById('iframe1').src='category/'+category+'/'+category+'.html';
 }
}

function calcHeight() {
 window.scroll(0,0);
 if (location.href.indexOf("q=cache:") > -1) { return; }
  document.getElementById('iframe1').style.height= '100%'; //reset size
	if (document.all)  {
	    var newheight = document.getElementById('iframe1').contentWindow.document.body.scrollHeight; 
	} else {
	    var newheight = document.getElementById('iframe1').contentDocument.height;
	}
	  document.getElementById('iframe1').style.height= newheight+'px';
}

function breakout() {
   var url=window.location.search.substring(1);
   if (url) {
      if (location.href.indexOf("q=cache:") > -1) {
         document.getElementById('iframe1').src="http://hotelbluemountain.com/category/hotel/hotel.html";
      } else {
        document.getElementById('iframe1').src=url;
      }
}}

function getWeather() {
  document.getElementById('weatherframe').src="http://btn.weather.ca/weatherbuttons/template8.php?placeCode=CAON0158&category0=Cities&containerWidth=150&btnNo=&backgroundColor=blue&multipleCity=&citySearch=0&celsiusF=C"
}

function onLineAgent() {
  window.open('http://messenger.providesupport.com/messenger/bluemountainchalets.html','chat','menubar=0,location=0,scrollbars=auto,resizable=1,status=0,width=600,height=550');
}

function popupWin() {
url="http://hotelparrysound.com/gallery/gallery.asp"
W=460; H=380;
L = (screen.width) ? (screen.width-W)/2 : 0;
T = (screen.height) ? (screen.height-H)/2 : 0;
ops="height="+H+",width="+W+",top="+T+",left="+L+",location=no,status=no,menubar=no,toolbar=no,resizable=no,scrollbars=no,dependent=yes"
newWin=window.open(url,null,ops);
newWin.focus();
}
