//Break frames and iframe capture (replace method fixes back button)
if (top!= self) top.location.replace(self.location.href);

// Home page: No sidebar. Right space with slideshow
// bottom space with logo banner
function page_home() { 
  if (document.getElementById) { // DOM3 = IE5, NS6 
    displayById('sidebarL', 'none');
    displayById('sidebarR', 'block');
    document.getElementById('sidebarR').style.width   = '40%';
  } 
}

// For extra pages the sidebar remains hidden
// we expand the margins
function page_extra() { 
  if (document.getElementById) { // DOM3 = IE5, NS6 
    displayById('sidebarL', 'none');
    displayById('sidebarR', 'none');
  } 
}

// For a news page, turn the Special box back on.
function page_news() { 
  if (document.getElementById) { // DOM3 = IE5, NS6 
    displayById('sidebarL', 'block');
    displayById('sidebarR', 'none');
    displayById('product1', 'none');
    displayById('special1', 'block');
  } 
}

// For a shop page, turn the Product box back on.
function page_shop() { 
  if (document.getElementById) { // DOM3 = IE5, NS6 
    displayById('sidebarL', 'block');
    displayById('sidebarR', 'none');
    displayById('product1', 'block');
    displayById('special1', 'none');
  } 
}

// Bare page: No sidebar, no margins, no padding
// typically used for pure <html> or <iframe>
function page_bare() { 
  if (document.getElementById) { // DOM3 = IE5, NS6 
    displayById('sidebarL', 'none');
    displayById('sidebarR', 'none');
    document.getElementById('Content').style.margin  = '0px';
    document.getElementById('Content').style.padding = '0px';
  } 
}

// subfunction to make only modify the object style if exists
// make above code more readable
function displayById(myId, display) { 
  if (document.getElementById(myId)) { document.getElementById(myId).style.display = display; }
}
