// 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] == "PostalCode")
	 {
		zipcode = nvPair[1] ;	 		
	 }	 
	 if (nvPair[0] == "LSF1")
	 {
		if(nvPair[1]=="ATM")
		{
			iFrameUrl = iFrameUrl + '&ATMSF=1' ;	 
		}
		else
		{
			iFrameUrl = iFrameUrl + '&FCS=1' ;	 
		}
	 }	 	 
}
if (zipcode.length > 0)
{
    addressline = zipcode ;    
}

if (addressline.length > 0)
{
	 iFrameUrl = 'addTXT=' + addressline.replace(' ','+') + iFrameUrl ;
}
else
{
	 iFrameUrl = '';
}

if (iFrameUrl.length > 0)
{
	document.write('<iframe id="atmlocator" src="http://northshorebank.locatorsearch.com/index.aspx?' + iFrameUrl + '" height="725" width="715" name="atmlocator" frameborder="0" allowtransparency="true" scrolling="no">Your browser doesn\'t support iframes</iframe>');
}
else
{
	document.write('<iframe id="atmlocator" src="http://northshorebank.locatorsearch.com/index.aspx?s=FCS&FCS=1" height="725" width="715" name="atmlocator" frameborder="0" allowtransparency="true" scrolling="no">Your browser doesn\'t support iframes</iframe>');
}

document.write('<table cellSpacing="0" cellPadding="0" width="735" align="center" border="0"><tr><td align="center"><a href="http://www.locatorsearch.com" target="_blank"><img src="https://images.locatorsearch.com/locatorsearch.gif" border="0"></a></td></tr></table>');

