/*
 CALL TO CORRECT DIRECTORY
 CALL TO CORRECT DIRECTORY
 CALL TO CORRECT DIRECTORY
 CALL TO CORRECT DIRECTORY
*/

directCall="";
directCall2="";

  
if (window.homepage){
	directCall="images/";	
	directCall2="site/";
}
else if (window.assocpage) {
	directCall="../images/";
	directCall2="../site/";
}
else if (window.ratespage)
{
	directCall="https://www.afsbonline2.com/images/";
	directCall2="https://www.afsbonline2.com/site/";
}
else if (window.absolutepage)
{
	directCall="http://www.afsbonline2.com/images/";
	directCall2="http://www.afsbonline2.com/site/";
}
else {
	directCall="../images/";
	directCall2="";
}


// ROLLOVER CODE BELOW ROLLOVER CODE BELOW ROLLOVER CODE BELOW ROLLOVER CODE BELOW
// ROLLOVER CODE BELOW ROLLOVER CODE BELOW ROLLOVER CODE BELOW ROLLOVER CODE BELOW
// ROLLOVER CODE BELOW ROLLOVER CODE BELOW ROLLOVER CODE BELOW ROLLOVER CODE BELOW


  browserName = navigator.appName;
  browserVer = parseInt(navigator.appVersion);
  if (((browserName == "Netscape") && (browserVer >= 3)) || ((browserName == "Microsoft Internet Explorer") && (browserVer >= 4))) {
    version = "ok";}

       
  if (document.images) {
            personal_on = new Image(132,21);            personal_on.src = directCall + "nav-personal-on.gif";     
            personal_off = new Image(132,21);            personal_off.src = directCall + "nav-personal-off.gif";
            personal_sub = new Image(610,15);          personal_sub.src = directCall + "sub-personal.gif";  
 
            commercial_on = new Image(163,21);            commercial_on.src = directCall + "nav-commercial-on.gif";     
            commercial_off = new Image(163,21);            commercial_off.src = directCall + "nav-commercial-off.gif";
            commercial_sub = new Image(610,15);          commercial_sub.src = directCall + "sub-commercial.gif";        
            
            associate_on = new Image(132,21);            associate_on.src = directCall + "nav-associate-on.gif";     
            associate_off = new Image(132,21);           associate_off.src = directCall + "nav-associate-off.gif";
            associate_sub = new Image(610,15);          associate_sub.src = directCall + "sub.gif"; 
			
			fees_on = new Image(54,21);            fees_on.src = directCall + "nav-fees-on.gif";     
            fees_off = new Image(54,21);           fees_off.src = directCall + "nav-fees-off.gif";
            fees_sub = new Image(610,15);          fees_sub.src = directCall + "sub.gif"; 
									
			rates_on = new Image(60,21);            rates_on.src = directCall + "nav-rates-on.gif";     
            rates_off = new Image(60,21);            rates_off.src = directCall + "nav-rates-off.gif";
            rates_sub = new Image(610,15);          rates_sub.src = directCall + "sub.gif";  

			calculators_on = new Image(100,21);            calculators_on.src = directCall + "nav-calculators-on.gif";     
            calculators_off = new Image(100,21);            calculators_off.src = directCall + "nav-calculators-off.gif";
            calculators_sub = new Image(610,15);          calculators_sub.src = directCall + "sub.gif";        
            
            aboutus_on = new Image(85,21);             aboutus_on.src = directCall + "nav-aboutus-on.gif";     
            aboutus_off = new Image(85,21);            aboutus_off.src = directCall + "nav-aboutus-off.gif";
            aboutus_sub = new Image(610,15);          aboutus_sub.src = directCall + "sub-aboutus.gif";      
            
            contact_on = new Image(78,21);            contact_on.src = directCall + "nav-contact-on.gif";     
            contact_off = new Image(78,21);            contact_off.src = directCall + "nav-contact-off.gif";
            contact_sub = new Image(610,15);          contact_sub.src = directCall + "sub-contact.gif";        
			
			contactus_on = new Image(78,21);            contactus_on.src = directCall + "nav-contactus-on.gif";     
            contactus_off = new Image(78,21);            contactus_off.src = directCall + "nav-contactus-off.gif";
            contactus_sub = new Image(610,15);          contactus_sub.src = directCall + "sub.gif";        
            
            help_on = new Image(47,21);            help_on.src = directCall + "nav-help-on.gif";     
            help_off = new Image(47,21);            help_off.src = directCall + "nav-help-off.gif";
            help_sub = new Image(610,15);          help_sub.src = directCall + "sub-help.gif";
			
            qa_on = new Image(119,21);            qa_on.src = directCall + "nav-qa-on.gif";     
            qa_off = new Image(119,21);            qa_off.src = directCall + "nav-qa-off.gif";
            qa_sub = new Image(610,15);          qa_sub.src = directCall + "sub.gif";                  
           
                     
        }


function imgOn(imgName) {
        if (document.images) {
            document[imgName].src = eval(imgName + "_on.src");
            document["sub"].src = eval(imgName + "_sub.src");
        }
}


function imgOff(imgName) {
        if (document.images) {
            document[imgName].src = eval(imgName + "_off.src");
            document["sub"].src = directCall + "sub.gif";
        }
}
  
// ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE
// ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE
// ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE  


//style sheet sniffer 
navigator.userAgent.indexOf('Mac') != -1 ? document.write('<link href="' + directCall2 + '_macstyle.css" rel="stylesheet"') : document.write('<link href="' + directCall2 + '_winstyle.css" rel="stylesheet">');

//calculator call
function showCalc(calc){
		var pWidth = ( ((parseInt(screen.width) / 2)) - 275 )
		var pHeight = (((parseInt(screen.height) / 2)) -240)
        window.open(calc,'hello',"width=550,height=480,left=" + pWidth + ",top=" + pHeight + ",resizable=1,scrollbars=1");
}


function openWin(URL) {
	 aWindow = window.open(URL,"application","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,width=600,height=450,screenX=100,screenY=104,top=90,left=100");
	  } 
	  
function openWin2(URL) {
	 aWindow = window.open(URL,"application","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,width=600,height=450,screenX=100,screenY=104,top=90,left=100");
	  }  


function goRates(){
	document.location.href="../../prodserv/rates.html";
}

function goRates_up_one(){
	document.location.href="../prodserv/rates.html";
}

function goURL(url) {
 
   window.location = url;
 
}

function showFooter(){
	document.write("<div align=\"center\"style=\"vertical-align: middle; padding:5px;\" class='ficontent'><img src="+directCall+"ehl.gif"+" height='46' width='40' style='vertical-align: middle;' />&nbsp;&nbsp;Member FDIC</div>");
}

var openWin;

function openBPPDemo() { //v2.0

	openWin = window.open("https://www.afsbonline2.com/bridge/GRP/mvbpp_flash_demo/index.html","mvdemo","resizable=yes,scrollbars=no,menubar=no,status=no,width=775,height=600,left=0,top=0");
	//so that the demo window can redirect this page if need be.
	window.name = 'opener';
	
}


function makeLoanNav() {
	var navigation = '';

	navigation += '<p style="padding-top: 110px; padding-left:4px;"><a href="'+directCall2+'about_acacia.html" style="text-decoration: none;"><strong>About Acacia Federal</strong></a></p>';
	navigation += '<ul>';
	navigation += '<li><a href="'+directCall2+'mortgage_products.html" style="text-decoration: none;"><strong>Loan Programs</strong></a></li>';
	navigation += '<li><a href="'+directCall2+'what_you_need.html" style="text-decoration: none;"><strong>What You Need When You Apply</strong></a></li>';
	navigation += '<li><a href="'+directCall2+'loan_process.html" style="text-decoration: none;"><strong>Loan Process</strong></a></li>';
	navigation += '<li><a href="'+directCall2+'calculator_mortgage.html" style="text-decoration: none;"><strong>Calculator</strong></a></li>';
	navigation += '<!--<li><strong>Glossary</strong></li>-->';
	navigation += '</ul>';
	navigation += '<p style="padding-left:4px;"><a href="/Forms/OnlineForm.cgi?form=mortgage_prequal_app" style="text-decoration: none;"><strong>Apply Now! (Simple pre-qualification form)</strong></a></p>';
	navigation += '<hr />';

	document.write(navigation);
}
