// Check jQuery version before we load function isiPhone(){ return ( (navigator.platform.indexOf("iPhone") != -1) || (navigator.platform.indexOf("iPod") != -1) ); } var isMobile = 0; function getScript(url, success) { var script = document.createElement('script'); script.src = url; var head = document.getElementsByTagName('head')[0], done = false; // Attach handlers for all browsers script.onload = script.onreadystatechange = function() { if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) { done = true; success(); script.onload = script.onreadystatechange = null; head.removeChild(script); } }; head.appendChild(script); } var col = '3'; var months = '6'; var size = '13'; var lang = 'english'; var btob = '1'; var bg = 'FFFFFF'; var dfc = '000000'; var border = 'CCCCCC'; var hbg = 'CAE8F5'; var hfc = '000000'; var abg = 'FFFFFF'; var afc = '000000'; var ubg = 'F69221'; var ufc = '000000'; var mobileresize = ''; var border_radius = '5'; var daystart = 'sunday'; function iFrame0(ek){ var ids = ek.id; getScript('https://codeorigin.jquery.com/jquery-1.10.2.min.js',function() { var cjQuery = jQuery.noConflict(true); cjQuery(document).ready(function() { //console.log(cjQuery(ek).parent().width()); /*cjQuery(ek).load(function(){ console.log(cjQuery(ek).parent().width()); });*/ cjQuery(window).on('resize', function(){ var win = cjQuery(this); //this = window //console.log('resize2!'); resizeiFrame(); }); /* var rand = Math.floor((Math.random()*100)+1); */ function resizeiFrame(){ var iFrameContainerWidth = cjQuery(ek).parent().width(); var iFrameContainerHeight = cjQuery(ek).parent().height(); if(isiPhone() && (mobileresize==='yes')){ // alert("iphone"); var iFrameMaxWidth = 30; var iFrameMinWidth = 30; var iFrameNormalHeight = 4188; var iFrameNarrowHeight = 4188; } else{ // alert("not iphone"); var iFrameMaxWidth0 = 0; var iFrameMinWidth0 = 0; var iFrameNormalHeight0 = 2100; var iFrameNarrowHeight0 = 2100; } //console.log(iFrameMaxWidth); var screenX = screen.width, screenY = screen.height; //console.log('screenx: ' + window.innerWidth); if (window.devicePixelRatio >= 2) { // retina display var multiplier = 2; //console.log('retina'); } else { // standard display var multiplier = 1; //console.log('standard'); } /*if (window.innerWidth < 310 * multiplier) { //console.log('xxx: ' + window.innerWidth); isMobile = 1; var iFrameMaxWidth0 = 300 * multiplier; var iFrameMinWidth0 = 222 * multiplier; var iFrameNormalHeight0 = 320 * multiplier; var iFrameNarrowHeight0 = 320 * multiplier; //console.log('going mobile'); } if (iFrameMaxWidth0 < iFrameContainerWidth) { //The iFrame is narrower than the container cjQuery(ek).width(iFrameMaxWidth0); //console.log(iFrameMaxWidth0); } else { //console.log('newsidth : ' + iFrameMinWidth); }*/ cjQuery(ek).width(iFrameMinWidth0); cjQuery(ek).height(iFrameNormalHeight0); /* if (iFrameMaxWidth0 < iFrameContainerWidth) { //The iFrame is narrower than the container cjQuery(ek).height(iFrameNormalHeight0); } else { cjQuery(ek).height(iFrameNarrowHeight0); } if (isMobile) { var iframe = ids; //document.getElementById('acCalendar'); iframe.src = iframe.src.replace(/mobile=0/gi, "mobile=1"); //console.log('reloading iframe' + iframe.src); } else { var iframe = ids; //document.getElementById('acCalendar'); if (iframe.src.search(/mobile=1/i) > 0){ iframe.src = iframe.src.replace(/mobile=1/gi, "mobile=0"); //console.log('reloading iframe' + iframe.src); } }*/ } }); var elements = document.getElementsByClassName('holds-the-iframe'); document.querySelectorAll('.holds-the-iframe'); console.log(document.querySelectorAll('.holds-the-iframe').length); console.log(document.querySelectorAll('.holds-the-iframe')); for(var i=0;i< document.querySelectorAll('.holds-the-iframe').length;i++) { var foobarElement = document.getElementsByClassName('holds-the-iframe'); foobarElement[i].style.background = 'none'; } }); } var calendarID = 'evhytr'; var iframeID = "acCalendar0"; document.write(''); document.write('') document.write('') document.write('') document.write('') document.write(''); document.write(''); document.write(''); document.write(''); document.write('
'); document.write('');