// JavaScript Document
var searchString = document.location.search;
var iFrameUrl ='' ;
var ShowAllBranch = false ;

// strip off the leading '?'
searchString = searchString.substring(1);

var nvPairs = searchString.split("&");

for (i = 0; i < nvPairs.length; i++)
{
     var nvPair = nvPairs[i].split("=");
     var name = nvPair[0];
     var value = nvPair[1];
	 
	 if (nvPair[0] == "street")
	 {
		iFrameUrl = 'street=' +  nvPair[1] ;	 
	 }
	 if (nvPair[0] == "city")
	 {
		iFrameUrl = iFrameUrl + '&city=' +  nvPair[1] ;	 
	 }
	 if (nvPair[0] == "state")
	 {
		iFrameUrl = iFrameUrl + '&state=' +  nvPair[1] ;	 
	 }
	 if (nvPair[0] == "zipcode")
	 {
		iFrameUrl = iFrameUrl + '&zipcode=' +  nvPair[1] ;	 
	 }
	 
	 if (nvPair[0] == "ATM")
	 {
		iFrameUrl = iFrameUrl + '&ATM=1' ;	 
	 }
	 if (nvPair[0] == "ATMSF")
	 {
		iFrameUrl = iFrameUrl + '&ATMSF=1' ;	 
	 }
	 if (nvPair[0] == "ATMDP")
	 {
		iFrameUrl = iFrameUrl + '&ATMDP=1' ;	 
	 }
	 if (nvPair[0] == "FCSATM")
	 {
		iFrameUrl = iFrameUrl + '&FCSATM=1' ;	 
	 }
	 if (nvPair[0] == "FCS")
	 {
		iFrameUrl = iFrameUrl + '&FCS=1' ;	 
	 }
	 if (nvPair[0] == "ESC")
	 {
		iFrameUrl = iFrameUrl + '&ESC=1' ;	 
	 }
	 if (nvPair[0] == "FSCESC")
	 {
		iFrameUrl = iFrameUrl + '&FSCESC=1' ;	 
	 }
	 if (nvPair[0] == "BRANCH")
	 {
		iFrameUrl = iFrameUrl + '&BRANCH=1' ;	 
	 }
	  if (nvPair[0] == "ShowAllBranch")
	 {
		ShowAllBranch = true ;
	 }
}

// Remove Scroll Bar
document.write('<script type="text/javascript" src="http://js.locatorsearch.com/iframe.js"></script>');

document.domain = 'genfed.com';


if (ShowAllBranch)
{
	document.write('<iframe id="atmlocator" src="http://locatorsearch.genfed.com/ListCUServiceCenter.aspx?loc=1" height="1200" onload="DYNIFS.resize(\'atmlocator\')" width="725" name="atmlocator" frameborder="0" allowtransparency="true" scrolling="no">Your browser doesn\'t support iframes</iframe>');
}
else
{
	if (iFrameUrl.length > 0)
	{
		document.write('<iframe id="atmlocator" src="http://locatorsearch.genfed.com/PostSearch.aspx?' + iFrameUrl + '" height="1200" onload="DYNIFS.resize(\'atmlocator\')" width="725" name="atmlocator" frameborder="0" allowtransparency="true" scrolling="no">Your browser doesn\'t support iframes</iframe>');
	}
	else
	{
		document.write('<iframe id="atmlocator" src="http://locatorsearch.genfed.com/index.aspx" height="1200" width="725" name="atmlocator" onload="DYNIFS.resize(\'atmlocator\')" frameborder="0" allowtransparency="true" scrolling="no">Your browser doesn\'t support iframes</iframe>');
	}
}


