(function (w, d) { var winWidth, winHeight, adDeliverUrl = "http:\/\/w.unister-adservices.com\/", containerWidth = 300, containerHeight = 250, vcCookieUpdated = false; function on(el, type, fn, obj) { var handler = function (e) { fn(e || w.event, obj); }; if (el.addEventListener) el.addEventListener(type, handler, false); else if (el.attachEvent) el.attachEvent('on'+type, handler); } /** * Prevend default operation of an event * @param Event event */ function preventDefault(event) { event.returnValue = false; if (event.preventDefault) { event.preventDefault(); } } function getContainerVisibility(frame) { var rect = frame.getBoundingClientRect(), style, width, height, winWidth, winHeight; if (rect) { if (typeof w.innerWidth == "number") { winWidth = w.innerWidth; winHeight = w.innerHeight; } else if (d.documentElement && (d.documentElement.offsetWidth || d.documentElement.offsetHeight)) { winWidth = d.documentElement.offsetWidth; winHeight = d.documentElement.offsetHeight; } else if (d.body && (d.body.offsetWidth || d.body.offsetHeight)) { winWidth = d.body.offsetWidth; winHeight = d.body.offsetHeight; } if (rect.left <= 0) { width = Math.max(0, Math.min(rect.left + containerWidth, containerWidth, winWidth)); } else { width = Math.max(0, Math.min(winWidth - rect.left, containerWidth, winWidth)); } if (rect.top <= 0) { height = Math.max(0, Math.min(rect.top + containerHeight, containerHeight, winHeight)); } else { height = Math.max(0, Math.min(winHeight - rect.top, containerHeight, winHeight)); } } // check if hidden by CSS if (width || height) { if (w.getComputedStyle) { style = w.getComputedStyle(frame, null); } else if (frame.currentStyle) { style = frame.currentStyle; } else { style = frame.style; } if (style && (style.display == "none" || style.visibility == "hidden")) { width = height = 0; } } // Page Visibility API if (width || height) { if (typeof d.hidden !== "undefined" && d.hidden) { width = height = 0; } else if (typeof d.mozHidden !== "undefined" && d.mozHidden) { width = height = 0; } else if (typeof d.msHidden !== "undefined" && d.msHidden) { width = height = 0; } else if (typeof d.webkitHidden !== "undefined" && d.webkitHidden) { width = height = 0; } } return (width !== undefined && height !== undefined) ? {width: width, height: height} : undefined; } function getElementsByAttr(elmt, attrName) { if (!elmt.querySelectorAll) { return (function () { var rs = [], all = elmt.getElementsByTagName("*"), l = all.length, i = 0; for (; i < l; i++) { if (all[i].getAttribute && all[i].getAttribute(attrName)) { rs.push(all[i]); } } return rs; })(); } return elmt.querySelectorAll("[" + attrName + "]"); } function getAdvGroupIds(d) { var attrName = "data-advgroupid", entries = getElementsByAttr(d.body, attrName), entryLen = entries.length, entryPos = 0, advGroupId, advGroupIds = []; for (; entryPos < entryLen; entryPos++) { advGroupId = Number(entries[entryPos].getAttribute(attrName)); if (isFinite(advGroupId)) { advGroupIds.push(advGroupId); } } return advGroupIds; } function ready() { var domId = "cpc_1164951362999771844", e = d.getElementById(domId), to = 1, f, onload; if (!e) return; f = d.createElement('iframe'); f.src = "javascript:document.open(); document.domain='" + document.domain + "'; document.close();"; f.width = 300; f.height = 250; f.scrolling = 'no'; f.frameBorder = '0'; f.marginWidth = 0; f.marginHeight = 0; f.vspace = 0; f.hspace = 0; f.allowTransparency = true; e.appendChild(f); write2iframe(); function write2iframe() { try { if (f.contentDocument) { write2Document(f.contentDocument); return; } else if (f.contentWindow) { write2Document(f.contentWindow.document); return; } } catch (e) {} setTimeout(write2iframe, to++); } function write2Document(d) { d.open(); if (!d.getElementsByClassName) { d.getElementsByClassName = function(sClass) { var classPattern = new RegExp('(?:^|\\s)' + sClass + '(?:$|\\s)'), allElmts = d.all || d.getElementsByTagName('*'), rsElmts = [], elmt; for (var i=0; i < allElmts.length; i++) { elmt = allElmts[i]; if (elmt.nodeType == 1 && classPattern.test(elmt.className)) rsElmts.push(elmt); } return rsElmts; } } d.write("\r\n\r\n\r\n\r\n