// 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] == "address")
	 {
		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' ;	 
	 }
}

var pageType = ''+document.location ;

if (pageType.indexOf('findus.php') > 0)
{
	document.write('<iframe id="atmlocator" src="http://psccu.locatorsearch.com/ListCUServiceCenter.aspx?loc=1" height="1200" width="625" name="atmlocator" frameborder="0" allowtransparency="true" scrolling="auto">Your browser doesn\'t support iframes</iframe>');
}
else
{
	document.write('<iframe id="atmlocator" src="http://psccu.locatorsearch.com/index.aspx" height="1200" width="625" name="atmlocator" frameborder="0" allowtransparency="true" scrolling="auto">Your browser doesn\'t support iframes</iframe>');
}


