function getWindowHeight(){
  var ih=1000;
  if(document.documentElement.clientHeight)ih=document.documentElement.clientHeight;
  if(ih==1000){
    if(window.innerHeight)ih=window.innerHeight;
  }
  if(ih==1000){
    if(document.body.clientHeight)ih=document.body.clientHeight;
  }
  return ih;
}


// pagefoot adds more space undef the heading if there is spare space, and
// alters the position of the Silverfen footer so it is always at the bottom of the screen.

function pagefoot(){
  var h1h=document.getElementById("h1").offsetHeight;
  var mh=document.getElementById("menu").offsetHeight;
  var mch=document.getElementById("maincontent").offsetHeight;
  var fh=document.getElementById("footer").offsetHeight;

  var mainh=mch;
  if(mh>mainh)mainh=mh;

  var sp=getWindowHeight() - h1h - mainh-fh;

  if(sp>40){
    var h1bpad=Math.round(sp*0.3);
    if(h1bpad>20)h1bpad=20;
    document.getElementById("h1").style.paddingBottom=h1bpad + "px";
    var foot=document.getElementById("footer").style;
    foot.position="absolute";
    foot.bottom="10px";
    foot.right="10px";
  }
}


var names=new Array();


names["colin"]="colin";
names["distributor"]="distributor";
names["publisher"]="publisher";

var i;
for(i in names){
  names[i]+="@d";
  names[i]+="idb";
  names[i]+="ach.";
  names[i]+="co.";
  names[i]+="uk";
}


function blat(name){
  document.write("<A href='mailto:" + names[name] +"'>" + names[name] + "</a>");
}

