// JavaScript Document
var searchString = document.location.search;
var iFrameUrl ='' ;
var street = '' ;
var city = '' ;
var state = '' ;
var zipcode = '' ;
var addressline= '' ;



// 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")
	 {
		street = nvPair[1] ;	 
	 }
	 if (nvPair[0] == "city")
	 {
		city = nvPair[1] ;	 
	 }
	 if (nvPair[0] == "state")
	 {
		state = nvPair[1] ;	 
	 }
	 if (nvPair[0] == "zipcode")
	 {
		zipcode = nvPair[1] ;	 
	 }	 
	 if (nvPair[0] == "ATM")
	 {
		iFrameUrl = iFrameUrl + '&ATMSF=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 + '&FCS=1' ;	 
	 }
}
if (street.length > 0)
 {
    addressline = street ;
 }	 
 if (city.length > 0)
 {
    if (addressline.length > 0)
    {
        addressline = addressline + "," + city ;
    }
    else
    {
        addressline = city ;
    }
 }
 if (state.length > 0)
 {
    if (addressline.length > 0)
    {
        addressline = addressline + "," + state ;
    }
    else
    {
        addressline = state ;
    }
 }
 if (zipcode.length > 0)
 {
    if (addressline.length > 0)
    {
        addressline = addressline + "," + zipcode ;
    }
    else
    {
        addressline = zipcode ;
    }
 }
 
if (addressline.length > 0) 
{
	iFrameUrl = 'addTXT=' + addressline.replace(' ','+') + iFrameUrl ;
}

document.write('<script type="text/javascript" src="http://js.locatorsearch.com/iframe.js"></script>');

document.domain = 'cu24.com';

if (iFrameUrl.length > 0)
{
	document.write('<iframe id="atmlocator" src="http://locatorsearch.cu24.com/index.aspx?siteid=3&' + iFrameUrl + '" height="500" onload="DYNIFS.resize(\'atmlocator\')" width="800" name="atmlocator" frameborder="0" allowtransparency="true" scrolling="no">Your browser doesn\'t support iframes</iframe>');
}
else
{
	document.write('<iframe id="atmlocator" src="http://locatorsearch.cu24.com/index.aspx?siteid=3" onload="DYNIFS.resize(\'atmlocator\')" height="500" width="800" name="atmlocator" frameborder="0" allowtransparency="true" scrolling="no">Your browser doesn\'t support iframes</iframe>');
}



