// For help see: http://www.TJKDesign.com/articles/a_menu_based_on_images_rather_than_background_images.asp
var TJK_tipMenu_Folder_Path = "navbuttons/";
var TJK_tipMenu_ext = "gif";
function TJK_tipMenu(imgHeight){// v1.1.1 Copyright (c) 2006 TJKDesign - Thierry Koblentz
if (!document.getElementsByTagName || !document.createElement) return;
	var tipMenu_Folder_Path = "/navbuttons/";
	var z_UL = document.getElementById("TJK_tipMenu");
	var z_Anchors=z_UL.getElementsByTagName("a");
	var z_ULwidth=0;
		for (var x=0;x<z_Anchors.length;x++){
		var z_HEIGHT =imgHeight+"px";
		var z_WIDTH = z_Anchors[x].getAttribute("id").split("_")[1]+"px";
		var z_FILE =tipMenu_Folder_Path+z_Anchors[x].getAttribute("id").split("_")[0]+"."+TJK_tipMenu_ext;
		var z_IMG = document.createElement('img');
		z_IMG.alt="";
		z_IMG.src=z_FILE;
			if(z_Anchors[x].className && z_Anchors[x].className=="ubiAt"){
			z_IMG.src=tipMenu_Folder_Path+z_Anchors[x].getAttribute("id").split("_")[0]+"-O."+TJK_tipMenu_ext;
			z_Anchors[x].style.cursor="default";
			}else{
			z_Anchors[x].onmouseover=TJK_roll;
			z_Anchors[x].onmouseout=TJK_rollBack;
			z_Anchors[x].onfocus=TJK_roll;				
			z_Anchors[x].onblur=TJK_rollBack;							
		}
		z_Anchors[x].insertBefore(z_IMG,z_Anchors[x].firstChild)
		z_Anchors[x].style.height=z_HEIGHT;
		z_Anchors[x].style.width=z_WIDTH;				
		z_Anchors[x].style.position="relative";
		z_Anchors[x].style.overflow="hidden";	
		z_IMG.width="1";// JS on / CSS off	
		z_IMG.style.width=z_WIDTH;
		z_IMG.style.height=z_HEIGHT;
		z_IMG.style.border="0";			
		z_IMG.style.position="absolute";
		z_IMG.style.top="0";
		z_IMG.style.left="0";
	}
}
function TJK_roll(){this.firstChild.src=TJK_tipMenu_Folder_Path+this.id.split("_")[0]+"-O."+TJK_tipMenu_ext;}
function TJK_rollBack(){this.firstChild.src=TJK_tipMenu_Folder_Path+this.id.split("_")[0]+"."+TJK_tipMenu_ext;}
