/* Constants */
var rootDirectory = "http://www.communitybanknv.com";

var defaultFileList = "index.html, index.htm";

PINT_BrowserDetection("browserupgrade.htm");

function init()
	{
	var fileName  = PINT_GetCurrentFileName();
	var directory = PINT_GetCurrentDirectory();
	PINT_AnchorPopupWindows();
	PINT_AddSmoothScrolling();
	PINT_externalLinkDisclaimer();
	//PINT_FirstFocus()
		
	// Uncomment for Nice Titles;
	//PINT_MakeNiceTitles("testdiv","testp");
	
	// This function is needed for Form Validation
	//PINT_FormValidator();
	
	if (directory != "popup") PINT_CSSMenus("nav");
	}

function cleanup(){}

window.onload = init;
window.onunload = cleanup;

function change_action() 
	{
	
		if (document.login.site[1].checked) {
			
			//alert("i-banking");
			
		    document.login.action = "https://www.apcb.internet-ebanking.com/EBC_EBC1961/EBC1961.ASP?WCI=Process&WCE=RemoteLogon&IRL=T";	
			document.login.AccessID.name = "idUID";
		    //document.login.Password.name = "idPWD";
		}
		else {
			
			//alert('i-cash');
			
			document.login.action = "https://www.gfswebbank.com/pbi_pbi1961/pbi1961.asp?WCI=RemoteLogin&Rt=122401794&Logonby=Connect3";	
			document.login.AccessID.name = "AccessID";
			//document.login.Password.name = "Password";
			
		}
	}

okToSubmit = true;
			function setFields(f)
			{
				if (f.bankingtype[0].checked)
				{
					f.AccessID.value = f.LoginID.value;
					//f.Password.value= f.LoginPassword.value;
					
				}
				else
				{
					f.nmUID.value = f.LoginID.value;
					//f.nmPWD.value= f.LoginPassword.value;
				}
			
			}
			
			
			function submitRemoteLogonPost(f)
				{
				if (f.bankingtype[0].checked==false && f.bankingtype[1].checked==false)
					{
						alert("Please select CB Internet Banking or CB Cash Management.");
						return false;
					}
				if (f.LoginID.value=="")
					{
						alert("Please enter your Access ID to login.")
						return false;
					}
				var ActionLine = '';
				ActionLine=f.bankingtype[0].checked?'https://www.gfswebbank.com/pbi_pbi1961/pbi1961.asp?WCI=RemoteLogin&Rt=122401794&Logonby=Connect3':'https://www.apcb.internet-ebanking.com/EBC_EBC1961/EBC1961.ASP?WCI=Process&WCE=RemoteLogon&IRL=T';
				okToSubmit = false;					
				document.onLineBanking.action = ActionLine;
				setFields(f);
				//var msg="Security Statement: Community Bank of Nevada online banking transactions are transmitted to a secure server. CBNV is committed to taking the measures necessary to ensure the confidentiality and security of our customers' personal information."
				//alert(msg);
				}
