фыв
Поддержать

фыв

фыв

 

n(window) { function Ticketon() {} Ticketon.prototype = { _fnStringify: function (obj) { var t = typeof (obj); if (t != «object» || obj === null) { if (t == «string») obj = ‘»‘+obj+'»‘; return String(obj); } else { var n, v, json = [], arr = (obj && obj.constructor == Array); for (n in obj) { v = obj[n]; t = typeof(v); if (t == «string») v = ‘»‘+v+'»‘; else if (t == «object» && v !== null) v = ticketon._fnStringify(v); json.push((arr ? «» : ‘»‘ + n + ‘»:’) + String(v)); } return (arr ? «[» : «{«) + String(json) + (arr ? «]» : «}»); } }, Stringify: function(obj) { if (!!JSON && !!JSON.stringify) { return JSON.stringify(obj); } else { return ticketon._fnStringify(obj); } }, OverlayID:null, FrameID:null, WrapID:null, LoaderID:null, BorderFrameID:null, ReturnURL:null, CommandURL:null, Dev:false, Consumer:null, FrameHashWatcherIvl:null, XDHashCheckInterval:null, Lang:’ru’, Transmit:{}, BodyInitialOverflow:’auto’, OverrideOverflow:true, TryMobile:true, sizeX: 770, sizeY: 510, overrideOverflow: function(bool) { if (typeof(bool) == ‘undefined’) { return this.OverrideOverflow; } this.OverrideOverflow = !!bool; return this; }, decorateSrc: function(url, callback) { try { if (!window.GoogleAnalyticsObject || !window[window.GoogleAnalyticsObject] || !(typeof(window[window.GoogleAnalyticsObject]) == ‘function’)) return callback(url); window[window.GoogleAnalyticsObject](function(tracker) { try { window.linker = window.linker || new window.gaplugins.Linker(tracker); callback(window.linker.decorate(url)); } catch (e) { callback(url); } }); } catch (e) { callback(url); } }, getWindowHeight: function() { var h = 0; if( typeof( window.innerWidth ) == ‘number’ ) { h = window.innerHeight; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { h = document.documentElement.clientHeight; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { h = document.body.clientHeight; } return h; }, setWindowResize: function() { if (window.addEventListener){ window.addEventListener(«resize», ticketon.WindowResize, false); } else if (window.attachEvent){ window.attachEvent(‘resize’, ticketon.WindowResize); } }, getScrollTop: function() { if (typeof window.pageYOffset != ‘undefined’){ return window.pageYOffset; } else { var B = document.body; //IE ‘quirks’ var D = document.documentElement; //IE with doctype return ((D.clientHeight) ? D: B).scrollTop || 0; } }, WindowResize: function() { var w = document.getElementById(ticketon.WrapID); var c = document.getElementById(ticketon.FrameID); var wh = ticketon.getWindowHeight(); w.style.top = ticketon.getScrollTop() + ‘px’; c.style.top = (wh > c.offsetHeight ? ((wh — c.offsetHeight) / 2) : 0) + ‘px’; }, fnHasProp:function(obj, prop) { if (typeof(obj) != ‘object’) return false; if (!Object.prototype.hasOwnProperty) { var proto = obj.__proto__ || obj.constructor.prototype; return (prop in obj) && (!(prop in proto) || proto[prop] !== obj[prop]); } else { return Object.prototype.hasOwnProperty.call(obj, prop); } }, InitDialog:function (a,b,p) { try { ticketon.tryMobile(null,p); if (ticketon.overrideOverflow()) { ticketon.BodyInitialOverflow = document.body.style.overflow.toString() || ‘auto’; document.body.style.overflow = ‘hidden’; } var top = ticketon.getScrollTop(); var w = document.getElementById(ticketon.WrapID); w.style.cssText = ‘position:absolute;top:’+top+’px;left:0;width:100%;height:100%;overflow:auto;z-index:65010;’; var o = document.getElementById(ticketon.OverlayID); o.style.cssText = ‘position:fixed;width:100%;height:100%;top:0;left:0;background:#000;opacity:0.4;z-index:65009;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=40);’; var c = document.getElementById(ticketon.FrameID); c.style.cssText = ‘position:relative;padding:4px;display:block;zoom:1;margin:0 auto;box-shadow:0 0 30px -5px #000;-moz-box-shadow:0 0 30px -5px #000;-webkit-box-shadow:0 0 30px -5px #000;border:none;overflow:auto;z-index:65010;box-sizing:content-box;’ +’width:’+a+’px;height:’+b+’px’; ticketon.WindowResize(); setTimeout(function() { window.scrollTo(0,top); }, 1); } catch (e) {ticketon.errorLog(e)} }, Exec:function() { return { command:function(c, o, cb) { try { var params = »; if (!o) o={}; if (!!o.Params) { o.Params.lang=ticketon.Lang.toString(); if (typeof(ticketon.Transmit) == ‘object’) { o.Params.transmit=ticketon.Stringify(ticketon.Transmit); } else { o.Params.transmit=ticketon.Transmit.toString(); } params = ticketon.getParams(o.Params); } var l = document.createElement(«div»); l.setAttribute(«id», ticketon.LoaderID); l.style.cssText = ‘position:absolute; z-index:3; top: 4px; left:4px; bottom:4px; right:4px; text-align:center; background:url(«‘+ticketon.getStaticBase()+’i/ticketon-loader.gif») no-repeat scroll center center #DEE0E3;’; var b = document.createElement(«div»); b.id = ticketon.BorderFrameID; b.style.cssText = ‘position:absolute; z-index:1; top: 0; left:0; bottom:0; right:0;background:#FFF;’; var mf = document.getElementById(ticketon.FrameID); mf.innerHTML = »; mf.appendChild(l); mf.appendChild(b); var ifr = document.createElement(‘iframe’); var ifrload = function() { ticketon.WindowResize(); if (ifrLoaded) return; ifrLoaded = true; l.style.display = ‘none’; }; if (ifr.addEventListener) { ifr.addEventListener(«load»,ifrload,false); } else if (ifr.attachEvent) { ifr.attachEvent(«onload»,ifrload); } ifr.id = ifr.name = ‘frame_’+ticketon.FrameID; ifr.className = ‘ticketon-iframe’; ifr.src = ‘about:blank’; ifr.style.cssText = ‘display:none;border:0;position:relative;z-index:2;top:0;left:0;margin:0;padding:0;’; ifr.scrolling = ‘no’; ifr.frameborder = ‘0’; ifr.allowTransparency = ‘true’; var ifrLoaded = false; var src = ticketon.CommandURL+’?’+ticketon.getParams({action:c,’return’:(!!o.ReturnURL)?o.ReturnURL:ticketon.ReturnURL})+’&’+params; ticketon.decorateSrc(src, function(src) { ifr.src = src; mf.appendChild(ifr); cb(); }) } catch (e) {ticketon.errorLog(e)} }, setStyle:function(o) { try { if (!o) o={}; document.getElementById(ticketon.OverlayID).style.display=»block»; var n = document.getElementById(«frame_» + ticketon.FrameID); for (var s in o) { if (!!o[s]) n.style[s] = o[s]; } n.style.display = «block»; } catch (e) {ticketon.errorLog(e)} }, hash:function(h) { try { if (!h.match(/^#!.*/)) return; var c = h.replace(/^#!(.*)/, ‘$1’).split(‘&’); var e = {}; var f = function(c) {e[c[0]]=c[1]}; for(var i=0,l=c.length;i9?h:’0’+h)+’:’+(m>9?m:’0’+m)); return n; }, addWidgetSchedule:function (d) { var n = document.createElement(‘a’); n.className=’tcn-widget tcn-widget-btn-tickets tcn-widget-c-{c} tcn-widget-f-{f} tcn-widget-t-{t}’.replace(‘{t}’, d.place||d.theatre).replace(‘{f}’, d.event||d.film).replace(‘{c}’, ticketon.Consumer) + (!!d.css?’ tcn-‘+d.css:»); if (!d.date) d.date = (function(){var _=new Date();return (_.getDate()+’.’+(_.getMonth()+1)+’.’+_.getFullYear())})(); if (!!(d.event||d.film)) { n.href = ‘javascript:ticketon.openEvent({f}, ‘{c}’, ‘{d}’)’.replace(‘{f}’, d.event||d.film).replace(‘{c}’,(d.city || »)); } else if (!!(d.place||d.theatre)) { n.href = ‘javascript:ticketon.openPlace({t}, ‘{d}’)’.replace(‘{t}’, d.place||d.theatre); } else { n.href = ‘#’; } n.href = n.href.replace(‘{d}’,(d.date || ((new Date).getTime()/1000))); n.innerHTML=’

‘+(!!d.text?d.text:’Билеты’)+’

‘; return n; }, addWidgetFilm:function (d) { var n = document.createElement(‘a’); if (!d.date) d.date = (function(){var _=new Date();return (_.getDate()+’.’+(_.getMonth()+1)+’.’+_.getFullYear())})(); n.className = ‘tcn-widget tcn-widget-film’; n.href = ‘javascript:ticketon.openEvent({f}, ‘{c}’, ‘{d}’)’.replace(‘{f}’, d.event||d.film).replace(‘{c}’,d.city).replace(‘{d}’,d.date); n.innerHTML = ‘ Купить билет‘; return n; }, addWidgetPromo:function(d) { var n = document.createElement(‘a’); n.className=’tcn-widget tcn-widget-promo’; if (!d.date) d.date = (function(){var _=new Date();return (_.getDate()+’.’+(_.getMonth()+1)+’.’+_.getFullYear())})(); if (!!(d.event||d.film)) { n.href = ‘javascript:ticketon.openEvent({f}, ‘{c}’, ‘{d}’)’.replace(‘{f}’, d.event||d.film).replace(‘{c}’,(d.city || »)); } else if (!!(d.place||d.theatre)) { n.href = ‘javascript:ticketon.openPlace({t}, ‘{d}’)’.replace(‘{t}’, d.place||d.theatre); } else { n.href = ‘#’; } n.href = n.href.replace(‘{d}’,(d.date || ((new Date).getTime()/1000))); n.innerHTML=’Купить билеты он-лайн‘; return n; }, addScript: function (c, d) { var s = document.createElement(‘script’); s.type = ‘text/javascript’; s.src = c + ‘&’ + ticketon.getParams(d); document.body.appendChild(s); }, addWidgetEmbed: function (d, n) { if (!n.id) { n.id = ‘tcn_’ + ticketon.getGuid(); } d.id = n.id; d.host = window.top.location.href; d.callback = ‘ticketon.setEmbed’; ticketon.addScript(ticketon.getEmbedDomain() + ‘?’, d); return false; }, setEmbed: function (code, id, o) { var f, p, n = document.getElementById(id); if (!!o.frame) { f = ticketon.createEmbedFrame(o.frame, id); n.parentNode.insertBefore(f, n); f.contentWindow.document.write(code); f.contentWindow.document.close(); } else { f = document.createDocumentFragment(); p = document.createElement(‘div’); p.innerHTML = code; while (p.firstChild) { if (p.firstChild.nodeName.toLowerCase() === ‘script’) { (function(s, c, h) { s.type = «text/javascript»; try { s.appendChild(document.createTextNode(c)); } catch(e) { s.text = c; } h.insertBefore(s, h.firstChild); h.removeChild(s); })(document.createElement(«script»), (p.firstChild.text || p.firstChild.textContent || p.firstChild.innerHTML || «» ), (document.getElementsByTagName(«head»)[0] || document.documentElement)); p.removeChild(p.firstChild); } else { f.appendChild(p.firstChild); } } n.parentNode.insertBefore(f, n); } }, createEmbedFrame:function(o, id) { var f = document.createElement(«iframe»); f.name = ticketon.fnHasProp(o, ‘name’) ? o.name : ‘ifr-‘+id; f.id = ‘ifr-‘+id; f.style.cssText = ticketon.fnHasProp(o, ‘css’) ? o.css : ‘border:none;width:0;height:0;’; f.className = ticketon.fnHasProp(o, ‘class’) ? o[‘class’] : »; f.allowTransparency = true; f.frameBorder = 0; f.scrolling = «no»; return f }, getData: function(e) { var d={}; for(var x=0;x




Комментариев пока нет

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *