// JavaScript Document');

var updated = '20 August 2010';
var year = '2010';

var Query = location.search.substring(1);

var Home = "http://nickyakehurst.com/";
var MenuGroupName = new Array();
var MenuGroupFolder = new Array();
var MenuGroupLink = new Array();
var MenuGroupLink2 = new Array();
var MenuGroupSubLimit = new Array();
var MenuGroupSubNames = new Array();
var MenuGroupSubFolders = new Array();
var MenuGroupSubLinks = new Array();
var MenuSubName = new Array();
var MenuSubFolder = new Array();
var MenuSubLink = new Array();
var MiniName = new Array();
var MiniLink = new Array();
var MiniBreak = new Array();
var I=0;

MenuGroupName[I] = 'Homepage';
MenuGroupFolder[I] = '';
MenuGroupLink[I] = 'index.html';
MenuGroupSubNames[I] = '';


I++;
MenuGroupName[I] = 'Consultancy Services';
MenuGroupFolder[I] = 'consultancy/';
MenuGroupLink[I] = 'index.html';
MenuGroupSubLimit[I] = 6;
MenuGroupSubNames[I] = 'Artist Management#Copyright and Legal#Curatorial Services';
MenuGroupSubFolders[I] = 'consultancy/management/#consultancy/copyright/#consultancy/curatorial/';
MenuGroupSubLinks[I] = 'index.html#index.html#index.html';

I++;
MenuGroupName[I] = 'Photographers';
MenuGroupFolder[I] = 'photographers/';
MenuGroupLink[I] = 'index.html';
MenuGroupLink2[I] = 'index2.html';
MenuGroupSubLimit[I] = 8;
//MenuGroupSubNames[I] = 'Jerry Berndt#Jamie Hodgson#Paul Kilsby#Helen Lyon#José Marti#Charlie Phillips#Michael Woods';
//MenuGroupSubFolders[I] = 'photographers/JerryBerndt/#photographers/JamieHodgson/#photographers/PaulKilsby/#photographers/HelenLyon/#photographers/JoseMarti/#photographers/CharliePhillips/#photographers/MichaelWoods/';
//MenuGroupSubLinks[I] = 'index.html#index.html#index.html#index.html#index.html#index.html#index.html';
MenuGroupSubNames[I] = 'Richard K Diran#Jamie Hodgson#Paul Kilsby#Helen Lyon#José Marti#Charlie Phillips#Karin Rosenthal#Michael Woods';
MenuGroupSubFolders[I] = 'photographers/RichardKDiran/#photographers/JamieHodgson/#photographers/PaulKilsby/#photographers/HelenLyon/#photographers/JoseMarti/#photographers/CharliePhillips/#photographers/KarinRosenthal/#photographers/MichaelWoods/';
MenuGroupSubLinks[I] = 'index.html#index.html#index.html#index.html#index.html#index.html#index.html#index.html';

I++;
MenuGroupName[I] = 'Touring Shows';
MenuGroupFolder[I] = 'touring/';
MenuGroupLink[I] = 'index.html';
MenuGroupSubNames[I] = '';

I++;
MenuGroupName[I] = 'Publications';
MenuGroupFolder[I] = 'publications/';
MenuGroupLink[I] = 'index.html';
MenuGroupSubNames[I] = '';

I++;
MenuGroupName[I] = 'Contact';
MenuGroupFolder[I] = 'contact/';
MenuGroupLink[I] = 'index.html';
MenuGroupSubNames[I] = '';


X = new String(window.location.href);
var ThisPageFileName = X.substr(X.indexOf(Home)+Home.length, X.length-X.indexOf(Home)-Home.length);
Y = new String(window.location.href);
var ThisPageFolderName = Y.substr(Y.indexOf(Home)+Home.length, Y.lastIndexOf('/')-Y.indexOf(Home)-Home.length) + '/';
var IsASubSelected;

// Main div to hold whole page and table for 1-2-1 layout
document.write ('<div style="margin-right:auto;margin-left:auto;margin-top:10px;width:850px;">');
document.write ('<table width="850" border="0" cellspacing="0" cellpadding="0" class="NAMainTable">');
// Top line (1 col) for main page heading/logo
document.write ('<tr>');
document.write ('<td width="850" height="90" colspan="2" style="border-top:1px solid #FFFFFF;border-left:1px solid #FFFFFF;border-right:1px solid #EEEEEE;background-color:#C3C3C3;">');
if   (Query == "a=b")
     {document.write ('<a href="index.html"><img src="/graphics/logolarger.jpg" style="margin-top:0px;padding-top:5px;border:0px;"></a>');}
else {document.write ('<a href="index.html?a=b"><img src="/graphics/logo.jpg" style="margin-top:5px;border:0px;"></a>');}
 
document.write ('</td>');
document.write ('</tr>');
// Seond line (2 cols) for menu and page content
document.write ('<tr>');
// s=p is to suppress the menu column
if   (Query == "s=p")
     {document.write ('<td width="700" valign="top" style="border-right:1px solid #EEEEEE;border-top:1px solid #EEEEEE;padding:5px 5px 5px 5px;text-align:center;background-color:#FFFFFF;">');}
else {document.write ('<td width="161" height="600" style="border-left:1px solid #FFFFFF; border-right:1px solid #FFFFFF; vertical-align:top;background-color:#C3C3C3;">');	
      for (var i = 0; i < MenuGroupName.length; i++)
          {CreateMenuGroup();}
      document.write('<p class="ZLineSingle"><span class="ZLink"> </span></p>');
	  var BoxMenuData;
      if  (BoxMenuData)
          {document.write(BoxMenuData);}
      document.write ('</td>');
      document.write ('<td width="700" valign="top" style="border-right:1px solid #EEEEEE;border-top:1px solid #EEEEEE;padding:10px 10px 10px 10px;text-align:center;background-color:#FFFFFF;">');
	 }
		  
function CreateMenuGroup() {
// Loop through each page in the menu
if      (MenuGroupFolder[i].length == 0)  // Is this a top level page - ie is it the homepage
        {if   (ThisPageFileName == MenuGroupLink[i])  // Is this the current page
              {document.write('<p class="ZLineSingle"><a href="' + Home + MenuGroupLink[i] + '" class="ZLinkThis"><img src="' + Home + 'graphics/menubulletchosen.gif" border="0">' + MenuGroupName[i] + '</a></p>');}
         else {document.write('<p class="ZLineSingle"><a href="' + Home + MenuGroupLink[i] + '" class="ZLink"><img src="' + Home + 'graphics/menubullet.gif" border="0">' + MenuGroupName[i] + '</a></p>');}
	    }
else if (MenuGroupSubNames[i].length == 0) // Is this a single page - ie with no sub pages
        {if   (ThisPageFolderName == MenuGroupFolder[i])  // Is this the current page
              {document.write('<p class="ZLineSingle"><a href="' + Home + MenuGroupFolder[i] + MenuGroupLink[i] + '" class="ZLinkThis"><img src="' + Home + 'graphics/menubulletchosen.gif" border="0">' + MenuGroupName[i] + '</a></p>');}
         else {document.write('<p class="ZLineSingle"><a href="' + Home + MenuGroupFolder[i]  + MenuGroupLink[i] + '" class="ZLink"><img src="' + Home + 'graphics/menubullet.gif" border="0">' + MenuGroupName[i] + '</a></p>');}
        }
else    {// Then ... it must be a multi page
         MenuSubName = MenuGroupSubNames[i].split('#');
         MenuSubFolder = MenuGroupSubFolders[i].split('#');
         MenuSubLink = MenuGroupSubLinks[i].split('#');
		 if  (MenuSubName.length < MenuGroupSubLimit[i])
             {MenuGroupSubLimit[i] = MenuSubName.length;}
			 
	     if   (ThisPageFileName == MenuGroupFolder[i] + MenuGroupLink[i])  // See if the current page is the first group level page
              {document.write('<p class="ZLineGroup"><a href="' + Home + MenuGroupFolder[i] + MenuGroupLink[i] + '" class="ZLinkThis"><img src="' + Home + 'graphics/menubulletchosen.gif" border="0">' + MenuGroupName[i] + '</a></p>');
			   for  (var j=0; j < MenuGroupSubLimit[i]; j++)
                    {document.write('<p class="ZLineSub"><a href="' + Home + MenuSubFolder[j] + MenuSubLink[j] + '" class="ZSubLink">' + MenuSubName[j] + '</a></p>');}
				if  (MenuSubName.length > MenuGroupSubLimit[i])
					{document.write('<p class="ZLineSub" style="text-align:right"><a href="' + Home + MenuGroupFolder[i] + MenuGroupLink2[i] + '" class="NAMenuSubLink">... more ...  </a></p>');}
		      }
	     else if  (ThisPageFileName == MenuGroupFolder[i] + MenuGroupLink2[i])  // See if the current page is the second group level page
              {document.write('<p class="ZLineGroup"><a href="' + Home + MenuGroupFolder[i] + MenuGroupLink[i] + '" class="ZLinkThis"><img src="' + Home + 'graphics/menubulletchosen.gif" border="0">' + MenuGroupName[i] + '</a></p>');
			   for  (var j=MenuGroupSubLimit[i]; j < MenuSubName.length; j++)
                    {document.write('<p class="ZLineSub"><a href="' + Home + MenuSubFolder[j] + MenuSubLink[j] + '" class="ZSubLink">' + MenuSubName[j] + '</a></p>');}
				if  (MenuSubName.length > MenuGroupSubLimit[i])
					{document.write('<p class="ZLineSub" style="text-align:right"><a href="' + Home + MenuGroupFolder[i] + MenuGroupLink[i] + '" class="ZSubLink">... more ...  </a></p>');}
		      }
         else {// See if one of the entries within the group has the same folder as the current page
               IsASubSelected = "-1";
               for  (var j=0; j < MenuSubName.length; j++){if  (ThisPageFolderName == MenuSubFolder[j]) {IsASubSelected = j; }}
               if   (IsASubSelected > -1)
                    {// One of the entries within the group has the same folder as the current page
  				     document.write('<p class="ZLineGroup"><a href="' + Home + MenuGroupFolder[i] + MenuGroupLink[i] + '" class="ZLink"><img src="' + Home + 'graphics/menubulletchosen.gif" border="0">' + MenuGroupName[i] + '</a></p>');
					 if  (MenuGroupSubLimit[i] > IsASubSelected)  
                         {for  (var j=0; j < MenuGroupSubLimit[i]; j++)
                               {if   (ThisPageFolderName == MenuSubFolder[j])
  						             {document.write('<p class="ZLineSub"><a href="' + Home + MenuSubFolder[j] + MenuSubLink[j] + '" class="ZSubLinkThis">' + MenuSubName[j] + '</a></p>');}
  					            else {document.write('<p class="ZLineSub"><a href="' + Home + MenuSubFolder[j] + MenuSubLink[j] + '" class="ZSubLink">' + MenuSubName[j] + '</a></p>');}
							   }
  				          if  (MenuSubName.length > MenuGroupSubLimit[i])
					          {document.write('<p class="ZLineSub" style="text-align:right"><a href="' + Home + MenuGroupFolder[i] + MenuGroupLink2[i] + '" class="ZSubLink">... more ...  </a></p>');}
						 }
                     else
					     {for  (var j=MenuGroupSubLimit[i]; j < MenuSubName.length; j++)
                               {if   (ThisPageFolderName == MenuSubFolder[j])
  						             {document.write('<p class="ZLineSub"><a href="' + Home + MenuSubFolder[j] + MenuSubLink[j] + '" class="ZSubLinkThis">' + MenuSubName[j] + '</a></p>');}
  					            else {document.write('<p class="ZLineSub"><a href="' + Home + MenuSubFolder[j] + MenuSubLink[j] + '" class="ZSubLink">' + MenuSubName[j] + '</a></p>');}
							   }
					      document.write('<p class="ZLineSub" style="text-align:right"><a href="' + Home + MenuGroupFolder[i] + MenuGroupLink[i] + '" class="ZSubLink">... more ...  </a></p>');
						 }

}
  			   else  {document.write('<p class="ZLineGroup"><a href="' + Home + MenuGroupFolder[i] + MenuGroupLink[i] + '" class="ZLink"><img src="' + Home + 'graphics/menubullet.gif" border="0">' + MenuGroupName[i] + '</a></p>');}
		      }
        }
}




function PageEnd() {
document.write ('</td>');
var warning = " ";
if   ((window.location.pathname == "/") || (window.location.pathname == "/index.html"))
     {document.write ('</tr>');
      document.write ('<tr>');
	  warning = '<br>No images, graphics or photographs on this site may be used, copied, reproduced, manipulated or archived<br>without prior consent of Akehurst Creative Management Ltd or the copyright holder(s) concerned.';
      document.write ('<td width="850" colspan="2" height="25" style="border:1px solid #EEEEEE;font-size:11px;color:#000080;background-color:#C3C3C3;">Updated: ' +  updated + '. © Akehurst Creative Management Ltd, ' + year + '.' + warning + '</td>');
      document.write ('</tr>');}
else {document.write ('</tr>');
      document.write ('<tr>');
      document.write ('<td width="850" colspan="2" height="25" style="border:1px solid #EEEEEE;font-size:11px;color:#000080;background-color:#C3C3C3;">Updated: ' +  updated + '. © Akehurst Creative Management Ltd, ' + year + '.' + warning + '</td>');
      document.write ('</tr>');
      document.write ('<tr>');
      document.write ('<td width="850" colspan="2" height="250" style="border:0px 0px 0px 0px;font-famuily:Arial, Helvetica, sans-serif;background:#444444;">&nbsp;</td>');
      document.write ('</tr>');}	
document.write ('</table></div>');
}


function MiniMenu() {
if  (PageTitle.length > 0)
    {document.write('<p class="NAPageHeading">' + PageTitle + '</p>');}
Z = new String(window.location.href);
var ThisFileName = Z.substr(Z.lastIndexOf('/')+1,Z.length-Z.lastIndexOf('/')-1);
var COL;
document.write ('<div style="margin:0px 0px 20px 0px;" align="center"><table style="margin:0px 0px 0px 0px;"><tr>');
for  (var k=0; k < MiniName.length; k++)
     {if  (ThisFileName == MiniLink[k]) {COL = ' style="color:#800000;"';} else {COL = '';}
	  if  ((k == LinkBreak) && (LinkBreak > 0)) {document.write ('</tr></table style="margin:0px 0px 0px 0px;"><table><tr>')}
	  if  (MiniBreak[k] == 1) {document.write ('</tr></table style="margin:0px 0px 0px 0px;"><table><tr>')}
	  document.write ('<td><ul style="list-style:none; margin:0px 0px 0px 0px; padding:0px 0px 0px 0px; border:none;">');
      document.write ('<li class="ZMiniLine"><a href="' + MiniLink[k] + '" class="ZMiniLink"' + COL + '>' + MiniName[k] + '</a></li>');
      document.write ('</ul></td>');}
document.write ('</tr></table></div>');
}


