/** JavaScript **/
ieHover = function() {
	if (navigator.appName != 'Opera'){
		var ieULs = document.getElementById('topnav').getElementsByTagName('ul');
		/** IE script to cover <select> elements with <iframe>s **/
		for (j=0; j<ieULs.length; j++) {
		ieULs[j].innerHTML = ('<iframe src="about:blank" scrolling="no" name=" " title=" "></iframe>' + ieULs[j].innerHTML);
		//	var ieMat = ieULs[j].childNodes[0];  alert(ieMat.nodeName); // also works...
			var ieMat = ieULs[j].firstChild;
				ieMat.style.width=ieULs[j].offsetWidth+"px";
				ieMat.style.height=ieULs[j].offsetHeight+"px";	
				ieULs[j].style.zIndex="99";
		}
		/** IE script to change class on mouseover **/
			var ieLIs = document.getElementById('topnav').getElementsByTagName('li');
			for (var i=0; i<ieLIs.length; i++) if (ieLIs[i]) {
				ieLIs[i].onmouseover=function() {this.className+=" iehover";}
				ieLIs[i].onmouseout=function() {this.className=this.className.replace(' iehover', '');}
		}
	}	
}
 if (window.attachEvent) window.attachEvent('onload', ieHover); 
/** end **/

// Header Tab Drop-down Menus
var services_array = [
	["tabId10", "Superannuation", "/index.php?p=services1", null, 1],
	["tabId11", "Succession Planning", "/index.php?p=services2", null, 1],
	["tabId12", "Taxation", "/index.php?p=services3", null, 1],
	["tabId14", "Business", "/index.php?p=services5", null, 1],
	["tabId13", "Related Services", "/index.php?p=services4", null, 1]
];

var products_array = [
	["tabId20", "Superannuation", "/index.php?p=superannuation", null, 1],
	["tabId21", "Succession Planning", "/index.php?p=products2", null, 1],
	["tabId22", "Trusts", "/index.php?p=products5", null, 1],
    	["tabId23", "Taxation & Agreements", "/index.php?p=products3", null, 1],
	["tabId24", "Companies", "/index.php?p=products4", null, 1]
	
];

var aboutus_array = [
	["tabId30", "Vision &amp; Values", "/index.php?p=aboutus1", null, 1],
	["tabId32", "DBA in the News", "/index.php?p=aboutus3", null, 1],
	["tabId34", "EPS Network", "/index.php?p=aboutus5", null, 1],
	["tabId35", "Charity & Community", "/index.php?p=aboutus6", null, 1],
	["tabId36", "Useful Links", "/index.php?p=aboutus7", null, 1]

	];

var publications_array = [
	["tabId43", "Newsletters", "/index.php?p=NLR", null, 1]
	
	];

var seminars_array = [
	["tabId50", "Quarterly Seminars", "/index.php?p=DNW", null, 1],
	["tabId50", "SMSF Borrowing Seminar", "/index.php?p=BOR", null, 1],
    ["tabId54", "SMSF Core Skills Training", "/index.php?p=COR", null, 1],
	["tabId52", "In-House", "/index.php?p=IHT", null, 1],
	["tabId53", "Other Events", "/index.php?p=SEO", null, 1]
	
];

var menu_array = [
	["tabId0", "&nbsp;Home&nbsp;", "/index.php?p=home", null, 1],
	["tabId1", "&nbsp;Services&nbsp;", "/index.php?p=services", services_array, 1],
	["tabId2", "&nbsp;Products/Order Forms&nbsp;", "/index.php?p=products", products_array, 1],
	["tabId3", "&nbsp;About Us&nbsp;", "/index.php?p=aboutus", aboutus_array, 1],
	["tabId4", "&nbsp;Publications&nbsp;", "/index.php?p=publications", publications_array, 1],
	["tabId5", "&nbsp;Seminars&nbsp;", "/index.php?p=seminars", seminars_array, 1],
	["tabId6", "&nbsp;Contact&nbsp;", "/index.php?p=contact", null, 1]
	
];


document.write('<div align="center"><table border="0" cellpadding="0" cellspacing="0" id="topnav"><tr><td class="table_row" width="8%">&nbsp;</td><td class="table_row">');
for (var i=0; i < menu_array.length; i++)
{
  
  if (i == (menu_array.length - 1))
  document.write('<li id="' + menu_array[i][0] + '"><a href="' + menu_array[i][2] + '" style="border-right:1px #FFFFFF solid;">' + menu_array[i][1] + '</a>');
 else
  document.write('<li id="' + menu_array[i][0] + '"><a href="' + menu_array[i][2] + '">' + menu_array[i][1] + '</a>'); 
  
		if (menu_array[i][3] != null)
		{
			if (i == (menu_array.length - 1))
			{
				document.write('<ul class="last">');
			}
			else
			{
				document.write('<ul>');
			}
			
			for (var j=0; j < menu_array[i][3].length; j++)
  		  if (menu_array[i][3][j][4] == 1)
					document.write('<li><a href="' + menu_array[i][3][j][2] + '">' + menu_array[i][3][j][1] +  '</a></li>');
				
			
			document.write('</ul>');
		}
			document.write(''); 
		/*	if (i == (menu_array.length - 1))
				document.write('</td><td class="table_row">&nbsp;</td>');  */
	    

}
document.write('<td class="table_row" width="8%">&nbsp;</td></tr></table></div>');