// get browser
var agent = navigator.userAgent.toLowerCase();
var isIE = (navigator.appName == "Microsoft Internet Explorer") ? true : false;
var isNetscape6 = (!document.all && !document.layers && navigator.appName == "Netscape" && parseInt(navigator.appVersion) >=5) ? true : false;
var isMac = (agent.indexOf("Mac") != -1) ? true : false;
var isIE4 = (agent.indexOf("MSIE") != -1 && agent.indexOf("4.0;") != -1) ? true : false;
var isNetscape = (agent.indexOf("Mozilla") != -1 && agent.indexOf("4.") != -1) ? true : false;
var win2000 = ((agent.indexOf("winnt") != -1) || (agent.indexOf("windows nt 5.0") != -1)) ? true : false;
var winXP = ((agent.indexOf("winnt") != -1) || (agent.indexOf("windows nt 5.1") != -1)) ? true : false;
// insert jscript
if((isNetscape6 || isIE || isIE4)) {
document.write('');
} else if (isNetscape && !isMac) {
document.write('');
}
// menu info
function createMenuObject () {
// getting here ************************************************************************ getting here ****
this.menus[0] = new Object();
this.menus[0].left = 190;
this.menus[0].width = 230;
this.menus[0].links = new Array("by bus",
"by car",
"by bike",
"by rail",
"parking at MetroCentre",
"public transport guide - PDF",
"park and ride information",
"new metrocentre circular bus service"
);
this.menus[0].urls = new Array("/pages/bus.mhtml",
"/pages/car.mhtml",
"/pages/bike.mhtml",
"/pages/rail.mhtml",
"/pages/parking.mhtml",
"javascript:window.open('/pdf/pt_guide.pdf'); return false;",
"/pages/park_and_ride.mhtml",
"javascript:window.open('/pdf/metrocentre_circular2.pdf'); return false;"
);
this.menus[0].subs = new Array();
// information ************************************************************************** information ****
this.menus[1] = new Object();
this.menus[1].left = 385;
this.menus[1].width = 210;
this.menus[1].links = new Array("customer services",
"job vacancies",
"press releases",
"centre contacts",
"accommodation guide",
"new developments",
"new public transport interchange",
"charities",
"MetroCentre Car Share scheme",
"product promotion sites",
"promotional opportunities",
"student info pack",
"Norwegian translation",
"Dutch translation",
"disclaimer"
);
this.menus[1].urls = new Array("/pages/customer_services.mhtml",
"javascript:openPopup('metro_popup', '/pages/popup/vacancies/', 557, 490, true, false, false, false, true);",
"javascript:openPopup('metro_popup', '/pages/popup/press_releases/', 557, 490, true, false, false, false, true);",
"/pages/contacts.mhtml",
"/pages/accommodation.mhtml",
"/pages/new_developments.mhtml",
"/pages/new_public_transport.mhtml",
"/pages/charities.mhtml",
"/pages/carshare.mhtml",
"javascript:openPopup('promo', '/pages/promotional_sites.html', 784, 500, true, false, false, false, false);",
"/pages/promotional_ops.mhtml",
"/pages/student_info.mhtml",
"/pages/norwegian.mhtml",
"/pages/dutch.mhtml",
"/pages/disclaimer.mhtml"
);
this.menus[1].subs = new Array();
// ************************************************* information sub menu (customer service) *************
this.menus[1].subs[0] = new Object();
this.menus[1].subs[0].width = 190;
this.menus[1].subs[0].links = new Array("buggies & boobaloos",
"safe child wristband",
"shopping hints",
"access for disabled people",
"smoke free zone",
"shop mobility"
);
this.menus[1].subs[0].urls = new Array("/pages/customer_services/buggies.mhtml",
"/pages/customer_services/wristbands.mhtml",
"/pages/customer_services/shopping_hints.mhtml",
"/pages/customer_services/disabled_access.mhtml",
"/pages/customer_services/smoke_free.mhtml",
"/pages/customer_services/shop_mobility.mhtml"
);
// get more ******************************************************************************** get more ****
this.menus[2] = new Object();
this.menus[2].left = 429;
this.menus[2].width = 150;
this.menus[2].links = new Array(
"events & promotions",
"special offers",
"latest news",
"gift card & vouchers",
"eating out guide",
"Odeon cinema",
"shopping angels"
);
this.menus[2].urls = new Array(
"javascript:openPopup('metro_popup', '/pages/popup/events/', 557, 490, true, false, false, false, true);",
"javascript:openPopup('metro_popup', '/pages/popup/offers/', 557, 490, true, false, false, false, true);",
"/pages/news/",
"/pages/gift_vouchers.mhtml",
"/pages/eating_out.mhtml",
"/pages/cinema.mhtml",
"/pages/shopping_angels.mhtml"
);
this.menus[2].subs = new Array();
// ************************************************* get more sub menu (eating out guide) *****************
this.menus[2].subs[4] = new Object();
this.menus[2].subs[4].width = 160;
this.menus[2].subs[4].links = new Array("page one",
"page two",
"page three",
"page four",
"page five",
"page six",
"page seven"
);
this.menus[2].subs[4].urls = new Array("/pages/eating_out1.mhtml",
"/pages/eating_out2.mhtml",
"/pages/eating_out3.mhtml",
"/pages/eating_out4.mhtml",
"/pages/eating_out5.mhtml",
"/pages/eating_out6.mhtml",
"/pages/eating_out7.mhtml"
);
}
// rollover functions ********************************************************************* rollover function ****
var rOvers = new Array;
function preloadImage (ref,image) {
rOvers[ref] = new Image;
rOvers[ref].src = image + ".gif";
rOvers[ref + "2"] = new Image;
rOvers[ref + "2"].src = image + "2.gif";
}
function rollOver (ref) {
document.images[ref].src = rOvers[ref + "2"].src;
}
function rollOut (ref) {
document.images[ref].src = rOvers[ref].src;
}
// submit link
function swapSubmit(name) {
document.getElementById(name + '_submit_link').innerHTML = 'Submitted...';
document.getElementById(name + '_submit_link').style.color = '#99BBFF';
}
// popup functions
function openPopup (ref, url, width, height, scroll, menu, toolbar, location, status) {
window.open(url,
ref,
"toolbar=no, location=no, menubar=" + ((menu) ? 'yes' : 'no') + ", " +
"scrollbars=" + ((scroll) ? 'yes' : 'no') + ", " +
"toolbar=" + ((toolbar) ? 'yes' : 'no') + ", " +
"status=" + ((status) ? 'yes' : 'no') + ", " +
"location=" + ((location) ? 'yes' : 'no') + ", " +
"resizable=no, width=" + width + ", height=" + height
);
}
// bookmark site
function bookmark_site() {
var bookmarkurl = "http://www.currentmedicalliterature.com";
var bookmarktitle = "Current Medical Literature";
if (isIE || isNetscape6) {
window.external.AddFavorite(bookmarkurl,bookmarktitle);
}
}