//- DirtyTool2 -// function DirtyTool2(cTool) { var oTool = document.getElementById('Tool' + cTool); if (oTool != null) { oTool.IsDirty = true; var c = new String(oTool.onerror); oTool.src = c.match(/.*\"(.*)\".*/)[1]; oTool.onmouseover = null; oTool.onmouseout = null; } } //- DirtyTool -// function DirtyTool(cTool) { var oTool = document.getElementById('Tool' + cTool); if (oTool != null) { oTool.IsDirty = true; var c = new String(oTool.onerror); oTool.src = c.match(/.*\"(.*)\".*/)[1]; oTool.onmouseover = null; oTool.onmouseout = null; oTool.enabled = false; } } //- CopyBillingToShipping -// function CopyBillingToShipping(oForm) { oForm['ShippingName'].value = oForm.BillingName.value; oForm['ShippingAttention'].value = oForm.BillingAttention.value; oForm['ShippingStreet'].value = oForm.BillingStreet.value; oForm['ShippingStreet2'].value = oForm.BillingStreet2.value; oForm['ShippingCity'].value = oForm.BillingCity.value; var cState = oForm.BillingState.value; var o = oForm['ShippingState']; for (var h = 0; h < o.options.length; h++) { if (o.options[h].value == cState) { oForm['ShippingState'].selectedIndex = h; } } oForm['ShippingZip'].value = oForm.BillingZip.value; // oForm['ShippingPhone'].value = null; } //- CopyBillingToShipping -// function CopyBillingToShipping(oForm) { oForm['ShippingName'].value = oForm.BillingName.value; oForm['ShippingAttention'].value = oForm.BillingAttention.value; oForm['ShippingStreet'].value = oForm.BillingStreet.value; oForm['ShippingStreet2'].value = oForm.BillingStreet2.value; oForm['ShippingCity'].value = oForm.BillingCity.value; var cState = oForm.BillingState.value; var o = oForm['ShippingState']; for (var h = 0; h < o.options.length; h++) { if (o.options[h].value == cState) { oForm['ShippingState'].selectedIndex = h; } } oForm['ShippingZip'].value = oForm.BillingZip.value; // oForm['ShippingPhone'].value = null; } //- CopyCheckingPrimaryToSecondary -// function CopyCheckingPrimaryToSecondary(oForm) { oForm['Secondary_Street'].value = oForm.Street.value; oForm['Secondary_Street2'].value = oForm.Street2.value; oForm['Secondary_City'].value = oForm.City.value; var cState = oForm.State.value; var o = oForm['Secondary_State']; for (var h = 0; h < o.options.length; h++) { if (o.options[h].value == cState) { oForm['Secondary_State'].selectedIndex = h; } } oForm['Secondary_Zip'].value = ExportZip(oForm.Zip.value); } //- CopyMoneyMarketPrimaryToSecondary -// function CopyMoneyMarketPrimaryToSecondary(oForm) { oForm['Secondary_Street'].value = oForm.Street.value; oForm['Secondary_Street2'].value = oForm.Street2.value; oForm['Secondary_City'].value = oForm.City.value; var cState = oForm.State.value; var o = oForm['Secondary_State']; for (var h = 0; h < o.options.length; h++) { if (o.options[h].value == cState) { oForm['Secondary_State'].selectedIndex = h; } } oForm['Secondary_Zip'].value = ExportZip(oForm.Zip.value); } //- CopyCDPrimaryToSecondary -// function CopyCDPrimaryToSecondary(oForm) { oForm['Secondary_Street'].value = oForm.Street.value; oForm['Secondary_Street2'].value = oForm.Street2.value; oForm['Secondary_City'].value = oForm.City.value; var cState = oForm.State.value; var o = oForm['Secondary_State']; for (var h = 0; h < o.options.length; h++) { if (o.options[h].value == cState) { oForm['Secondary_State'].selectedIndex = h; } } oForm['Secondary_Zip'].value = ExportZip(oForm.Zip.value); } //- IfEnterAction -// function IfEnterAction(oEvent, oForm, cAction, cSelId){ if ((EventKeyCode(oEvent) == 13) || (EventKeyCode(oEvent) == 3)) { oForm.Action.value = cAction; oForm.SelId.value = cSelId; oForm.submit(); return false; } return true; } //- IfEnterScript -// function IfEnterScript(oEvent, cScript) { if ((EventKeyCode(oEvent) == 13) || (EventKeyCode(oEvent) == 3)) { eval(cScript); return false; } return true; } //- EventKeyCode -// function EventKeyCode(oEvent) { return ((oEvent != null) && (oEvent.which != null) ? oEvent.which : event.keyCode); } //- ExportZip -// function ExportZip(cStream) { var cZip = cStream.replace(/\?/g, ''); return cZip; } //- ExportFon -// function ExportFon(cStream) { var cFon = ''; if (cStream.length >= 10) { cFon = cStream.substr(0, 3) + '-' + cStream.substr(3, 3) + '-' + cStream.substr(6, 4) if ((cStream.length == 15) && (cStream.substr(10, 5) != '?????')) { cFon += ' x' + cStream.substr(10, 5).replace('?', '') } } return cFon; } //- Console_AddRemove -// function Console_AddRemove(oFromSet, oToSet, bIsAll) { //+ unselect for (var hOption = 0; hOption < oToSet.length; hOption++) { oToSet.options[hOption].selected = false; } //+ move for (hOption = oFromSet.length; hOption != 0; hOption--) { if ((bIsAll == true) || (oFromSet.options[hOption - 1].selected == true)) { oToSet.options[oToSet.length] = new Option(oFromSet.options[hOption - 1].text, oFromSet.options[hOption - 1].value, false, true); oFromSet.options[hOption - 1] = null; } } } //- Console_Pack -// function Console_Pack(oSet, oField) { var cPack = ''; for (var hOption = 0; hOption < oSet.length; hOption++) { cPack += ',' + oSet.options[hOption].value; } oField.value = cPack.substring(1); } //- ToggleCriteriaView -// function ToggleCriteriaView(cBlock, cFieldName, cCriteria) { var oElement = document.getElementById(cBlock); var oField = document.getElementById(cFieldName); var cValue = ((oField.type == 'checkbox') ? oField.checked.toString() : oField.value); var bIsTrue = false; if (cCriteria.indexOf('|') >= 0) { var cArray = cCriteria.split('|'); for (i = 0; i < cArray.length; i++) { if ((cArray[i].length > 0) && (cArray[i].indexOf('!') >= 0)) { if (cValue != cArray[i].substr(1, cArray[i].length)) { bIsTrue = true; break; } } else if (cValue == cArray[i]) { bIsTrue = true; break; } } } else if (cCriteria.indexOf('&') >= 0) { var cArray = cCriteria.split('&'); for (i = 0; i < cArray.length; i++) { if ((cArray[i].length > 0) && (cArray[i].indexOf('!') >= 0)) { if (cValue != cArray[i].substr(1, cArray[i].length)) { bIsTrue = true; } else { bIsTrue = false; break; } } else if (cValue != cArray[i]) { bIsTrue = true; } else { bIsTrue = false; break; } } } else { if (cCriteria.indexOf('!') >= 0) { if (cValue != cCriteria.substr(1, cCriteria.length)) { bIsTrue = true; } else { bIsTrue = false; } } else if (cValue == cCriteria) { bIsTrue = true; } else { bIsTrue = false; } } if (bIsTrue == true) { oElement.style.display = 'block'; } else { oElement.style.display = 'none'; } } //- ToggleView -// function ToggleView(cBlock) { var oElement = document.getElementById(cBlock); if (oElement.style.display == 'none') { oElement.style.display = 'block'; } else { oElement.style.display = 'none'; } } //- ShowItemField -// function ShowItemField(cKey, bIsShow) { if (bIsShow == true) { document.getElementById(cKey).style.display = ''; } else { document.getElementById(cKey).style.display = 'none'; } } function PNGTransparent(cId, cClass) { var arVersion = navigator.appVersion.split("MSIE"); var version = parseFloat(arVersion[1]); if ((version >= 5.5) && (version < 7.0)) { //document.getElementById(cId).style.background = 'none'; if (document.getElementById(cId)) { document.getElementById(cId).className = cClass; } } } function CreateRequestObject() { if (navigator.appName == "Microsoft Internet Explorer"){ return new ActiveXObject("Microsoft.XMLHTTP"); } return new XMLHttpRequest(); } function InquryCodeDescription() { alert('Your Inquiry Code is a code you select to help Hillcrest Bank verify your identity for future online or phone-in inquiries. If you are an existing Hillcrest Bank customer, please enter your existing inquiry code here to proceed with your request. If you are a new Hillcrest Bank customer, please type your desired Inquiry Code now. Inquiry Codes are 4 characters and can be letters or numbers. For security purposes, Hillcrest Bank suggests selecting an Inquiry Code not used for other bank products (i.e. Debit Card PINs).'); } function RequirementReason(key) { switch (key) { case "DayPhone": alert('Why do we ask for Day Phone.'); break; case "EveningPhone": alert('Why do we ask for Evening Phone.'); break; case "Ssn": alert('Hillcrest Bank uses your social security number to verify your identity and access your credit history which assists us on processing your application. If you prefer not to provide your SSN online you can apply in person at one of our banking centers. To locate the banking center nearest you just click on Bank/ATM locations or call 800-681-1776.'); break; } }