// JavaScript Document
//Contents for resources menu
//Contents for personal banking menu
var menu1=new Array()
menu1[0]='<a href="apply.html">Apply Now</a>'
menu1[1]='<a href="SDA.html">Checking</a>'
menu1[2]='<a href="SHA.html">Savings</a>'
menu1[3]='<a href="mortgage_index.html">Mortgages</a>'
menu1[4]='<a href="visa.html">Credit Cards</a>'
menu1[5]='<a href="electronic.html">Online Services</a>'
menu1[6]='<a href="rates.html">Rates</a>'

//Contents for business banking menu
var menu2=new Array()
menu2[0]='<a href="business/accounts.html">Accounts</a>'
menu2[1]='<a href="business/eservices.html">Online Services</a>'
menu2[2]='<a href="business/merchantservices.html">Merchant Services</a>'
menu2[3]='<a href="business/loans.html">Business Loans</a>'
menu2[4]='<a href="business/visa.html">Visa</a>'
menu2[5]='<a href="business/contact.html">Contact Us</a>'


//About menu
var menu3=new Array()
menu3[0]='<a href="contact.html">Contact Us</a>' 
menu3[1]='<a href="branches.html">Branch Locations</a>'
menu3[2]='<a href="cu24.html">ATM Locations</a>'
menu3[3]='<a href="jobs.html">Employment Opportunities</a>' 
menu3[4]='<a href="https://www.sunstatefcu.org/servicerequest.html">Information Request Form</a>'
menu3[5]='<a href="faq2.html">FAQs</a>'
menu3[6]='<a href="newsletters/NL0710.pdf">Newsletter</a>' 
menu3[7]='<a href="pdf/feeschedule.pdf">Fee Schedule</a>'

//Contents for rates menu
var menu4=new Array()
menu4[0]='<a href="https://www.sunstatefcu.org/cgi-bin/mcw000.cgi?MCWSTART">Home$Banking</a>'
menu4[1]='<a href="apply.html">Online Loan App</a>'
menu4[2]='<a href="https://secure.loanspq.com/Consumer/login/default.aspx?LenderID=169f6bf5167446f2acdd03db248a4156">Online Membership App</a>'
menu4[3]='<a href="https://www.sunstatefcu.org/switch.html">Online Switch Kit</a>'

// contents for resources
var menu5=new Array()
menu5[0]='<a href="http://anytime.cuna.org/13840/">Anytime Advisor</a>'
menu5[1]='<a href="https://www.ezcardinfo.com/">Credit Card EZCard Info</a>'
menu5[2]='<a href="http://googolplex.cuna.org/index.html?sub_id=13840">Googolplex</a>'
menu5[3]='<a href="http://gti.cuna.org/13840/">Guide to Independence</a>'
menu5[4]='<a href="http://hffo.cuna.org/13840/front/13840/html">Home &amp; Family Finance</a>'
menu5[5]='<a href="javascript:WarningAlert();">Investments</a>'
menu5[6]='<a href="http://moneymix.cuna.org/13840/index.php">MoneyMix: Launch Your Life</a>'
menu5[7]='<a href="http://planit.cuna.org/13840/index.php">Plan It: Retire Ready Toolkit</a>'
menu5[8]='<a href="javascript:WarningAlert();">Retirement Planning</a>'
menu5[9]='<a href="http://www.membersautohome.com/default.aspx?contract=00905176&ICU=BBB5&utm_source=00905176&utm_medium=Link&utm_campaign=BBB4">Get Insurance Quote Now!</a>'
menu5[10]='<a href="http://www.sunstatefcu.org/newsletters/NL0709.pdf">SFCU Newsletter</a>'
menu5[11]='<a href="http://turbotax.intuit.com/affiliate/sunsta">TurboTax</a>'
menu5[12]='<a href="http://www.sunstatefcu.org/carinfo.html">Vehicle Pricing</a>'
menu5[13]='<a href="http://www.kqzyfj.com/click-2310659-10434925">Your Credit Report</a>'










var menuwidth='165px' //default menu width
var menubgcolor='#000000'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed
var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div align="left" id="dropmenudiv" style="margin-top:3px; margin-left:4px;visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}
function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu
