/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//Contents for menu 1 Buy
var menu1 = new Array()
menu1[0] = '<a href="/search.aspx?st=nl" onmouseover="highlight1()" onmouseout="unhighlight1()">Recent Listings</a>'
menu1[1] = '<a href="/search.aspx?st=fs" onmouseover="highlight1()" onmouseout="unhighlight1()">Properties for Sale</a>'
menu1[2] = '<a href="/Homeopen.aspx" onmouseover="highlight1()" onmouseout="unhighlight1()">This Week&rsquo;s Opens</a>'
menu1[3] = '<a href="/sold.aspx" onmouseover="highlight1()" onmouseout="unhighlight1()">Recent Sales</a>'
//menu1[3] = '<a href="/resources.aspx" onmouseover="highlight1()" onmouseout="unhighlight1()">Loan Calculator</a>'
menu1[4] = '<a href="/content.aspx?page=buyer_qa" onmouseover="highlight1()" onmouseout="unhighlight1()">Buyer&rsquo;s Q&A</a>'
menu1[5] = '<a href="/content.aspx?page=buyer_handbook" onmouseover="highlight1()" onmouseout="unhighlight1()">Buyer&rsquo;s Handbook </a>'
   
//Contents for menu 2 Sell
var menu2=new Array()
menu2[0] = '<a href="/content.aspx?page=Our_Sales_Approach" onmouseover="highlight2()" onmouseout="unhighlight2()">Our Sales Approach</a>'
menu2[1] = '<a href="/sold.aspx?s=1" onmouseover="highlight2()" onmouseout="unhighlight2()">Recent Sales</a>'
menu2[2] = '<a href="/content.aspx?page=Should_I_Auction" onmouseover="highlight2()" onmouseout="unhighlight2()">Should I Auction?</a>'
menu2[3] = '<a href="/Appraisal.aspx" onmouseover="highlight2()" onmouseout="unhighlight2()">Request an Appraisal </a>'
menu2[4] = '<a href="/content.aspx?page=Tips_for_Selling" onmouseover="highlight2()" onmouseout="unhighlight2()">Tips for Selling </a>'
menu2[5] = '<a href="/content.aspx?page=testimonial_selling" onmouseover="highlight2()" onmouseout="unhighlight2()">Testimonials </a>'
menu2[6] = '<a href="/content.aspx?page=seller_handbook" onmouseover="highlight2()" onmouseout="unhighlight2()">Seller&rsquo;s Handbook</a>'

//Contents for menu 3 Rent
var menu3 = new Array()
menu3[0] = '<span class="Subtitle">TENANTS</span>'
menu3[1] = '<a href="/search.aspx?st=fr" onmouseover="highlight3()" onmouseout="unhighlight3()">&nbsp;&nbsp;&nbsp;Properties for Rent</a>'
menu3[2] = '<a href="#" onmouseover="highlight3()" onmouseout="unhighlight3()">&nbsp;&nbsp;&nbsp;Tenancy Application</a>'
menu3[3] = '<a href="/maintenance.aspx" onmouseover="highlight3()" onmouseout="unhighlight3()">&nbsp;&nbsp;&nbsp;Maintenance Request</a>'
menu3[4] = '<a href="/content.aspx?page=choosing_the_right_property" onmouseover="highlight3()" onmouseout="unhighlight3()">&nbsp;&nbsp;&nbsp;Choosing the Right Property</a>'
menu3[5] = '<span class="Subtitle">OWNERS</span>'
menu3[6] = '<a href="/content.aspx?page=managing_your_asset" onmouseover="highlight3()" onmouseout="unhighlight3()">&nbsp;&nbsp;&nbsp;Managing Your Asset</a>'
menu3[7] = '<a href="/content.aspx?page=preparing_your_property" onmouseover="highlight3()" onmouseout="unhighlight3()">&nbsp;&nbsp;&nbsp;Preparing your Property</a>'
menu3[8] = '<a href="/content.aspx?page=testimonial_renting" onmouseover="highlight3()" onmouseout="unhighlight3()">&nbsp;&nbsp;&nbsp;Testimonials</a>'
menu3[9] = '<a href="/content.aspx?page=avoiding_common_mistakes" onmouseover="highlight3()" onmouseout="unhighlight3()">&nbsp;&nbsp;&nbsp;Avoiding Common Mistakes</a>'
menu3[10] = '<span class="Subtitle">RENTSTAR*</span>'
menu3[11] = '<a href="/content.aspx?page=about_rentstar" onmouseover="highlight3()" onmouseout="unhighlight3()">&nbsp;&nbsp;&nbsp;About RentStar*</a>'
menu3[12] = '<a href="/RentStarLogin.aspx" onmouseover="highlight3()" onmouseout="unhighlight3()">&nbsp;&nbsp;&nbsp;Rentstar* Login</a>'

//Contents for menu 4 About
var menu4 = new Array()
menu4[0] = '<a href="/content.aspx?page=company_profile" onmouseover="highlight4()" onmouseout="unhighlight4()">Company Profile</a>'
menu4[1] = '<a href="/content.aspx?page=Why_bourkes" onmouseover="highlight4()" onmouseout="unhighlight4()">Why Bourkes?</a>'
menu4[2] = '<a href="/team.aspx?aid=10479" onmouseover="highlight4()" onmouseout="unhighlight4()">Our Team</a>'
menu4[3] = '<a href="/content.aspx?page=Community" onmouseover="highlight4()" onmouseout="unhighlight4()">Community</a>'
menu4[4] = '<a href="/content.aspx?page=testimonial_about" onmouseover="highlight4()" onmouseout="unhighlight4()">Testimonials</a>'
menu4[5] = '<a href="/content.aspx?page=Careers_at_bourkes" onmouseover="highlight4()" onmouseout="unhighlight4()">Careers At Bourkes</a>'
     
//Contents for menu 5 Resources
var menu5 = new Array()
menu5[0] = '<a href="/resources.aspx" onmouseover="highlight5()" onmouseout="unhighlight5()">Useful Calculators</a>'
menu5[1] = '<a href="/REIWAnews.aspx" onmouseover="highlight5()" onmouseout="unhighlight5()">REIWA News </a>'
menu5[2] = '<a href="/foreigninvestment.aspx" onmouseover="highlight5()" onmouseout="unhighlight5()">Foreign Investment Review Board</a>'
menu5[3] = '<a href="/content.aspx?page=useful_links" onmouseover="highlight5()" onmouseout="unhighlight5()">Useful Links</a>'
menu5[4] = '<a href="/content.aspx?page=publications" onmouseover="highlight5()" onmouseout="unhighlight5()">Publications</a>'

//Contents for menu 6 Updates
var menu6 = new Array()
menu6[0] = '<a href="#" onmouseover="highlight6()" onmouseout="unhighlight6()">Property Alerts</a>'
menu6[1] = '<a href="#" onmouseover="highlight6()" onmouseout="unhighlight6()">Weekly Listings</a>'
menu6[2] = '<a href="#" onmouseover="highlight6()" onmouseout="unhighlight6()">Follow us on Twitter </a>'
menu6[3] = '<a href="#" onmouseover="highlight6()" onmouseout="unhighlight6()">Join our Facebook page</a>'

		
	 
var menuwidth='165px' //default menu width
var menubgcolor='lightyellow'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?



function highlight1() {
    document.getElementById("menuBuy").className = 'mapbuy1';
}

function unhighlight1() {
    document.getElementById("menuBuy").className = 'mapbuy';
}

function highlight2(){
    document.getElementById("menuSell").className = 'mapsell1';
}

function unhighlight2(){
    document.getElementById("menuSell").className = 'mapsell';
}

function highlight3() {
    document.getElementById("menuRent").className = 'maprent1';
}

function unhighlight3() {
    document.getElementById("menuRent").className = 'maprent';
}

function highlight4() {
    document.getElementById("menuAbout").className = 'mapabout1';
}

function unhighlight4() {
    document.getElementById("menuAbout").className = 'mapabout';
}

function highlight5() {
    document.getElementById("menuResources").className = 'mapresources1';
}

function unhighlight5() {
    document.getElementById("menuResources").className = 'mapresources';
}

function highlight6() {
    document.getElementById("menuUpdates").className = 'mapupdates1';
}

function unhighlight6() {
    document.getElementById("menuUpdates").className = 'mapupdates';
}
/////No further editting needed

var ie4=document.all
var ie5_5=typeof dropmenuiframe=='undefined'? 0 : 1
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="z-index:100;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'
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover") {
obj.visibility=visible
unhideIframe() }
else if (e.type=="click") {
setTimeout("hideIframe();",0);
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"
unhideIframe()
}

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"
hideIframe()
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes") {
document.onclick=delayhidemenu
}

// Hide IFrame
function hideIframe() {
if (ie5_5){
var theIframe = document.getElementById("dropmenuiframe")
theIframe.style.display = "none";
}
}

// Unhide IFrame
function unhideIframe() {
if (ie5_5){
var theIframe = document.getElementById("dropmenuiframe")
var theDiv = document.getElementById("dropmenudiv");
theIframe.style.width = theDiv.offsetWidth+'px';
theIframe.style.height = theDiv.offsetHeight+'px';
theIframe.style.top = theDiv.offsetTop+'px';
theIframe.style.left = theDiv.offsetLeft+'px';
theIframe.style.display = "block";
}
}
