function openpopupwindow(page, winName, ht, wd, tool, scroll){
	OpenWindow=window.open(page, winName, "height="+ht+", width="+wd+", toolbar="+tool+", scrollbars="+scroll+", menubar=no");
}
function openPicWindow(page, ht, wd){ 
	OpenWindow=window.open(page, 'bigPic', "height="+ht+", width="+wd+", toolbar=no, scrollbars=no, menubar=no");
}
function openPrintWindow(page){
	OpenWindow=window.open(page, "printWin", "height=500, width=500, toolbars=no, scrollbars=yes, menubar=no");
}
function openTellFriend(){
	var pgStr = window.location.protocol+"//"+window.location.host+window.location.pathname;
	OpenWindow=window.open('mailto:?subject=I%27ve found a UK diet site&body=Hi, I thought you might be interested in this page on a new UK site, that also has a huge UK calorie database. Take a look: '+pgStr, 'tellWin', "height=300, width=500, toolbar=yes, scrollbars=yes, menubar=yes");
}
function openhelpwindow(URL){
OpenWindow3=window.open(URL, "help", "height=350, width=600, toolbar=no, scrollbars=yes, menubar=no");
OpenWindow3.focus();
}
function blanks() {
  if (!document.getElementsByTagName) return false;
  var links = document.getElementsByTagName("a");
  for (var i=0; i<links.length; i++) {
    if (links[i].className=="blank") {
      links[i].onclick = function() {
        window.open(this.href);
        return false;
      }
    }
  }
}
window.onload = blanks;

function swapPix() {
  document.getElementById("pic"+pic).style.display = 'none';
  pic++;
  if (pic==pics) pic = 0;
  document.getElementById("pic"+pic).style.display = 'block';
}
