/***********************************************
* 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 Blue Alert
var menu1=new Array()
menu1[0]='<a href="propAlerts.aspx?fro=itself&heading=Blue_Alert&status=fs" onmouseover="highlight1()" onmouseout="unhighlight()">Register For Blue Alert</a>'

//Contents for menu 2 Buying
var menu2=new Array()
menu2[0]='<a href="search.aspx?st=fs&heading=For_Sale" onmouseover="highlight2()" onmouseout="unhighlight()">Residential Properties</a>'
menu2[1]='<a href="search.aspx?st=fsComm&heading=For_Sale" onmouseover="highlight2_special()" onmouseout="unhighlight2_special()">Commercial Properties</a>'
menu2[2] = '<a href="content.aspx?cmsName=Current_Projects&heading=Current_Projects" onmouseover="highlight2()" onmouseout="unhighlight()">Current Projects</a>'
menu2[3] = '<a href="content.aspx?cmsName=Past_Projects&heading=Past_Projects" onmouseover="highlight2()" onmouseout="unhighlight()">Past Projects</a>'
menu2[4] = '<a href="search.aspx?st=hps&heading=Inspection_Times" onmouseover="highlight2()" onmouseout="unhighlight()">Inspection Times</a>'
//menu2[3]='<a href="search.aspx?st=au&heading=Auction_Times" onmouseover="highlight2()" onmouseout="unhighlight()">Auction Times</a>'
menu2[5]='<a href="loanCalc.aspx?heading=Loan_Calculator" onmouseover="highlight2()" onmouseout="unhighlight()">Loan Calculator</a>'
//menu2[3]='<a href="content.aspx?cmsName=Buyers_Guide&heading=Buyers_Guide" onmouseover="highlight2()" onmouseout="unhighlight()">Buyers&rsquo; Guide</a>'
//menu2[6]='<a href="propAlerts.aspx?fro=Buying&heading=Blue_Alert&status=fs" onmouseover="highlight2()" onmouseout="unhighlight()">Blue Alert</a>'
menu2[6]='<a href="content.aspx?cmsName=Buying_Off_The_Plan&heading=Buying_Off_The_Plan" onmouseover="highlight2()" onmouseout="unhighlight()">Buying Off The Plan</a>'

//Contents for menu 3 Selling
var menu3=new Array()
menu3[0]='<a href="appraisal.aspx?fro=Selling&heading=Request_Appraisal" onmouseover="highlight3()" onmouseout="unhighlight()">Request Appraisal</a>'
//menu3[1]='<a href="content.aspx?cmsName=Presenting_Your_Property&heading=Presenting_Your_Property" onmouseover="highlight3()" onmouseout="unhighlight()">Presenting Your Property</a>'
menu3[1]='<a href="staff.aspx?co=Sales&heading=Sales_Team" onmouseover="highlight3()" onmouseout="unhighlight()">Sales Team</a>'	
menu3[2]='<a href="content.aspx?cmsName=Our_Auctioneers&heading=Our_Auctioneers" onmouseover="highlight3()" onmouseout="unhighlight()">Our Auctioneers</a>'	
menu3[3]='<a href="solds.aspx?heading=Solds" onmouseover="highlight3()" onmouseout="unhighlight()">Sales Results</a>'	
//menu3[5]='<a href="content.aspx?cmsName=Testimonials&heading=Testimonials" onmouseover="highlight3()" onmouseout="unhighlight()">Testimonials</a>'	
menu3[4]='<a href="content.aspx?cmsName=Sell_For_More&heading=Sell_For_More" onmouseover="highlight3()" onmouseout="unhighlight()">Sell For More</a>'	

//Contents for menu 4 Renting
var menu4=new Array()
menu4[0]='<a href="search.aspx?st=fr&heading=For_Rent" onmouseover="highlight4()" onmouseout="unhighlight()">Residential Properties</a>'
menu4[1]='<a href="search.aspx?st=frComm&heading=For_Rent" onmouseover="highlight4_special()" onmouseout="unhighlight4_special()">Commercial Properties</a>'
menu4[2]='<a href="search.aspx?st=hpr&heading=Inspection_Times" onmouseover="highlight4()" onmouseout="unhighlight()">Inspection Times</a>'
menu4[3] = '<a href="http://files.aussiehome.com/cmsFiles/546/Rental_Application_form_2009.pdf" target=_blank" onmouseover="highlight4()" onmouseout="unhighlight()">Tenancy Application Form</a>'
menu4[4]='<a href="content.aspx?cmsName=Tenant_Services&heading=Tenant_Services" onmouseover="highlight4()" onmouseout="unhighlight()">Tenant Services</a>'
menu4[5]='<a href="content.aspx?cmsName=Landlord_Services&heading=Landlord_Services" onmouseover="highlight4()" onmouseout="unhighlight4()">Landlord Services</a>'		
menu4[6]='<a href="appraisal.aspx?fro=Renting&heading=Request_Appraisal" onmouseover="highlight4()" onmouseout="unhighlight()">Request Appraisal</a>'
menu4[7]='<a href="staff.aspx?co=Rental&heading=Rental_Team" onmouseover="highlight4()" onmouseout="unhighlight()">Rental Team</a>'		
//menu4[6]='<a href="content.aspx?cmsName=Student_Rental&heading=Student_Rental" onmouseover="highlight4()" onmouseout="unhighlight()">Student rental</a>'		
menu4[8]='<a href="content.aspx?cmsName=Preferred_Tradespeople&heading=Preferred_Tradespeople" onmouseover="highlight4()" onmouseout="unhighlight()">Preferred Tradespeople</a>'		
//menu4[7]='<a href="propAlerts.aspx?fro=Renting&heading=Blue_Alert&status=fr" onmouseover="highlight4()" onmouseout="unhighlight()">Blue Alert</a>'	
		
//Contents for menu 5 Projects
var menu5=new Array()
menu5[0]='<a href="content.aspx?cmsName=Current_Projects&heading=Current_Projects" onmouseover="highlight5()" onmouseout="unhighlight()">Current Projects</a>'
menu5[1]='<a href="content.aspx?cmsName=Past_Projects&heading=Past_Projects" onmouseover="highlight5()" onmouseout="unhighlight()">Past Projects</a>'
//menu5[0]='<a href="search.aspx?st=frComm&heading=For_Lease" onmouseover="highlight5()" onmouseout="unhighlight()">Properties For Lease</a>'
//menu5[1]='<a href="search.aspx?st=fsComm&heading=For_Sale" onmouseover="highlight5()" onmouseout="unhighlight()">Properties For Sale</a>'
//menu5[2]='<a href="content.aspx?cmsName=Register_Your_Requirements&heading=Register_Your_Requirements" onmouseover="highlight5()" onmouseout="unhighlight()">Register Your Requirements</a>'
//menu5[3]='<a href="content.aspx?cmsName=Profile&heading=Profile" onmouseover="highlight5()" onmouseout="unhighlight()">Profile</a>'
//menu5[3]='<a href="staff.aspx?co=Commercial&heading=Commercial_Team" onmouseover="highlight5()" onmouseout="unhighlight()">Commercial Team</a>'
//menu5[4]='<a href="appraisal.aspx?fro=Commercial&heading=Request_Appraisal" onmouseover="highlight5()" onmouseout="unhighlight()">Request Appraisal</a>'
//menu5[5]='<a href="propAlerts.aspx?fro=Commercial&heading=Blue_Alert&status=fs&type=comm" onmouseover="highlight5()" onmouseout="unhighlight()">Blue alert</a>'
		
		
//Contents for menu 6 About Us
var menu6=new Array()
menu6[0]='<a href="content.aspx?cmsName=Our_Service&heading=Our_Service" onmouseover="highlight6()" onmouseout="unhighlight()">Our Service</a>'
menu6[1]='<a href="Our_Team.aspx?heading=Our_Team" onmouseover="highlight6()" onmouseout="unhighlight()">Our Team</a>'
menu6[2]='<a href="content.aspx?cmsName=Customer_Charter&heading=Customer_Charter" onmouseover="highlight6()" onmouseout="unhighlight()">Customer Charter</a>'					
menu6[3]='<a href="content.aspx?cmsName=Careers&heading=Careers" onmouseover="highlight6()" onmouseout="unhighlight()">Careers</a>'	
menu6[4]='<a href="content.aspx?cmsName=Community_Involvement&heading=Community_Involvement" onmouseover="highlight6()" onmouseout="unhighlight()">Community Involvement</a>'	
		
//Contents for menu 7 Contact Us
var menu7=new Array()
menu7[0]='<a href="contact.aspx?heading=Contact_Form" onmouseover="highlight7()" onmouseout="unhighlight()">Contact Form</a>'
menu7[1]='<a href="Location.aspx?heading=Location_Map" onmouseover="highlight7()" onmouseout="unhighlight()">Location Map</a>'	
menu7[2]='<a href="http://www.metlinkmelbourne.com.au" target="_blank" onmouseover="highlight7()" onmouseout="unhighlight()">Tram Timetable</a>'	

//Contents for menu 8 Alliance
var menu8=new Array()
menu8[0]='<a target="_blank" href="http://andrews.radian.com.au/" onmouseover="highlight8()" onmouseout="unhighlight()">Andrews Alliance Login</a>'
menu8[1]='<a href="content.aspx?cmsName=What_Is_Andrews_Alliance&heading=What_Is_Andrews_Alliance" onmouseover="highlight8()" onmouseout="unhighlight()">What Is Andrews Alliance?</a>'
menu8[2]='<a href="content.aspx?cmsName=Join_Andrews_Alliance&heading=Join_Andrews_Alliance" onmouseover="highlight8()" onmouseout="unhighlight()">Join Andrews Alliance</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?


/***************TEST**************/
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    }

    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    }

    function MM_nbGroup(event, grpName) { //v6.0
      var i,img,nbArr,args=MM_nbGroup.arguments;
      if (event == "init" && args.length > 2) {
        if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
          img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
          if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
          nbArr[nbArr.length] = img;
          for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
            if (!img.MM_up) img.MM_up = img.src;
            img.src = img.MM_dn = args[i+1];
            nbArr[nbArr.length] = img;
        } }
      } else if (event == "over") {
        document.MM_nbOver = nbArr = new Array();
        for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
          if (!img.MM_up) img.MM_up = img.src;
          img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);
          nbArr[nbArr.length] = img;
        }
      } else if (event == "out" ) {
        for (i=0; i < document.MM_nbOver.length; i++) {
          img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
      } else if (event == "down") {
        nbArr = document[grpName];
        if (nbArr)
          for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
        document[grpName] = nbArr = new Array();
        for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
          if (!img.MM_up) img.MM_up = img.src;
          img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
          nbArr[nbArr.length] = img;
      } }
    }
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    }
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    }

    function mySetStyleDisplay (myDiv, myStyle){
        if (document.all){
        obj = document.all(myDiv);
        obj.style.display = myStyle;
        } else if (document.getElementById) {
        obj = document.getElementById(myDiv);
        obj.style.display = myStyle;
        } else {alert (Err_Browser);}
    }

    function myShow(myDiv){
        mySetStyleDisplay (myDiv,'');
    }

    function myHide(myDiv){
        mySetStyleDisplay (myDiv,'none');
    }								

/***************TEST**************/

function highlight1(){
    MM_nbGroup('over','nav2','images/nav_2_f2.gif','',1);

}
function highlight2(){
    MM_nbGroup('over','nav3','images/nav_3_f2.gif','',1);
    
}
function highlight2_special(){
    MM_nbGroup('over','nav3','images/nav_3_f2.gif','',1);
    myShow('sub_new_Comm');
}
function unhighlight2_special(){
    MM_nbGroup('out');
    myHide('sub_new_Comm');
}
function highlight2_specialB() {
    MM_nbGroup('over', 'nav3', 'images/nav_3_f2.gif', '', 1);
    myShow('sub_new_resProject');
}
function unhighlight2_specialB() {
    MM_nbGroup('out');
    myHide('sub_new_resProject');
}
function highlight3(){
    MM_nbGroup('over','nav4','images/nav_4_f2.gif','',1);
}
function highlight4(){
    MM_nbGroup('over','nav5','images/nav_5_f2.gif','',1);
}
function highlight4_special(){
    MM_nbGroup('over','nav5','images/nav_5_f2.gif','',1);
    myShow('sub_new_Comm_R');
}
function unhighlight4_special(){
    MM_nbGroup('out');
    myHide('sub_new_Comm_R');
}

function highlight5(){
    MM_nbGroup('over','nav_projects','images/nav_projects_f2.gif','',1);
}
function highlight6(){
    MM_nbGroup('over','nav7','images/nav_7_f2.gif','',1);
}
function highlight7(){
    MM_nbGroup('over','nav8','images/nav_8_f2.gif','',1);
}
function highlight8(){
    MM_nbGroup('over','nav9','images/nav_9_f2.gif','',1);
}



function unhighlight(){
    MM_nbGroup('out');
}


/////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";
}
}