
 <!-- 
/*********************************************************/
/*                                                       */
/*              Albedo LayerMenu v1.2                    */
/*              Author: Fin Fahey                        */
/*              Company: Albedo Systems                  */
/*              Email: admin@albedo.co.uk                */
/*              Web: www.albedo.co.uk                    */
/*              Last modified: 11 March 2005             */
/*              Copyright: Albedo Systems 2005           */
/*                                                       */
/*              If you like this script,                 */
/*              please free to use,                      */		
/*              modify and/or redistribute               */
/*		        it for your own purposes.                */
/*              We only ask that you retain              */
/*              the credit lines above, please.          */
/*                                                       */
/*              Unfortunately, we                        */
/*              cannot guarantee any                     */
/*              technical support, but do                */
/*              feel free to notify us of any            */
/*              bugs or to suggest enhancements.         */
/*                                                       */
/* 				This script has been tested and works	 */
/*				with Firefox 1.0, IE 6.0 up, NS 4.6		 */
/*				and Opera 7.11                         	 */ 
/*                                                       */
/*********************************************************/

/* First the usual rollover type code */

// Create Array objects
var ic_out = new Array();
var ic_over = new Array();
var ic_link = new Array();
var ic_alt = new Array();

function icItem (name, number) {
if (ic_out[number]!="")
	{
		this.out = new Image();
		this.out.src = ic_out[number]+ ".gif"
		this.over = new Image();
		this.over.src = ic_over[number]+ ".gif"
	}
}

function ic_new (name,number) {
icItem[name] = new icItem(name,number);
}

function img_act (imgName) {
    if (document.images) document[imgName].src = icItem[imgName].over.src;
}

function img_inact (imgName) {
    if (document.images) document [imgName].src = icItem[imgName].out.src;
}

// clear 80 slots

for (n=0;n<70;n++)
{
	ic_out[n]="";
	ic_over[n]="";
	ic_link[n]="#";
	ic_alt[n]="unknown";
}

// This is where all your first set of parameters go

// Top menu bar graphix out

ic_out[1]="/menu/middle/home_out";
ic_out[2]="/menu/middle/news_out";
ic_out[3]="/menu/middle/info_out";
ic_out[4]="/menu/middle/courses_out";
ic_out[5]="/menu/middle/support_out";
ic_out[6]="/menu/middle/contact_out";


// Top menu bar graphix over

ic_over[1]="/menu/middle/home_over";
ic_over[2]="/menu/middle/news_over";
ic_over[3]="/menu/middle/info_over";
ic_over[4]="/menu/middle/courses_over";
ic_over[5]="/menu/middle/support_over";
ic_over[6]="/menu/middle/contact_over";

// Home layer graphix out

ic_out[8]="/menu/bottom/welcome_out";
ic_out[9]="/menu/bottom/howto_out";
ic_out[10]="/menu/bottom/sitemap_out";

// Home layer graphix over

ic_over[8]="/menu/bottom/welcome_over";
ic_over[9]="/menu/bottom/howto_over";
ic_over[10]="/menu/bottom/sitemap_over";

// Home layer links

ic_link[8]="/welcome.cfm";
ic_link[9]="/howto.cfm";
ic_link[10]="/map.cfm";

// Home layer alts

ic_alt[8]="Welcome";
ic_alt[9]="How to use this site";
ic_alt[10]="Site map";

// News layer graphix out

ic_out[20]="/menu/bottom/news_out";
ic_out[21]="/menu/bottom/newcourses_out";

// News layer graphix over

ic_over[20]="/menu/bottom/news_over";
ic_over[21]="/menu/bottom/newcourses_over";

// News layer links

ic_link[20]="/news.cfm";
ic_link[21]="/newcourses.cfm";

// News layer alts

ic_alt[20]="News & events";
ic_alt[21]="New courses";


// Information layer graphix out

ic_out[30]="/menu/bottom/enrol_out";
ic_out[31]="/menu/bottom/costs_out";
ic_out[32]="/menu/bottom/choosing_out";
ic_out[33]="/menu/bottom/venue_out";

// Information layer graphix over

ic_over[30]="/menu/bottom/enrol_over";
ic_over[31]="/menu/bottom/costs_over";
ic_over[32]="/menu/bottom/choosing_over";
ic_over[33]="/menu/bottom/venue_over";

// Information layer links

ic_link[30]="/enrol.cfm";
ic_link[31]="/costsfees.cfm";
ic_link[32]="/choosing.cfm";
ic_link[33]="/venues.cfm";

// Information layer alts

ic_alt[30]="How to enrol";
ic_alt[31]="Costs & fees";
ic_alt[32]="Choosing a course";
ic_alt[33]="Venue details";


// Courses layer graphix out

ic_out[40]="/menu/bottom/alpha_out";
ic_out[41]="/menu/bottom/browse_out";
ic_out[42]="/menu/bottom/advanced_out";

// Courses layer graphix over

ic_over[40]="/menu/bottom/alpha_over";
ic_over[41]="/menu/bottom/browse_over";
ic_over[42]="/menu/bottom/advanced_over";

// Courses layer links

ic_link[40]="/courses_temp.cfm";
ic_link[41]="/courses_temp.cfm";
ic_link[42]="/courses_temp.cfm";

// Courses layer alts

ic_alt[40]="Courses A-Z";
ic_alt[41]="Browse courses";
ic_alt[42]="Advanced search";


// Support layer graphix out

ic_out[50]="/menu/bottom/support_out";
ic_out[51]="/menu/bottom/esol_out";
ic_out[52]="/menu/bottom/disabled_out";

// Support layer graphix over

ic_over[50]="/menu/bottom/support_over";
ic_over[51]="/menu/bottom/esol_over";
ic_over[52]="/menu/bottom/disabled_over";

// Support layer links

ic_link[50]="/general.cfm";
ic_link[51]="/esol.cfm";
ic_link[52]="/disabilities.cfm";

// Support layer alts

ic_alt[50]="General support";
ic_alt[51]="Study support";
ic_alt[52]="Accessibility support";

// Contact layer graphix out

ic_out[60]="/menu/bottom/contact_out";

// Contact layer graphix over

ic_over[60]="/menu/bottom/contact_over";

// Contact layer links

ic_link[60]="/contact.cfm";

// Contact layer alts

ic_alt[60]="Contact details";


function load_ic (name, num) {
for (i = 1; i <= num; i++) ic_new(name + i,i);
}

if (document.images != null) load_ic ('ic', 60);

/* Now set up the layers and provide support */

function initialise ()
{
	
	
	ns4up = (document.layers) ? true : false;
	ie4up = (document.all) ? true : false;
	ns6up = (!document.all && document.getElementById) ? true : false;

	// initial parameters
	
	layerCount=6;	// number of menu layers
	var menuHeight=20;	// Height of menu boxes
	var menuBGcolor="#ffffff";	// menu background colour

	if (ie4up) 
	{
		var menuX=13;	// X coordinate of menu layers
		var menuY=255;	// Y coordinate of menu layers
		var menuWidth=500;	// (possible) width parameter of menus - set low here so it's pushed out
	}
	else if (ns4up)
	{
		var menuX=105;	// X coordinate of menu layers
		var menuY=253;	// Y coordinate of menu layers
		var menuWidth=700;	// (possible) width parameter of menus - set low here so
	}
	else if (ns6up)
	{
		var menuX=13;	// X coordinate of menu layers
		var menuY=255;	// Y coordinate of menu layers
		var menuWidth=700;	// (possible) width parameter of menus - set low here so it's pushed out
	}
	
	
	// header for layers
	layerHead="<table width=\"100%\" bgcolor=\"#ffffff\"  cellspacing=\"0\"  cellpadding=\"0\"><tr><td width=\"100%\" class=\"secnav\">";
	
	// footer for layers 
	layerFoot="</td></tr></table>";
	
	// data for each layer
	
	var layStart = new Array();
	var layEnd = new Array();
	var IElayX = new Array();
	var spaceX = new Array();

	// Home layer
	
	layStart[1]=8;
	layEnd[1]=10;
	IElayX[1]=34;
	spaceX[1]=8;
	
	// News layer
	
	layStart[2]=20;
	layEnd[2]=21;
	IElayX[2]=34;
	spaceX[2]=8;
	

	// Information layer
	
	layStart[3]=30;
	layEnd[3]=33;
	IElayX[3]=34;
	spaceX[3]=8;
	
	// Courses layer
	
	layStart[4]=40;
	layEnd[4]=42;
	IElayX[4]=34;
	spaceX[4]=8;
		

	// Support layer
	
	layStart[5]=50;
	layEnd[5]=52;
	IElayX[5]=34;
	spaceX[5]=8;
		
	   // Courses layer
	
	layStart[6]=60;
	layEnd[6]=60;
	IElayX[6]=34;
	spaceX[6]=8;
	
	layers=new Array();

	for (n=1;n<=layerCount;n++)
	{
		textPos=spaceX[n];
		
		layers[n]=new conLayer(n,IElayX[n],menuY,menuWidth,menuHeight,layStart[n],layEnd[n], textPos);
		createLayer(n);
	}

}


function conLayer (layUID,layX,layY,layWidth,layHeight,lStart,lEnd,textPos)
{
	this.UID=layUID;
	this.pX=layX;
	this.pY=layY;
	this.Width=layWidth;
	this.Height=layHeight;
		
	this.Content="";
	
	this.Content=this.Content+"<img src=\"/menu/dot_clr.gif\" width=\""+textPos+"\" height=\"1\" border=\"0\" alt=\"\">";
	
	for (m=lStart;m<=lEnd;m++)
	{
		this.Content=this.Content+"<a href=\""+ic_link[m]+"\">"+ic_alt[m]+"</a>&nbsp;&nbsp;&nbsp;";
	}
	
}

function createLayer(layInd)
{                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
 
	if (ie4up) // IE
	{
		document.write("<div id=\"layer"+layInd+"\" style=\"POSITION: absolute; Z-INDEX: "+layInd+"; VISIBILITY: hidden;  TOP: "+layers[layInd].pY+" px; LEFT: "+layers[layInd].pX+" px; width:"+layers[layInd].Width+"; height:"+layers[layInd].Height+"\">");
	    
		//constant header
		
		document.write(layerHead);
	    
		//variable content
		
		document.write(layers[layInd].Content);
	    
		//constant footer
		
		document.write(layerFoot);
		document.write("</div>");
	}
	else if (ns4up) // Netscape
	{
		
		document.write("<layer name=\"layer"+ layInd +"\" left=\""+(layers[layInd].pX-2)+"\"  width=\""+layers[layInd].Width+"\"");
		document.write("top=\""+layers[layInd].pY+"\" height=\""+layers[layInd].Height+"\" visibility=\"hide\">");
		
		//constant header
		
		document.write(layerHead);
	    
		//variable content
		
		document.write(layers[layInd].Content);
	    
		//constant footer
		
		document.write(layerFoot);
		document.write("</layer>");
	}
	else if (ns6up)		// Mozilla
	{
			
			document.write("<div id=\"layer"+layInd+"\" style=\"POSITION: absolute; z-index: "+layInd+"; VISIBILITY: hidden;  TOP: "+layers[layInd].pY+"; LEFT: "+layers[layInd].pX+"; width:"+layers[layInd].Width+"; height:"+layers[layInd].Height+"\">");
	    
		//constant header
		
		document.write(layerHead);
	    
		//variable content
		
		document.write(layers[layInd].Content);
	    
		//constant footer
		
		document.write(layerFoot);
		document.write("</div>");
	}
}

function showLayer(layind)
{
		
	if (ie4up || ns6up) 
	{
		for (n=1;n<=layerCount;n++)
		{
			document.all["layer"+n].style.visibility = "hidden";
		}
		
		document.all["layer"+layind].style.visibility = "visible";
	}
	else if (ns4up) 
	{
		for (n=1;n<=layerCount;n++)
		{
			document.layers["layer"+n].visibility = "hide";
		}
		document.layers["layer"+layind].visibility = "show";
	
	}
}

// -->