// Set up submenu links. Home=new Array();i=-1 Services=new Array();i=-1 i++;Services[i]=new Array('Project Management', 'ProjectManagement.htm') i++;Services[i]=new Array('Quantity Surveying', 'QuantitySurveying.htm') i++;Services[i]=new Array('Commercial Agency', 'CommercialAgency.htm') i++;Services[i]=new Array('Valuation', 'ValuationSurveying.htm') i++;Services[i]=new Array('Building Surveying', 'BuildingSurveying.htm') i++;Services[i]=new Array('Housing Consultancy', 'HousingConsultancy.htm') i++;Services[i]=new Array('CDM Coordinator', 'CDMCoordinators.htm') Partners=new Array();i=-1 Projects=new Array();i=-1 i++;Projects[i]=new Array('Commercial/Retail', 'Retail.htm') i++;Projects[i]=new Array('Health', 'Health.htm') i++;Projects[i]=new Array('Hotel/Leisure', 'HotelLeisure.htm') i++;Projects[i]=new Array('Industrial', 'Industrial.htm') i++;Projects[i]=new Array('Housing', 'ProjHousing.htm') i++;Projects[i]=new Array('Education', 'Education.htm') i++;Projects[i]=new Array('Specialist', 'Specialist.htm') Links=new Array();i=-1 NewsCareers=new Array();i=-1 Contact=new Array();i=-1 i++;Contact[i]=new Array('Office Locations', 'Offices.htm') i++;Contact[i]=new Array('Enquiries', 'Contact.htm') // // Misc Variables var timer; // holds the current timer value Menu_Over = null // Menu currently highlighted MouseOver_bgColor ="#526BA1"// Color of the cell when mouse is over it OffsetMenuTop = 15 // Offset Menu Top the height of the cell so it's top is at the cell bottom // // This is the bit that does it all. function ShowMenu(elem,HTML){ if(Menu_Over!=null){if(!document.layers){Menu_Over.className='DropDownHeader'}} Menu_Over = elem if(!document.layers){elem.className='DropDownHeaderOver'} var HTMLCode = '' HTMLelem = eval(HTML) if(HTMLelem.length>0){ HTMLCode += '' } if(document.layers){ document.OptionListDiv.left = findPosX(elem) document.OptionListDiv.top = findPosY(elem) + OffsetMenuTop document.OptionListDiv.document.write(HTMLCode); document.layers['OptionListDiv'].document.close(); } if(document.all){ OptionListDiv.style.left = findPosX(elem) OptionListDiv.style.top = findPosY(elem) + OffsetMenuTop OptionListDiv.innerHTML = HTMLCode } if(!document.all && document.getElementById){ document.getElementById('OptionListDiv').style.left = findPosX(elem) document.getElementById('OptionListDiv').style.top = findPosY(elem) + OffsetMenuTop document.getElementById('OptionListDiv').innerHTML = HTMLCode } } // // find the Left position function findPosX(obj){ var curleft=0; if(document.getElementById||document.all){while(obj.offsetParent){curleft+=obj.offsetLeft;obj=obj.offsetParent;}} else if(document.layers){curleft+=obj.x;} return curleft; } // // find the top position function findPosY(obj){ var curtop=0; if(document.getElementById||document.all){while(obj.offsetParent){curtop+=obj.offsetTop;obj=obj.offsetParent;}} else if(document.layers){curtop+=obj.y;} return curtop; } // // set the mouse click mouseup event if(document.layers)document.captureEvents(Event.MOUSEMOVE);document.onmouseup=HideDiv; // // hide the menu function HideDiv(){ if(Menu_Over!=null){ if(!document.layers){Menu_Over.className='DropDownHeader'} } if(document.layers){document.OptionListDiv.top = -999} if(document.all){OptionListDiv.style.top = -999} if(!document.all && document.getElementById){document.getElementById('OptionListDiv').style.top = -999} }