/* Begin optional link open window function */ function optLinkOpenWindow(url) { var myWin = window.open(url,'viator','scrollbars=yes,width=500,height=500,resizable=yes,status=yes,toolbar=yes,location=yes');
myWin.focus();
}
//



/* Begin printer friendly function */

var getMode = location.search.substring(1).split('#')[0];
if(getMode == 'print'){
	document.getElementById('adv_trips_css').media='none';
	document.getElementById('adv_trips_print_css').media='screen, print'; }






/* Begin toggle function */
function toggleMe(a, b){
  var e=document.getElementById(a);
  var f=document.getElementById(b);
  if(!e)return true;
  if(e.style.display=="none"){
    e.style.display="block"
  } else {
    e.style.display="none"
  }
  if(!f)return true;
  if(f.style.display=="none"){
    f.style.display="block"
  } else {
    f.style.display="none"
  }
  return true;
}





/* Begin switch filter view */
function switchFilter(showSection, hideSection1, hideSection2, hideSection3, hideSection4)	{
	document.getElementById('displayedSection').style.visibility='hidden';
	document.getElementById(showSection).style.display='block';
	document.getElementById(showSection).id='displayedSection';
	document.getElementById('current').id='';
	}
/* End switch filter view */






/* Begin tabBar function */
// Set global vars
	var Handle;
	var tabArray;
	var mainContentHandle;
	var mainContentArray;

// Get the Hash String from the URL so we can show the right content if one is there
	var showContent = window.location.hash.substring(1);

// Formatting function to be called when the body loads.
	function loadFormat(){

		// If showContent var is empty, or isn't valid for this page, we set it to be the first tab option
		if(showContent.length < 1 || document.getElementById('content' + showContent)==null || document.getElementById('tab' + showContent)==null){
			showContent = 'sec1';
		}
		
		setContent();
	}

	function setContent(){
		document.getElementById('content' + showContent).style.display = 'block';
		document.getElementById('tab' + showContent).className = 'currentTab';
		document.getElementById('sideContent').style.display = sideDisplay[showContent];
				
	}

	function switchContent(selectedContent){
		showContent = selectedContent;

		// Create an array of the li elements in the ul element with id "tabs", so we can clear the className before calling the setContent function.
		tabHandle = document.getElementById('tabBar');
		tabArray = tabHandle.getElementsByTagName('li');

		// Clear the tabs classNames
		for (i=0; i < tabArray.length; i++) {
			tabArray[i].className = 'tabs';
		}

		// Create an array of the div elements in the div element with id "mainContent", so we can set the display to 'none' before calling the setContent function.
		mainContentHandle = document.getElementById('mainContent');
		mainContentArray = mainContentHandle.getElementsByTagName('div');

		// Set the mainContent display to 'none'
		for (i=0; i < mainContentArray.length; i++) {
			if(mainContentArray[i].className == 'things'){
				mainContentArray[i].style.display = 'none';
			}
		}

		setContent();
	}
