//************************
//	Standards Compliant Rollover Script
//	Author : Daniel Nolan
//	http://www.bleedingego.co.uk/webdev.php
//************************
function initRollovers() {
	if (!document.getElementById) return;
	
	var aPreLoad = new Array();
	var sTempSrc;
	var aImages = document.getElementsByTagName('img');

	for (var i = 0; i < aImages.length; i++) {		
		if (aImages[i].className == 'imgover') {
			var src = aImages[i].getAttribute('src');
			var ftype = src.substring(src.lastIndexOf('.'), src.length);
			var hsrc = src.replace(ftype, '_hl'+ftype);

			aImages[i].setAttribute('hsrc', hsrc);
			
			aPreLoad[i] = new Image();
			aPreLoad[i].src = hsrc;
			
			aImages[i].onmouseover = function() {
				sTempSrc = this.getAttribute('src');
				this.setAttribute('src', this.getAttribute('hsrc'));
			}	
			
			aImages[i].onmouseout = function() {
				if (!sTempSrc) sTempSrc = this.getAttribute('src').replace('_hl'+ftype, ftype);
				this.setAttribute('src', sTempSrc);
			}

			// Added to relieve bug in Mozilla, when layer dissapears and mouse never goes "out", is stuck in hover state
			aImages[i].onclick = function() {
				if (!sTempSrc) sTempSrc = this.getAttribute('src').replace('_hl'+ftype, ftype);
				this.setAttribute('src', sTempSrc);
			}
		}
	}
}


function HexToHTML(hexString)
    {
    htmlString = '' ;
    hexDigits = '0123456789ABCDEF' ;
    for (i=0; i < hexString.length; i+=2)
        {
        msn = hexDigits.indexOf(hexString.charAt(i)) ;
        lsn = hexDigits.indexOf(hexString.charAt(i + 1)) ;
        hexByte = msn * 16 + lsn ;
        htmlString += String.fromCharCode(hexByte) ;
        }
    
    document.write(htmlString) ;
 }
	
function submitAlpha()
{
	if (document.forms['alpha'].letter.value != "")
	{
		document.forms['alpha'].submit();
	} else {
		alert("Please select a letter from the dropdown menu.");
	}
}
