// General javascript utilities


function roll(imageName, imageSrc){
  document[imageName].src=imageSrc;
}

function pop(url, name){
  newWindow = window.open(url, name);
  if (window.focus) {newWindow.focus()};
}

function addSiteToFavourites(theName, theUrl){
  if (window.external && (!document.createTextNode || (typeof(window.external.AddFavorite)=='unknown'))){
    window.external.AddFavorite(theUrl, theName);
  } else if (window.sidebar) {
    window.sidebar.addPanel(theName, theUrl,"");
  }
}

function addPageToFavourites(){
	var theURL = document.URL;
	var theName = document.title;
	if (window.external && (!document.createTextNode || (typeof(window.external.AddFavorite)=='unknown'))){
    window.external.AddFavorite(theURL, theName);
  } else if (window.sidebar) {
    window.sidebar.addPanel(theName, theURL,"");
  }
}


function setTextSize(newSize){
	document.body.style.fontSize = newSize;
	return;
}