browserName = navigator.appName.substring(0,8);
browserVer = parseFloat(navigator.appVersion);

if (browserName == 'Microsof'){
	//document.write("<link href='css/structure.css' rel='stylesheet' type='text/css'>");
}else{
	//document.write("<link href='css/Netstructure.css' rel='stylesheet' type='text/css'>");
}

var Browser = 0;

if (browserName == 'Microsof' && browserVer < 4){Browser = 0;}
if (browserName == 'Microsof' && browserVer >= 4){Browser = 1;}
if (browserName == 'Netscape' && browserVer < 4){Browser = 1;}
if (browserName == 'Netscape' && browserVer >= 4){Browser = 1;}

if(Browser == 1){
img = new Array(90);
for (m=0; m<=90; m++){
img[m] = new Image();
}
img[0].src = 'images/nav_home/but_aboutcm_off.gif';
img[1].src = 'images/nav_home/but_aboutcm_on.gif';
img[2].src = 'images/nav_home/but_home_off.gif';
img[3].src = 'images/nav_home/but_home_on.gif';
img[4].src = 'images/nav_home/but_about_off.gif';
img[5].src = 'images/nav_home/but_about_on.gif';
img[6].src = 'images/nav_home/but_news_off.gif';
img[7].src = 'images/nav_home/but_news_on.gif';
img[8].src = 'images/but_products_off.gif';
img[9].src = 'images/but_products_on.gif';
img[10].src = 'images/but_testimonials_off.gif';
img[11].src = 'images/but_testimonials_on.gif';
img[12].src = 'images/but_stock_off.gif';
img[13].src = 'images/but_stock_on.gif';
img[14].src = 'images/but_links_off.gif';
img[15].src = 'images/but_links_on.gif';
img[16].src = 'images/but_contact_off.gif';
img[17].src = 'images/but_contact_on.gif';
img[18].src = 'images/nav_about/but_aboutcm_off.gif';
img[19].src = 'images/nav_about/but_aboutcm_on.gif';
img[20].src = 'images/nav_about/but_home_off.gif';
img[21].src = 'images/nav_about/but_home_on.gif';
img[22].src = 'images/nav_about/but_about_off.gif';
img[23].src = 'images/nav_about/but_about_on.gif';
img[24].src = 'images/nav_about/but_news_off.gif';
img[25].src = 'images/nav_about/but_news_on.gif';
img[26].src = 'images/nav_aboutcm/but_aboutcm_off.gif';
img[27].src = 'images/nav_aboutcm/but_aboutcm_on.gif';
img[28].src = 'images/nav_aboutcm/but_home_off.gif';
img[29].src = 'images/nav_aboutcm/but_home_on.gif';
img[30].src = 'images/nav_aboutcm/but_about_off.gif';
img[31].src = 'images/nav_aboutcm/but_about_on.gif';
img[32].src = 'images/nav_aboutcm/but_news_off.gif';
img[33].src = 'images/nav_aboutcm/but_news_on.gif';
img[34].src = 'images/nav_news/but_aboutcm_off.gif';
img[35].src = 'images/nav_news/but_aboutcm_on.gif';
img[36].src = 'images/nav_news/but_home_off.gif';
img[37].src = 'images/nav_news/but_home_on.gif';
img[38].src = 'images/nav_news/but_about_off.gif';
img[39].src = 'images/nav_news/but_about_on.gif';
img[40].src = 'images/nav_news/but_news_off.gif';
img[41].src = 'images/nav_news/but_news_on.gif';
img[42].src = 'images/nav_products/but_aboutcm_off.gif';
img[43].src = 'images/nav_products/but_aboutcm_on.gif';
img[44].src = 'images/nav_products/but_home_off.gif';
img[45].src = 'images/nav_products/but_home_on.gif';
img[46].src = 'images/nav_products/but_about_off.gif';
img[47].src = 'images/nav_products/but_about_on.gif';
img[48].src = 'images/nav_products/but_news_off.gif';
img[49].src = 'images/nav_products/but_news_on.gif';
img[50].src = 'images/nav_test/but_aboutcm_off.gif';
img[51].src = 'images/nav_test/but_aboutcm_on.gif';
img[52].src = 'images/nav_test/but_home_off.gif';
img[53].src = 'images/nav_test/but_home_on.gif';
img[54].src = 'images/nav_test/but_about_off.gif';
img[55].src = 'images/nav_test/but_about_on.gif';
img[56].src = 'images/nav_test/but_news_off.gif';
img[57].src = 'images/nav_test/but_news_on.gif';
img[58].src = 'images/nav_stock/but_aboutcm_off.gif';
img[59].src = 'images/nav_stock/but_aboutcm_on.gif';
img[60].src = 'images/nav_stock/but_home_off.gif';
img[61].src = 'images/nav_stock/but_home_on.gif';
img[62].src = 'images/nav_stock/but_about_off.gif';
img[63].src = 'images/nav_stock/but_about_on.gif';
img[64].src = 'images/nav_stock/but_news_off.gif';
img[65].src = 'images/nav_stock/but_news_on.gif';
img[66].src = 'images/nav_links/but_aboutcm_off.gif';
img[67].src = 'images/nav_links/but_aboutcm_on.gif';
img[68].src = 'images/nav_links/but_home_off.gif';
img[69].src = 'images/nav_links/but_home_on.gif';
img[70].src = 'images/nav_links/but_about_off.gif';
img[71].src = 'images/nav_links/but_about_on.gif';
img[72].src = 'images/nav_links/but_news_off.gif';
img[73].src = 'images/nav_links/but_news_on.gif';
img[74].src = 'images/nav_contact/but_aboutcm_off.gif';
img[75].src = 'images/nav_contact/but_aboutcm_on.gif';
img[76].src = 'images/nav_contact/but_home_off.gif';
img[77].src = 'images/nav_contact/but_home_on.gif';
img[78].src = 'images/nav_contact/but_about_off.gif';
img[79].src = 'images/nav_contact/but_about_on.gif';
img[80].src = 'images/nav_contact/but_news_off.gif';
img[81].src = 'images/nav_contact/but_news_on.gif';
img[82].src = 'images/but_bo_off.gif';
img[83].src = 'images/but_bo_on.gif';
img[84].src = 'images/but_down_off.gif';
img[85].src = 'images/but_down_on.gif';
img[86].src = 'images/but_sitemap_off.gif';
img[87].src = 'images/but_sitemap_on.gif';
 }
function m_home_over(index){
if(Browser == 1){
	if(index == 1){
		setTimeout('document.i1.src = img[1].src',0);
	}
	if(index == 2){
		setTimeout('document.i2.src = img[3].src',0);
	}
	if(index == 3){
		setTimeout('document.i3.src = img[5].src',0);
	}	
	if(index == 4){
		setTimeout('document.i4.src = img[7].src',0);
	}		
}
}
function m_home_out(index){
if(Browser == 1){
	if(index == 1){
		setTimeout('document.i1.src = img[0].src',0);
	}
	if(index == 2){
		setTimeout('document.i2.src = img[2].src',0);
	}
	if(index == 3){
		setTimeout('document.i3.src = img[4].src',0);
	}	
	if(index == 4){
		setTimeout('document.i4.src = img[6].src',0);
	}
	checkPage();
}
}
function m_about_over(index){
if(Browser == 1){
	if(index == 1){
		setTimeout('document.i1.src = img[19].src',0);
	}
	if(index == 2){
		setTimeout('document.i2.src = img[21].src',0);
	}
	if(index == 3){
		setTimeout('document.i3.src = img[23].src',0);
	}	
	if(index == 4){
		setTimeout('document.i4.src = img[25].src',0);
	}		
}
}
function m_about_out(index){
if(Browser == 1){
	if(index == 1){
		setTimeout('document.i1.src = img[18].src',0);
	}
	if(index == 2){
		setTimeout('document.i2.src = img[20].src',0);
	}
	if(index == 3){
		setTimeout('document.i3.src = img[22].src',0);
	}	
	if(index == 4){
		setTimeout('document.i4.src = img[24].src',0);
	}
	checkPage();
}
}
function m_aboutcm_over(index){
if(Browser == 1){
	if(index == 1){
		setTimeout('document.i1.src = img[27].src',0);
	}
	if(index == 2){
		setTimeout('document.i2.src = img[29].src',0);
	}
	if(index == 3){
		setTimeout('document.i3.src = img[31].src',0);
	}	
	if(index == 4){
		setTimeout('document.i4.src = img[33].src',0);
	}		
}
}
function m_aboutcm_out(index){
if(Browser == 1){
	if(index == 1){
		setTimeout('document.i1.src = img[26].src',0);
	}
	if(index == 2){
		setTimeout('document.i2.src = img[28].src',0);
	}
	if(index == 3){
		setTimeout('document.i3.src = img[30].src',0);
	}	
	if(index == 4){
		setTimeout('document.i4.src = img[32].src',0);
	}
	checkPage();
}
}
function m_news_over(index){
if(Browser == 1){
	if(index == 1){
		setTimeout('document.i1.src = img[35].src',0);
	}
	if(index == 2){
		setTimeout('document.i2.src = img[37].src',0);
	}
	if(index == 3){
		setTimeout('document.i3.src = img[39].src',0);
	}	
	if(index == 4){
		setTimeout('document.i4.src = img[41].src',0);
	}		
}
}
function m_news_out(index){
if(Browser == 1){
	if(index == 1){
		setTimeout('document.i1.src = img[34].src',0);
	}
	if(index == 2){
		setTimeout('document.i2.src = img[36].src',0);
	}
	if(index == 3){
		setTimeout('document.i3.src = img[38].src',0);
	}	
	if(index == 4){
		setTimeout('document.i4.src = img[40].src',0);
	}
	checkPage();
}
}
function m_products_over(index){
if(Browser == 1){
	if(index == 1){
		setTimeout('document.i1.src = img[43].src',0);
	}
	if(index == 2){
		setTimeout('document.i2.src = img[45].src',0);
	}
	if(index == 3){
		setTimeout('document.i3.src = img[47].src',0);
	}	
	if(index == 4){
		setTimeout('document.i4.src = img[49].src',0);
	}		
}
}
function m_products_out(index){
if(Browser == 1){
	if(index == 1){
		setTimeout('document.i1.src = img[42].src',0);
	}
	if(index == 2){
		setTimeout('document.i2.src = img[44].src',0);
	}
	if(index == 3){
		setTimeout('document.i3.src = img[46].src',0);
	}	
	if(index == 4){
		setTimeout('document.i4.src = img[48].src',0);
	}
	checkPage();
}
}
function m_test_over(index){
if(Browser == 1){
	if(index == 1){
		setTimeout('document.i1.src = img[51].src',0);
	}
	if(index == 2){
		setTimeout('document.i2.src = img[53].src',0);
	}
	if(index == 3){
		setTimeout('document.i3.src = img[55].src',0);
	}	
	if(index == 4){
		setTimeout('document.i4.src = img[57].src',0);
	}		
}
}
function m_test_out(index){
if(Browser == 1){
	if(index == 1){
		setTimeout('document.i1.src = img[50].src',0);
	}
	if(index == 2){
		setTimeout('document.i2.src = img[52].src',0);
	}
	if(index == 3){
		setTimeout('document.i3.src = img[54].src',0);
	}	
	if(index == 4){
		setTimeout('document.i4.src = img[56].src',0);
	}
	checkPage();
}
}
function m_stock_over(index){
if(Browser == 1){
	if(index == 1){
		setTimeout('document.i1.src = img[59].src',0);
	}
	if(index == 2){
		setTimeout('document.i2.src = img[61].src',0);
	}
	if(index == 3){
		setTimeout('document.i3.src = img[63].src',0);
	}	
	if(index == 4){
		setTimeout('document.i4.src = img[65].src',0);
	}		
}
}
function m_stock_out(index){
if(Browser == 1){
	if(index == 1){
		setTimeout('document.i1.src = img[58].src',0);
	}
	if(index == 2){
		setTimeout('document.i2.src = img[60].src',0);
	}
	if(index == 3){
		setTimeout('document.i3.src = img[62].src',0);
	}	
	if(index == 4){
		setTimeout('document.i4.src = img[64].src',0);
	}
	checkPage();
}
}
function m_links_over(index){
if(Browser == 1){
	if(index == 1){
		setTimeout('document.i1.src = img[67].src',0);
	}
	if(index == 2){
		setTimeout('document.i2.src = img[69].src',0);
	}
	if(index == 3){
		setTimeout('document.i3.src = img[71].src',0);
	}	
	if(index == 4){
		setTimeout('document.i4.src = img[73].src',0);
	}		
}
}
function m_links_out(index){
if(Browser == 1){
	if(index == 1){
		setTimeout('document.i1.src = img[66].src',0);
	}
	if(index == 2){
		setTimeout('document.i2.src = img[68].src',0);
	}
	if(index == 3){
		setTimeout('document.i3.src = img[70].src',0);
	}	
	if(index == 4){
		setTimeout('document.i4.src = img[72].src',0);
	}
	checkPage();
}
}
function m_contact_over(index){
if(Browser == 1){
	if(index == 1){
		setTimeout('document.i1.src = img[75].src',0);
	}
	if(index == 2){
		setTimeout('document.i2.src = img[77].src',0);
	}
	if(index == 3){
		setTimeout('document.i3.src = img[79].src',0);
	}	
	if(index == 4){
		setTimeout('document.i4.src = img[81].src',0);
	}		
}
}
function m_contact_out(index){
if(Browser == 1){
	if(index == 1){
		setTimeout('document.i1.src = img[74].src',0);
	}
	if(index == 2){
		setTimeout('document.i2.src = img[76].src',0);
	}
	if(index == 3){
		setTimeout('document.i3.src = img[78].src',0);
	}	
	if(index == 4){
		setTimeout('document.i4.src = img[80].src',0);
	}
	checkPage();
}
}
function m_over(index){
if(Browser == 1){
	if(index == 5){
		setTimeout('document.i5.src = img[9].src',0);
	}		
	if(index == 6){
		setTimeout('document.i6.src = img[11].src',0);
	}		
	if(index == 7){
		setTimeout('document.i7.src = img[13].src',0);
	}	
	if(index == 8){
		setTimeout('document.i8.src = img[15].src',0);
	}	
	if(index == 9){
		setTimeout('document.i9.src = img[17].src',0);
	}		
	if(index == 10){
		setTimeout('document.i10.src = img[83].src',0);
	}		
	if(index == 11){
		setTimeout('document.i11.src = img[85].src',0);
	}		
	if(index == 12){
		setTimeout('document.i12.src = img[87].src',0);
	}		
  }
}
function m_out(index){
if(Browser == 1){
	if(index == 1){
		setTimeout('document.i1.src = img[0].src',0);
	}
	if(index == 2){
		setTimeout('document.i2.src = img[2].src',0);
	}
	if(index == 3){
		setTimeout('document.i3.src = img[4].src',0);
	}	
	if(index == 4){
		setTimeout('document.i4.src = img[6].src',0);
	}	
	if(index == 5){
		setTimeout('document.i5.src = img[8].src',0);
	}		
	if(index == 6){
		setTimeout('document.i6.src = img[10].src',0);
	}		
	if(index == 7){
		setTimeout('document.i7.src = img[12].src',0);
	}	
	if(index == 8){
		setTimeout('document.i8.src = img[14].src',0);
	}
	if(index == 9){
		setTimeout('document.i9.src = img[16].src',0);
	}
	if(index == 10){
		setTimeout('document.i10.src = img[82].src',0);
	}
	if(index == 11){
		setTimeout('document.i11.src = img[84].src',0);
	}
	if(index == 12){
		setTimeout('document.i12.src = img[86].src',0);
	}
	checkPage();
  }
}

function checkPage(){
	myLocation = document.location.href;
	myLocation = myLocation.replace("http://localhost/www.healthway.co.za/", "");
	myLocation = myLocation.replace("http://www.healthway.co.za/", "");
	
	if (myLocation == "aboutcm.php"){
		setTimeout("document.i1.src = 'images/nav_aboutcm/but_aboutcm_on.gif'",0);
	}
	if (myLocation == "index.php"){
		setTimeout("document.i2.src = 'images/nav_home/but_home_on.gif'",0);
	}
	if (myLocation == "about.php"){
		setTimeout("document.i3.src = 'images/nav_about/but_about_on.gif'",0);
	}
	if (myLocation == "news.php"){
		setTimeout("document.i4.src = 'images/nav_news/but_news_on.gif'",0);
	}
	if (myLocation == "categories.php" || myLocation == "payProducts.php" || myLocation == "processBank.php" || myLocation == "payPGResult.php"){
		setTimeout("document.i5.src = 'images/but_products_on.gif'",0);
	}
	if (myLocation == "testimonials.php"){
		setTimeout("document.i6.src = 'images/but_testimonials_on.gif'",0);
	}
	if (myLocation == "stockists.php"){
		setTimeout("document.i7.src = 'images/but_stock_on.gif'",0);
	}
	if (myLocation == "links.php"){
		setTimeout("document.i8.src = 'images/but_links_on.gif'",0);
	}
	if (myLocation == "contact.php"){
		setTimeout("document.i9.src = 'images/but_contact_on.gif'",0);
	}
	if (myLocation == "bo.php"){
		setTimeout("document.i10.src = 'images/but_bo_on.gif'",0);
	}
	if (myLocation == "bank.php"){
		setTimeout("document.i11.src = 'images/but_bank_on.gif'",0);
	}
}
