// 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(''); } // menu info function createMenuObject () { this.menus[0] = new Object(); this.menus[0].left = 210; this.menus[0].width = 140; this.menus[0].links = new Array("directions", "public transport" ); this.menus[0].urls = new Array("/pages/directions.mhtml", "/pages/public.mhtml" ); this.menus[0].subs = new Array(); this.menus[1] = new Object(); this.menus[1].left = 430; this.menus[1].width = 280; this.menus[1].links = new Array( "contact form", "charity, community and environmental", "centre contacts", "customer services", "disclaimer", "education pack - PDF", "easy access", "job vacancies", "press releases", "shopmobility", "retail opportunities", "students shopping" ); this.menus[1].urls = new Array( "/pages/contact_form.mhtml", "/pages/clean_air.mhtml", "/pages/contacts.mhtml", "/pages/customer_service.mhtml", "/pages/disclaimer.mhtml", "javascript:void(window.open('/pdf/student_pack.pdf'));", "/pages/easy_access.mhtml", "javascript:openPopup('potteries_popup', '/pages/popup/vacancies/', 510, 490, true, true, true, false, true);", "javascript:openPopup('potteries_popup', '/pages/popup/press_releases/', 510, 490, true, true, true, false, true);", "/pages/shopmobility.mhtml", "/pages/retail_opportunities.mhtml", "/pages/students.mhtml" ); this.menus[1].subs = new Array(); this.menus[2] = new Object(); this.menus[2].left = 477; this.menus[2].width = 200; this.menus[2].links = new Array( "eating in - eating out", "events & promotions", "family facilities", "gift vouchers and gift cards", "latest news", "picture gallery" ,"special offers" ); this.menus[2].urls = new Array( "/pages/eat_in.mhtml", "javascript:openPopup('potteries_popup', '/pages/popup/events/', 510, 490, true, true, true, false, true);", "/pages/families.mhtml", "/pages/gift_vouchers.mhtml", "/pages/news/", "/pages/gallery.mhtml" ,"javascript:openPopup('potteries_popup', '/pages/popup/offers/', 540, 490, true, true, true, false, true);" ); 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.theglades.uk.com"; var bookmarktitle = "The Glades Shopping Centre"; if (isIE || isNetscape6) { window.external.AddFavorite(bookmarkurl,bookmarktitle); } }