var siteUrl = '/Institutional';var OP   = (navigator.userAgent.indexOf("Opera") != -1);var IE   = (navigator.userAgent.indexOf("MSIE") != -1) && !OP;if (IE){    sfHover = function()    {   var sfEls = document.getElementById("navContainer").getElementsByTagName("LI");    	for (var i=0; i<sfEls.length; i++)    	{   sfEls[i].onmouseover=function()    	    {   this.className+=" hover";    		}    		sfEls[i].onmouseout=function()    		{   this.className=this.className.replace(new RegExp(" hover\\b"), "");    		}    	}    }    if (window.attachEvent) window.attachEvent("onload", sfHover);}if (location.href.indexOf('') == -1){ 	location.href = ''; }else{		$(document).ready(function() {                if (urlParameter('redirectTo') != '' && urlParameter('redirectName') != '') {                    if (typeof setLinkName == 'function') {                        setLinkName(urlParameter('redirectName'));                    }                    location.href = decodeURIComponent(urlParameter('redirectTo'));                    return false;          }	    		// Check for cookies and redirect to Disclaimer		// --------------------------------------------- 				$('#accept').click(function(){		    $.cookie('seenDisclaimer', siteUrl,{ expires: 90, path: '/' });	        var redirectTo = location.href.indexOf('ReturnTo=') != -1 ? location.href.split('ReturnTo=')[1] : '/';	        location.href = redirectTo;	    });			    if ((!$.cookie('seenDisclaimer') || $.cookie('seenDisclaimer') != siteUrl) && location.href.toLowerCase().indexOf('disclaimer') == -1 && location.href.toLowerCase().indexOf('/footer') == -1 && siteUrl.toLowerCase() != '/investor'){	       			    	    	 location.href = siteUrl + '/Disclaimer.aspx?ReturnTo=' + location.href; 	    }	    else{	    	 $('div.pageDisplay').show();	    }		    // Change search box contents on focus/blur		// --------------------------------------------- 		$('#_searchTerms')			.focus(function(){				if ($(this).val() == 'Search'){ $(this).val(''); }			})			.blur(function(){				if ($(this).val() == ''){ $(this).val('Search'); }			});						// Add search terms in the search action		$('#_searchForm').submit(function(){			$(this).attr('action',$(this).attr('action') + '?terms=' + $('#_searchTerms').val());		});						// FIX -- talking point links		$('#latestTalkingPoints a').each(function(){			if (location.href.indexOf($(this).attr('href')) != -1){				$(this).parent().remove();			}			});		if ($('#latestTalkingPoints a').length > 5){			$('#latestTalkingPoints a:last').remove();		}				// FIX -- repeated breadcrumb arrows 		$('.breadcrumb a:empty').remove();		$('.breadcrumb a').after(' » ');				// FIX -- webconferences empty Learn more link		$('.webConferences a').each(function(){			if (location.href.indexOf($(this).attr('href')) != -1){				$(this).parent().remove();			}			});				// Global navigation drop menus		// --------------------------------------------- 				$('#navContainer ul li').each(function(){			if ($(this).find('ul').length > 0){				$(this).addClass('hasMenu');			}		});				// Last sitemap node	    $('.sitemap ul ul').each(function(){ $(this).children('li:last').addClass('last'); });	    		// Redirect interactive factsheet - DC site	    if (urlParameter('FundID') && urlParameter('ShareClassID') && urlParameter('FundType')){	    	if (urlParameter('FundType') == 'Life'){				$('#factsheet, #factsheetDP').attr('src','http://213.229.167.101/LF/retail/LifeFundOff.asp?PASSJP=&PARAMMIFID=' + mifid + '&USERJP=&lang=EN&view=GENERAL&fundid=' + urlParameter('FundID') + '&country=GB&subview=SUMMARY&frecuencia=Monthly&cambioshare=1&css=2&option=1&share=' + urlParameter('ShareClassID'));			}			else{				$('#factsheet, #factsheetDP').attr('src','http://213.229.167.101/FS/retail/FactSheet.asp?PASSJP=&PARAMMIFID=' + mifid + '&USERJP=&lang=EN&view=GENERAL&fundid=' + urlParameter('FundID') + '&country=GB&subview=SUMMARY&frecuencia=Monthly&cambioshare=1&css=2&option=1&share=' + urlParameter('ShareClassID'));			}		}                                         	// Redirect Investment Trust interactive factsheet	    if (urlParameter('TrustCode')){	    	$('#InvTrustFactsheet').attr('src','http://213.229.167.101/ITRUST/TestUC.aspx?trustCode=' + urlParameter('TrustCode') + '&css=2&PARAMMIFID=' + mifid + '&AspxAutoDetectCookieSupport=1');	    }	    	});}// FIX -- get top most Sectionfunction getTopSection(){	if (siteUrl != ''){		return location.pathname.split('/')[2];	}	else{		return location.pathname.split('/')[1];	}}// Get URL parameters// --------------------------------------------- function urlParameter(name){	name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");  	var regexS = "[\\?&]"+name+"=([^&#]*)"; 	var regex = new RegExp(regexS); 	var results = regex.exec(window.location.href);  	if (results == null){		return ""; 	}	else{		return results[1];	}}