// JavaScript Document
vOPenDivMenu="0";
function ShowHideDivMenu(vID)
{     
	var vShow = document.getElementById(vID);
	if(vOPenDivMenu != "0")
	{
		if(vOPenDivMenu != vID)
		{
			document.getElementById(vOPenDivMenu).style.display = "none";
			
		}
	}
	if(vShow.style.display == "none")
	{
		document.getElementById(vID).style.display = "block";
		vOPenDivMenu = vID;
	}
	else
	{
		document.getElementById(vID).style.display = "none";			
	}

}
//Show hide Div function Ends

//Highlight Left Menu in Asset Management
//link1Selected for bullet and color
//Selected1 for header color
function HighlightDivMenu(vID, hdname) 
{
    document.getElementById(vID).className = "link1Selected";
	document.getElementById(hdname).className = "selected1";
}
//Highlight Top menu
function HighlightMainMenu(vMenuID) 
{
    document.getElementById(vMenuID).className = "selectMain";
}
//Quick Links DropdownList on select redirect to links
function redirectQuickLinks() 
{
    if(document.getElementById("ddlQuickLinks").value == "AccessRemoteDeposit")
    {               
       window.location.href = "https://xpress.epaysol.com/ct/?bid=116112098";          
    }  
    if(document.getElementById("ddlQuickLinks").value == "OnlineBusinessBanking")
    {           
        window.location.href = "/site/BusinessServices/CashManagement/OnlineBusinessBanking/Content.aspx";
    }   
    if(document.getElementById("ddlQuickLinks").value == "OnlineLockBoxAccess")
    {            
        window.location.href = "/site/BusinessServices/OnlineLockbox/Content.aspx";                                  
    }   
    if(document.getElementById("ddlQuickLinks").value == "WealthManagementAccess")
    {              
        window.location.href = "https://www.tpars.com/prod/login.asp?FI=0569a";                                 
    }     
    return;
}
//Home page Quick Links DropdownList on select redirect to links
function redirectHomeQuickLinks() 
{
    if(document.getElementById("ddlQuickLinks").value == "RemoteDepositCapture")
    {               
       window.location.href = "/site/BusinessServices/CashManagement/RemoteDepositCapture/Content.aspx";          
    }  
    if(document.getElementById("ddlQuickLinks").value == "HomeLoans")
    {           
        window.location.href = "/site/PersonalServices/HomeLoan/Content.aspx";            
    }   
    if(document.getElementById("ddlQuickLinks").value == "BusinessLoans")
    {            
        window.location.href = "/site/BusinessServices/LoanCredit/Content.aspx";                                  
    }   
    if(document.getElementById("ddlQuickLinks").value == "CorrespondentLoans")
    {            
        window.location.href = "/site/PersonalServices/CorrespondentLoans/Content.aspx";                                  
    }
    if(document.getElementById("ddlQuickLinks").value == "OnlineLockBoxAccess")
    {              
        window.location.href = "/site/BusinessServices/OnlineLockbox/Content.aspx";                                 
    }   
    if(document.getElementById("ddlQuickLinks").value == "WealthManagementAccess")
    {   
        window.open("https://www.tpars.com/prod/login.asp?FI=0569a", "","");                                     
    }  
    if(document.getElementById("ddlQuickLinks").value == "GenGold")
    {
        window.location.href = "/gengold/generationsgold.aspx";
	}  
    if(document.getElementById("ddlQuickLinks").value == "ProvidentPerks")
    {
        window.open("https://www.scorecardrewards.com", "", "");                                        
    }  
    if(document.getElementById("ddlQuickLinks").value == "FraudAlerts")
    {              
        window.location.href = "/site/QuickLinks/FraudAlerts/Content.aspx";                                 
    }  
    if(document.getElementById("ddlQuickLinks").value == "FundAvailabiltyPolicy")
    {
        window.open("/uploads/2010_Provident_Funds_Availibility_Policy.pdf", "", "");
    }
    if(document.getElementById("ddlQuickLinks").value == "OverdraftProtection")
    {              
        window.location.href = "/site/PersonalServices/OverdraftAcknowledge/Content.aspx";                                 
    }  
    if(document.getElementById("ddlQuickLinks").value == "TemporaryFDICInsuranceCoverage")
    {
        window.location.href = "/site/MainPage/Announcements/default.aspx";
    }  
    return;
}
function openwindow(x)
{        
    var z;
    
    if(x == 'PFA')
    {
       window.open("/App_UI/AboutToLeave.aspx?parentPage=PFA","win1","width=450,height=475,screenX=200,screenY=300,titlebar=no,scrollbars=auto,maximize=no"); 
    }
    if(x == 'BFA')
    {
        window.open("/App_UI/AboutToLeave.aspx?parentPage=BFA", "win1", "width=450,height=475,screenX=200,screenY=300,titlebar=no,scrollbars=auto,maximize=no"); 
    }
    if(x == 'FA')
    {
        window.open("/App_UI/AboutToLeave.aspx?parentPage=FA", "win1", "width=450,height=475,screenX=200,screenY=300,titlebar=no,scrollbars=auto,maximize=no"); 
    }
    if(x == 'ASPG')
    {
        window.open("/App_UI/AboutToLeave.aspx?parentPage=ASPG", "win1", "width=450,height=475,screenX=200,screenY=300,titlebar=no,scrollbars=auto,maximize=no"); 
    }
    return;
} 
function openwindow1(x)
{ 
   if(x == 'Fin')
    {
      window.open("/App_UI/AboutToLeave.aspx?parentPage=Fin","win1","width=450,height=475,screenX=200,screenY=300,titlebar=no,scrollbars=auto,maximize=no"); 
    }

} 
function openwindow2(x)
{ 
   if(x == 'Fin')
    {
      window.open("/App_UI/AboutToLeave2.aspx?parentPage=Fin","win1","width=450,height=475,screenX=200,screenY=300,titlebar=no,scrollbars=auto,maximize=no"); 
    }
    if(x == 'BFAS')
    {
      window.open("/App_UI/AboutToLeave2.aspx?parentPage=BFAS","win1","width=450,height=475,screenX=200,screenY=300,titlebar=no,scrollbars=auto,maximize=no"); 
    }
} 
