// JavaScript Document
var searchString = document.location.search;
var iFrameUrl ='' ;

// 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] == "param5")
	 {
		iFrameUrl = iFrameUrl + '&city=' +  nvPair[1] ;	 
	 }
	 if (nvPair[0] == "param6")
	 {
		iFrameUrl = iFrameUrl + '&state=' +  nvPair[1].replace('/home/','') ;	 
	 }
	 if (nvPair[0] == "param7")
	 {
		iFrameUrl = iFrameUrl + '&zipcode=' +  nvPair[1] ;	 
	 }
	 
	 if (nvPair[0] == "param2")
	 {
		iFrameUrl = iFrameUrl + '&ATM=1' ;	 
	 }
	 if (nvPair[0] == "param3")
	 {
		iFrameUrl = iFrameUrl + '&FCS=1' ;	 
	 }
	 if (nvPair[0] == "param4")
	 {
		iFrameUrl = iFrameUrl + '&ESC=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] == "FSCESC")
	 {
		iFrameUrl = iFrameUrl + '&FSCESC=1' ;	 
	 }
	 if (nvPair[0] == "BRANCH")
	 {
		iFrameUrl = iFrameUrl + '&BRANCH=1' ;	 
	 }
}

if (iFrameUrl.length > 0)
{
	document.write('<iframe id="atmlocator" src="http://lapcu.locatorsearch.com/PostSearch.aspx?' + iFrameUrl + '" height="1000" width="725" name="atmlocator" frameborder="0" allowtransparency="true" scrolling="auto">Your browser doesn\'t support iframes</iframe>');
}
else
{
	document.write('<iframe id="atmlocator" src="http://lapcu.locatorsearch.com/ListCUServiceCenter.aspx?loc=3" height="1000" width="725" name="atmlocator" frameborder="0" allowtransparency="true" scrolling="auto">Your browser doesn\'t support iframes</iframe>');
}


