// 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;
// popup functions
function open_popup (ref, url, width, height, scroll, menu, toolbar, location, status, resizable) {
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=" + ((resizable) ? 'yes' : 'no') + ", " +
"width=" + width + ", height=" + height
);
}
// insert jscript
if((isNetscape6 || isIE || isIE4)) {
document.write('');
} else if (isNetscape && !isMac) {
document.write('');
}
// getting here
function createMenuObject () {
this.menus[0] = new Object();
this.menus[0].left = 184;
this.menus[0].width = 100;
this.menus[0].links = new Array("by car",
"by bus",
"by rail"
);
this.menus[0].urls = new Array("/pages/car.mhtml",
"/pages/bus.mhtml",
"/pages/tube.mhtml",
"/pages/parking.mhtml"
);
this.menus[0].subs = new Array();
this.menus[1] = new Object();
this.menus[1].left = 380;
this.menus[1].width = 150;
this.menus[1].links = new Array("customer care",
"job vacancies",
"press releases",
"centre contacts",
"shopmobility",
"student info - PDF",
"disclaimer"
);
this.menus[1].urls = new Array("/pages/customer_care.mhtml",
"javascript:openPopup('harlequin_popup', '/pages/popup/vacancies/', 561, 500, true, true, true, false, true);",
"javascript:openPopup('harlequin_popup', '/pages/popup/press_releases/', 561, 500, true, true, true, false, true);",
"/pages/contacts.mhtml",
"/pages/shopmobility.mhtml",
"javascript:void(window.open('/pdf/education.pdf'));",
"/pages/disclaimer.mhtml"
);
this.menus[1].subs = new Array();
this.menus[2] = new Object();
this.menus[2].left = 424;
this.menus[2].width = 150;
this.menus[2].links = new Array(
"events & promotions",
"special offers",
"store guide",
"latest news",
"gift vouchers",
"kids at Harlequin",
"picture gallery",
"personal style coach™"
);
this.menus[2].urls = new Array(
"javascript:openPopup('harlequin_popup', '/pages/popup/events/', 561, 500, true, true, true, false, true);",
"javascript:openPopup('harlequin_popup', '/pages/popup/offers/', 561, 500, true, true, true, false, true);",
"/pages/store_guide.mhtml",
"/pages/news/",
"/pages/gift_vouchers/",
"/pages/kids.mhtml",
"/pages/gallery/",
"/lisa-jayne/"
);
this.menus[2].subs = new Array();
}
// rollover functions
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);
}
}