
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);

menutype=new Array;
menuname=new Array;
menusection=new Array;
plink=new Array;

i=1;

menutype[i]=1;
menuname[i]="Home";
ms=i;
menusection[i]=0;
plink[i]="index.htm";
i++;

menutype[i]=1;
menuname[i]="News";
ms=i;
menusection[i]=ms;
plink[i]="news.php";
i++;

menutype[i]=1;
menuname[i]="About us";
ms=i;
menusection[i]=ms;
plink[i]="about_us.htm";
i++;

menutype[i]=1;
menuname[i]="Objectives";
ms=i;
menusection[i]=ms;
plink[i]="objectives.htm";
i++;

menutype[i]=1;
menuname[i]="About camelids";
ms=i;
menusection[i]=ms;
plink[i]="camelid.htm";
i++;

menutype[i]=1;
menuname[i]="Information sheets";
ms=i;
menusection[i]=ms;
plink[i]="infosheets.htm";
i++;

menutype[i]=1;
menuname[i]="Events";
ms=i;
menusection[i]=ms;
plink[i]="events.php";
i++;

menutype[i]=1;
menuname[i]="Other Services";
ms=i;
menusection[i]=ms;
plink[i]="services.php";
i++;

menutype[i]=1;
menuname[i]="Other Organisations";
ms=i;
menusection[i]=ms;
plink[i]="orgs.htm";
i++;

pagetotal=i-1;

function makemenu() {


for(i=1;i<=pagetotal;i++){
if(thispage==menuname[i]) pageID=i;
}


thissection=0;
if(menutype[pageID]==2) thissection=menusection[pageID];

w('<p class="menumain">');

for(i=1;i<=pagetotal;i++){

if(menutype[i]==1) {

// section heading - no link
if(i==pageID) {
w('<font color="#00FFFF"><img border="0" src="images/marker.gif" width="13" height="9">'+menuname[i]+'</font><br>');
w('<img border="0" src="images/line.gif" width="132" height="2"><br>');
}

else {
if(i==thissection) {
w('<img border="0" src="images/marker.gif" width="11" height="9"><strong>'+menuname[i]+'</strong><br>');
}
else {
w('<a href="'+plink[i]+'" class="menulink"><img border="0" src="images/blank.gif" width="11" height="9">'+menuname[i]+'</a><br>');
w('<img border="0" src="images/line.gif" width="132" height="2"><br>');
}
}
}


if(menutype[i]==2) {
if(menusection[i]==thissection) {
if(i==pageID) w('<font color="#FF9900"><img border="0" src="images/blank.gif" width="13" height="9">'+menuname[i]+'</font><br>');
else w('<a href="'+plink[i]+'"><img border="0" src="images/blank.gif" width="13" height="9">'+menuname[i]+'</a><br>');

if(menutype[i+1]==1) w('<img border="0" src="images/line.gif" width="132" height="2"><br>');
}
}

// end of loop
}
}


// MAKE PAGE

w('<div align="center"><center>');
w('<table border="0" width="100%" cellspacing="2" cellpadding="0" height="100%" bgcolor="#667FFF"><tr>');
w('<td width="140" valign="top" align="center" bgcolor="#667FFF">');

w('<table border="0" width="140" cellspacing="0" cellpadding="0" height="100%">');
w('<tr><td width="100%" valign="top">');
w('<p align="center"><img src="images/blank.gif" width="111" height="6"><br><img src="images/BClogo.gif" width="132" height="112">');
makemenu();
w('<p class="smalltext"><font color="#667FFF">British Camelids</font>');
w('</td></tr></table></td>');

w('<td width="1" bgcolor="#000066"><img src="images/blank.gif" width="1" height="6"></td>')

w('<td bgcolor="white" valign="top"><img border="0" src="images/blank.gif" width="576" height="2">');
w('<table border="0" width="100%" cellspacing="0" cellpadding="10"><tr><td width="100%">');


function finish() {
w('</td></tr></table>');
w('<br>&nbsp;</td>');
w('<td width="1" bgcolor="#000066"><img src="images/blank.gif" width="1" height="6"></td>')
w('<td width="40"><img src="images/blank.gif" width="40" height="6"></td>');
w('</tr></table>');
w('</center></div>');
}

function w(cont) {document.write(cont);}
