if (!document.getElementById('MEOV_CSS_STYLE')) { var head = document.getElementsByTagName('head')[0]; var link = document.createElement('link'); link.id = 'MEOV_CSS_STYLE'; link.rel = 'stylesheet'; link.type = 'text/css'; link.href = '//dd3gy7mtoah62.cloudfront.net/portal/public/img/mail/theme_61/view360modalv5.css?v=1492451521'; link.media = 'all'; head.appendChild(link) } function MEOVPopup(vin) { //console.log('MEOVPopup'); var MEOVPopupId = "MEOVPopup_" + vin; var h = 380; var w = 680; var ratio = 680 / 380; var t = !1; var f = !1; var availWidth = 0; var availHeight = 0; try { //console.log('will getting size'); w = screen.availWidth; h = screen.availHeight; availWidth = screen.availWidth; availHeight = screen.availHeight; //console.log('success getting size ' + w + ' x ' + h); console.log(orientation) } catch (err) {} if (w <= 320) { w = 300 * 1.5; h = 170 * 2; t = !0; f = !0 } else if (w >= 320 && w <= 375) { w = 360 * 1.5; h = 203 * 2.5; t = !0; f = !0 } else if (w > 375 && w <= 414) { w = 400 * 1.5; h = 203 * 2.5; t = !0 } else if (w > 414 && w <= 768) { h = 280 * 2; w = 500 * 1.5; t = !0 } else { h = 380 * 2; w = 680 } if (availWidth > 0 && availHeight > 0) { //t = !1 //console.log('oops ' + t); if (w > availWidth) { w = availWidth * 0.9; h = w; } } //console.log('w: ' + w + 'h: ' + h); var centerLeft = (t) ? 0 : parseInt((screen.availWidth - w) / 2); var centerTop = (t) ? 0 : parseInt(((screen.availHeight - h) / 2)); console.log(); var popupURl = "https://dashboard.autosonvideo.com/view360video.go?did=1041705&vin=" + vin + "&t=1&height=" + h + "&width=" + w + "&modal=true&full=" + f; //console.log(popupURl); var elm = document.getElementById("MEOV_" + vin); elm.innerHTML += '
'; return !1 } function MEOVClose(id) { var elem = document.getElementById(id); return elem.parentNode.removeChild(elem) } function MEOVVideo(vin, width) { width = typeof width !== 'undefined' ? width : 200; if (typeof(vin) != undefined && vin != null && vin.length > 1) { var $vElm = document.getElementById('MEOV_' + vin); if ($vElm !== null && $vElm !== undefined) { if (1041705 > 0) { //console.log('MEOVVideo1'); $vElm.addEventListener('eventName', MEOVVCheck($vElm, vin, width), !0) } else { $vElm.innerHTML = '