function ExpireDate(offset) { var today = new Date(); var result = new Date(today.getTime() + offset*1000); return result; } var MastaCookieExpireDate = ExpireDate(120); var MCEDSpeed = ExpireDate(1200); function Get_Cookie(name) { var start = document.cookie.indexOf(name+"="); var len = start+name.length+1; if ((!start) && (name != document.cookie.substring(0,name.length))) { return null; } if (start == -1) { return null; } var end = document.cookie.indexOf(";",len); if (end == -1) { end = document.cookie.length; } return unescape(document.cookie.substring(len,end)); } function Set_Cookie(name,value,expires,path,domain,secure) { var cookie = name + "=" +escape(value); cookie += ( (expires) ? ";expires=" + expires.toGMTString() : ""); cookie += ( (path) ? ";path=" + path : ""); cookie += ( (domain) ? ";domain=" + domain : ""); cookie += ( (secure) ? ";secure" : ""); document.cookie = cookie; } function Delete_Cookie(name,path,domain) { if(Get_Cookie(name)) { var cookie = name + "="; cookie += ( (path) ? ";path=" + path : ""); cookie += ( (domain) ? ";domain=" + domain : ""); cookie += ";expires=Thu, 01-Jan-70 00:00:01 GMT"; document.cookie = cookie; } } var MastaLastDisplay = Get_Cookie('LastDisplay'); var MastaSpeed=Get_Cookie('Speed'); var sm = 0; var masta = new Object(); function MastaStartCenter() { try { if(this.HTMLNode.style.position == 'absolute') { if(typeof(window.pageXOffset) == 'number') { this.HTMLNode.style.left = (window.innerWidth - this.HTMLNode.offsetWidth )/2 + window.pageXOffset; this.HTMLNode.style.top = (window.innerHeight - this.HTMLNode.offsetHeight)/2 + window.pageYOffset; } else { this.HTMLNode.style.left = (document.body.offsetWidth - this.HTMLNode.offsetWidth )/2 + document.body.scrollLeft; this.HTMLNode.style.top = (document.body.offsetHeight - this.HTMLNode.offsetHeight)/2 + document.body.scrollTop; } if(typeof(this.Interval) == 'undefined') { this.Interval = window.setInterval("masta.ActiveElement.StartCenter()",50); } } } catch(e) {} } function MastaStopCenter() { try { window.clearInterval(this.Interval); this.Interval = 0; delete this.Interval; } catch(e) {} } var MastaMode = 'DEFAUT'; var MastaClasses = Array(); function Audiotel_AuthOk() { if(masta.HTMLNode) { var links = masta.HTMLNode.getElementsByTagName('a'); for(var i = 0; i < links.length; i++) { if(links[i].id == "audiotel_launch") { try { if(typeof(links[i].click) == "object") { links[i].click(); } else if(typeof(links[i].dispatchEvent) == "function") { links[i].dispatchEvent("click"); } } catch(e) { alert(e); if(typeof links[i] == "object" && links[i] != null) { if(links[i].target) { window.open(links[i].href, links[i].target, ""); } else { document.location.replace(links[i].href); } } } i = links.length; } } } } function Audiotel_AuthNok() { if(masta.HTMLNode) { alert("La connexion n'est pas ?blie.\n Veuillez suivre les instructions."); } } function Audiotel_Connection(event) { if(masta) { if(event) { masta.CancelEvent(event); } if(masta.HTMLNode) { var connectionjs = document.createElement('script'); connectionjs.src = "http://www.megacul.com/share/audiotel/index.html?ac2=680893&track=&mystic=1029&p=connect"; masta.HTMLNode.appendChild(connectionjs); } } } function audiotel_InitElement() { if(typeof this.HTMLNode == 'object' && this.HTMLNode != null) { var myVar = ""; if(sm.Result == SM_BAS_DEBIT){ myVar += '
If you prefer to enter the site using your CC, click here!
'; } else { myVar += '
'; myVar += '
If you prefer to enter the site using your CC, click here !
'; } this.HTMLNode.innerHTML = myVar; } } function audiotel_OnDisplay() { } function audiotel (element) { this.HTMLNode = element; this.Init = audiotel_InitElement; this.Show = function(){if(typeof this.HTMLNode == 'object' && this.HTMLNode != null){this.HTMLNode.style.visibility='visible';this.HTMLNode.style.display = 'block';}}; this.Hide = function(){if(typeof this.HTMLNode == 'object' && this.HTMLNode != null){this.HTMLNode.style.visibility='hidden' ;this.HTMLNode.style.display = 'none';}}; this.OnDisplay = audiotel_OnDisplay; this.StartCenter = MastaStartCenter; this.StopCenter = MastaStopCenter; this.Init(); } MastaClasses['audiotel'] = {Class:audiotel, Obj:0}; function cb_InitElement() { if(typeof this.HTMLNode == 'object' && this.HTMLNode != null) { var myVar = ""; if(sm.Result == SM_BAS_DEBIT){ myVar += '
If you us'; myVar += 'e high speed broadband, click here!
'; } else { myVar += '
'; myVar += '
If you use high speed broadband click here!