function addBookmark(title,url) {
	if (window.sidebar) { 
		window.sidebar.addPanel(title, url,""); 
	} else if( document.all ) {
		window.external.AddFavorite( url, title);
	} else if( window.opera && window.print ) {
		return true;
	}
}


// -- lastModified ------------------------------------------------------------
// Displays when the page was last modified.

function lastModified()
{
	datUpdated = new Date(document.lastModified) ;
	datMonth = datUpdated.getMonth() + 1 ;
	datDate = datUpdated.getDate() ;
	datYear = datUpdated.getYear() ;
	if (navigator.appName != "Microsoft Internet Explorer") datYear = datYear + 1900; 
	document.write( datDate + "/" + datMonth + "/" + datYear) ;
}


// -- moretext ----------------------------------------------------------------
// Put in a date (when) and a string (text) of information
// The information is no longer displayed after the date shown.

function moreText(anchor,text)
{
	if (document.URL.search(anchor) != -1)
	{
		document.write(text);
	}
}


// -- expireText --------------------------------------------------------------
// Put in a date (when) and a string (text).
// The information (text) is no longer displayed after the date (when) shown.

function expireText(when,text) {

date = new Date(when)
now  = new Date()

if (date.getTime() < now.getTime())
	{
	}
	else
	{
	document.write(text)
	}
}


// -- expireImage -------------------------------------------------------------
// Put in a date (when) and a string (imagePath) which is the path and name of the image
// The image is no longer displayed after the (when) date.

function expireImage(when, imagePath) {

date = new Date(when)
now  = new Date()

if (date.getTime() < now.getTime())
	{
	}
	else
	{
	document.write("<img src=\"" + imagePath + "\">")
	}
}


// -- swapimage ---------------------------------------------------------------
// Swaps the images on the banner 

var currentdate = 0
var core = 0

function StringArray(n) {
  this.length = n;
  for (var i =1; i <= n; i++) {
    this[i] = ' '
  }
}

image = new StringArray(10)
image[0] = 'images/strip5.jpg'
image[1] = 'images/strip6.jpg'
image[2] = 'images/strip8.jpg'
image[3] = 'images/strip12.jpg'
image[4] = 'images/strip7.jpg'
image[5] = 'images/strip9.jpg'
image[6] = 'images/strip9.jpg'
image[7] = 'images/strip12.jpg'
image[8] = 'images/strip8.jpg'
image[9] = 'images/strip10.jpg'

var ran = 60/image.length

function swapimage(path) {
  currentdate = new Date()
  core = currentdate.getSeconds();
  core = Math.floor(core/ran);
    return(path+image[core])
}    


// -- imageWidth -------------------------------------------------------------

function imageWidth() {
	if (screen.width <= 800) {
		return "width='560px' height='84px' ";
	} else {
		return "width='720px' height='105px'";
	}
}


// -- printFunction -----------------------------------------------------------

function printFunction(pathToGraphic) {
	document.write('<a href=\"' + pathToGraphic + 'print.html' + window.location.hash + '\">');
	//document.write('<font color=\"#aaaaaa\"><img height=\"15\" width=\"15\" src=\"../graphics/bug_print.gif" border=\"0\">');
	document.write('<font color=\"#aaaaaa\"><img height=\"15\" width=\"15\" src=\"' + pathToGraphic + 'graphics/bug_print.gif\" border=\"0\">');
	document.write('Print Information</font><a/>');
}


// -- hideEmail ---------------------------------------------------------------
// Use : <script language="javascript" type="text/javascript">hideEmail("InterMARGINS","dxg","soc.soton.ac.uk")</script>
// Some people do not like their email to be put on the web.
// This function makes the information safe from robots and is therefore 'spam safe'.

function hideEmail(location,name,address) {
 locationString =  name + '@' + address;
 document.write('<a href=mai' + 'lto:' + locationString + '>' + location + '</a> <small><i>(spam safe)</i></small>');
}


// -- hideEmail1 ---------------------------------------------------------------
// No spam safe message.

function hideEmail1(location,name,address) {
 locationString =  name + '@' + address;
 document.write('<a href=mai' + 'lto:' + locationString + '>' + location + '</a>');
}
// -- Mouseover Control ---------------------------------------------------------------
function swImg(iName,str) {
	document.images[iName].src = str;
}