var currentPanel;
//?id=1
var gobeach = 1; beachid = location.href.substring(location.href.indexOf('?id='));
if ( beachid.substring(0,4) == '?id=' ){
 if ( beachid.length == 5 ){ gobeach = beachid.substring(4,5);}
}
if ( gobeach <= 0 ) gobeach = 1; if ( gobeach >= 6 ) gobeach = 1;

function showPanel(panelNum) {
   //hide visible panel, show selected panel, 
   //set tab
   if ( panelNum == 0 ) panelNum = gobeach;

   if (currentPanel != null) {
      hidePanel();
   }
   document.getElementById 
      ('panel'+panelNum).style.visibility = 'visible';
   document.getElementById 
      ('panel'+panelNum).style.display = 'block';
      currentPanel = panelNum;
      setState(panelNum);
}
   
function hidePanel() {
   //hide visible panel, unhighlight tab
   document.getElementById
     ('panel'+currentPanel).style.visibility = 'hidden';
   document.getElementById
     ('panel'+currentPanel).style.display = 'none';
   document.getElementById
     ('tab'+currentPanel).style.backgroundColor = '#22201d';
   document.getElementById
     ('tab'+currentPanel).style.color = '#75997b';
   document.getElementById
     ('tab'+currentPanel).style.fontWeight = 'bold';
}
   
function setState(tabNum) {
   if (tabNum==currentPanel) {
      document.getElementById
        ('tab'+tabNum).style.backgroundColor = '#b2cbcc';
      document.getElementById
        ('tab'+tabNum).style.color = '#75997b';
      document.getElementById
        ('tab'+tabNum).style.fontWeight = 'bold';
   }
   else {
      document.getElementById
        ('tab'+tabNum).style.backgroundColor = '#22201d';
      document.getElementById
        ('tab'+tabNum).style.color = '#75997b';
      document.getElementById
        ('tab'+tabNum).style.fontWeight = 'bold';
   }
}
   
function hover(tab) { 
        tab.style.fontWeight = 'bold'; 
      document.getElementById
        tab.style.backgroundColor = '#d3ecf1';
}


var xcurrentPanel;
//?id=1
var xgobeach = 1; xbeachid = location.href.substring(location.href.indexOf('?id='));
if ( xbeachid.substring(0,4) == '?id=' ){
 if ( xbeachid.length == 5 ){ xgobeach = xbeachid.substring(4,5);}
 if ( xbeachid.length == 6 ){ xgobeach = xbeachid.substring(4,6);}
}
if ( xgobeach <= 0 ) xgobeach = 1; if ( xgobeach >= 17 ) xgobeach = 1;

function xshowPanel(xpanelNum) {
   //hide visible fanel, show selected fanel, 
   //set xtab
   if ( xpanelNum == 0 ) xpanelNum = xgobeach;
   if (xcurrentPanel != null) {
      xhidePanel();
   }
   document.getElementById 
      ('fanel'+xpanelNum).style.visibility = 'visible';
   document.getElementById 
      ('fanel'+xpanelNum).style.display = 'block';
      xcurrentPanel = xpanelNum;
}
function xhidePanel() {
   //hide visible fanel
   document.getElementById
     ('fanel'+xcurrentPanel).style.visibility = 'hidden';
   document.getElementById
     ('fanel'+xcurrentPanel).style.display = 'none';
}
   

