document.write( '<script src="/scripts/bnym_cookie.js" type="text/javascript"><\/script>' );

if ((document.URL.indexOf("bnymellon.com/foresight/") != -1) || (document.URL.indexOf("bnymellon.com/consultants/") != -1) || (document.URL.indexOf("bnymellon.com/assetservicing/") != -1) || (document.URL.indexOf("bnymellon.com/alternativeinvestmentservices/") != -1)) {
	if ((document.URL.indexOf("foresight/index.html") != -1) || (document.URL.indexOf("richardhoey.html") != -1) || (document.URL.indexOf("rssfeeds.html") != -1) || (document.URL.indexOf("rssgenerate.cfm") != -1)) {
	} else {
		document.write( '<script src="/scripts/bnym_share.js" type="text/javascript"><\/script>' );
	}
}

function init() {
	setUpHeaderSearch();
	setNavDropDown();
	setWorldDropDown();
	this.currentPage = "";
	if ((document.URL.indexOf("bnymellon.com/foresight/") != -1) || (document.URL.indexOf("bnymellon.com/consultants/") != -1) || (document.URL.indexOf("bnymellon.com/assetservicing/") != -1) || (document.URL.indexOf("bnymellon.com/alternativeinvestmentservices/") != -1)) {
		if ((document.URL.indexOf("foresight/index.html") != -1) || (document.URL.indexOf("richardhoey.html") != -1) || (document.URL.indexOf("rssfeeds.html") != -1) || (document.URL.indexOf("rssgenerate.cfm") != -1)) {
		} else {
			initShare();
		}
	}
}

function setUpHeaderSearch() {
	searchObj = document.getElementById("searchBox");
	searchObj.onfocus = function () {
		searchObj.value="";
	}

	searchObj.onblur = function () {
		if (searchObj.value=="") {
			searchObj.value="SEARCH BNY MELLON";
		}
	}
}

function SetCountryCookie() {
	if (document.URL.indexOf("/cn/zh/") != -1)
	{
		Set_Cookie( 'bnymcountry', '1' + "!" + 'cnzh' );
	}
	else if (document.URL.indexOf("/cn/en/") != -1)
	{
		Set_Cookie( 'bnymcountry', '2' + "!" + 'cnen' );
	}
	else if (document.URL.indexOf("/de/de/") != -1) 
	{
		Set_Cookie( 'bnymcountry', '3' + "!" + 'dede' );
	}
	else if (document.URL.indexOf("/de/en/") != -1) 
	{
		Set_Cookie( 'bnymcountry', '4' + "!" + 'deen' );
	}
	else if (document.URL.indexOf("/it/it/") != -1) 
	{
		Set_Cookie( 'bnymcountry', '5' + "!" + 'itit' );
	}
	else if (document.URL.indexOf("/it/en/") != -1) 
	{
		Set_Cookie( 'bnymcountry', '6' + "!" + 'iten' );
	}
	else if (document.URL.indexOf("/jp/ja/") != -1) 
	{
		Set_Cookie( 'bnymcountry', '7' + "!" + 'jpja' );
	}
	else if (document.URL.indexOf("/jp/en/") != -1) 
	{
		Set_Cookie( 'bnymcountry', '8' + "!" + 'jpen' );
	}
	else if (document.URL.indexOf("/kr/ko/") != -1) 
	{
		Set_Cookie( 'bnymcountry', '9' + "!" + 'krko' );
	}
	else if (document.URL.indexOf("/kr/en/") != -1) 
	{
		Set_Cookie( 'bnymcountry', '10' + "!" + 'kren' );
	}
	else if (document.URL.indexOf("/ae/ar/") != -1) 
	{
		Set_Cookie( 'bnymcountry', '11' + "!" + 'aear' );
	}
	else if (document.URL.indexOf("/ae/en/") != -1) 
	{
		Set_Cookie( 'bnymcountry', '12' + "!" + 'aeen' );
	}
	else if (document.URL.indexOf("/nl/nl/") != -1) 
	{
		Set_Cookie( 'bnymcountry', '13' + "!" + 'nlnl' );
	}
	else if (document.URL.indexOf("/nl/en/") != -1) 
	{
		Set_Cookie( 'bnymcountry', '14' + "!" + 'nlen' );
	}
	else if (document.URL.indexOf("/se/en/") != -1) 
	{
		Set_Cookie( 'bnymcountry', '15' + "!" + 'seen' );
	}
	else if ((document.URL.indexOf("/alternativeinvestmentservices/") != -1) || (document.URL.indexOf("/assetmanagement/") != -1) || (document.URL.indexOf("/assetservicing/") != -1) || (document.URL.indexOf("/brokerdealeradvisorservices/") != -1) || (document.URL.indexOf("/corporatetrust/") != -1) || (document.URL.indexOf("/depositaryreceipts/") != -1) || (document.URL.indexOf("/environmentalsolutions/") != -1) || (document.URL.indexOf("/globalmarkets/") != -1) || (document.URL.indexOf("/securitiesservicing/") != -1) || (document.URL.indexOf("/shareownerservices/") != -1) || (document.URL.indexOf("/treasuryservices/") != -1) || (document.URL.indexOf("/wealthmanagement/") != -1))
	{
		Set_Cookie( 'bnymcountry', '0' + "!" + 'usen' );
	}
	else if (document.URL.indexOf("docs/index.html") != -1)
	{
		Set_Cookie( 'bnymcountry', '0' + "!" + 'usen' );
	}
}

function GetCountryCookieValue( sPart ) {
	var sSelection = Get_Cookie( 'bnymcountry' );
//alert( "Cookie Value: " + sSelection );
 
	if( sSelection == "" || sSelection == null ) {
		if( sPart == "id" ) {
//alert( "No Cookie Set: DEFAULT TO 0" );
			document.bnym.country.selectedIndex = "0";
		} else {
//alert( "No Cookie Set: DEFAULT TO US" );
			return( "usen" );
		}
	} else {
		var cookie_parts = sSelection.split( '!' );
		if( sPart == "id" ) {
//alert( "ID: " + cookie_parts[0] );
			document.bnym.country.selectedIndex = cookie_parts[0];
		} else {
//alert( "VALUE: " + cookie_parts[1] );
			return( cookie_parts[1] );
		}
	}
}

function DisplayCountryName() {
	var cookieValue = GetCountryCookieValue('value');
	
	if ((document.URL.indexOf("/cn/zh/") != -1) || (cookieValue == "cnzh"))
	{
		document.write('<span xml:lang="zh-hans">中国<\/span>');
	}
	else if ((document.URL.indexOf("/cn/en/") != -1) || (cookieValue == "cnen"))
	{
		document.write('<span>China<\/span>');
	}
	else if ((document.URL.indexOf("/de/de/") != -1) || (cookieValue == "dede")) 
	{
		document.write('<span>Deutschland<\/span>');
	}
	else if ((document.URL.indexOf("/de/en/") != -1) || (cookieValue == "deen")) 
	{
		document.write('<span>Germany<\/span>');
	}
	else if ((document.URL.indexOf("/it/it/") != -1) || (cookieValue == "itit")) 
	{
		document.write('<span>Italia<\/span>');
	}
	else if ((document.URL.indexOf("/it/en/") != -1) || (cookieValue == "iten")) 
	{
		document.write('<span>Italy<\/span>');
	}
	else if ((document.URL.indexOf("/jp/ja/") != -1) || (cookieValue == "jpja")) 
	{
		document.write('<span xml:lang="ja">日本<\/span>');
	}
	else if ((document.URL.indexOf("/jp/en/") != -1) || (cookieValue == "jpen")) 
	{
		document.write('<span>Japan<\/span>');
	}
	else if ((document.URL.indexOf("/kr/ko/") != -1) || (cookieValue == "krko")) 
	{
		document.write('<span xml:lang="ko">한국<\/span>');
	}
	else if ((document.URL.indexOf("/kr/en/") != -1) || (cookieValue == "kren")) 
	{
		document.write('<span>Korea<\/span>');
	}
	else if ((document.URL.indexOf("/ae/ar/") != -1) || (cookieValue == "aear")) 
	{
		document.write('<span>Middle East<\/span>');
	}
	else if ((document.URL.indexOf("/ae/en/") != -1) || (cookieValue == "aeen")) 
	{
		document.write('<span>Middle East<\/span>');
	}
	else if ((document.URL.indexOf("/nl/nl/") != -1) || (cookieValue == "nlnl")) 
	{
		document.write('<span>Nederland<\/span>');
	}
	else if ((document.URL.indexOf("/nl/en/") != -1) || (cookieValue == "nlen")) 
	{
		document.write('<span>Netherlands<\/span>');
	}
	else if ((document.URL.indexOf("/se/en/") != -1) || (cookieValue == "seen")) 
	{
		document.write('<span>Nordic/Baltic<\/span>');
	}
	else if (cookieValue == "usen")
	{
		document.write('<span>Worldwide<\/span>');
	}
	else 
	{
		document.write('<span>Worldwide<\/span>');
	}
}

function SetDirectory() {
	var cookieValue = GetCountryCookieValue('value');
	var directory = '';
	
	if ((document.URL.indexOf("/cn/zh/") != -1) || (cookieValue == "cnzh"))
	{
		directory = '/cn/zh';
	}
	else if ((document.URL.indexOf("/cn/en/") != -1) || (cookieValue == "cnen"))
	{
		directory = '/cn/en';
	}
	else if ((document.URL.indexOf("/de/de/") != -1) || (cookieValue == "dede")) 
	{
		directory = '/de/de';
	}
	else if ((document.URL.indexOf("/de/en/") != -1) || (cookieValue == "deen")) 
	{
		directory = '/de/en';
	}
	else if ((document.URL.indexOf("/it/it/") != -1) || (cookieValue == "itit")) 
	{
		directory = '/it/it';
	}
	else if ((document.URL.indexOf("/it/en/") != -1) || (cookieValue == "iten")) 
	{
		directory = '/it/en';
	}
	else if ((document.URL.indexOf("/jp/ja/") != -1) || (cookieValue == "jpja")) 
	{
		directory = '/jp/ja';
	}
	else if ((document.URL.indexOf("/jp/en/") != -1) || (cookieValue == "jpen")) 
	{
		directory = '/jp/en';
	}
	else if ((document.URL.indexOf("/kr/ko/") != -1) || (cookieValue == "krko")) 
	{
		directory = '/kr/ko';
	}
	else if ((document.URL.indexOf("/kr/en/") != -1) || (cookieValue == "kren")) 
	{
		directory = '/kr/en';
	}
	else if ((document.URL.indexOf("/ae/ar/") != -1) || (cookieValue == "aear")) 
	{
		directory = '/ae/ar';
	}
	else if ((document.URL.indexOf("/ae/en/") != -1) || (cookieValue == "aeen")) 
	{
		directory = '/ae/en';
	}
	else if ((document.URL.indexOf("/nl/nl/") != -1) || (cookieValue == "nlnl")) 
	{
		directory = '/nl/nl';
	}
	else if ((document.URL.indexOf("/nl/en/") != -1) || (cookieValue == "nlen")) 
	{
		directory = '/nl/en';
	}
	else if ((document.URL.indexOf("/se/en/") != -1) || (cookieValue == "seen")) 
	{
		directory = '/se/en';
	}
	else if (cookieValue == "usen")
	{
		directory = '';
	}
	else 
	{
		directory = '';
	}
	return directory;
}

function DisplayPrimaryNav() {
	var cookieValue = GetCountryCookieValue('value');
	var directory = SetDirectory('directory');
	var primarynavjs = '';

	if (cookieValue == "cnzh")
	{
		primarynavjs = '-cn-zh';
	}
	else if (cookieValue == "cnen")
	{
		primarynavjs = '-cn-en';
	}
	else if (cookieValue == "dede")
	{
		primarynavjs = '-de-de';
	}
	else if (cookieValue == "deen")
	{
		primarynavjs = '-de-en';
	}
	else if (cookieValue == "itit")
	{
		primarynavjs = '-it-it';
	}
	else if (cookieValue == "iten")
	{
		primarynavjs = '-it-en';
	}
	else if (cookieValue == "jpja")
	{
		primarynavjs = '-jp-ja';
	}
	else if (cookieValue == "jpen")
	{
		primarynavjs = '-jp-en';
	}
	else if (cookieValue == "krko")
	{
		primarynavjs = '-kr-ko';
	}
	else if (cookieValue == "kren")
	{
		primarynavjs = '-kr-en';
	}
	else if (cookieValue == "aear")
	{
		primarynavjs = '-ae-ar';
	}
	else if (cookieValue == "aeen")
	{
		primarynavjs = '-ae-en';
	}
	else if (cookieValue == "nlnl")
	{
		primarynavjs = '-nl-nl';
	}
	else if (cookieValue == "nlen")
	{
		primarynavjs = '-nl-en';
	}
	else if (cookieValue == "seen")
	{
		primarynavjs = '-se-en';
	}
	else if (cookieValue == "usen")
	{
		primarynavjs = '-us-en';
	}
	else 
	{
		primarynavjs = '-us-en';
	}
	document.write('<div id="primaryNavigation">');
	document.write('	<span class="navItem0">&nbsp;<\/span><a href="/foresight/index.html" class="fsItem" tabindex="20"><span>ForeSight<\/span><\/a><a href="' + directory + '/assetmanagement/index.html" class="amItem" tabindex="21"><span>Asset Management<\/span><\/a><a href="' + directory + '/securitiesservicing/index.html" class="ssItem" tabindex="22"><span>Securities Servicing<\/span><\/a><a href="' + directory + '/treasuryservices/index.html" class="tsItem" tabindex="23"><span>Treasury Services<\/span><\/a><a href="' + directory + '/wealthmanagement/index.html" class="wmItem" tabindex="24"><span>Wealth Management<\/span><\/a>');
	document.write('<\/div>');
	document.writeln ('<script type="text/javascript" src="/inc/primary/primarynav' + primarynavjs + '.js">');
	document.write ('<\/');document.writeln ('script>');
}
	
function doPrimaryNavHighlight() {
	primaryNavLinkObj = document.getElementById("primaryNavigation");
	primaryNavLinkArray = primaryNavLinkObj.getElementsByTagName("A");

	if (document.URL.indexOf("/foresight/") != -1)
	{
		primaryNavLinkArray[0].className = "fsItemOn";
	}
	else if (document.URL.indexOf("/assetmanagement/") != -1)
	{
		primaryNavLinkArray[1].className = "amItemOn";
	}
	else if ((document.URL.indexOf("/securitiesservicing/") != -1) || (document.URL.indexOf("/assetservicing/") != -1) || (document.URL.indexOf("/alternativeinvestmentservices/") != -1) || (document.URL.indexOf("/brokerdealeradvisorservices/") != -1) || (document.URL.indexOf("/corporatetrust/") != -1) || (document.URL.indexOf("/depositaryreceipts/") != -1) || (document.URL.indexOf("/environmentalsolutions/") != -1) || (document.URL.indexOf("/globalmarkets/") != -1) ||(document.URL.indexOf("/shareownerservices/") != -1) ||(document.URL.indexOf("/consultants/") != -1))
	{
		primaryNavLinkArray[2].className = "ssItemOn";
	}
	else if (document.URL.indexOf("/treasuryservices/") != -1)
	{
		primaryNavLinkArray[3].className = "tsItemOn";
	}
	else if (document.URL.indexOf("/wealthmanagement/") != -1)
	{
		primaryNavLinkArray[4].className = "wmItemOn";
	}
}


function setWorldDropDown() {
	init.currentPage = "";

	mainWorldWrapper = document.getElementById("worldNavigation");
	mainWorldArr = mainWorldWrapper.getElementsByTagName("A");

	mainWorldArr[3].onmouseover = function() {
		buildWorldDropDown(this);
	}

	if (mainWorldArr[3].className.indexOf("On") > 0) {
		init.currentPage = mainWorldArr[3].className;
	}
}

function buildWorldDropDown(obj) {

	worldMenuObj = document.getElementById("worldMenu");
	worldMenuObj.className = "showWorld";
	obj.className = "worldItemOn";


	worldMenuMaskObj = document.getElementById("worldMenuMask");
	worldMenuMaskObj.className = "worldMenuMask";
	worldMenuMaskObj.onmouseover = function() {
		hideWorldMenu();
		obj.className = "worldItem";
	}

	worldMenuMaskObj2 = document.getElementById("worldMenuMask2");
	worldMenuMaskObj2.className = "worldMenuMask2";
	worldMenuMaskObj2.onmouseover = function() {
		hideWorldMenu();
		obj.className = "worldItem";
	}

	worldMenuMaskObj3 = document.getElementById("worldMenuMask3");
	worldMenuMaskObj3.className = "worldMenuMask3";
	worldMenuMaskObj3.onmouseover = function() {
		hideWorldMenu();
		obj.className = "worldItem";
	}

	worldMenuMaskObj4 = document.getElementById("worldMenuMask4");
	worldMenuMaskObj4.className = "worldMenuMask4";
	worldMenuMaskObj4.onmouseover = function() {
		hideWorldMenu();
		obj.className = "worldItem";
	}
}

function hideWorldMenu() {
	worldMenuObj = document.getElementById("worldMenu");
	worldMenuObj.className = "hidden";

	worldMenuMaskObj = document.getElementById("worldMenuMask");
	worldMenuMaskObj.className = "hidden";
	worldMenuMaskObj2 = document.getElementById("worldMenuMask2");
	worldMenuMaskObj2.className = "hidden";
	worldMenuMaskObj3 = document.getElementById("worldMenuMask3");
	worldMenuMaskObj3.className = "hidden";
	worldMenuMaskObj4 = document.getElementById("worldMenuMask4");
	worldMenuMaskObj4.className = "hidden";
}

function setNavDropDown() {
	init.currentPage = "";
	
	mainNavWrapper = document.getElementById("primaryNavigation");
	mainNavArr = mainNavWrapper.getElementsByTagName("A");

	mainNavArr[0].onmouseover = function() {
		hideSSMenu();
		hideTSMenu();
		hideWMMenu();
		mainNavArr[1].className = "amItem";
		mainNavArr[2].className = "ssItem";
		mainNavArr[3].className = "tsItem";
		mainNavArr[4].className = "wmItem";
	}
	mainNavArr[0].onmouseout = function() {
		doPrimaryNavHighlight();
	}
	
	mainNavArr[1].onmouseover = function() {
		hideSSMenu();
		hideTSMenu();
		hideWMMenu();
		mainNavArr[0].className = "fsItem";
		mainNavArr[2].className = "ssItem";
		mainNavArr[3].className = "tsItem";
		mainNavArr[4].className = "wmItem";
	}
	mainNavArr[1].onmouseout = function() {
		doPrimaryNavHighlight();
	}

	mainNavArr[2].onmouseover = function() {
		buildSSDropDown(this);
		hideTSMenu();
		hideWMMenu();
		mainNavArr[0].className = "fsItem";
		mainNavArr[1].className = "amItem";
		mainNavArr[3].className = "tsItem";
		mainNavArr[4].className = "wmItem";
		
		if (document.URL.indexOf("/assetmanagement/index") != -1) {
			//amDropdownDiv = document.getElementById("amDropdown"); 
			//amDropdownDiv.className = "hide";
		}
		else if (document.URL.indexOf("/contact/index.cfm") != -1) {
			//toDropdown1Div = document.getElementById("toDropdown"); 
			//toDropdown1Div.className = "hide";
			//phoneDropdownDiv = document.getElementById("phoneDropdown"); 
			//phoneDropdownDiv.className = "hide";
		}
	}
	mainNavArr[2].onmouseout = function() {
	}
	
	mainNavArr[3].onmouseover = function() {
		buildTSDropDown(this);
		hideSSMenu();
		hideWMMenu();
		mainNavArr[0].className = "fsItem";
		mainNavArr[1].className = "amItem";
		mainNavArr[2].className = "ssItem";
		mainNavArr[4].className = "wmItem";
	}
	mainNavArr[3].onmouseout = function() {
	}
	
	mainNavArr[4].onmouseover = function() {
		buildWMDropDown(this);
		hideSSMenu();
		hideTSMenu();
		mainNavArr[0].className = "fsItem";
		mainNavArr[1].className = "amItem";
		mainNavArr[2].className = "ssItem";
		mainNavArr[3].className = "tsItem";
	}
	mainNavArr[4].onmouseout = function() {
	}
}

function buildSSDropDown(obj) {

	ssMenuObj = document.getElementById("ssMenu");
	ssMenuObj.className = "showSS";
	obj.className = "ssItemOn";

	ssMenuMaskObj = document.getElementById("ssMenuMask");
	ssMenuMaskObj.className = "ssMenuMask";
	ssMenuMaskObj.onmouseover = function() {
		hideSSMenu();
		obj.className = "ssItem";
		doPrimaryNavHighlight();
	}

	ssMenuMaskObj2 = document.getElementById("ssMenuMask2");
	ssMenuMaskObj2.className = "ssMenuMask2";
	ssMenuMaskObj2.onmouseover = function() {
		hideSSMenu();
		obj.className = "ssItem";
		doPrimaryNavHighlight();
	}

	ssMenuMaskObj3 = document.getElementById("ssMenuMask3");
	ssMenuMaskObj3.className = "ssMenuMask3";
	ssMenuMaskObj3.onmouseover = function() {
		hideSSMenu();
		obj.className = "ssItem";
		doPrimaryNavHighlight();
	}

	ssMenuMaskObj4 = document.getElementById("ssMenuMask4");
	ssMenuMaskObj4.className = "ssMenuMask4";
	ssMenuMaskObj4.onmouseover = function() {
		hideSSMenu();
		obj.className = "ssItem";
		doPrimaryNavHighlight();
	}
}

function hideSSMenu() {
	
	ssMenuObj = document.getElementById("ssMenu");
	ssMenuObj.className = "hidden";

	ssMenuMaskObj = document.getElementById("ssMenuMask");
	ssMenuMaskObj.className = "hidden";
	ssMenuMaskObj2 = document.getElementById("ssMenuMask2");
	ssMenuMaskObj2.className = "hidden";
	ssMenuMaskObj3 = document.getElementById("ssMenuMask3");
	ssMenuMaskObj3.className = "hidden";
	ssMenuMaskObj4 = document.getElementById("ssMenuMask4");
	ssMenuMaskObj4.className = "hidden";
	
	if (document.URL.indexOf("/assetmanagement/index") != -1) {
		//amDropdownDiv = document.getElementById("amDropdown");
		//amDropdownDiv.className = "show";
	}
	else if (document.URL.indexOf("/contact/index.cfm") != -1) {
		//toDropdown1Div = document.getElementById("toDropdown"); 
		//toDropdown1Div.className = "show";
		//phoneDropdownDiv = document.getElementById("phoneDropdown"); 
		//phoneDropdownDiv.className = "show";
	}
}

function buildTSDropDown(obj) {

	tsMenuObj = document.getElementById("tsMenu");
	tsMenuObj.className = "showTS";
	obj.className = "tsItemOn";


	tsMenuMaskObj = document.getElementById("tsMenuMask");
	tsMenuMaskObj.className = "tsMenuMask";
	tsMenuMaskObj.onmouseover = function() {
		hideTSMenu();
		obj.className = "tsItem";
		doPrimaryNavHighlight();
	}

	tsMenuMaskObj2 = document.getElementById("tsMenuMask2");
	tsMenuMaskObj2.className = "tsMenuMask2";
	tsMenuMaskObj2.onmouseover = function() {
		hideTSMenu();
		obj.className = "tsItem";
		doPrimaryNavHighlight();
	}

	tsMenuMaskObj3 = document.getElementById("tsMenuMask3");
	tsMenuMaskObj3.className = "tsMenuMask3";
	tsMenuMaskObj3.onmouseover = function() {
		hideTSMenu();
		obj.className = "tsItem";
		doPrimaryNavHighlight();
	}

	tsMenuMaskObj4 = document.getElementById("tsMenuMask4");
	tsMenuMaskObj4.className = "tsMenuMask4";
	tsMenuMaskObj4.onmouseover = function() {
		hideTSMenu();
		obj.className = "tsItem";
		doPrimaryNavHighlight();
	}
}

function hideTSMenu() {
	tsMenuObj = document.getElementById("tsMenu");
	tsMenuObj.className = "hidden";

	tsMenuMaskObj = document.getElementById("tsMenuMask");
	tsMenuMaskObj.className = "hidden";
	tsMenuMaskObj2 = document.getElementById("tsMenuMask2");
	tsMenuMaskObj2.className = "hidden";
	tsMenuMaskObj3 = document.getElementById("tsMenuMask3");
	tsMenuMaskObj3.className = "hidden";
	tsMenuMaskObj4 = document.getElementById("tsMenuMask4");
	tsMenuMaskObj4.className = "hidden";
}


function buildWMDropDown(obj) {

	wmMenuObj = document.getElementById("wmMenu");
	wmMenuObj.className = "showWM";
	obj.className = "wmItemOn";


	wmMenuMaskObj = document.getElementById("wmMenuMask");
	wmMenuMaskObj.className = "wmMenuMask";
	wmMenuMaskObj.onmouseover = function() {
		hideWMMenu();
		obj.className = "wmItem";
		doPrimaryNavHighlight();
	}

	wmMenuMaskObj2 = document.getElementById("wmMenuMask2");
	wmMenuMaskObj2.className = "wmMenuMask2";
	wmMenuMaskObj2.onmouseover = function() {
		hideWMMenu();
		obj.className = "wmItem";
		doPrimaryNavHighlight();
	}

	wmMenuMaskObj3 = document.getElementById("wmMenuMask3");
	wmMenuMaskObj3.className = "wmMenuMask3";
	wmMenuMaskObj3.onmouseover = function() {
		hideWMMenu();
		obj.className = "wmItem";
		doPrimaryNavHighlight();
	}

	wmMenuMaskObj4 = document.getElementById("wmMenuMask4");
	wmMenuMaskObj4.className = "wmMenuMask4";
	wmMenuMaskObj4.onmouseover = function() {
		hideWMMenu();
		obj.className = "wmItem";
		doPrimaryNavHighlight();
	}
}

function hideWMMenu() {
	wmMenuObj = document.getElementById("wmMenu");
	wmMenuObj.className = "hidden";

	wmMenuMaskObj = document.getElementById("wmMenuMask");
	wmMenuMaskObj.className = "hidden";
	wmMenuMaskObj2 = document.getElementById("wmMenuMask2");
	wmMenuMaskObj2.className = "hidden";
	wmMenuMaskObj3 = document.getElementById("wmMenuMask3");
	wmMenuMaskObj3.className = "hidden";
	wmMenuMaskObj4 = document.getElementById("wmMenuMask4");
	wmMenuMaskObj4.className = "hidden";
}


function DisplayAboutCompanyProfileLink() {
	var directory = SetDirectory('directory');
	document.write('<a href="' + directory + '/about/companyprofile.html" class="t1"><span>Company Profile<\/span><\/a>');
}

function DisplayAboutCompanyProfileLinkOn() {
	var directory = SetDirectory('directory');
	document.write('<a href="' + directory + '/about/companyprofile.html" class="t1On"><span>Company Profile<\/span><\/a>');
}

function DisplayFooterLinks() {
	var directory = SetDirectory('directory');
	document.write('<a href="/news/index.html">NEWSROOM<\/a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="/about/index.html">ABOUT US<\/a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="/careers/index.html">CAREERS<\/a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="/util/tosecure.cfm?Dest=/contact/index.cfm">CONTACT US<\/a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="/suppliers/index.html">SUPPLIER RESOURCES<\/a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="' + directory + '/sitemap.html">SITE MAP<\/a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="' + directory + '/privacy/index.html">PRIVACY<\/a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="' + directory + '/security/index.html">SECURITY<\/a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="' + directory + '/legal/index.html">LEGAL &amp; REGULATORY<\/a>');
}

function DisplayProductDisclaimer() {
	if ((document.URL.indexOf("/alternativeinvestmentservices/") != -1) || (document.URL.indexOf("/assetmanagement/") != -1) || (document.URL.indexOf("/assetservicing/") != -1) || (document.URL.indexOf("/brokerdealeradvisorservices/") != -1) || (document.URL.indexOf("/brokerdealerservices/") != -1) || (document.URL.indexOf("/pershing/") != -1) || (document.URL.indexOf("/convergex/") != -1) || (document.URL.indexOf("/corporatetrust/") != -1) || (document.URL.indexOf("/depositaryreceipts/") != -1) || (document.URL.indexOf("/environmentalsolutions/") != -1) || (document.URL.indexOf("/globalmarkets/") != -1) || (document.URL.indexOf("/liquidityservices/") != -1) || (document.URL.indexOf("/securitiesservicing/") != -1) || (document.URL.indexOf("/shareownerservices/") != -1) || (document.URL.indexOf("/treasuryservices/") != -1) || (document.URL.indexOf("/wealthmanagement/") != -1) || (document.URL.indexOf("/clients/") != -1) || (document.URL.indexOf("/banks/") != -1) || (document.URL.indexOf("/brokerdealers/") != -1) || (document.URL.indexOf("/derivatives/") != -1) || (document.URL.indexOf("/insurance/") != -1) || (document.URL.indexOf("/retirementplans/") != -1) || (document.URL.indexOf("/sovereigninstitutions/") != -1) || (document.URL.indexOf("/consultants/") != -1) || (document.URL.indexOf("/foresight/") != -1))
	{
		document.write('<p><br />Products and services may be provided in various countries by the subsidiaries and joint ventures of The Bank of New York Mellon Corporation.<br />Each is authorized and regulated as required within each jurisdiction.<\/p>');
	}
}

function displayWindow(url, width, height) {
	var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',left=50,top=50,resizable=yes,scrollbars=1,menubar=no,status=no');
}

function displayNoScroll(url, width, height) {
	var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',left=50,top=50,resizable=yes,scrollbars=0,menubar=no,status=no');
}

function displayQT(txt) {
	var url='';
	var urlnoflash='';
	url='/video/videoqt/videoplayer.html?assetURL=' + txt;
	urlnoflash='/video/videoqt/flashrequired.html?id=' + txt;
	if ( is_Flash ) {
		var Win = window.open(url,'displayWindow','width=706,height=476,top=50,left=50,resizable=no,scrollbars=0,menubar=no,status=no');
	} else {
		var Win = window.open(urlnoflash,'displayWindow','width=706,height=476,top=50,left=50,resizable=no,scrollbars=0,menubar=no,status=no');
	}
}

function displayVideo400(txt) {
	var url='';
	var urlnoflash='';
	url='/video/video400/videoplayer.html?assetURL=' + txt;
	urlnoflash='/video/video400/flashrequired.html?id=' + txt;
	if ( is_Flash ) {
		var Win = window.open(url,'displayWindow','width=400,height=375,top=50,left=50,resizable=no,scrollbars=0,menubar=no,status=no');
	} else {
		var Win = window.open(urlnoflash,'displayWindow','width=400,height=375,top=50,left=50,resizable=no,scrollbars=0,menubar=no,status=no');
	}
}

function displayVideo476(txt) {
	var url='';
	var urlnoflash='';
	url='/video/video476/videoplayer.html?assetURL=' + txt;
	urlnoflash='/video/video476/flashrequired.html?id=' + txt;
	if ( is_Flash ) {
		var Win = window.open(url,'displayWindow','width=476,height=330,top=50,left=50,resizable=no,scrollbars=0,menubar=no,status=no');
	} else {
		var Win = window.open(urlnoflash,'displayWindow','width=476,height=330,top=50,left=50,resizable=no,scrollbars=0,menubar=no,status=no');
	}
}


function changeImages() {
	if( document.images ) {
		for( var i = 0 ; i < changeImages.arguments.length ; i += 2 ) {
			document[changeImages.arguments[i]].src = eval( changeImages.arguments[i+1] + ".src" );
		}
	}
}

function init_international() {
	setIntDropDown();
	this.intPage = "";
}

function setIntDropDown() {
	init_international.intPage = "";

	mainIntWrapper = document.getElementById("intNavigation");
	mainIntArr = mainIntWrapper.getElementsByTagName("A");

	for (i=0;i<mainIntArr.length;i++) {
		mainIntArr[i].onmouseover = function() {
			buildIntDropDown(this);
		}

		if (mainIntArr[i].className.indexOf("On") > 0) {
			//variable initiated in "init_international" function at top
			init_international.intPage = mainIntArr[i].className;
		}
	}
}

function buildIntDropDown(obj) {

	intMenuObj = document.getElementById("intMenu");
	intMenuObj.className = "showInt";
	obj.className = "intItemOn";


	intMenuMaskObj = document.getElementById("intMenuMask");
	intMenuMaskObj.className = "intMenuMask";
	intMenuMaskObj.onmouseover = function() {
		hideIntMenu();
		obj.className = "intItem";
	}

	intMenuMaskObj2 = document.getElementById("intMenuMask2");
	intMenuMaskObj2.className = "intMenuMask2";
	intMenuMaskObj2.onmouseover = function() {
		hideIntMenu();
		obj.className = "intItem";
	}

	intMenuMaskObj3 = document.getElementById("intMenuMask3");
	intMenuMaskObj3.className = "intMenuMask3";
	intMenuMaskObj3.onmouseover = function() {
		hideIntMenu();
		obj.className = "intItem";
	}

	intMenuMaskObj4 = document.getElementById("intMenuMask4");
	intMenuMaskObj4.className = "intMenuMask4";
	intMenuMaskObj4.onmouseover = function() {
		hideIntMenu();
		obj.className = "intItem";
	}
}

function hideIntMenu() {
	intMenuObj = document.getElementById("intMenu");
	intMenuObj.className = "hidden";

	intMenuMaskObj = document.getElementById("intMenuMask");
	intMenuMaskObj.className = "hidden";
	intMenuMaskObj2 = document.getElementById("intMenuMask2");
	intMenuMaskObj2.className = "hidden";
	intMenuMaskObj3 = document.getElementById("intMenuMask3");
	intMenuMaskObj3.className = "hidden";
	intMenuMaskObj4 = document.getElementById("intMenuMask4");
	intMenuMaskObj4.className = "hidden";
}

function getClientDate() {
		var dtClient = "";
		var dt = new Date();

		var yrYear = dt.getYear();
		var mName = new Array("January","February","March","April","May","June","July","August","September","October","November","December");

		if( yrYear < 1900 ) {
			yrYear = yrYear + 1900;
		}

		dtClient = mName[dt.getMonth()] + "&nbsp;" + dt.getDate() + ",&nbsp;" + yrYear;

		document.write(dtClient);
}

function DisplayAdTag() {
    var sRegExp = new RegExp( "bnymad", 'i' );
    var sRegExp2 = new RegExp( "wtfswp", 'i' );
	var allcookies = document.cookie;
    cookiearray  = allcookies.split(';');
	
	var adcookiearray=new Array();
	var fscookiearray=new Array();

	for(var i=0; i<cookiearray.length; i++){
      cookieName = cookiearray[i].split('=')[0];
      cookieValue = cookiearray[i].split('=')[1];
	  if (cookieName.match(sRegExp)) {
		 adcookiearray.push(cookieValue);
	  }
	  if (cookieName.match(sRegExp2)) {
		 fscookiearray.push(cookieValue);
	  }
	}
	document.write('<meta name="WT.bnymad" content="' + adcookiearray.join(';') + '" />'); 
	document.write('<meta name="WT.fs.wp" content="' + fscookiearray.join(';') + '" />'); 
}

function languageDetect() {
	if (document.URL.indexOf("/cn/zh/") != -1) {
		cnzhDIV = document.getElementById("cn-chinese");
		cnzhDIV.style.display = "block";
	}
	else if (document.URL.indexOf("/cn/en/") != -1) {
		cnenDIV = document.getElementById("cn-english");
		cnenDIV.style.display = "block";
	}
	else if (document.URL.indexOf("/jp/ja/") != -1) {
		jpjaDIV = document.getElementById("jp-japanese");
		jpjaDIV.style.display = "block";
	}
	else if (document.URL.indexOf("/jp/en/") != -1) {
		jpenDIV = document.getElementById("jp-english");
		jpenDIV.style.display = "block";
	}
	else if (document.URL.indexOf("/kr/ko/") != -1) {
		krkoDIV = document.getElementById("kr-korean");
		krkoDIV.style.display = "block";
	}
	else if (document.URL.indexOf("/kr/en/") != -1) {
		krenDIV = document.getElementById("kr-english");
		krenDIV.style.display = "block";
	}
	else if (document.URL.indexOf("/de/de/") != -1) {
		dedeDIV = document.getElementById("de-german");
		dedeDIV.style.display = "block";
	}
	else if (document.URL.indexOf("/de/en/") != -1) {
		deenDIV = document.getElementById("de-english");
		deenDIV.style.display = "block";
	}
	else if (document.URL.indexOf("/it/it/") != -1) {
		ititDIV = document.getElementById("it-italian");
		ititDIV.style.display = "block";
	}
	else if (document.URL.indexOf("/it/en/") != -1) {
		itenDIV = document.getElementById("it-english");
		itenDIV.style.display = "block";
	}
	else {
		usenDIV = document.getElementById("us-english");
		usenDIV.style.display = "block";
	}
}

function setStyleSheets() {
	if ((document.URL.indexOf("melpricemonthly") != -1) || (document.URL.indexOf("melpricedaily") != -1) || (document.URL.indexOf("melpricemonthly") != -1)) {
  		document.write('<link rel="stylesheet" type="text/css" href="http://phx.corporate-ir.net/client/87/87345/css/ccbnIR.css" />');
	}
	if ((document.URL.indexOf("/cn/zh/") != -1) || (cookieValue == "cnzh")) {
  		document.write('<link rel="stylesheet" type="text/css" href="/styles/bnym-cnzh.css" />');
	}
	else if ((document.URL.indexOf("/cn/en/") != -1) || (cookieValue == "cnen")) {
  		document.write('<link rel="stylesheet" type="text/css" href="/styles/bnym-cnen.css" />');
	}
	else if ((document.URL.indexOf("/de/de/") != -1) || (cookieValue == "dede")) {
  		document.write('<link rel="stylesheet" type="text/css" href="/styles/bnym-dede.css" />');
	}
	else if ((document.URL.indexOf("/de/en/") != -1) || (cookieValue == "deen")) {
  		document.write('<link rel="stylesheet" type="text/css" href="/styles/bnym-deen.css" />');
	}
	else if ((document.URL.indexOf("/it/it/") != -1) || (cookieValue == "itit")) {
  		document.write('<link rel="stylesheet" type="text/css" href="/styles/bnym-itit.css" />');
	}
	else if ((document.URL.indexOf("/it/en/") != -1) || (cookieValue == "iten")) {
  		document.write('<link rel="stylesheet" type="text/css" href="/styles/bnym-iten.css" />');
	}
	else if ((document.URL.indexOf("/jp/ja/") != -1) || (cookieValue == "jpja")) {
  		document.write('<link rel="stylesheet" type="text/css" href="/styles/bnym-jpja.css" />');
	}
	else if ((document.URL.indexOf("/jp/en/") != -1) || (cookieValue == "jpen")) {
  		document.write('<link rel="stylesheet" type="text/css" href="/styles/bnym-jpen.css" />');
	}
	else if ((document.URL.indexOf("/kr/ko/") != -1) || (cookieValue == "krko")) {
  		document.write('<link rel="stylesheet" type="text/css" href="/styles/bnym-krko.css" />');
	}
	else if ((document.URL.indexOf("/kr/en/") != -1) || (cookieValue == "kren")) {
  		document.write('<link rel="stylesheet" type="text/css" href="/styles/bnym-kren.css" />');
	}
}
