/* Andrew Urquhart : Client-Side Request Object for javascript : http://andrewu.co.uk/tools/request/
COPYRIGHT:You are free to use this script for any use you wish if this comment is left intact. Feel free to enhance the script and send me the updated version. Please don't redistribute. This script is provided as is,with no warranty of any kind. Use it at your own risk. Copyright Andrew R Urquhart; VERSION:#1.3 2005-05-11 17:52 UTC*/
function RObj(ea){var LS="";var QS=new Object();var un="undefined";var x=null;var f="function";var n="number";var r="string";var e1="ERROR:Index out of range in\r\nRequest.QueryString";var e2="ERROR:Wrong number of arguments or invalid property assignment\r\nRequest.QueryString";var e3="ERROR:Object doesn't support this property or method\r\nRequest.QueryString.Key";function Err(arg){if(ea){alert("Request Object:\r\n"+arg)}};function URID(t){var d="";if(t){for(var i=0;i<t.length;++i){var c=t.charAt(i);d+=(c=="+"?" ":c)}};return unescape(d)};function OL(o){var l=0;for(var i in o){if(typeof o[i]!=f){l++}};return l};function AK(key){var auk=true;for(var u in QS){if(typeof QS[u]!=f&&u.toString().toLowerCase()==key.toLowerCase()){auk=false;return u}}if(auk){QS[key]=new Object();QS[key].toString=function(){return TS(QS[key])};QS[key].Count=function(){return OL(QS[key])};QS[key].Count.toString=function(){return OL(QS[key]).toString()};QS[key].Item=function(e){if(typeof e==un){return QS[key]}else {if(typeof e==n){var a=QS[key][Math.ceil(e)];if(typeof a==un){Err(e1+"(\""+key+"\").Item("+e+")")};return a}else {Err("ERROR:Expecting numeric input in\r\nRequest.QueryString(\""+key+"\").Item(\""+e+"\")")}}};QS[key].Item.toString=function(e){if(typeof e==un){return QS[key].toString()}else {var a=QS[key][e];if(typeof a==un){Err(e1+"(\""+key+"\").Item("+e+")")};return a.toString()}};QS[key].Key=function(e){var t=typeof e;if(t==r){var a=QS[key][e];return(typeof a!=un&&a&&a.toString()?e:"")}else {Err(e3+"("+(e?e:"")+")")}};QS[key].Key.toString=function(){return x}};return key};function AVTK(key,val){if(key!=""){var key=AK(key);var l=OL(QS[key]);QS[key][l+1]=val}};function TS(o){var s="";for(var i in o){var ty=typeof o[i];if(ty=="object"){s+=TS(o[i])}else if(ty!=f){s+=o[i]+", "}};var l=s.length;if(l>1){return(s.substring(0,l-2))}return(s==""?x:s)};function KM(k,o){var k=k.toLowerCase();for(var u in o){if(typeof o[u]!=f&&u.toString().toLowerCase()==k){return u}}}if(window.location&&window.location.search){LS=window.location.search;var l=LS.length;if(l>0){LS=LS.substring(1,l);var preAmpAt=0;var ampAt=-1;var eqAt=-1;var k=0;var skip=false;for(var i=0;i<l;++i){var c=LS.charAt(i);if(LS.charAt(preAmpAt)=="="||(preAmpAt==0&&i==0&&c=="=")){skip=true}if(c=="="&&eqAt==-1&&!skip){eqAt=i}if(c=="&"&&ampAt==-1){if(eqAt!=-1){ampAt=i}if(skip){preAmpAt=i+1};skip=false}if(ampAt>eqAt){AVTK(URID(LS.substring(preAmpAt,eqAt)),URID(LS.substring(eqAt+1,ampAt)));preAmpAt=ampAt+1;eqAt=ampAt=-1;++k}}if(LS.charAt(preAmpAt)!="="&&(preAmpAt!=0||i!=0||c!="=")){if(preAmpAt!=l){if(eqAt!=-1){AVTK(URID(LS.substring(preAmpAt,eqAt)),URID(LS.substring(eqAt+1,l)))}else if(preAmpAt!=l-1){AVTK(URID(LS.substring(preAmpAt,l)),"")}}if(l==1){AVTK(LS.substring(0,1),"")}}}};var TC=OL(QS);if(!TC){TC=0};QS.toString=function(){return LS.toString()};QS.Count=function(){return(TC?TC:0)};QS.Count.toString=function(){return(TC?TC.toString():"0")};QS.Item=function(e){if(typeof e==un){return LS}else {if(typeof e==n){var e=Math.ceil(e);var c=0;for(var i in QS){if(typeof QS[i]!=f&&++c==e){return QS[i]}};Err(e1+"().Item("+e+")")}else {return QS[KM(e,QS)]}};return x};QS.Item.toString=function(){return LS.toString()};QS.Key=function(e){var t=typeof e;if(t==n){var e=Math.ceil(e);var c=0;for(var i in QS){if(typeof QS[i]!=f&&++c==e){return i}}}else if(t==r){var e=KM(e,QS);var a=QS[e];return(typeof a!=un&&a&&a.toString()?e:"")}else {Err(e2+"().Key("+(e?e:"")+")")};Err(e1+"().Item("+e+")")};QS.Key.toString=function(){Err(e2+"().Key")};this.QueryString=function(k){if(typeof k==un){return QS}else {var k=KM(k,QS);if(typeof QS[k]==un){t=new Object();t.Count=function(){return 0};t.Count.toString=function(){return "0"};t.toString=function(){return x};t.Item=function(e){return x};t.Item.toString=function(){return x};t.Key=function(e){Err(e3+"("+(e?e:"")+")")};t.Key.toString=function(){return x};return t}if(typeof k==n){return QS.Item(k)}else {return QS[k]}}};this.QueryString.toString=function(){return LS.toString()};this.QueryString.Count=function(){return(TC?TC:0)};this.QueryString.Count.toString=function(){return(TC?TC.toString():"0")};this.QueryString.Item=function(e){if(typeof e==un){return LS.toString()}else {if(typeof e==n){var e=Math.ceil(e);var c=0;for(var i in QS){if(typeof QS[i]!=f&&++c==e){return QS[i]}};Err(e1+".Item("+e+")")}else {return QS[KM(e,QS)]}}if(typeof e==n){Err(e1+".Item("+e+")")};return x};this.QueryString.Item.toString=function(){return LS.toString()};this.QueryString.Key=function(e){var t=typeof e;if(t==n){var e=Math.ceil(e);var c=0;for(var i in QS){if(typeof QS[i]=="object"&&(++c==e)){return i}}}else if(t==r){var e=KM(e,QS);var a=QS[e];return(typeof a!=un&&a&&a.toString()?e:"")}else {Err(e2+".Key("+(e?e:"")+")")};Err(e1+".Item("+e+")")};this.QueryString.Key.toString=function(){Err(e2+".Key")};this.Version=1.3;this.Author="Andrew Urquhart (www.andrewu.co.uk)"};var Request=new RObj(false);







// Ornibus Ltd 09/05/05
// MENU SYSTEM JAVA SCRIPT
// This is a java script menu system. It uses functions to build a menu system up that is easy to change or modify
// It also checks for different browsers and adjusts the positioning to accomodate the differences in browsers.
// A menu system is created/built up and then positioned relatively to an existing object. This is done upon load and resize events.


// Browser detection
var browser = navigator.appName;
if (navigator.userAgent.toLowerCase().indexOf("opera")>=0) browser = "Opera";
var platform = "pc";
var whichStyle = "pc_ie";
is = new BrowserCheck();
function BrowserCheck() {
if (navigator.appVersion.toLowerCase().indexOf('mac')>=0) {
platform = "mac";
this.mac = true;
}
else this.pc = true;
this.platform = platform;
var vers = parseInt(navigator.appVersion);
this.vers = vers;
this.browser = browser;
switch (browser) {
case "Microsoft Internet Explorer":
this.ie = true;
browser_base = "ie";
browser_family = "ie3";
whichStyle = "pc_ie";
if (vers <= 3) {
browser_vers = "ie3.0";
this.ie3 = true;
}
if (vers >= 4)	{
browser_family = "ie5";
browser_vers = "ie5.0";
if (navigator.userAgent.toLowerCase().indexOf('msie 4')>=0) {
this.ie4 = true;
browser_vers = "ie4.0";
}
if (navigator.userAgent.toLowerCase().indexOf('msie 5.0')>=0) {
this.ie5 = true;
this.vers = 5;
browser_vers = "ie5.0";
}
if (navigator.userAgent.toLowerCase().indexOf('msie 5.5')>=0) {
this.ie5 = true;
this.vers = 5;
browser_vers = "ie5.5";
}
if (navigator.userAgent.toLowerCase().indexOf('msie 6')>=0) {
this.ie5 = true;
this.vers = 5;
this.ie6 = true;
browser_vers = "ie6.0";
}
browser_family = browser_vers.substr(0,3);
}
break;
case "Netscape":
this.ns = true;
browser_base = "ns";
whichStyle = "pc_ns";
if (vers <= 3)	{
this.ns3 = true;
browser_family = "ns3";
browser_vers = "ns3.0";
}
if (vers == 4)	{
this.ns4 = true;
browser_vers = "ns4.0";
browser_family = "ns4";
if (navigator.userAgent.toLowerCase().indexOf('mozilla/4')>=0) browser_vers = "ns4.0";
if (navigator.userAgent.toLowerCase().indexOf('mozilla/4.7')>=0) browser_vers = "ns4.7";
}
if (vers >= 5)	{
this.ns5 = true;
this.ns6 = true;
browser_vers = "ns6.0";
browser_family = "ns6";
whichStyle = "pc_ie";
if (navigator.userAgent.toLowerCase().indexOf('netscape6')>=0) browser_vers = "ns6.0";
if (navigator.userAgent.toLowerCase().indexOf('netscape6/6.1')>=0) browser_vers = "ns6.1";
if (navigator.userAgent.toLowerCase().indexOf('netscape6/6.2')>=0) browser_vers = "ns6.2";
}
break;
case "Opera":
this.op = true;
if (navigator.userAgent.toLowerCase().indexOf("opera/5")>=0) {
browser_base = "op";
browser_family = "op5";
browser_vers = "op5.0";
whichStyle = "pc_ns";
}
else {
browser_base = "op";
browser_family = "op6";
browser_vers = "op6.0";
whichStyle = "pc_ie";
}
break;
default:
browser_base = "uk";
browser_vers = "uk5";
whichStyle = "pc_ie";
break;
}
}
if (platform == "mac") {
if (browser_family == "ns6") whichStyle="mac_ns";
else whichStyle="mac_ie";
}

// Function getElm()

function getElm(id){
if (document.layers) return document.layers[id];
else if (document.all) return document.all[id];
else return document.getElementById(id);
}

// Global vars

var cssClassSwap = "strat_colour3";
var HEADING=1;
var HEADINGLINK=2;
var SUBHEADING=3;
var LINK=4;
var TERTLINK=5;
var FINALARRAYELEMENT=6;
var LOGINBOX=7;
var button_delay;
var browser=navigator.appName;
var j=0;
var retrieve_count=0;
var lhcount=0;
var lhmenu=new Array(0);
var qstring_arr=new Array(0);
var forceclick="no";
var heading_link;
var subheading_link;
var highlight_subheading;
var headinglink_link;
var selected_array_pos;
var selected_pos_text;
var highlight_selected_pos;
var elmt_selected=-1;
var item_selected=-1;
var linkfound=false;
var queryfound=false;
var nav_space=0; //177
var iframewrite=true;
var macinitialload=false;
var strmac;
var menuTitle;

// for IE browser

if (browser_vers=="ie5.0" || browser_vers=="op6.0") iframewrite=false;
document.write('<div id="menu2" style="z-index: 999; visibility: visible;"></div>');

// Function menuTitle()

function menuTitle(txt)
{
    menuTitle = txt;
}

// Function menuItem()
// This function takes recieves the data and data type details for each menu item, be it a link, header, sublink... and where it links to or what it displays.

function menuItem(type,parid,id,text,link)
{
if (type==FINALARRAYELEMENT) return;
var item=new Item(type,parid,id,text,link);
lhmenu[lhcount]=item;
if (lhmenu[lhcount].id==document.nav_form.pageid.value && linkfound==false)
{ var prim="prim";
var sec="sec";
getQueryValue(prim);
qstring_arr[0]=string_arr[i].toUpperCase();
getQueryValue(sec);
if (string_arr[i]!="not found") qstring_arr[1]=string_arr[i].toUpperCase();
var exitloop=false;
selected_array_pos=lhcount;
highlight_selected_pos=selected_array_pos;
selected_pos_text=lhmenu[highlight_selected_pos].text;
var menutype=lhmenu[lhcount].type;
if (queryfound==true)
{	if (menutype==LINK) find_secondary();
if (menutype==TERTLINK)
{	find_tertiary();
find_secondary();
}
if (menutype==HEADINGLINK) find_headinglink(menutype);
}
else no_querylink(menutype);
}
lhcount+=1;
return;
}


function find_headinglink(menutype)
{	if (menutype==HEADINGLINK && lhmenu[lhcount].parid==qstring_arr[0])
{	headinglink_link=lhmenu[lhcount].text;
linkfound=true;
}
}
function no_querylink(menutype)
{	for (retrieve_count=lhcount; retrieve_count>=0; retrieve_count--)
{
if (menutype==LINK && lhmenu[retrieve_count].type==HEADING)
{ elmt_selected=retrieve_count;
heading_link=lhmenu[retrieve_count].text;
linkfound=true;
break;
}
if (menutype==TERTLINK && lhmenu[retrieve_count].type==SUBHEADING)
{	subheading_link=lhmenu[retrieve_count].text;
highlight_subheading=subheading_link;
for (retrieve_count=retrieve_count; retrieve_count>=0; retrieve_count--)
{	if (lhmenu[retrieve_count].type==HEADING)
{	elmt_selected=retrieve_count;
heading_link=lhmenu[retrieve_count].text;
linkfound=true;
exitloop=true;
break;
}
}
if (exitloop==true) break;
}
if (menutype==HEADINGLINK && lhmenu[retrieve_count].type==HEADINGLINK)
{	headinglink_link=lhmenu[retrieve_count].text;
linkfound=true;
break;
}
}
}
function Item(type,parid,id,text,link)
{	this.type=type;
this.parid=parid;
this.id=id;
this.text=text;
this.link=link;
}
function writeVerneNav(layerName, str)
{
	
if (str == "") return;

if (typeof getElm(layerName) == "undefined") return;

if (document.getElementById||document.all)
{
if (typeof getElm(layerName) != "undefined") getElm(layerName).innerHTML=str;
if (browser_vers=="op6.0") document.getElementById(layerName).innerHTML=str;
}
else if (document.layers)
{	getElm(layerName).document.open();
getElm(layerName).document.writeln(str);
getElm(layerName).document.close();
}
var DivMenu=document.getElementById('menu2');
if (iframewrite) var IfrMenu=document.getElementById('DivTert');
if (navigator.appName=="Netscape")
{	if (DivMenu.style.display=="none") DivMenu.style.display="block";
else if (DivMenu.style.display=="block") DivMenu.style.display="none";
}
else
{	if (document.getElementById("menu2").style.display=="none")
{	DivMenu.style.display="block";
}
}
}
function createMenu()
{   cssClassSwap = "strat_colour3";
	if (browser=="Netscape")
    {	nav_space=182;
        str='<table width="221" border="0" cellpadding="0" cellspacing="0">';
    }
    else str='<table width="221" border="0"  cellpadding="0" cellspacing="0">';
    menulen=lhmenu.length;

    str+='<tr><td height="15" valign="middle" class="strat_colour_head">' + menuTitle + '' + '</tr></td>';

    showItems=false;
    subMenu=false;
    prevHeading=false;
    ypos=0;
    for (lhcount=0; lhcount<menulen; lhcount++)
    {
        if ((lhmenu[lhcount].type==HEADING) || (lhmenu[lhcount].type==HEADING && lhmenu[lhcount].text==heading_link))
        {
            if ((lhcount==elmt_selected) || (lhmenu[lhcount].text==heading_link))
            {	arrow="down";
                menulink="Close";
                showItems=true;
            }
            else
            {	arrow="right";
                menulink="Open";
                showItems=false;
            }
            submenu=false;
            if (cssClassSwap=="strat_colour2")
                cssClassSwap="strat_colour3";
            else
                cssClassSwap="strat_colour2";
 
            /*-----------------------------------------------------------------------------------------------------------------------
            MENULINK
            -----------------------------------------------------------------------------------------------------------------------*/
            hreflink='<a href="javascript:void(0);" class="left_column grey_link" onClick="javascript:menu'+menulink+'('+lhcount+');return false;">';
            str+='<tr class='+cssClassSwap+' height="15" valign="middle" onmouseover="this.className=\''+cssClassSwap+'\'" onmouseout="this.className=\''+cssClassSwap+'\'"><td height="15" valign="middle" class="'+cssClassSwap+'">'+hreflink+lhmenu[lhcount].text+'</td><td>'+hreflink+'</td></tr>';
            /*-----------------------------------------------------------------------------------------------------------------------*/

            ypos=ypos+24;
            prevHeading=true;
        }
        else if ((lhmenu[lhcount].type==HEADINGLINK) || (lhmenu[lhcount].type==HEADINGLINK && lhmenu[lhcount].text==headinglink_link))
        {

            if (cssClassSwap=="strat_colour2")
                cssClassSwap="strat_colour3";
            else
                cssClassSwap="strat_colour2";


            /*-----------------------------------------------------------------------------------------------------------------------
            HEADINGLINK
            -----------------------------------------------------------------------------------------------------------------------*/
            hreflink='<a href="javascript:findlink('+lhcount+')" class="left_column grey_link" onClick="linkto('+lhcount+')">';


            str+='<tr class="'+cssClassSwap+'" onmouseover="this.className=\''+cssClassSwap+'\'" onmouseout="this.className=\''+cssClassSwap+'\'"><td height="15" valign="middle" class="'+cssClassSwap+'">'+hreflink+lhmenu[lhcount].text+'</td></tr></a>';
            /*-----------------------------------------------------------------------------------------------------------------------*/

            ypos=ypos+24;
            prevHeading=true;
        }
        if (showItems)
        {	prevHeading=false;
            if ((lhcount==item_selected) || (lhcount==selected_array_pos)) cssClass="menu_selected";
            else cssClass = "menu_item";
            if (lhmenu[lhcount].type==SUBHEADING)
            {	if (lhmenu[lhcount].text==highlight_subheading) cssClass="menu_selected2";
                thelink='"javascript:menuPopup('+(lhcount+1)+','+ypos+');"';
                hreflink='<a href="javascript:findlink('+lhcount+')" class="left_column grey_link" onClick="linkto('+lhcount+')">';
                str+='<tr class="'+cssClassSwap+'" onmouseover="this.className=\''+cssClassSwap+'\'" onmouseout="this.className=\''+cssClassSwap+'\'"><td height="15" valign="middle" colspan="2" height="20">'+hreflink+lhmenu[lhcount].text+'</td></tr></a>';
                if (lhmenu[lhcount].text==subheading_link)
                {	forceclick="yes";
                    var ypos2=ypos;
                    var lhstore=lhcount+1;
                }
                subMenu=true;
                ypos=ypos+20;
            }
            //submenu links
            else
            {   if (lhmenu[lhcount].type==LINK && !submenu)
                {	if (lhcount==highlight_selected_pos) cssClass="menu_selected2";
                    hreflink='<img src="spacer.gif" width="8" height="8"><a href="javascript:findlink('+lhcount+')" class="left_column grey_link" onClick="linkto('+lhcount+')">';
                    str+='<tr class="'+cssClassSwap+'" onmouseover="this.className=\''+cssClassSwap+'\'" onmouseout="this.className=\''+cssClassSwap+'\'"><td height="15" valign="middle" class="'+cssClassSwap+'">'+hreflink+lhmenu[lhcount].text+'</td></tr></a>';
                    /*-----------------------------------------------------------------------------------------------------------------------*/
                    ypos=ypos+20;
                }
            }
        }
    }
    if (prevHeading) str+='<tr><td colspan="2"></td></tr>';
    str+='<tr class="menu_primary"><td colspan="2">&nbsp;</td></tr>';
    str+='</table>';
    if (platform == "mac")
    {
        str+='</tr></table>&nbsp;\n';
        strmac=str;
    }
    else str+='</tr></table>';
    if (platform!="mac" || browser_vers!="ie5.0" || macinitialload==true)
        writeVerneNav('menu',str);
    if (forceclick=="yes") menuPopup(lhstore,ypos2);
        selected_array_pos="";
}
function menuClose()
{	heading_link="";
subheading_link="";
selected_array_pos="";
j=0;
item_selected=-1;
elmt_selected=-1;
Clear_tert_menu(-25,0);
createMenu();
}
function menuOpen(menu_num)
{	heading_link="";
subheading_link="";
selected_array_pos="";
item_selected=-1;
elmt_selected=menu_num;
Clear_tert_menu(-25,0);
createMenu();
}

function Clear_tert_menu(menu_num,ypos)//deletes any tertiary menus currently open
{	menulen=lhmenu.length;
	str="";
	if (ypos>-1) getElm("menu2").style.top=(nav_space)+(ypos);
	//alert(str);
	writeVerneNav('menu2',str);
}
function linkto(link_num)
{	item_selected=link_num;
	cssClass="menu_selected";
}
//if the item contains a link this function is called.  If the item contains a page id use that, if not use the specified link.  We also need to build the querystring to enable our breadcrumb functionality
function findlink(lhcount)
{	var querylhnav="";
	var prim_par_id="";
	var sec_par_id="";
	var pagelink;
	
	//secondary or primary menu with a link
	if ((lhmenu[lhcount].type==LINK) || (lhmenu[lhcount].type==HEADINGLINK)) prim_par_id=lhmenu[lhcount].parid;
	
	else //we have a tertiary menu
	{	sec_par_id=lhmenu[lhcount].parid;
		//loop backwards to obtain the primary menu parent id
		for (retrieve_count=lhcount; retrieve_count>=0; retrieve_count--)
					{	if (lhmenu[retrieve_count].parid!=sec_par_id)
				  			{	prim_par_id=lhmenu[retrieve_count].parid;
				   		 		 break;
				  			}	
				 	}
	}	
	
	querylhnav="?prim="+prim_par_id.toLowerCase();

	if (lhmenu[lhcount].link!="")//if we have a page id use it
	{   pagelink=lhmenu[lhcount].link;
		window.location=pagelink;
	}
	else //we have page id
	{	pagelink=lhmenu[lhcount].id;
		
		if (sec_par_id=="")
		{	pagelink=buildVerneUrl(pagelink);
	      	pagelink+=querylhnav;
		  	window.location=pagelink;
		}
		else
		{	querylhnav=querylhnav+"&sec="+sec_par_id.toLowerCase();
		  	pagelink=buildVerneUrl(pagelink);
		 	pagelink+=querylhnav;
		  	window.location=pagelink;
		}  
	}
}
function buildVerneUrl(pageid)//build the url from the given pageid
{	var newLocation;
	if (arguments.length==1) newLocation=urlrewrite(pageid);
	
	else if (arguments.length==2) //add in content classifications and other parameters
	{   var urlextension=arguments[1];
		newLocation=urlrewrite(pageid,null,urlextension);
	}
	else if (arguments.length==3) //add in content classifications and other parameters
	{   var urlprotocol=arguments[1];
		var urlextension=arguments[2];
		newLocation=urlrewrite(pageid,urlprotocol,urlextension);
	}
	return(newLocation);
}
function popLinkto(menu_num,link_num)
{	heading_link="";
	subheading_link="";
	selected_array_pos="";
	item_selected=link_num;
}
function use_timer(thelink) //used to delay the appearance of the tertiary menu 
{	button_delay=setTimeout(thelink,500);
}
function button_off()
{	clearTimeout(button_delay);
}
function hide_table() //hides the tertiary menu
{	j=0;
	writeVerneNav('menu2',str);
}
function close_table(evnt)
{	var menucontent=document.getElementById("tertiary")

	if(document.all)
	{    if(!menucontent.contains(evnt.toElement))//IE
			setTimeout("hide_table()",300);
	}
	else
	{   if(evnt.currentTarget!= evnt.relatedTarget && !contains_ns6(menucontent, evnt.relatedTarget))//NS
			setTimeout("hide_table()",300);
	}
}
function contains_ns6(menucont, reltar)
{	while (reltar.parentNode)
	if ((reltar=reltar.parentNode)==menucont)
	return true;
	return false;	
}
function getQueryValue(fieldname)
{	querylhnav=this.location.href; //get the url string
	querylhnav=querylhnav.substring((querylhnav.indexOf('?')) + 1); //split the url so we get the query string
	string_arr=querylhnav.split('&'); //make an array of all the different name value pairs
	for (i=0; i< string_arr.length; i++) //for each pair....
		{ 	if ((string_arr[i].indexOf(fieldname)>-1) && (this.location.href.indexOf('?') > 0)) //search the string for our name
			{//split the string so we get RHS of = 
				string_arr[i]=string_arr[i].substring((string_arr[i].indexOf('=')) + 1);
				queryfound=true;
				return string_arr[i];
			}	
		}
	string_arr[i]="not found";
	return (string_arr[i]);
}



if (navigator.appName == "Netscape")
{
document.write('<div id="menu" style="visibility: visible;"></div>'); 
}

else
{
//document.write('<div id="menutop" style="visibility: visible;"><table width="160" cellpadding="0" cellspacing="0" height="5" valign="top" bgcolor="#FFFFFF" ><tr><td colspan="2"><img src="/cms/global/images/icons/topbar.gif" alt="" width="160" height="5" border="0"></td></tr></table></div>');

document.write('<div id="menu" style="visibility: visible;"></div>');
}

var fixed_tab;
if (((Request.QueryString('tab') == null) || (Request.QueryString('tab')==0)))  
{
	fixed_tab = "1";
}
else
{
	fixed_tab = Request.QueryString('tab');
}

var fixed_fund;
if ((("x"+Request.QueryString('fund')+"x" == "xnullx") || (Request.QueryString('fund') == "")))  
{
	fixed_fund = "";
}
else
{
	fixed_fund = Request.QueryString('fund');
}

var fixed_fundfactsheet;
if ((("x"+Request.QueryString('fundfactsheet')+"x" == "xnullx") || (Request.QueryString('fundfactsheet') == "")))  
{
	fixed_fundfactsheet = "";
}
else
{
	fixed_fundfactsheet = Request.QueryString('fundfactsheet');
}

var fixed_catID;
if ((("x"+Request.QueryString('catID')+"x" == "xnullx") || (Request.QueryString('catID') == "")))  
{
	fixed_catID = "";
}
else
{
	fixed_catID = Request.QueryString('catID');
}

if (1==1)  
{
    menuTitle("&nbsp;");
    menuItem(HEADINGLINK,"OVERVIEW","OVERVIEW","Overview","prices.asp");
    
    menuItem(HEADING,"DIRECTIONAL","DIRECTIONAL","Directional","");
    //menuItem(LINK,"DIRECTIONAL","DIRECTIONAL_FUND","Directional Fund","../Prices/prices_drill.asp?catID=FD05000049&tab=0&fund=directional");
    menuItem(LINK,"DIRECTIONAL","GLOBAL_DYNAMIC_TRADING_FUND","Global Dynamic Trading Fund","../Prices/prices_drill.asp?catID=FD00000435&tab=0&fund=GlobalDynamic");
    //menuItem(LINK,"DIRECTIONAL","RESOURCES_FUND","Resources Fund","../Prices/prices_drill.asp?catID=FD00000417&tab=0&fund=Resources");

    menuItem(HEADING,"LONG/SHORT EQUITY","LONG/SHORT EQUITY","Equity Long/Short","");
    menuItem(LINK,"LONG/SHORT EQUITY","EUROPEAN_ABSOLUTE","European Absolute","../Prices/prices_drill.asp?catID=FD00000065&tab=0&fund=european");
    menuItem(LINK,"LONG/SHORT EQUITY","GLOBAL_LONG/SHORT","Global Long/Short","../Prices/prices_drill.asp?catID=FD05000020&tab=0&fund=globallongshort");

    menuItem(HEADING,"MULTI_STRATEGY","MULTI_STRATEGY","Multi-Strategy","");
    menuItem(LINK,"MULTI_STRATEGY_GLOBAL","GLOBAL_MULTI-STRATEGY","Global Multi-strategy","../Prices/prices_drill.asp?catID=FD00000403&tab=0&fund=GlobalMultiStrat");

    menuItem(HEADING,"RELATIVE_VALUE","RELATIVE_VALUE","Relative Value","");
    menuItem(LINK,"RELATIVE_VALUE","EVENT_DRIVEN","Distressed and Event","../Prices/prices_drill.asp?catID=FD00000012&tab=0&fund=DistressedEvent");
    menuItem(LINK,"RELATIVE_VALUE","ASSET_SELECTION","Asset Selection","../Prices/prices_drill.asp?catID=FD00000087&tab=0&fund=Asset");

    menuItem(HEADINGLINK,"LATEST_PRICES","LATEST_PRICES","Final Prices","prices.asp" + "?tab=" + fixed_tab + "&fund=" + Request.QueryString('fund'));

    menuItem(HEADINGLINK,"FACT_SHEET","FACT_SHEET","Fund Factsheets","prices.asp?tab=" + fixed_tab + "&fund=" + Request.QueryString('fund')+"&fundfactsheets=1");

    menuItem(HEADINGLINK,"ESTIMATE PRICES","ESTIMATE PRICES","Estimated Prices","priceestimate.asp");

    menuItem(HEADINGLINK,"FUND_ADMINISTRATION","FUND_ADMINISTRATION","Fund Administration","prices.asp?tab=" + fixed_tab + "&fund=" + Request.QueryString('fund')+"&admin=1");

    menuItem(HEADINGLINK,"REGISTER","REGISTER","Further Information","prices.asp?tab=" + fixed_tab + "&fund=" + Request.QueryString('fund')+"&register=1");

    menuItem(FINALARRAYELEMENT,"","","");createMenu();
}
