Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* EDIT LINKS HERE */
- var links = {
- "SINGLE TICKET CALENDAR" : { dev: "http://devtest.thephil.org/buytickets/calendar.aspx",
- staging: "http://staging.thephil.org/buytickets/calendar.aspx",
- production: "http://www.thephil.org/buytickets/calendar.aspx",
- tnewdev: "http://www.thephil.org/buytickets/calendar.aspx",
- tnewproduction: "http://www.thephil.org/buytickets/calendar.aspx"},
- "PRE-SEASON & SUBSCRIPTION PACKAGES" : { dev: "http://tickets.thephil.org/_QA_/subscription/packages.aspx?promo=1961",
- staging: "http://tickets.thephil.org/_QA_/subscription/packages.aspx?promo=1961",
- production: "http://tickets.thephil.org/subscription/packages.aspx?promo=1961",
- tnewdev: "http://tickets.thephil.org/_QA_/subscription/packages.aspx?promo=1961",
- tnewproduction: "http://tickets.thephil.org/subscription/packages.aspx?promo=1961"},
- "MUSIC EDUCATION" : { dev: "http://devtest.thephil.org/buytickets/tix/sourceselect.aspx",
- staging: "http://staging.thephil.org/buytickets/tix/sourceselect.aspx",
- production: "http://www.thephil.org/buytickets/tix/sourceselect.aspx",
- tnewdev: "http://www.thephil.org/buytickets/tix/sourceselect.aspx",
- tnewproduction: "http://www.thephil.org/buytickets/tix/sourceselect.aspx"}
- }
- /****************************************
- * *
- * DON'T EDIT ANYTHING BELOW THIS *
- * *
- ****************************************/
- var timeout = 800;
- var closetimer = 0;
- var ddmenuitem = 0;
- // open hidden layer
- function mopen(id) {
- // cancel close timer
- mcancelclosetime();
- // close old layer
- if (ddmenuitem) ddmenuitem.style.visibility = 'hidden';
- // get new layer and show it
- ddmenuitem = document.getElementById(id);
- ddmenuitem.style.visibility = 'visible';
- }
- // close showed layer
- function mclose() {
- if (ddmenuitem) ddmenuitem.style.visibility = 'hidden';
- }
- // go close timer
- function mclosetime() {
- closetimer = window.setTimeout(mclose, timeout);
- }
- // cancel close timer
- function mcancelclosetime() {
- if (closetimer) {
- window.clearTimeout(closetimer);
- closetimer = null;
- }
- }
- function generateLinks(environment)
- {
- var ahrefs = ''
- for(link in links) {
- ahrefs += "<a href=\"" + links[link][environment] + "\">" + link + "</a>";
- }
- return ahrefs;
- }
- function changeBuyTicketsMenubar2() {
- document.getElementById('BuyTicketsMenubar').innerHTML = '<ul id="sddm"> \
- <li><a href="#" \
- onmouseover="mopen(\'m1\')" \
- onmouseout="mclosetime()">BUY TICKETS</a> \
- <div id="m1" \
- onmouseover="mcancelclosetime()" \
- onmouseout="mclosetime()">\
- ' +
- (function(){switch (document.location.host)
- {
- case 'devtest.thephil.org':
- return generateLinks('dev');
- case 'staging.thephil.org':
- return generateLinks('staging');
- case 'thephil.org':
- case 'www.thephil.org':
- return generateLinks('production');
- case 'tickets.thephil.org':
- return (document.location.pathname.toUpperCase().indexOf('_QA_') > 0) ? generateLinks('dev') : generateLinks('production');
- default:
- return '';
- };}())
- + ' \
- </div> \
- </li> \
- </ul>';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement