// 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] == "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] == "LocTypeID")
	 {
		iFrameUrl = iFrameUrl + '&LocTypeID=' + nvPair[1];	
	 }
	 if (nvPair[0] == "FCS")
	 {
		iFrameUrl = iFrameUrl + '&FCS=1' ;	 
	 }
}

if (iFrameUrl.length > 0)
{
	document.write('<iframe id="atmlocator" src="http://mafcu.locatorsearch.com/PostSearch.aspx?' + iFrameUrl + '" height="1200" width="650" name="atmlocator" frameborder="0" allowtransparency="true" scrolling="auto">Your browser doesn\'t support iframes</iframe>');
}
else
{
	document.write('<iframe id="atmlocator" src="http://mafcu.locatorsearch.com/index.aspx" height="1200" width="650" name="atmlocator" frameborder="0" allowtransparency="true" scrolling="auto">Your browser doesn\'t support iframes</iframe>');
}


