/*! Developed by Illimar Pihlamäe | e-mail: illimar@idra.pri.ee | Euroland Estonia © 2014 | e-mail: illimar@euroland.com */ var EurolandToolAutoSizeObject=new function(){this.marginOffset=0;var e=this,t=0,n=0,r=document.all?void 0===document.documentMode?function e(){if(!document.all)return 0;if(null!=r)return r;var t,n=navigator.userAgent;return -1==(t=n.search("MSIE"))?0:r=Math.floor(parseFloat(r=n.substring(t+4,n.indexOf(";",t))))}():Math.floor(parseFloat(document.documentMode)):0,o=!1,i=!1,l=null,s=[],a=!1;function f(e,t){var n,r,o,i,l=(e.ownerDocument||document).defaultView;if(l&&l.getComputedStyle)return t=t.replace(/([A-Z])/g,"-$1").toLowerCase(),l.getComputedStyle(e,null).getPropertyValue(t);if(e.currentStyle)return(t=t.replace(/\-(\w)/g,function(e,t){return t.toUpperCase()}),i=e.currentStyle[t],/^\d+(em|pt|%|ex)?$/i.test(i))?(n=i,r=e.style.left,o=e.runtimeStyle.left,e.runtimeStyle.left=e.currentStyle.left,e.style.left=n||0,n=e.style.pixelLeft+"px",e.style.left=r,e.runtimeStyle.left=o,n):i}function u(e){if(e||(e=window.event),"string"==typeof e.data){var t=e.data.split("-");if("ActivateEurolandToolAutoSizeObject"==t[0]&&(2==t.length||3==t.length)){try{n=parseFloat(t[1]),o=!0}catch(r){return}3==t.length&&parseFloat(t[2])&&(a=!0),window.removeEventListener?window.removeEventListener("message",u):window.detachEvent("onmessage",u),g()}}}function g(){null==l&&i&&o&&(l=setInterval(function(){!function r(){var o,i,l=0;for(o=s.length;o--;)(i=parseFloat(s[o].offsetHeight)+e.marginOffset)>l&&(l=i);l!=t&&(t=l,window[a?"parent":"top"].postMessage('{ "iFrame" : { "height" : '+t+', "index" : '+n+" }}","*"))}()},30))}function c(e){var t=e.indexOf("#");return t>-1&&(e=e.substring(0,t)),e}this.scrollTo=function(e){if(o){var t={scrollTo:{index:n,scrollY:e}};("top"===e||"bottom"===e||"[object Number]"===Object.prototype.toString.call(e))&&window[a?"parent":"top"].postMessage(JSON.stringify(t))}},this.load=function(t){var n,o,l;if(window.postMessage&&(!r||!(r<8))&&window!=window.top){if(!e.marginOffset)try{e.marginOffset=parseFloat(f(document.body,"margin-top").replace("px",""))+parseFloat(f(document.body,"margin-bottom").replace("px",""))+20,isNaN(e.marginOffset)&&(e.marginOffset=20)}catch(a){e.marginOffset=20}for("string"!=typeof t&&("object"!=typeof t||("length"in t))?l=t:(l=[]).push(t),o=l.length;o--;)"string"==typeof(n=l[o])&&(n=document.getElementById(n)),"object"==typeof n&&null!=n&&window.parent!=window&&s.push(n);return!!s.length&&(i=!0,g(),!0)}},window.postMessage&&(!r||!(r<8))&&window!=window.top&&(window.addEventListener?window.addEventListener("message",u):window.attachEvent("onmessage",u))};