// JavaScript Document

//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="http://beinus.com/whatwedo.php" style="text-align:center" title="What we do link"><b>What We Do</b></a>'
menu1[1]='<a href="http://beinus.com/international-mail-forwarding.php" style="text-align:center" title="International Mail Forwarding"><b>What&rsquo;s International Mail Forwarding</b></a>'
menu1[2]='<a href="http://beinus.com/beinususer.php" style="text-align:center" title="BeinUS User link"><i><b>Who use BeinUS?</b></i></a>'
menu1[3]='<a href="http://beinus.com/forwarding-save-money.php" style="text-align:center" title="Forwarding Save Money"><b>Forwarding Save $$</b></a>'
menu1[4]='<a href="http://beinus.com/index.php#ourservice" style="text-align:center" title="Why use our service link"><b>Why use our service?</b></a>'
menu1[5]='<a href="http://beinus.com/membership.php" style="text-align:center" title="Membership link"><b>Membership</b><img src="/images/newiconbar.png" alt="Iconbar" border: #cccccc 0px solid;" border="0" /></a>'
menu1[6]='<a href="http://beinus.com/membership.php#Features/Fees" style="text-align:center" title="Features/Fees link"><b>Features/Fees</b></a>'
menu1[7]='<a href="http://beinus.com/prohibited-items.php" style="text-align:center" title="Prohibited Items"><b>Prohibited Items</b></a>'
menu1[8]='<a href="http://www.xe.com/ucc/" target="_blank" style="text-align:center" title="Currency Converter link"><b>Currency Converter</b></a>'
menu1[9]='<a href="http://beinus.com/membership.php#Calculator" style="text-align:center" title="Calculator link"><b>Calculator Tool</b></a>'
menu1[10]='<a href="http://beinus.com/images/ps1583-0.pdf" target="_blank" style="text-align:center" title="Sample 1583 Form"><b>Sample 1583 Form</b></a>'
menu1[11]='<a href="http://beinus.com/sitemap.php" style="text-align:center" title="BeinUS sitemap link"><b>Sitemap</b></a>'
menu1[12]='<a href="http://beinus.com/resources.php" style="text-align:center" title="Resources link"><b>Resources</b></a>'
menu1[13]='<a href="http://beinus.com/widgetchart.php" style="text-align:center" title="Alexa Ranking link"><b>Widgets Chart</b></a>'
menu1[14]='<a href="http://beinus.com/Calender.php" style="text-align:center" title="U.S. Holidays"><b>U.S. Holidays</b></a>'


//Contents for menu 2
var menu2=new Array()
menu2[0]='<a href="http://beinus.com/mail-forwarding.php" style="text-align:center" title="Package & Mail Forwarding"><b>Package & Mail Forwarding</b></a>'
menu2[1]='<a href="http://beinus.com/instore.php" style="text-align:center" title="In-Store Purchase"><span style="font-size: 12px; color: #c70404;"><b>In-Store </span>Purchase</b></a>'
menu2[2]='<a href="http://beinus.com/personal-shopper.php" style="text-align:center" title="Personal Shopper"><b>Personal Shopper</b></a>'
menu2[3]='<a href="http://beinus.com/us-telephone.php" style="text-align:center" title="US Telephone Number link"><b>U.S. Telephone Number & Voice Mail</b></a>'

//Contents for menu 3
var menu3=new Array()
menu3[0]='<a href="http://beinus.com/personal-shopper.php" style="text-align:center" title="Personal Shopper"><b>Personal Shopper</b></a>'
menu3[1]='<a href="http://beinus.com/shopping-made-easy.php" style="text-align:center" title="Shopping Made Easy"><b>Shopping Made Easy</b></a>'
menu3[2]='<a href="http://beinus.com/personal-shopper.php#US Magazines" style="text-align:center" title="U.S. Magazines link"><b>U.S. Magazines</b></a>'
menu3[3]='<a href="http://beinus.com/recommended-retailers.php" style="text-align:center" title="Personal Shopper link"><b>Recommended U.S. Retailers</b></a>'
menu3[4]='<a href="http://www.google.com" target="_blank" style="text-align:center" title="Google"><b>Google Search</b></a>'


//Contents for menu 4
var menu4=new Array()
menu4[0]='<a href="http://beinus.com/images/ps1583.pdf" target="_blank" style="text-align:center" title="Form 1583 link"><b>Form 1583</b></a>'

//Contents for menu 5
var menu5=new Array ()
menu5[0]='<a href="http://beinus.com/faq.php" style="text-align:center" title="FAQ link"><b>FAQs</b></a>'
menu5[1]='<a href="http://beinus.com/contact.php" style="text-align:center" title="FAQ link"><b>Contact Us</b></a>'
menu5[2]='<a href="http://beinus.com/aboutus.php" style="text-align:center" title="About Us link"><b>About Us</b></a>'
menu5[3]='<a href="http://beinus.com/testimonials.php" style="text-align:center" title="FAQ link"><b>Feedback/Testimonial</b></a>'
menu5[4]='<a href="http://beinus.com/tellfriend/index.php" target="_blank" style="text-align:center" title="FAQ link"><b>Refer A Friend</b></a>'

//Contents for menu 6
var menu6=new Array ()
menu6[0]='<a href="http://www.usps.com/shipping/trackandconfirm.htm?from=home_header&page=trackandconfirm" target="_blank" style="text-align:center" title="USPS Tracking link"><b>USPS Tracking</b></a>'
menu6[1]='<a href="http://www.fedex.com/us/pckgenvlp/track/index.html" target="_blank" style="text-align:center" title="FedEx Tracking link"><b>FedEx Tracking</b></a>'
menu6[2]='<a href="http://track.dhl-usa.com/TrackByNbr.asp?nav=TrackBynumber" target="_blank" style="text-align:center" title="DHL Tracking link"><b>DHL Tracking</b></a>'
menu6[3]='<a href="http://www.ups.com/WebTracking/track?loc=en_US&WT.svl=PNRO_L1" target="_blank" style="text-align:center" title="UPS Tracking link"><b>UPS Tracking</b></a>'

var menuwidth='140px' //default menu width
var menubgcolor='#ffffff'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////Do not touch

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="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="-500px"
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 topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
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){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
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

