var subM = new ItemStyle(162, 2, '', -15, 3, 'images/topmenu_back.gif', 'images/topmenu_backh.gif', 'highText', 'highText',
 '', '', null, null, 'hand', 'default');
var subH = new ItemStyle(162, 2, '', -15, 3, 'images/topmenu_home.gif', 'images/topmenu_homeh.gif', 'highText', 'highText',
 '', '', null, null, 'hand', 'default');
var subR = new ItemStyle(162, 2, '', -15, 3, 'images/topmenu_res.gif', 'images/topmenu_resh.gif', 'highText', 'highText',
 '', '', null, null, 'hand', 'default');
var subC = new ItemStyle(162, 2, '', -15, 3, 'images/topmenu_com.gif', 'images/topmenu_comh.gif', 'highText', 'highText',
 '', '', null, null, 'hand', 'default');
var subL = new ItemStyle(160, 2, '', -15, 3, 'images/topmenu_news.gif', 'images/topmenu_newsh.gif', 'highText', 'highText',
 '', '', null, null, 'hand', 'default');
var subA = new ItemStyle(162, 2, '', -15, 3, 'images/topmenu_about.gif', 'images/topmenu_abouth.gif', 'highText', 'highText',
 '', '', null, null, 'hand', 'default');
var subX = new ItemStyle(162, 2, '', -15, 3, 'images/topmenu_cont.gif', 'images/topmenu_conth.gif', 'highText', 'highText',
 '', '', null, null, 'hand', 'default');
var subN = new ItemStyle(36, 0, '', -15, 0, '#0081C3', '#0796DE', 'lowText', 'lowText',
 'itemBorder', 'itemBorder', null, null, 'hand', 'default');
var sub1 = new ItemStyle(35, 0, '', -15, 0, 'images/drop_EPCsale.gif', 'images/drop_EPCsaleh.gif', 'lowText', 'lowText',
 'itemBorder', 'itemBorder', null, null, 'hand', 'default');
var sub2 = new ItemStyle(35, 0, '', -15, 0, 'images/drop_EPCrental.gif', 'images/drop_EPCrentalh.gif', 'lowText', 'lowText',
 'itemBorder', 'itemBorder', null, null, 'hand', 'default');
var sub3 = new ItemStyle(35, 0, '', -15, 0, 'images/drop_HIP.gif', 'images/drop_HIPh.gif', 'lowText', 'lowText',
 'itemBorder', 'itemBorder', null, null, 'hand', 'default');
var sub4 = new ItemStyle(35, 0, '', -15, 0, 'images/drop_EPC.gif', 'images/drop_EPCh.gif', 'lowText', 'lowText',
 'itemBorder', 'itemBorder', null, null, 'hand', 'default');
var sub5 = new ItemStyle(35, 0, '', -15, 0, 'images/drop_SBEM.gif', 'images/drop_SBEMh.gif', 'lowText', 'lowText',
 'itemBorder', 'itemBorder', null, null, 'hand', 'default');
var subO = new ItemStyle(20, 0, '', -15, 0, '#0081C3', 'images/', 'lowText', 'lowText',
 'itemBorder', 'itemBorder', null, null, 'hand', 'default');
var sub6 = new ItemStyle(19, 0, '', -15, 0, 'images/drop_survey.gif', 'images/drop_surveyh.gif', 'lowText', 'lowText',
 'itemBorder', 'itemBorder', null, null, 'hand', 'default');
var sub7 = new ItemStyle(19, 0, '', -15, 0, 'images/drop_areas.gif', 'images/drop_areash.gif', 'lowText', 'lowText',
 'itemBorder', 'itemBorder', null, null, 'hand', 'default');

var button = new ItemStyle(22, 1, '&gt;', -15, 2, '#006633', '#CC6600', 'buttonText', 'buttonHover',
 'buttonBorder', 'buttonBorderOver', 80, 95, 'crosshair', 'default');

var pMenu = new PopupMenu('pMenu');
with (pMenu)
{
startMenu('root', false, 'window.page.elmPos("home").x', 'window.page.elmPos("home").y + 4', 24, subM, '', false);
addItem('&nbsp;', 'index.html', 'parent', subH);
addItem('&nbsp;', 'mRes', 'sm:', subR).onclick='window.location.href="home-information-pack-hip.html"';
addItem('&nbsp;', 'mCom', 'sm:', subC).onclick='window.location.href="commercial-energy-performance-certificate-epc.html"';
addItem('&nbsp;', 'index.html#news', 'parent', subL);
addItem('&nbsp;', 'about-us.html', 'parent', subA);
addItem('&nbsp;', 'contact-us.html', 'parent', subX);

startMenu('mRes', true, -2, 24, 164, subN);
addItem('&nbsp;', 'home-information-pack-hip.html', 'parent', sub3);
addItem('&nbsp;', 'HIP-Areas.html', 'parent', sub7);
addItem('&nbsp;', 'energy-performance-certificate-epc.html', 'parent', sub1);
addItem('&nbsp;', 'energy-performance-certificate-rental-epc.html', 'parent', sub2);
addItem('&nbsp;', 'residential-survey.html', 'parent', sub6);

startMenu('mCom', true, -2, 24, 164, subN);
addItem('&nbsp;', 'commercial-energy-performance-certificate-epc.html', 'parent', sub4);
addItem('&nbsp;', 'simplified-building-energy-model-sbem.html', 'parent', sub5);

}

// ******************** FUNCTIONS CALLED BY THE EFFECTS SECTION ********************

// This is the "positioning from page anchors" code used by the advanced positioning expressions.
page.elmPos=function(e,p)
{
 var x=0,y=0,w=p?p:this.win;
 e=e?(e.substr?(isNS4?w.document.anchors[e]:getRef(e,w)):e):p;
 if(isNS4){if(e&&(e!=p)){x=e.x;y=e.y};if(p){x+=p.pageX;y+=p.pageY}}
 if (e && this.MS && navigator.platform.indexOf('Mac')>-1 && e.tagName=='A')
 {
  e.onfocus = new Function('with(event){self.tmpX=clientX-offsetX;' +
   'self.tmpY=clientY-offsetY}');
  e.focus();x=tmpX;y=tmpY;e.blur()
 }
 else while(e){x+=e.offsetLeft;y+=e.offsetTop;e=e.offsetParent}
 return{x:x,y:y};
};




