/******************************************/
/* University of Liverpool 2004           */
/* ?Loines Furnival Ltd 2004             */
/******************************************/

/*

++      Summary of functions employed    ++

showsizer() - allows all non netscape browsers to display the text links to alter the pages style sheets

setActiveStyle Sheet()  & getActiveStyleSheet() -  gets/sets the style sheet that is currently being used to render the page

createCookie(), readCookie() & loadCookie() - stores the clients prefered style to render the pages - this is set to a default of 1yr



*/

function showSizer(){
if (navigator.appName.indexOf("Netscape") == -1){
	document.write("<div id='stylechange' align=right class=menu><a href='#' onclick=\"setActiveStyleSheet('style1'); return false; \"><font class=menu>¤p</font></a>");
	document.write("&nbsp;&nbsp;<a href='#' onclick=\"setActiveStyleSheet('style2'); return false;\" ><font class=menu>¤¤</font></a>");
	document.write("&nbsp;&nbsp;<a href='#' onclick=\"setActiveStyleSheet('style3'); return false;\" ><font class=menu>¤j</font></a>&nbsp;&nbsp;</div>");
}

}

function setActiveStyleSheet(title) {	
	if (navigator.appName.indexOf("Netscape") == -1){
		  var i, a, main;
			  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
					if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
					  a.disabled = true;
						  if(a.getAttribute("title") == title) a.disabled = false;
					
						}
				  }
			}
}

function getActiveStyleSheet() {
	if (navigator.appName.indexOf("Netscape") == -1){
		  var i, a;
			  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
					if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
				  }
			  return null;
	}
}

function getPreferredStyleSheet() {
	if (navigator.appName.indexOf("Netscape") == -1){
		  var i, a;
			  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
					if(a.getAttribute("rel").indexOf("style") != -1
					   && a.getAttribute("rel").indexOf("alt") == -1
					   && a.getAttribute("title")
					   ) return a.getAttribute("title");
				  }
			  return null;
	}
}

function createCookie(name,value,days) {
	if (navigator.appName.indexOf("Netscape") == -1){
		  if (days) {
			var date = new Date();
			date.setTime(date.getTime()+(days*24*60*60*1000));
			var expires = "; expires="+date.toGMTString();
		  }
		  else expires = "";
		 		 document.cookie = name+"="+value+expires+"; path=/";
			}
}

function readCookie(name) {
	if (navigator.appName.indexOf("Netscape") == -1){
		  var nameEQ = name + "=";
		  var ca = document.cookie.split(';');
		  for(var i=0;i < ca.length;i++) {
			var c = ca[i];
			while (c.charAt(0)==' ') c = c.substring(1,c.length);
			if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
		  }
		  return null;
			}
}

function loadCookie(e) {
	if (navigator.appName.indexOf("Netscape") == -1){
		  var cookie = readCookie("style");
		  var title = cookie ? cookie : getPreferredStyleSheet();
		  setActiveStyleSheet(title);
	}
}
window.onunload = function(e) {
	var title = getActiveStyleSheet();
  createCookie("style", title, 365);
}



/*==================================last modified date=================================*/

<!-- hide script
function date_ddmmmyy(date)
{
  var d = date.getDate();
  var m = date.getMonth() + 1;
  var y = date.getYear();

  // handle different year values 
  // returned by IE and NS in 
  // the year 2000.
  if(y >= 2000)
  {
    y -= 2000;
  }
  if(y >= 100)
  {
    y -= 100;
  }

  // could use splitString() here 
  // but the following method is 
  // more compatible
  var mmm = 
    ( 1==m)?'Jan':( 2==m)?'Feb':(3==m)?'Mar':
    ( 4==m)?'Apr':( 5==m)?'May':(6==m)?'Jun':
    ( 7==m)?'Jul':( 8==m)?'Aug':(9==m)?'Sep':
    (10==m)?'Oct':(11==m)?'Nov':'Dec';

  return "" +
    (d<10?"0"+d:d) + " " +
    mmm + " " +
    (y<10?"0"+y:y);
}


//
// get last modified date of the 
// current document.
//
function date_lastmodified()
{
  var lmd = document.lastModified;
  var s   = "Unknown";
  var d1;

  // check if we have a valid date
  // before proceeding
  if(0 != (d1=Date.parse(lmd)))
  {
    s = "" + date_ddmmmyy(new Date(d1));
  }

document.write('<span class="lastmodified"> Last modified: ' +s+'</span>');
}


// end Hide-->



 



