//Script para o menu Horizontal
///////////////////////////////
var hBar = new ItemStyle(22, 0, '', -5, 0, '#fff', '#fff', 'highText', 'highText', '0', '0',
null, null, 'hand', 'hand');
var subM = new ItemStyle(22, 0, '', -5, 3, '#435270', '#4e5976', 'Text', 'Text',
'0', '0', 100, 50, 'hand', 'hand');
var subM1 = new ItemStyle(22, 0, '', -5, 3, '#fff', '#fd8604', 'lowText', 'highText',
'0', '0', 90, 100, 'hand', 'hand');
var subM2 = new ItemStyle(22, 0, '', -5, 3, '#fff', '#01296e', 'lowText', 'highText',
'0', '0', 90, 100, 'hand', 'hand');
var subM3 = new ItemStyle(22, 0, '', -5, 3, '#fff', '#006633', 'lowText', 'highText',
'0', '0', 90, 100, 'hand', 'hand');
var subM4 = new ItemStyle(22, 0, '', -5, 3, '#fff', '#c81e39', 'lowText', 'highText',
'0', '0', 90, 100, 'hand', 'hand');
var subM5 = new ItemStyle(22, 0, '', -5, 3, '#fff', '#fff', 'lowText', 'lowText',
'0', '0', 90, 100, 'hand', 'hand');
var subBlank = new ItemStyle(22, 1, '>', -15, 3, '#CCCCDD', '#6699CC', 'lowText', 'highText',
'itemBorderBlank', 'itemBorder', null, null, 'hand', 'default');
var button = new ItemStyle(22, 1, '>', -15, 2, '10#006633', '10#CC6600', 'buttonText', 'buttonHover',
'buttonBorder', 'buttonBorderOver', 80, 95, 'crosshair', 'default');
//
var separator = new ItemStyle(7, 0, '>', -15, 0, '', '', 'lowText', 'highText', '0', '0', null, null, 'hand', 'default');
//
var separator2 = new ItemStyle(15, 0, '>', -15, 0, '', '', 'lowText', 'highText', '0', '0', null, null, 'hand', 'default');
var pMenu = new PopupMenu('pMenu');
with (pMenu)
{
startMenu('root', false, 'page.elmPos("pMenu").x + 6', 'page.elmPos("pMenu").y + 5', 18, hBar, '', false);
addItem('
', 'sol.asp?lang=en', '', null, 145);
addItem('', '', '', separator);
addItem('
', 'culture.asp?lang=en', '', null, 145);
addItem('', '', '', separator);
addItem('
', 'nature.asp?lang=en', '', null, 145);
addItem('', '', '', separator);
addItem('
', 'service.asp?lang=en', '', null, 145);
addItem('', '', '', separator);
addItem('
', 'mAssoc', 'sm:', null, 145);
/*
startMenu('mSun', true, 0, 22, 146, subM1, '', true);
addItem(' Beach', 'praias.asp?lang=en', '');
addItem(' Marina', 'marina.asp?lang=en', '');
startMenu('mEtertaiment', true, 0, 22, 146, subM2, '', true);
addItem(' Gastronomy', 'gastronomia.asp?lang=en', '');
addItem(' Night', 'vidanocturna.asp?lang=en', '');
addItem(' Culture', 'cultura.asp?lang=en', '');
startMenu('mNature', true, 0, 22, 146, subM3, '', true);
addItem(' Golf', 'golf.asp?lang=en', '');
addItem(' Sports', 'desporto.asp?lang=en', '');
addItem(' Nature', 'natureza.asp?lang=en', '');
addItem(' Sports Training', 'estagios.asp?lang=en', '');
startMenu('mBusiness', true, 0, 22, 146, subM4, '', true);
addItem(' Conferences', 'conferencia.asp?lang=en', '');
addItem(' Museum', 'museu.asp?lang=en', '');
addItem(' Swimming Poll', 'piscina.asp?lang=en', '');
addItem(' Library', 'biblioteca.asp?lang=en', '');
*/
startMenu('mAssoc', true, 0, 22, 146, subM5, '', true);
addItem(' Accommodation', 'associados.asp?lang=en&sub_categoriaID=1', '');addItem(' Bars & Clubs', 'associados.asp?lang=en&sub_categoriaID=4', '');addItem(' Builders and Property Promoters', 'associados.asp?lang=en&sub_categoriaID=22', '');addItem(' Golf', 'associados.asp?lang=en&sub_categoriaID=21', '');addItem(' Marinas', 'associados.asp?lang=en&sub_categoriaID=12', '');addItem(' Official Entities', 'associados.asp?lang=en&sub_categoriaID=20', '');addItem(' Real Estate Agencies', 'associados.asp?lang=en&sub_categoriaID=16', '');addItem(' Rent-a-Car', 'associados.asp?lang=en&sub_categoriaID=15', '');addItem(' Restaurants', 'associados.asp?lang=en&sub_categoriaID=5', '');addItem(' Shops & Other Services', 'associados.asp?lang=en&sub_categoriaID=19', '');addItem(' Theme Parks', 'associados.asp?lang=en&sub_categoriaID=17', '');addItem(' Travel Agencies', 'associados.asp?lang=en&sub_categoriaID=13', '');
// HIDE OR SHOW DELAYS (in milliseconds) can be customised. Defaults are:
//showDelay = 0;
//hideDelay = 500;
}
var hMenu = new PopupMenu('anotherMenu');
with (hMenu)
{
startMenu('root', false, 'page.elmPos("hMenu").x + 155', 'page.elmPos("hMenu").y + 10', 20, subM);
addItem('Home', 'home.asp?lang=en', '', null, 40);
addItem('', '', '', separator);
addItem('About Albufeira', 'albufeira.asp?lang=en', '', null, 85);
addItem('', '', '', separator);
addItem('About us', 'nos.asp?lang=en', '', null, 55);
addItem('', '', '', separator);
addItem('Downloads', 'download.asp?lang=en', '', null, 60);
addItem('', '', '', separator);
addItem('News', 'news.asp?lang=en', '', null, 40);
addItem('', '', '', separator);
addItem('Weather', 'tempo.asp?lang=en', '', null, 50);
addItem('', '', '', separator);
addItem('Contacts', 'contactos.asp?lang=en', '', null, 50);
};
/*
addMenuBorder(pMenu, window.subBlank,
null, '#666666', 1, '#CCCCDD', 2);
*/
/*
addDropShadow(pMenu, window.subM,
[40,"#333333",6,6,-4,-4], [40,"#666666",4,4,0,0]);
addDropShadow(pMenu, window.subBlank,
[40,"#333333",6,6,-4,-4], [40,"#666666",4,4,0,0]);
*/
if ((navigator.userAgent.indexOf('rv:0.')==-1) &&
!(isOp&&!document.documentElement) && !(isIE4&&!window.external))
{
pMenu.showMenu = new Function('mN','menuAnim(this, mN, 10)');
pMenu.hideMenu = new Function('mN','menuAnim(this, mN, -15)');
}
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};
};
function menuAnim(menuObj, menuName, dir)
{
// The array index of the named menu (e.g. 'mFile') in the menu object (e.g. 'pMenu').
var mD = menuObj.menu[menuName][0];
// Add timer and counter variables to the menu data structure, we'll need them.
if (!mD.timer) mD.timer = 0;
if (!mD.counter) mD.counter = 0;
with (mD)
{
clearTimeout(timer);
if (!lyr || !lyr.ref) return;
if (!visNow && dir>0) dir = 0-dir;
if (dir>0) lyr.vis('visible');
lyr.sty.zIndex = dir>0 ? mD.zIndex + 1 : 1001;
lyr.clip(0, 0, menuW+2, (menuH+2)*Math.pow(Math.sin(Math.PI*counter/200),0.75) );
counter += dir;
if (counter>100) { counter = 100; lyr.sty.zIndex = mD.zIndex }
else if (counter<0) { counter = 0; lyr.vis('hidden') }
else timer = setTimeout('menuAnim('+menuObj.myName+',"'+menuName+'",'+dir+')', 40);
}
};
// Borders and Dropshadows:
//
// Here's the menu border and dropshadow functions we call above. Edit ot delete if you're
// not using them. Basically, they assign a string to pMenu.menu.menuName[0].extraHTML, which
// is written to the document with the menus as they are created -- the string can contain
// anything you want, really. They also adjust the menu dimensions and item positions
// to suit. Dig out the Object Browser script and open up "pMenu" for more info.
function addMenuBorder(mObj, iS, alpha, bordCol, bordW, backCol, backW)
{
// Loop through the menu array of that object, finding matching ItemStyles.
for (var mN in mObj.menu)
{
var mR=mObj.menu[mN], dS='