var iHOME = 1;
var iCONTACT = 5;

var sURL = new Array(null,"index.html","music-production.html","recording-studio.html","music-producer.html","contact.html");

var sTitle = new Array(null,"Home","Music Production","Recording Studio in London","Music Production","Contact London Studio");

var sText = new Array(null,"intro","music","studio","about","contact"); 

function htmlNAV(index)
/* 

Changes inner HTML of list navigation <ul>, so that we can run an IE-specific script that won't make buttons flicker when mouse hovers.
This is necessary because scriptless CSS-navigation on IE 6/7 (and also 8 now!) is embarrasingly buggy
HG/12/12/06 (from guitar-teaching.co.uk)
HG/20/12/06 (changing navigation)
HG/14/04/09 (modified for whitelight production)

usage: htmlNAV(1 to 5)

intro = 1
music = 2
studio = 3
about = 4
contact = 5

lot's of couplings here:

- do not change button images names
- all pages must start by defining a variable ie PAGE = 1 ...
- use 0, if no button is to be shown pressed
- URLs are also coupled
- IDs are coupled
- image id's are now b1,b2, ... b5
- extra css defined for IEx with loads of hacks

*/
{
/* Not using DOM3 .. as it's too slow on IE  */

	var sHTML = "";

	for(var i=1;i<=5;i++)
	{	
		if(i==index)
		{
			sHTML += "<li><strong id='"+sText[i]+"'><span>" + sText[i] + "</span></strong></li>"; 
			/* Non changing button on pages */
		}
		else
		{
			sHTML += "<li><a id='"+ sText[i] + "' href='" + sURL[i] + "' title='" + sTitle[i] + "' onmouseover='hi(" + i + ")' onmouseout='lo(" + i + ")' onfocus='hi(" + i + ")' onblur='lo(" + i  + ")'><span><u>" + sText[i] + "</u></span><img name='b" + i + "' src='images/" + condition(i) + "-button.gif' /></a></li>"; 
		}
	}
	document.all.ulNav.innerHTML = sHTML;
}

function hi(N) /* when hover */
{
	document.images["b"+N].src="images/" + condition(N) + "-highlight.gif";
}

function lo(N) /* when not */
{
	document.images["b"+N].src="images/" + condition(N) + "-button.gif";
}

function condition(N)  /* deals with the curvy-ended buttons: intro and contact */
{
	return  (N==iHOME)? "left" : ((N==iCONTACT)? "right" : "middle");
}

