
var iInId;var iAjx=0;function Ajax()
{this.toString=function(){return"Ajax";}
this.http=new HTTP();this.makeRequest=function(_method,_url,_callbackMethod)
{if(_callbackMethod==_callbackMethod)
{if(iAjx>0)iAjx--;}
iAjx++;this.request=(window.XMLHttpRequest)?new XMLHttpRequest():new ActiveXObject("MSXML2.XMLHTTP");this.request.onreadystatechange=_callbackMethod;this.request.open(_method,_url,true);this.request.send(_url);}
this.checkReadyState=function(_id,_1,_2,_3)
{switch(this.request.readyState)
{case 1:if(document.getElementById("dvLoadingImg")!=null)
{document.getElementById("dvLoadingImg").style.display="block";}
else
{if(_id!=''&&_id!=null)
{document.getElementById(_id).innerHTML="<span style='font-family:arial;font-size:11px;' >"+_1+" </span><span style='font-family:arial;font-size:11px;'></span>";BeginPageLoad(_id);}}
break;case 2:break;case 3:break;case 4:iAjx--;if(document.getElementById("dvLoadingImg")!=null)
{window.clearInterval(iInId);iInId=window.setInterval("EndLoadimg();",600);}
else
{EndPageLoad();}
if(this.http.status(this.request.status)=="success")
{if(this.request.responseText.indexOf('~logout~')!=-1)
{fnLogOut();return;}}
return this.http.status(this.request.status);}}}
var iLoopCounter=1;var iMaxLoop=5;var iIntervalId;var oDiv;function BeginPageLoad(dvName)
{if(oDiv!=dvName)
{oDiv=dvName;iIntervalId=window.setInterval("iLoopCounter=UpdateProgressMeter(iLoopCounter,iMaxLoop)",500);}}
function EndLoadimg()
{if(typeof(iInId)!="undefined")
{if(iAjx<=0)
{document.getElementById('dvLoadingImg').style.display='none';window.clearInterval(iInId);}}}
function EndPageLoad(){if(iAjx<=0){window.clearInterval(iIntervalId);}}
var iLoadId;var oDiv=null;function fnLoadingImg(obj)
{if(obj==null)
{obj=oDiv;}
else
{oDiv=obj;}
if(obj.innerHTML=="")
{document.getElementById("dvLoadingImg").style.display="block";iLoadId=setTimeout('fnLoadingImg()',600);}
else
{document.getElementById("dvLoadingImg").style.display="none";window.clearInterval(iLoadId);}}
function UpdateProgressMeter(iCurrentLoopCounter,iMaximumLoops)
{iCurrentLoopCounter+=1;if(oDiv)
{if(document.getElementById(oDiv).childNodes.length>1)
{if(iCurrentLoopCounter<=iMaximumLoops)
{document.getElementById(oDiv).childNodes[1].innerHTML+=".";return iCurrentLoopCounter;}
else
{document.getElementById(oDiv).childNodes[1].innerHTML="";return 1;}}
else
{oDiv="";return 1;}}}
function HTTP(){this.toString=function(){return"HTTP";}
this.status=function(_status)
{switch(_status)
{case 200:return"success";break;case 404:return"File not found.";break;default:return"HTTP Status: "+_status;}}}
function getRef(name){return document.getElementById(name);}
window.document.onkeydown=function(e){var ev=(e)?e:event;top.keySarav=ev.keyCode;}
function fnsrcElement(e){return(window.event)?window.event.srcElement:e.target;}
function fnsrcElementId(e){return(window.event)?window.event.srcElement.id:e.target.getAttribute("id");}
function getObjInnerText(obj){var elem=obj;if(typeof(elem.text)!="undefined"){return elem.text;}else if(typeof(elem.textContent)!="undefined"){return elem.textContent;}else if(typeof(elem.innerText)!="undefined"){return elem.innerText;}}
function fnClick(obj){if(document.all){obj.click();}else{clickevent=document.createEvent("MouseEvents");clickevent.initEvent("click",true,true);obj.dispatchEvent(clickevent);}}
function getPosition(el){var p={x:el.offsetLeft,y:el.offsetTop};while(el.offsetParent){el=el.offsetParent;p.x+=el.offsetLeft;p.y+=el.offsetTop;if(el!=document.body&&el!=document.documentElement){p.x-=el.scrollLeft;p.y-=el.scrollTop;}}return p;}
function setCookie(c_name,value,expiredays){var exdate=new Date();exdate.setDate(exdate.getDate()+expiredays);alert(document.cookie);document.cookie=c_name+"="+escape(value)+((expiredays==null)?"":";expires="+exdate.toUTCString());}
function getCookie(c_name){if(document.cookie.length>0){c_start=document.cookie.indexOf(c_name+"=");if(c_start!=-1){c_start=c_start+c_name.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1)c_end=document.cookie.length;return unescape(document.cookie.substring(c_start,c_end));}}return"";}
var ajaxChooseRole=new Ajax();function fnJsEnter(name,clicked){var mode=0;if(name=="btnEnter1"){mode=0;}else{mode=1;}
var strUrl=RootURL+'Common/AjaxFunctions.aspx?qstrtype=ChangeRole&qstrmode='+mode+'&qstrchecked='+clicked;ajaxChooseRole.makeRequest("GET",strUrl,ajxChangeRole1);}
var ajaxChangeRole=new Ajax();function fnChangeRole(mode){try{var strUrl=RootURL+"Common/AjaxFunctions.aspx?qstrtype=ChangeRole&qstrmode="+mode;ajaxChangeRole.makeRequest("GET",strUrl,ajxChangeRole);}catch(ex){}}
function fnJsStatCounter(pmode,pname){var strUrl=RootURL+'Widgets/MarketIndic/stat-count.aspx#'+pmode+'='+pname;document.getElementById("fraStatCount").innerHTML='<iframe src="'+strUrl+'" ></iframe>';}
function fnJsExpand(pHt){document.getElementById("dvIndicator").style.height=pHt+62+"px";document.getElementById("dvMarketRBPIndicator").style.height=pHt+62+"px";}
function fnJsExpandFunds(pHt){document.getElementById("OurMutualFunds").style.height=pHt+25+"px";}
function fnJsCloseFund(){document.getElementById("dvMarketRBPIndicator").style.width="221px";document.getElementById("dvMarketRBPIndicator").style.height=document.getElementById("dvIndicator").style.height;}
function fnJsOpenFund(){document.getElementById("dvMarketRBPIndicator").style.width="750px";document.getElementById("dvMarketRBPIndicator").style.height="740px";}
function fnJsBanner(name) {
    document.getElementById("dvBannerPopup").style.display = "block"; document.getElementById("dvIntroBg").style.display = "block"; /*document.getElementById("fraBan1").style.display = "none";*/ document.getElementById("fraBan2").style.display = "none"; document.getElementById("fraBan3").style.display = "none"; document.getElementById("fraBan4").style.display = "none"; document.getElementById("fraBan5").style.display = "none";
if(name=="btnopen1"){grow(document.getElementById("liBan-1"));}
if(name=="btnopen2"){grow(document.getElementById("liBan-2"));}
if(name=="btnopen3"){grow(document.getElementById("liBan-3"));}
if(name=="btnopen4"){grow(document.getElementById("liBan-4"));}
if(name=="btnopen5"){grow(document.getElementById("liBan-5"));}}
function fnJsBannerClose(){document.getElementById("dvBannerPopup").style.display="none";document.getElementById("dvIntroBg").style.display="none";/*document.getElementById("fraRBPAnswer").src="";*/document.getElementById("fraRBPProcess").src="";document.getElementById("fraRBPinAction").src="";document.getElementById("fraRBPToolsuite").src="";document.getElementById("fraIntroVideo").src="";}
var tabbanlink;function bantabClick(obj,name){/*document.getElementById("fraBan1").style.display="none";*/document.getElementById("fraBan2").style.display="none";document.getElementById("fraBan3").style.display="none";document.getElementById("fraBan4").style.display="none";document.getElementById("fraBan5").style.display="none";if(tabbanlink!=null){tabbanlink.className="";}
tabbanlink=obj;tabbanlink.className="ui-tabs-selected";document.getElementById(name).style.display="block";/*document.getElementById("fraRBPAnswer").src="";*/document.getElementById("fraRBPProcess").src="";document.getElementById("fraRBPinAction").src="";document.getElementById("fraRBPToolsuite").src="";document.getElementById("fraIntroVideo").src="";switch(name){case"fraBan2":document.getElementById("fraRBPProcess").src="Widgets/RBPProcess/how-is-RBP-calculated-demo.aspx";break;case"fraBan3":document.getElementById("fraRBPinAction").src="Widgets/RBPinAction/how-is-rbp-used-to-invest-demo.aspx";break;case"fraBan4":document.getElementById("fraIntroVideo").src="introduction-video.aspx";break;case"fraBan1":document.getElementById("fraRBPAnswer").src="Widgets/RBPAnswer/what-is-rbp-demo.aspx";break;default:break;}}
function grow(obj){$("#dvBannerPopup").css({"width":"100px","height":"100px","top":"75%","left":"75%","opacity":"0.4"});$("#dvBannerPopup").animate({width:"1000px",height:"712px",top:"10%",left:"50%",opacity:1},600,function(){fnClick(obj);});$("#dvIntroBg").css({"opacity":"0"});$("#dvIntroBg").animate({opacity:0.5},600,function(){});}
