function MM_openBrWindow(theURL,winName,features) { //v2.0

	win=window.open(theURL,winName,features);		
	win.focus();
}

function forcedFileDownload(sFile) {
	var sURL = location.protocol + '//' + location.host + '/AdvisorBusinessCentre/distglobal/inc_ForcedDownload.asp';

	window.location = sURL + '?FileName=' + sFile + '&Lang=' + strLanguage_js ;
}

function languageToggle() {
	var appPath = document.location.href;  
				  
	if(appPath.indexOf("/e/") > -1)
	{
		appPath = appPath.replace("/e/", "/f/");
	}
	else
	{
		appPath = appPath.replace("/f/", "/e/");
	}
			  	
	window.location = appPath;
} 

function setAdvCookie(AID)
{	
	document.cookie = 'EncodedAgentNo=' + AID + '; path=/'
}

function getParam(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];
}