/*
	This is the main navigation JS page for the DBFS Website.
	The values of section and id are set in the html page and passed from there.
*/
/**************************************************/

// Set Default Values
var col=""; var invcol=""; var footcol="FF3300";var titletxt='text01.jpg'; var navcol=""

function setCol(section,id){
	// This sets the color for the navigation
	// navcol = colour of the text in the RHS menu navigation
	// invcol = inverse colour (not really used)
	// titletxt = the image which is used in the banner as a section title
	// return value = the highligh colour for the navigation and the background header lines on the page
	if (col==""){
		if(section=="home"){invcol="orange"; navcol="gray"; titletxt="insert_SPD.jpg";  return "#6477A7";};
		if(section=="consulting"){invcol="orange"; navcol="gray"; titletxt="insert_BSC.jpg"; return "#121C4E";};
		if(section=="projectmanagement"){invcol="orange"; navcol="gray"; titletxt="insert_SPD.jpg";  return "#6477A7";};
		if(section=="projectspecial"){invcol="orange"; navcol="gray"; titletxt="insert_SPD.jpg";  return "#6477A7";};
		if(section=="main"){invcol="orange"; navcol="gray";  return "#FF3300";};
		if(section=="engage"){invcol="orange"; navcol="gray"; titletxt="text04.jpg"; return "#5E2579";};
		if(section=="assetplus"){invcol="orange"; navcol="gray"; titletxt="insert_AP.jpg"; return "#C2AA5F";};
		if(section=="engagetravel"){invcol="orange"; navcol="gray"; titletxt="insert_travel.jpg"; return "#121C4E";};
		if(section=="engagetrax"){invcol="orange"; navcol="gray"; titletxt="text04.jpg"; return "#5E2579";};
		if(section=="solutions"){invcol="orange"; navcol="gray";  
			(id=="sequence"?titletxt="insert_seq.jpg":titletxt=titletxt);
			return "#123456";};
		if(section=="hiportfolio"){invcol="orange"; navcol="gray"; titletxt="insert_hiportfolio.jpg"; return "#6B6258";};
		if(section=="corporate"){invcol="orange"; navcol="gray"; titletxt="tran.gif"; return "#6585BE";};
	}
}

function DBFS_PopBanner(section){
	// This sets the style of the main blue page banner. essentially each image is the same, but the words under DBFS are changed
	// as appropriate (e.g. DBFS Consulting for consulting pages)
	var imgtxt="images/banner_general.jpg";
	var o = DBFS_findObj("banner");
	if(o!=null){
		if(section=="home"){o.src="../images/banner_general.jpg";}
		if(section=="general"){o.src="../images/banner_general.jpg";}
		if(section=="consulting"){o.src="../images/banner_consulting.jpg";}
		if(section=="solutions"){o.src="../images/banner_consulting.jpg";}
		if(section=="projectmanagement"){o.src="../images/banner_consulting.jpg";}
		if(section=="projectspecial"){o.src="../images/banner_consulting.jpg";}
		if(section=="hiportfolio"){o.src="../images/banner_consulting.jpg";}
		if(section=="corporate"){o.src="../images/banner_corporate.jpg";}
		if(section=="development"){o.src="../images/banner_development.jpg";}
		if(section=="products"){o.src="../images/banner_products.jpg";}
		if(section=="engage"){o.src="../images/banner_products.jpg";}
		if(section=="engagetravel"){o.src="../images/banner_products.jpg";}
		if(section=="engagetrax"){o.src="../images/banner_products.jpg";}
		if(section=="assetplus"){o.src="../images/banner_products.jpg";}
		if(section=="resourcing"){o.src="../images/banner_resourcing.jpg";}
	}
	//else {alert("could not find 'banner' object for section =" + section);}
}

function DBFS_SetMenu(loc, pname){
	/* Tigra Menu items structure 
		[MenuTitle, URL, Options]
		where options = {'tt':'ToolTipText','sb':'StatusBarText'}
	*/
	MENU_ITEMS = [
		['&nbsp;',,],
		['&nbsp;&nbsp;&nbsp;&nbsp;Home', '../index.htm', {'sb':'DBFS Home Page'}],
		['Services', null, {'sb':'DBFS Services'},
			['IT Business Consulting','/services/it_business_consulting.htm',{'sb':'IT Business Consulting Services'}],
			['IT Project Delivery','/services/it_project_delivery.htm',{'sb':'IT Project Delivery Services'}]
		],
		['Solutions', null, {'sb':'DBFS Solutions'},
			['Engage','/engage/index.htm', {'tt':'Enabling Business Process Management','sb':'Enabling Business Process Management'}],
			['ProjectDirector','/services/ProjectDirector.htm', {'tt':'Directing Project Delivery','sb':'Directing Project Delivery'}],
			['Asset+','/assetplus/index.htm', {'tt':'Controlling Multi-dimensional Portfolios','sb':'Controlling Multi-dimensional Portfolios'}],
//			['on-line delivery',null],
			['HiPortfolio Solutions','/hiportfolio/index.htm', {'tt':'HiPortfolio Solutions','sb':'HiPortfolio Solutions'}],
			['Sequence','/sequence/index.htm']
//			,['HiPortfolio Optimiser',null]
		],
//		['Industries', null, {'sb':'DBFS Services/Solutions by Industry'},
//			['Invest Management', null],
//			['FX Trading', null],
//			['eCommerce', null],
//			['Travel','/engagetravel/index.htm',{'tt':'DBFS Travel Solutions','sb':'DBFS Travel Solutions'}]
//		],
		['About Us', null, {'sb':'About DBFS'},
			['Our Vision', '/corporate/index.htm',{'tt':'See Our Vision','sb':'Our Vision'}],
			['Our People', '/corporate/keystaff.htm',{'tt':'Meet Our People','sb':'Our People'}],
			['Our Clients', '/corporate/clients.htm',{'tt':'View Our Clients','sb':'Our Clients'}],
			['Our Partners', '/corporate/partners.htm',{'tt':'View Our Partners','sb':'Our Partners'}],
			['Our News', '/corporate/news.htm',{'tt':'Read Our News & Press Releases','sb':'Our News'}],
			['Contact Us', '/corporate/contact.htm',{'tt':'Addresses and Maps','sb':'Contact Us'}],
//			['Site Map', '/corporate/sitemap.htm',{'tt':'Webiste Map','sb':'Website Map'}]
		]
	];
	/* modify menu and locate on the screen */
	if (loc=='home'){MENU_ITEMS[0][0]='';}

	/* Tigra Menu template structure {L1,L2,L3]*/
	MENU_TPL = [
	{	'width': 90, 'height': 24, 'left': 89, 'top': 0, 'hide_delay': 500,
		'expd_delay': 200, 'css': {'inner': ['TM2i0','TM2i1'],'outer': 'TM2o0'},
		'block_left': null,	'block_top': null
	},
	{	'width': 140, 'height': 20, 'block_left': 0, 'block_top': 24,
		'left': 0,'top': 20,
		'css': {'inner': ['TM3i0','TM3i1'],	'outer': 'TM3o0'}
	},
	{	'width': 140, 'height': 20,	'block_left': 100, 'block_top': 10,
		'left': 0, 'top': 20, 'css': {'inner': ['TM3i0','TM3i1'], 'outer': 'TM3o0'}
	}
];
}

function MakeTrace(section, id){
	// Creates the whereamI trace at the top of the website
	if(section!="home"){
		if(col==""){col = setCol(section,id);}
		var aStr="<span class=\"youarehere\" style=''>";
		aStr+="<font style='color:black'>You are here: </font>"+MakeLink('/index.htm','DBFS Home Page')+"Home</a>";
		(id!="home"?aStr="<img src='../images/tran.gif' border='0' width='1' height='5' /><br />"+aStr:f=0);
		if(section=="consulting"){
			(id!="home"?aStr+=" \\ "+MakeLink('../services/it_business_consulting.htm','Software Consulting Home')+"IT Business Consulting</a>":f=0);
			(id=="home"?aStr+=" \\ <font class='youarehereHi'>IT Business Consulting</font>":f=0);
//			(id=="strategic"?aStr+=" \\ <font class='youarehereHi'>Project Consulting</font><br />":f=0);
			(id=="operations"?aStr+=" \\ <font class='youarehereHi'>Operations Consulting</font><br />":f=0);
		}
		if(section=="projectmanagement"||section=="projectspecial"){
			(id!="home"?aStr+=" \\ "+MakeLink('../services/it_project_delivery.htm','Project Delivery Home')+"IT Project Delivery</a>":f=0);
			(id=="home"?aStr+=" \\ <font class='youarehereHi'>IT Project Delivery</font>":f=0);
			(id=="alm"?aStr+=" \\ <font class='youarehereHi'>Application Lifecycle Management</font><br />":f=0);
			(id=="pm"?aStr+=" \\ <font class='youarehereHi'>Project Management</font><br />":f=0);
			(id=="si"?aStr+=" \\ <font class='youarehereHi'>Systems Integration</font><br />":f=0);
			(id=="difference"?aStr+=" \\ <font class='youarehereHi'>The DBFS Difference</font><br />":f=0);
			((id=="dbfs2m"||id=="dbfsplus"||id=="dbfs4l"||id=="toolsets"||id=="associates")?aStr+=" \\ "+MakeLink('difference.htm','The DBFS Difference')+"The DBFS Difference</a>":f=0);
			(id=="dbfs2m"?aStr+=" \\ <font class='youarehereHi'>DBFS2M</font><br />":f=0);
			(id=="dbfs4l"?aStr+=" \\ <font class='youarehereHi'>Encompass Approach</font><br />":f=0);
			(id=="dbfsplus"?aStr+=" \\ <font class='youarehereHi'>Project Control</font><br />":f=0);
//			(id=="toolsets"?aStr+=" \\ <font class='youarehereHi'>Dev Toolsets</font><br />":f=0);
//			(id=="associates"?aStr+=" \\ <font class='youarehereHi'>Knowledge</font><br />":f=0);
		}
		if(section=="engage"){
			(id!="home"?aStr+=" \\ "+MakeLink('../services/it_project_delivery.htm','Project Delivery Home')+"Engage Solutions</a>":f=0);
			(id=="home"?aStr+=" \\ <font class='youarehereHi'>Engage Solutions</font>":f=0);
			(id=="benefits"?aStr+=" \\ <font class='youarehereHi'>Benefits</font><br />":f=0);
			(id=="overview"?aStr+=" \\ <font class='youarehereHi'>Overview</font><br />":f=0);
			(id=="casestudy"?aStr+=" \\ <font class='youarehereHi'>Case Study</font><br />":f=0);
			(id=="pricing"?aStr+=" \\ <font class='youarehereHi'>Licensing</font><br />":f=0);
			(id=="manipulation"?aStr+=" \\ "+MakeLink('../engage/benefits.htm','',0)+"Overview</a> \\ <font class='youarehereHi'>Manuipulation Scripts</font><br />":f=0);
			(id=="connectors"?aStr+=" \\ "+MakeLink('../engage/benefits.htm','',0)+"Overview</a> \\ <font class='youarehereHi'>Connectors</font><br />":f=0);
			(id=="plans"?aStr+=" \\ "+MakeLink('../engage/benefits.htm','',0)+"Overview</a> \\ <font class='youarehereHi'>Plans & Scheduling</font><br />":f=0);
			(id=="dashboard"?aStr+=" \\ "+MakeLink('../engage/benefits.htm','',0)+"Overview</a> \\ <font class='youarehereHi'>Dashboards & MIS</font><br />":f=0);
			(id=="wizard"?aStr+=" \\ "+MakeLink('../engage/benefits.htm','',0)+"Overview</a> \\ <font class='youarehereHi'>Wizards</font><br />":f=0);
		}
		if(section=="engagetravel"){
			aStr+=" \\ "+MakeLink('../engage/index.htm','Engage Solutions Home')+"Engage Solutions</a>";
			(id!="home"?aStr+=" \\ "+MakeLink('../engagetravel/index.htm','Travel')+"Travel</a>":f=0);
			(id=="home"?aStr+=" \\ <font class='youarehereHi'>Industry Solutions</font><br/>":f=0);
			(id=="solutions"?aStr+=" \\ <font class='youarehereHi'>Industry Solutions</font><br />":f=0);
			}
		if(section=="engagetrax"){
			aStr+=" \\ "+MakeLink('../engage/index.htm','Engage Solutions Home')+"Engage Solutions</a>";
			(id=="home"?aStr+=" \\ <font class='youarehereHi'>ICMA: TRAX2</font><br />":f=0);
			}
		if(section=="solutions"){
			(id!="home"?aStr+=" \\ "+MakeLink('#','Project Delivery Home')+"DBFS Solutions</a>":f=0);
			(id=="home"?aStr+=" \\ <font class='youarehereHi'>DBFS Solutions</font>":f=0);
			(id=="sequence"?aStr+=" \\ <font class='youarehereHi'>Sequence BPM</font><br />":f=0);
		}
		if(section=="assetplus"){
			(id!="home"?aStr+=" \\ "+MakeLink('../assetplus/index.htm','Project Delivery Home')+"Asset+</a>":f=0);
			(id=="home"?aStr+=" \\ <font class='youarehereHi'>Asset+</font>":f=0);
			(id=="management"?aStr+=" \\ <font class='youarehereHi'>Asset/Wealth Management</font><br />":f=0);
			(id=="fof"?aStr+=" \\ <font class='youarehereHi'>Fund of Funds Management</font><br />":f=0);
			(id=="hedgefunds"?aStr+=" \\ <font class='youarehereHi'>Hedge Funds Management</font><br />":f=0);			
			(id=="faq"?aStr+=" \\ <font class='youarehereHi'>Frequently Asked Questions</font><br />":f=0);
			(id=="implement"?aStr+=" \\ <font class='youarehereHi'>Implementation and Fund Migration</font><br />":f=0);
		}
		if(section=="hiportfolio"){
			aStr+=" \\ "+MakeLink('#','Investment Management Services Home')+"Investment Management</a>";
			(id!="home"?aStr+=" \\ "+MakeLink('../hiportfolio/index.htm','HiPortfolio Services Home')+"HiPortfolio</a>":f=0);
			(id=="home"?aStr+=" \\ <font class='youarehereHi'>HiPortfolio</font><br />":f=0);
			(id=="consultancy"?aStr+=" \\ <font class='youarehereHi'>Consultancy</font><br />":f=0);
			(id=="solutions"?aStr+=" \\ <font class='youarehereHi'>Solutions</font><br />":f=0);
			(id=="upgrade"?aStr+=" \\ <font class='youarehereHi'>Upgrade Services</font><br />":f=0);			
			(id=="scripting"?aStr+=" \\ <font class='youarehereHi'>Scripting</font><br />":f=0);			
		}
		if(section=="corporate"){
			aStr+=" \\ <font style='color:gray'>About Us</font>";
//			(id!="home"?aStr+=" \\ "+MakeLink('../corporate/index.htm','DBFS: Our Vision')+"Our Vision</a>":f=0);
			(id=="home"?aStr+=" \\ <font class='DBFSAnchor'>Our Vision</font><br />":f=0);
			(id=="staff"?aStr+=" \\ <font class='youarehereHi'>Our People</font><br />":f=0);
			(id=="clients"?aStr+=" \\ <font class='youarehereHi'>Our Clients</font><br />":f=0);
			(id=="news"?aStr+=" \\ <font class='youarehereHi'>Our News</font><br />":f=0);			
			(id=="contact"?aStr+=" \\ <font class='youarehereHi'>Contact Us</font><br />":f=0);			
			(id=="partners"?aStr+=" \\ <font class='youarehereHi'>Partners</font><br />":f=0);			
			(id=="sitemap"?aStr+=" \\ <font class='youarehereHi'>Sitemap</font><br />":f=0);			
			(id=="investors"?aStr+=" \\ <font class='youarehereHi'>Investment Opportunities</font><br />":f=0);			
			((id=="associates"||id=="vacancies")?aStr+=" \\ " +MakeLink('../corporate/keystaff.htm','DBFS: Our People')+"Our People</a>":f=0);
			(id=="associates"?aStr+=" \\ <font class='youarehereHi'>Associate Programme</font><br />":f=0);			
			(id=="vacancies"?aStr+=" \\ <font class='youarehereHi'>Employment Opportunities</font><br />":f=0);			
		}
		document.write(aStr+"<br /></span><img src='../images/tran.gif' border='0' width='1' height='5' /><br />");
	}
}
function sidenav(section,id){
	// This creates the actual navigation on the RHS of the page
	var found=0;
	if(col==""){col = setCol(section,id);}
	//alert(col);
	if(section=='consulting'){
		document.write("<div id='lyrSideNavigation'>");
		document.write("<div class='navTitle'>&nbsp;Find Out More:</div>");
		(id=='home' ? writeactive('Consulting Home',0) : writelink('it_business_consulting.htm','Consulting Home',0));
//		(id=='strategic' ? writeactive('Project Consulting',0) : writelink('it_project_management.htm','Project Consulting',0));
		(id=='operations' ? writeactive('IT/Operations Consulting',0) : writelink('it_operations_consulting.htm','IT/Operations Consulting',0));
		writelink('../corporate/contact.htm','Contact Us',0);
		document.write("</div>");
		found=1;
		}
	if(section=='projectmanagement'||section=='projectspecial'){
		document.write("<div id='lyrSideNavigation'>");
		document.write("<div class='navTitle'>&nbsp;Find Out More:</div>");
		(id=='home' ? writeactive('Project Delivery Home',0) : writelink('it_project_delivery.htm','Project Delivery Home',0));
		(id=='pm' ? writeactive('Project Management',0) : writelink('it_project_management.htm','Project Management',0));
		(id=='alm' ? writeactive('ALM',0) : writelink('alm.htm','ALM',0));
		(id=='si' ? writeactive('Systems Integration',0) : writelink('systems_integration.htm','Systems Integration',0));
		if(id=='difference'||id=='dbfs2m'||id=='dbfs4l'||id=='dbfsplus'){ 
			(id=='difference'?writeactive('The DBFS Difference',0):writelink('difference.htm','The DBFS Difference',0));
			(id=='dbfs2m' ? writeactive('&nbsp;&nbsp;- DBFS2M',0) : writelink('dbfs2m.htm','&nbsp;&nbsp;- DBFS2M',0));
			(id=='dbfsplus' ? writeactive('&nbsp;&nbsp;- Project Control',0) : writelink('ProjectDirector.htm','&nbsp;&nbsp;- Project Control',0));
			writelink('../engage/index.htm','&nbsp;&nbsp;- Engage',0);
			writelink('../corporate/keystaff.htm','&nbsp;&nbsp;- Knowledge',0);
			}
		else {
			writelink('difference.htm','The DBFS Difference',0)};
		document.write("</div>");
		found=1;
		}		
	if(section=='assetplus'){
		document.write("<div id='lyrSideNavigation'>");
		document.write("<div class='navTitle'>&nbsp;My Portfolio Type:</div>");
		(id=='home' ? writeactive('Asset+ Home',0) : writelink('index.htm','Asset+ Home',0));
		(id=='fof' ? writeactive('Fund of Funds',0) : writelink('fund_of_hedge_funds.htm','Fund of Funds',0));
		(id=='hedgefunds' ? writeactive('Hedge Fund',0) : writelink('hedge_funds.htm','Hedge Funds',0));		
		(id=='management' ? writeactive('Asset Management',0) : writelink('wealth_management.htm','Asset Management',0));
		document.write("<hr color='"+col+"' style='position:relative;top:-5px' />");
		document.write("<div style='position:relative;top:-9px'>");
		(id=='faq' ? writeactive('FAQ',0) : writelink('faq.htm','FAQ',0));
		(id=='implement' ? writeactive('Implementation',0) : writelink('implementation.htm','Implementation',0));
		writelink('../corporate/contact.htm','Contact Us',0)
		document.write("</div>");
		document.write("</div>");
		found=1;
		}	
	if(section=='engage'){
		document.write("<div id='lyrSideNavigation'>");
		document.write("<div class='navTitle'>&nbsp;DBFS Engage Microsite:</div>");
		(id=='home' ? writeactive('Engage Home',0) : writelink('index.htm','Engage home',0));
		(id=='benefits' ? writeactive('How will it help me ?',0) : writelink('benefits.htm','How will it help me ?',0));
//		(id=='overview' ? writeactive('How does it work ?',0) : writelink('overview.htm','How does it work ?',0));
		if(id=='overview'||id=='connectors'||id=='plans'||id=='manipulation'||id=='dashboard'||id=='wizard'){ 
			(id=='overview'?writeactive('How does it work ?',0):writelink('overview.htm','How does it work ?',0));
			(id=='connectors' ? writeactive('&nbsp;&nbsp;- Connectors',0) : writelink('connectors.htm','&nbsp;&nbsp;- Connectors',0));
			(id=='plans' ? writeactive('&nbsp;&nbsp;- Plans \& Scheduling',0) : writelink('plans.htm','&nbsp;&nbsp;- Plans \& Scheduling',0));
			(id=='manipulation' ? writeactive('&nbsp;&nbsp;- Manipulation Scripts',0) : writelink('manipulation_scripts.htm','&nbsp;&nbsp;- Manipulation Scripts',0));
//			(id=='dashboard' ? writeactive('&nbsp;&nbsp;- Dashboards \& MIS',0) : writelink('dashboards.htm','&nbsp;&nbsp;- Dashboards \& MIS',0));
//			(id=='wizard' ? writeactive('&nbsp;&nbsp;- Wizards',0) : writelink('wizards.htm','&nbsp;&nbsp;- Wizards',0));
			}
		else {
			writelink('overview.htm','How does it work ?',0)
			};
		(id=='casestudy' ? writeactive('Where can I use it ?',0) : writelink('index_case_studies.htm','Where can I use it ?',0));
		(id=='pricing' ? writeactive('How do I buy it ?',0) : writelink('pricing.htm','How do I buy it ?',0));
		writelink('../corporate/contact.htm','Contact us',0);
		document.write("<hr color='"+col+"' style='position:relative;top:-5px' />");
		document.write("<div class='navTitle'>&nbsp;Downloads:</div>");
		writelink('../pdfs/engage.pdf','Engage Brochure',1);
		writelink('../pdfs/Engage_Plans_A4.pdf','Engage Overview',1);
		writelink('../pdfs/CaseStudy_TREMOR.pdf','Engage Case Study',1);
		document.write("<hr color='"+col+"' style='position:relative;top:-5px' />");
		document.write("</div>");
		found=1;
		}
	if(section=='engagetravel'){
//		var bg='background:url("../images/beach145.jpg");';
		var bg='';
		document.write("<div id='lyrSideNavigation' style='"+bg+"'>");
		document.write("<div class='navTitle'>Engage Solutions</div>");
		writelink('../engage/index.htm','Engage Home',0);
		(id=='home' ? writeactive('Travel Home',0) : writelink('index.htm','Travel Home',0));
		(id=='solutions' ? writeactive('Industry Solutions',0) : writelink('solutions.htm','Industry Solutions',0));
		writelink('../corporate/contact.htm','Contact Us',0);
		document.write("</div>");
		found=1;
		}
	if(section=='engagetrax'){
//		var bg='background:url("../images/beach145.jpg");';
		var bg='';
		document.write("<div id='lyrSideNavigation' style='"+bg+"'>");
		document.write("<div class='navTitle'>Engage Solutions</div>");
		writelink('../engage/index.htm','Engage Home',0);
		(id=='home' ? writeactive('ICMA:TRAX2 Solution',0) : writelink('index.htm','ICMA: TRAX2 Solution',0));
		writelink('../corporate/contact.htm','Contact Us',0);
		document.write("</div>");
		found=1;
		}
	if(section=='solutions'){
		document.write("<div id='lyrSideNavigation'>");
		document.write("<div class='navTitle'> DBFS Solutions</div>");
		(id=='home' ? writeactive('Solutions Home',0) : writelink('#','Solutions Home',0));
		(id=='sequence' ? writeactive('Sequence BPM',0) : writelink('../sequence/index.htm','Sequence BPM',0));
		writelink('../corporate/contact.htm','Contact Us',0);
		document.write("</div>");
		found=1;
		}
	if(section=='hiportfolio'){
		document.write("<div id='lyrSideNavigation'>");
		document.write("<div class='navTitle'>&nbsp;HiPortfolio Services:</div>");
		writelink('#','Exit to Invest. Mgt',0);
		(id=='home' ? writeactive('HiPortfolio Home',0) : writelink('index.htm','HiPortfolio Home',0));
		(id=='consultancy' ? writeactive('HiPortfolio Consultancy',0) : writelink('consultancy.htm','HiPortfolio Consultancy',0));
		(id=='upgrade' ? writeactive('Upgrade Services',0) : writelink('upgrades.htm','Upgrade Services',0));
		(id=='solutions' ? writeactive('HiPortfolio Solutions',0) : writelink('solutions.htm','HiPortfolio Solutions',0));
		(id=='scripting' ? writeactive('HiPortfolio Scripting',0) : writelink('scripting.htm','HiPortfolio Scripting',0));
		writelink('../corporate/contact.htm','Contact Us',0)
		document.write("</div>");
		found=1;
		}
	if(section=='corporate'){
		document.write("<div id='lyrSideNavigation'>");
		document.write("<div class='navTitle'>&nbsp;Find out about DBFS:</div>");
		(id=='home' ? writeactive('Our Vision',0) : writelink('index.htm','Our Vision',0));
		(id=='news' ? writeactive('Our News',0) : writelink('news.htm','Our News',0));
		(id=='staff' ? writeactive('Our People',0) : writelink('keystaff.htm','Our People',0));
		(id=='clients' ? writeactive('Our Clients',0) : writelink('clients.htm','Our Clients',0));
		(id=='partners' ? writeactive('Our Partners',0) : writelink('partners.htm','Our Partners',0));
//		(id=='associates' ? writeactive('Our Associates in DBFS',0) : writelink('associates.htm','Our Associates',0));
		(id=='investors' ? writeactive('Invest in DBFS',0) : writelink('investors.htm','Invest in DBFS',0));
		(id=='vacancies' ? writeactive('Work for DBFS',0) : writelink('vacancies.htm','Work for DBFS',0));
		(id=='contact' ? writeactive('Contact Us',0) : writelink('contact.htm','Contact Us',0));
		(id=='sitemap' ? writeactive('Site Map',0) : writelink('sitemap.htm','Site Map',0));
		document.write("</div>");
		found=1;
		}
	if(found==0){writeback();}
	// put the correct title
	var o = DBFS_findObj('bantitle');
	if(o!=null){try{o.src="../images/" + titletxt;} catch (e){};}	
}

function navStyles(section,id){
	// This creates the stylesheet for the navigation using the values set in setCol (or elsewhere)
	if(col==""){col = setCol(section,id);}
	document.write("<style type='text/css'>");
	document.write (".navButton {width:145px; z-index:5;color:" + navcol + ";font-size:8pt}");
	document.write (".navTitle {text-align:left; padding-left:0px; width:145px; color:white; font-weight:600; background-color:" + col + "; z-index:5 }  ");
	document.write ("#lyrSideNavigation {border-style:none; padding:0px; color:red; font-size:8pt; font-family:Arial; font-weight:400; text-align:left; width:145px;}");
	document.write ("#lyrSideNavigation A{color:" + navcol + "; font-weight:400; text-decoration:none; width:145px;z-index:6}");
	document.write ("#lyrSideNavigation A:Active{color:" + col + "; font-weight:400; text-decoration:none; width:145px;}");
	document.write ("#lyrSideNavigation A:Visited{color:" + navcol + "; font-weight:400; text-decoration:none; width:145px;}");
	document.write ("#lyrSideNavigation A:Hover{color:" + col + "; font-weight:800;  text-decoration:none; width:145px;}");
	document.write (".TitleBar660 {background-color:" + col + ";height:21px;font-weight:normal; text-decoration:none;width:660px;}");
	document.write (".TitleBar550 {background-color:" + col + ";height:21px;font-weight:normal; text-decoration:none;width:550px;}");
	document.write (".TitleBar440 {background-color:" + col + ";height:21px;font-weight:normal; text-decoration:none;width:440px;}");
	document.write (".TitleBar150 {background-color:" + col + ";height:14px;font-weight:normal; text-decoration:none;width:150px;}");
	document.write (".footernav A{color:gray; font-weight:normal; background-color:white; text-decoration:none;}");
	document.write (".footernav A:Active{color:" + footcol+ "; font-weight:normal; text-decoration:none; }");
	document.write (".footernav A:Visited{color:gray; font-weight:normal; text-decoration:none; }");
	document.write (".footernav A:Hover{color:" + footcol+ "; font-weight:normal;text-decoration:none; }");
	document.write ("</style>");
}

/******************************************************************************************************
 Utilities
******************************************************************************************************/

function writeback(){
	// Default entry which just provides a link back to the previous page
	document.write("<div class='navTitle'>&nbsp;NAVIGATION</div>");
	document.write("<a href='#' onclick='javascript:history.back()' class='navButton' style=''>&nbsp;Back</a><br/>");
}
function writelink(link,text,alast){
	// this writes a line to the document which contains a link (i.e. clickable menu entry)
	var txtx = 'window.status="Click here for '+text+'";return true;';
	var sbit=""
	if(alast==1){var sbit=' target="_blank"'};
	document.write ("<div class='navButton'><a href='"+link+"' title='' onMouseOver='"+txtx+"' onMouseOut='window.status=window.defaultStatus;return true;' "+sbit+">&nbsp;"+text+"</a></div>");
}
function writeactive(text,last){
	// this writes a line to the document for the active page (i.e. highlighted menu entry)
	document.write("<div style='color:"+col+";font-weight:800;text-decoration:none;z-index:6'>&nbsp;" + text + "</div>");
}
function writeemail(name){
	// creates an email link which is hard to scan by spammers
	return "<a href='mailto:" + name + "@dbfs.co.uk' border='0'>" + name + "@dbfs.co.uk</a>";
	}
function emailanchor(name,subject,body){
	return "<a href='mailto:"+name+"@dbfs.co.uk?subject="+subject+"&body="+body+"' title='"+subject+"' border='0' class='DBFSAnchor' onMouseOver='window.status=window.defaultStatus;return true;' onMouseOut='window.status=window.defaultStatus;return true'>";
}
function MakeLink(aLink, aStr, i){
	var inStr="<a href='"+aLink+"' ";
	(isNaN(i)==1?i=1:i=0);
	(i==0?inStr+="title='' ":inStr+=" title='"+aStr+"' ");
	inStr+="class='youarehere' ";
	inStr+="onMouseOver='window.status=\"Click here for "+aStr+"\";return true;' "
	inStr+="onMouseOut='window.status=window.defaultStatus;return true'>";
	return inStr;
}


