/*oDevCloudFrameHeight = null; var setHeight = function(){ if(oDevCloudFrameHeight!=null){ var iFrame = document.getElementById("oDevCloudFrame") iFrame.style.height = oDevCloudFrameHeight; iFrame.src = ""; }else{ setTimeout("setHeight()",200); } }*/ function addEvent( obj, type, fn ) { if ( obj.attachEvent ) { obj["e"+type+fn] = fn; obj[type+fn] = function() { obj["e"+type+fn]( window.event ); }; obj.attachEvent( "on"+type, obj[type+fn] ); } else{ obj.addEventListener( type, fn, false ); } } var thisScript = document.scripts[document.scripts.length - 1]; var iFrame = document.createElement("iframe"); var parent = thisScript.parentElement; parent.insertBefore(iFrame, thisScript.nextSibling); iFrame.setAttribute("id","oDevCloudFrame"); iFrame.setAttribute("name","oDevCloudFrame"); iFrame.style.width = "100%"; iFrame.style.borderStyle = "none"; iFrame.style.borderWidth = "0"; //iFrame.style.borderColor = "initial"; //iFrame.style.borderImage = "initial"; iFrame.setAttribute("allowtransparancy","${params.allowtransparancy?:'true' }"); iFrame.setAttribute("scrolling","off"); var addEvent = function(obj, type, fn){ if (obj.attachEvent) { obj["e" + type + fn] = fn; obj[type + fn] = function () { obj["e" + type + fn](window.event) }; obj.attachEvent("on" + type, obj[type + fn]); } else { obj.addEventListener('message', fn, false); } } bindMethod = function (method, scope) { return function () { method.apply(scope, arguments); } } oDevCloudFrameResize = function (event) { var data = event.data.split('|'); var newFrameHeight = new Number(data[0]); var oDevCloudFrame = document.getElementById("oDevCloudFrame"); if (oDevCloudFrame) { oDevCloudFrame.height = newFrameHeight + 'px'; } console.log('resizing'); /*if(data[1]=='scroll'){ window.scroll(0,findPos(document.getElementById("oDevCloud${params.id }"))); }*/ } addEvent(window, 'message', bindMethod(oDevCloudFrameResize, window)) iFrame.src = "https://quovadisplanners.com/buy/local/state/null/exaclair"; /*function findPos(obj) { var curtop = 0; if (obj.offsetParent) { do { curtop += obj.offsetTop; } while (obj = obj.offsetParent); return [curtop-100]; } }*/