 function MM_goToURL() { //v2.0
  for (var i=0; i< (MM_goToURL.arguments.length - 1); i+=2) //with arg pairs
    eval(MM_goToURL.arguments[i]+".location='"+MM_goToURL.arguments[i+1]+"'");
  document.MM_returnValue = false;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function popUp(URL,STATUS) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', STATUS);");
}

function closeIt() {
 close();
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


function get_primary_nav() {
  var urlString = location.href.toLowerCase();
  site1 = urlString.lastIndexOf("index");
  site2 = urlString.lastIndexOf("aboutus");
  site3 = urlString.lastIndexOf("products");
  site4 = urlString.lastIndexOf("solutions");
  site5 = urlString.lastIndexOf("news");
  site6 = urlString.lastIndexOf("support");
  site7 = urlString.lastIndexOf("contactus");
  site8 = urlString.lastIndexOf("team");
  site9 = urlString.lastIndexOf("customers");
  site10 = urlString.lastIndexOf("employment");
  site11 = urlString.lastIndexOf("industries");
  site12 = urlString.lastIndexOf("government");
  site13 = urlString.lastIndexOf("methodology");
  site14 = urlString.lastIndexOf("case");
  site15 = urlString.lastIndexOf("press");
  site16 = urlString.lastIndexOf("industry");
  site17 = urlString.lastIndexOf("testimonials");

  siteName="index";
  maxNum=site1;
  
  if (site2 > maxNum) {siteName="aboutus"; maxNum=site2;}
  if (site3 > maxNum) {siteName="products"; maxNum=site3;}
  if (site4 > maxNum) {siteName="solutions"; maxNum=site4;}
  if (site5 > maxNum) {siteName="news"; maxNum=site5;}
  if (site6 > maxNum) {siteName="support"; maxNum=site6;}
  if (site7 > maxNum) {siteName="contactus"; maxNum=site7;}
  if (site8 > maxNum) {siteName="team"; maxNum=site8;}
  if (site9 > maxNum) {siteName="customers"; maxNum=site9;}
  if (site10 > maxNum) {siteName="employment"; maxNum=site10;}
  if (site11 > maxNum) {siteName="industries"; maxNum=site11;}
  if (site12 > maxNum) {siteName="government"; maxNum=site12;}
  if (site13 > maxNum) {siteName="methodology"; maxNum=site13;}
  if (site14 > maxNum) {siteName="case"; maxNum=site14;}
  if (site15 > maxNum) {siteName="press"; maxNum=site15;}
  if (site16 > maxNum) {siteName="industry"; maxNum=site16;}
  if (site17 > maxNum) {siteName="testimonials"; maxNum=site17;}
  return siteName;
}


function get_secondary_nav() {
  var urlString = location.href.toLowerCase();
  subsite1 = urlString.lastIndexOf("index");
  subsite2 = urlString.lastIndexOf("aboutus");
  subsite3 = urlString.lastIndexOf("solutions");
  subsite4 = urlString.lastIndexOf("news");

  siteSubName="index";
  maxNum=subsite1;
  
  if (subsite2 > maxNum) {siteSubName="aboutus"; maxNum=subsite2;}
  if (subsite3 > maxNum) {siteSubName="solutions"; maxNum=subsite3;}
  if (subsite4 > maxNum) {siteSubName="news"; maxNum=subsite4;}
  return siteSubName;
}


function site_get_primary_nav() { 
  siteSubName=get_secondary_nav();
  siteName=get_primary_nav();
  src1="";
  src2="";
  src3="";
  src4="";
  src5="";
  src6="";
  src7="";
  src8="";
  src9="";
  src10="";
  src11="";
  src12="";
  src13="";
  src14="";
  src15="";
  src16="";
  src17="";
  
  if (siteName == "index") 				{src1="_r";}
  if (siteName == "aboutus") 			{src2="_r";}
  if (siteName == "products") 			{src3="_r";}
  if (siteName == "solutions") 			{src4="_r";}
  if (siteName == "news") 				{src5="_r";}
  if (siteName == "support") 			{src6="_r";}
  if (siteName == "contactus") 			{src7="_r";}
  if (siteName == "team") 				{src8="_r";}
  if (siteName == "customers") 			{src9="_r";}
  if (siteName == "employment") 		{src10="_r";}
  if (siteName == "industries") 		{src11="_r";}
  if (siteName == "government") 		{src12="_r";}
  if (siteName == "methodology") 		{src13="_r";}
  if (siteName == "case") 				{src14="_r";}
  if (siteName == "press") 				{src15="_r";}
  if (siteName == "industry") 			{src16="_r";}
  if (siteName == "testimonials") 			{src17="_r";}

  subsrc1="";
  subsrc2="";

  if (siteSubName == "index") 			{subsrc1="_r";}
  if (siteSubName == "aboutus") 		{subsrc2="_r";}

  document.write("<a href='http://www.akoretax.com/index.shtml'		onMouseOver=MM_swapImage('home','','http://www.akoretax.com/images/but_home_r.gif',1) 			onMouseOut=MM_swapImgRestore()><img src='http://www.akoretax.com/images/but_home"+src1+".gif' name='home' width='152' height='24' border='0' id='home'></a><br>");

  if (siteSubName == "aboutus") {
  	document.write("<a href='http://www.akoretax.com/aboutus.shtml'><img src='http://www.akoretax.com/images/but_aboutus_sub.gif' name='abaoutus_sub' width='152' height='18' border='0' id='abaoutus_sub'></a><br>");
  	document.write("<a href='http://www.akoretax.com/aboutus_team.shtml' 			onMouseOver=MM_swapImage('team','','http://www.akoretax.com/images/but_aboutus_team_r.gif',1) 				onMouseOut=MM_swapImgRestore()><img src='http://www.akoretax.com/images/but_aboutus_team"+src8+".gif' name='team' width='152' height='11' border='0' id='team'></a><br>");
  	document.write("<a href='http://www.akoretax.com/aboutus_customers.shtml' 	onMouseOver=MM_swapImage('customers','','http://www.akoretax.com/images/but_aboutus_customers_r.gif',1) 	onMouseOut=MM_swapImgRestore()><img src='http://www.akoretax.com/images/but_aboutus_customers"+src9+".gif' name='customers' width='152' height='13' border='0' id='customers'></a><br>");
  	document.write("<a href='http://www.akoretax.com/aboutus_employment.shtml' 	onMouseOver=MM_swapImage('employment','','http://www.akoretax.com/images/but_aboutus_employment_r.gif',1) 	onMouseOut=MM_swapImgRestore()><img src='http://www.akoretax.com/images/but_aboutus_employment"+src10+".gif' name='employment' width='152' height='18' border='0' id='employment'></a><br>");
  }
  else {
  	document.write("<a href='http://www.akoretax.com/aboutus.shtml' 	onMouseOver=MM_swapImage('aboutus','','http://www.akoretax.com/images/but_aboutus_r.gif',1) 	onMouseOut=MM_swapImgRestore()><img src='http://www.akoretax.com/images/but_aboutus"+src2+".gif' name='aboutus' width='152' height='23' border='0' id='aboutus'></a><br>");
  }
  
  document.write("<a href='http://www.akoretax.com/products.shtml' 	onMouseOver=MM_swapImage('products','','http://www.akoretax.com/images/but_products_r.gif',1) 	onMouseOut=MM_swapImgRestore()><img src='http://www.akoretax.com/images/but_products"+src3+".gif' name='products' width='152' height='24' border='0' id='products'></a><br>");

  if (siteSubName == "solutions") {
  document.write("<a href='http://www.akoretax.com/solutions.shtml'><img src='http://www.akoretax.com/images/but_solutions_sub.gif' name='solutions_sub' width='152' height='18' border='0' id='solutions_sub'></a><br>");
  document.write("<a href='http://www.akoretax.com/solutions_methodology.shtml' onMouseOver=MM_swapImage('methodology','','http://www.akoretax.com/images/but_solutions_methodology_r.gif',1) onMouseOut=MM_swapImgRestore()><img src='http://www.akoretax.com/images/but_solutions_methodology"+src13+".gif' name='methodology' width='152' height='12' border='0' id='methodology'></a><br>");
  document.write("<a href='http://www.akoretax.com/solutions_industries.shtml' onMouseOver=MM_swapImage('industries','','http://www.akoretax.com/images/but_solutions_industries_r.gif',1) onMouseOut=MM_swapImgRestore()><img src='http://www.akoretax.com/images/but_solutions_industries"+src11+".gif' name='industries' width='152' height='12' border='0' id='industries'></a><br>");
  document.write("<a href='http://www.akoretax.com/solutions_government.shtml' onMouseOver=MM_swapImage('government','','http://www.akoretax.com/images/but_solutions_government_r.gif',1) onMouseOut=MM_swapImgRestore()><img src='http://www.akoretax.com/images/but_solutions_government"+src12+".gif' name='government' width='152' height='12' border='0' id='government'></a><br>");
  document.write("<a href='http://www.akoretax.com/solutions_case.shtml' onMouseOver=MM_swapImage('case','','http://www.akoretax.com/images/but_solutions_casestudies_r.gif',1) onMouseOut=MM_swapImgRestore()><img src='http://www.akoretax.com/images/but_solutions_casestudies"+src14+".gif' name='case' width='152' height='12' border='0' id='case'></a><br>");
  document.write("<a href='http://www.akoretax.com/solutions_testimonials.shtml' onMouseOver=MM_swapImage('testimonials','','http://www.akoretax.com/images/but_solutions_testimonials_r.gif',1) onMouseOut=MM_swapImgRestore()><img src='http://www.akoretax.com/images/but_solutions_testimonials"+src17+".gif' name='testimonials' width='152' height='17' border='0' id='testimonials'></a><br>");
  }
  else {
  	document.write("<a href='http://www.akoretax.com/solutions.shtml' onMouseOver=MM_swapImage('solutions','','http://www.akoretax.com/images/but_solutions_r.gif',1) onMouseOut=MM_swapImgRestore()><img src='http://www.akoretax.com/images/but_solutions"+src4+".gif' name='solutions' width='152' height='24' border='0' id='solutions'></a><br>");
  }
  
  if (siteSubName == "news") {
  document.write("<a href='http://www.akoretax.com/news.shtml'><img src='http://www.akoretax.com/images/but_news_sub.gif' name='news_sub' width='152' height='18' border='0' id='news_sub'></a><br>");
  document.write("<a href='http://www.akoretax.com/news_press.shtml' onMouseOver=MM_swapImage('press','','http://www.akoretax.com/images/but_news_press_r.gif',1) onMouseOut=MM_swapImgRestore()><img src='http://www.akoretax.com/images/but_news_press"+src15+".gif' name='press' width='152' height='13' border='0' id='press'></a><br>");
  document.write("<a href='http://www.akoretax.com/news_industry.shtml' onMouseOver=MM_swapImage('industry','','http://www.akoretax.com/images/but_news_industry_r.gif',1) onMouseOut=MM_swapImgRestore()><img src='http://www.akoretax.com/images/but_news_industry"+src16+".gif' name='industry' width='152' height='17' border='0' id='industry'></a><br>");
  }
  else {
 	 document.write("<a href='http://www.akoretax.com/news.shtml' 		onMouseOver=MM_swapImage('news','','http://www.akoretax.com/images/but_news_r.gif',1) 			onMouseOut=MM_swapImgRestore()><img src='http://www.akoretax.com/images/but_news"+src5+".gif' name='news' width='152' height='24' border='0' id='news'></a><br>");
  }
  
  document.write("<a href='http://www.akoretax.com/support.shtml' 	onMouseOver=MM_swapImage('support','','http://www.akoretax.com/images/but_support_r.gif',1) 	onMouseOut=MM_swapImgRestore()><img src='http://www.akoretax.com/images/but_support"+src6+".gif' name='support' width='152' height='24' border='0' id='support'></a><br>");
  document.write("<a href='http://www.akoretax.com/contactus.php' onMouseOver=MM_swapImage('contactus','','http://www.akoretax.com/images/but_contactus_r.gif',1) onMouseOut=MM_swapImgRestore()><img src='http://www.akoretax.com/images/but_contactus"+src7+".gif' name='contactus' width='152' height='24' border='0' id='contactus'></a><br>");


}



function site_get_image() { 
  siteName=get_primary_nav();
  siteSubName=get_secondary_nav();

  if (siteName == "index") {
  	document.write("<img src='http://www.akoretax.com/images/image_home.jpg' width=444 height=216 border=0>");
  }
  if (siteSubName == "aboutus") {
  	document.write("<img src='http://www.akoretax.com/images/image_aboutus.jpg' width=444 height=216 border=0>");
  }
  if (siteName == "products") {
  	document.write("<img src='http://www.akoretax.com/images/image_products.jpg' width=444 height=216 border=0>");
  }
  if (siteSubName == "solutions") {
  	document.write("<img src='http://www.akoretax.com/images/image_solutions.jpg' width=444 height=216 border=0>");
  }
  if (siteSubName == "news") {
  	document.write("<img src='http://www.akoretax.com/images/image_news.jpg' width=444 height=216 border=0>");
  }
  if (siteName == "support") {
  	document.write("<img src='http://www.akoretax.com/images/image_support.jpg' width=444 height=216 border=0>");
  }
  if (siteName == "contactus") {
  	document.write("<img src='http://www.akoretax.com/images/image_contactus.jpg' width=444 height=216 border=0>");
  }
  if (siteName == "cgi") {
  	document.write("<img src='http://www.akoretax.com/images/image_home.jpg' width=444 height=216 border=0>");
  }

}


function site_get_header() { 
  siteName=get_primary_nav();
  siteSubName=get_secondary_nav();

  if (siteSubName == "aboutus") {
  	document.write("<img src='http://www.akoretax.com/images/hd_aboutus.gif' width=55 height=13 border=0>");
  }
  if (siteName == "products") {
  	document.write("<img src='http://www.akoretax.com/images/hd_products.gif' width=59 height=13 border=0>");
  }
  if (siteSubName == "solutions") {
  	document.write("<img src='http://www.akoretax.com/images/hd_solutions.gif' width=121 height=13 border=0>");
  }
  if (siteSubName == "news") {
  	document.write("<img src='http://www.akoretax.com/images/hd_news.gif' width=85 height=13 border=0>");
  }
  if (siteName == "support") {
  	document.write("<img src='http://www.akoretax.com/images/hd_support.gif' width=51 height=13 border=0>");
  }
  if (siteName == "contactus") {
  	document.write("<img src='http://www.akoretax.com/images/hd_contactus.gif' width=67 height=13 border=0>");
  }

}

function site_get_subheader() { 
  siteName=get_primary_nav();
  siteSubName=get_secondary_nav();

  if (siteName == "team") {
  	document.write("<img src='http://www.akoretax.com/images/hd_sub_team.gif' width=40 height=13 border=0>");
  }
  if (siteName == "customers") {
  	document.write("<img src='http://www.akoretax.com/images/hd_sub_customers.gif' width=76 height=13 border=0>");
  }
  if (siteName == "employment") {
  	document.write("<img src='http://www.akoretax.com/images/hd_sub_employment.gif' width=83 height=13 border=0>");
  }
  if (siteName == "industries") {
  	document.write("<img src='http://www.akoretax.com/images/hd_sub_industries.gif' width=73 height=13 border=0>");
  }
  if (siteName == "government") {
  	document.write("<img src='http://www.akoretax.com/images/hd_sub_government.gif' width=84 height=13 border=0>");
  }
  if (siteName == "methodology") {
  	document.write("<img src='http://www.akoretax.com/images/hd_sub_methodology.gif' width=91 height=13 border=0>");
  }
  if (siteName == "case") {
  	document.write("<img src='http://www.akoretax.com/images/hd_sub_casestudies.gif' width=85 height=13 border=0>");
  }
  if (siteName == "press") {
  	document.write("<img src='http://www.akoretax.com/images/hd_sub_pressreleases.gif' width=99 height=13 border=0>");
  }
  if (siteName == "industry") {
  	document.write("<img src='http://www.akoretax.com/images/hd_sub_industryevents.gif' width=103 height=13 border=0>");
  }
  if (siteName == "testimonials") {
  	document.write("<img src='http://www.akoretax.com/images/hd_sub_testimonials.gif' width=86 height=13 border=0>");
  }

}
