//google analytics
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-20273669-1']);
  _gaq.push(['_trackPageview']);
 
  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
 
// Load flash objects
	function swf(thisName, width, height) {
		document.write ("<OBJECT classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\"  ");
		document.write ("WIDTH=\"" + width + "\" HEIGHT=\"" + height + "\" id=\"" + thisName + "\"> ");
		document.write ("<PARAM NAME=movie VALUE=\"" + thisName + ".swf\"> ");
		document.write ("<PARAM NAME=wmode VALUE=\"transparent\"> ");
		document.write ("<PARAM NAME=quality VALUE=high> ");
		document.write ("<EMBED  src=\"" + thisName + ".swf\" href=\"/support/flash/ts/documents/myFlashMovie.swf\" quality=high WIDTH=\"" + width + "\" HEIGHT=\"" + height + "\" NAME=\"" + thisName + "\"");
		document.write ("ALIGN=\"\" TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://get.adobe.com/flashplayer/\" wmode=\"transparent\"> ");
		document.write ("</EMBED></OBJECT> ");
}

//log in functions
	function setAction()
	{
		if(document.Remote.loginTo[1].checked)
		{
		document.Remote.nmUID.value = document.Remote.AccessID.value;
		//document.Remote.target = '_top';
		document.Remote.action = 'https://www.ecorphost.net/EBC_EBC1961/EBC1961.ASP?WCI=Process&WCE=RemoteLogon&IRL=T';
		}
	}
	   
	function doLoginRefresh()
	{
		if (document.Remote.AccessID.value != "")
			{
			setAction();
			setTimeout('document.Remote.reset()', 20000);
			document.Remote.AccessID.value=document.Remote.AccessID.value;
			return true;
			}
		else
			{
			alert("\n Please Enter a valid Access ID.  Thank you!\n\n\t"); 
			return false;
			}	
	}

// share this
	stLight.options({publisher:'75529278-8a8a-40c8-a56a-e9cfce0dfd7b'});
	
	function printpage() {
	  window.print();
	}

//drop down function
	sfHover = function() {
		var sfEls = document.getElementById("navbar").getElementsByTagName("li");
		for (var i=0; i<sfEls.length; i++) {
			sfEls[i].onmouseover=function() {
				this.className+=" hover";
			}
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" hover\\b"), "");
			}
		}
	}
	if (window.attachEvent) window.attachEvent("onload", sfHover);

//leaving site legal notice
	function speedbump(url) {
		var answer = confirm("You are about to leave our website to visit a link that we have provided for your convenience. Please note that Sumner Bank & Trust is not responsible for and has no control over the subject matter, content, information, views, advertisements, sponsorship, safety or graphics on the website that follows.");
		if (answer){
			window.location.replace(url);
		}
	}
