// JavaScript Document


function rolloverBig(id)
{
	var one = document.getElementById(id)
	//one.style.border = "#333333 solid 1px";
	one.style.opacity = ".60";
    	one.style.MozOpacity = ".60";
    	one.style.filter = "alpha(opacity=60)";
}

function rolloutBig(id)
{
	var one = document.getElementById(id)
	//one.style.border = "#333333 solid 1px";
	one.style.opacity = "1";
    	one.style.MozOpacity = "1";
    	one.style.filter = "alpha(opacity=100)";
}

function validateLogin(id)
{
	id = document.getElementById(id)
	if(id.value == '')
	{
		id.style.border = '#C00 solid 3px'
		id.focus();
		alert("Please enter an Access ID")
		return false;
	}else{
		
		accessid = document.getElementById("aid").value
		showImagePop('/Scripts/validateAccessID.asp?id='+accessid,'Westbury Online Banking ',750,500)
		
	}
}

function validateLoginIE(id)
{
	id = document.getElementById(id)
	if(id.value == '')
	{
		id.style.border = '#C00 solid 3px'
		id.focus();
		alert("Please enter an Access ID")
		return false;
	}else{
		var x = document.forms.logID;
		var y = document.getElementById('AccessID')
		y.value = id.value;
		//alert(y.value)
		//return false;
		id.value = "";
		x.action = 'https://web1.secureinternetbank.com/pbi_pbi1961/Pbi1961.asp?WCI=RemoteLogin&RT=275971825&LogonBy=connect3&PRMACCESS=Portfolio'
	}
}

function showImagePop(popURL,popName,popWidth,popHeight)
	{
		var popWin;
		var popAttr = "width="+popWidth+",height="+popHeight+",resizable=1,scrollbars=1";
		popWin = window.open(popURL,popName,popAttr);
		if (popWin.opener == null) popWin.opener = self;
		popWin.focus();
	}
	
	//function setAction()
//	{
//		//Fill in the Routing number below.
//		var rtNum = "275971825";
//		var x = document.forms.Remote;
//		//x.action = 'https://web1.secureinternetbank.com/pbi_pbi1961/Pbi1961.asp?WCI=Remote=Login&RT=275971825&LogonBy=connect3&PRMACCESS=Portfolio=';	
//		
//	}
	function doLoginRefresh(id)
	{
		id = document.getElementById(id)
		hid = document.get.ElementById('AccessID')
		alert(hid)
		return false;
		//var x = document.forms.Remote;
		if (id.value == "") 
		{
			id.style.border = '#C00 solid 3px'
			id.focus();
			alert("Please Enter a valid Access ID.  Thank you!");
			return false;
		} else {
				alert("yes")
			hid.value = id.value;
			id.value = "";
			showImagePop('/Scripts/validateAccessID.asp','Westbury Online Banking ',750,500)
			//setAction();
			return true;
		}
	}