// script to unfix the menu if the inner height
// of the browser is not high enough

// freely distribute or modify

d = document;

function unFixNav(){
	// hard coded IDs for this site
  n = d.getElementById("menu");
  n.style.position = "absolute";
  n = d.getElementById("logo");
  n.style.position = "absolute";
  d.body.style.backgroundAttachment = "scroll";
}

// NB: we don't attempt to refix the elements because
// some browsers really object to position:fixed
// the fixed style is hidden from those browsers in the CSS
// We assume that if the user resizes their browser they
// will move around the site and so re-fix the menus via CSS
function heightChange(){
	// check to see if the height of the viewport is too small
	
    if( d.getElementById )
		if( window.innerHeight <= 380 )
			unFixNav();
 }
 
onresize = heightChange;
onload = heightChange;