var originUrl= "http://www.dfwme.org/embed"; var http = location.protocol; var slashes = http.concat("//");var host = slashes.concat(window.location.hostname); function sendFrameMessage (receiver) { receiver.contentWindow.postMessage("includeURL__" + host, "http://www.dfwme.org/embed"); } var addFun = function(){ if (!document.getElementById('egl_campaignlists_6f6f478bd919142be0a3')) { var element = document.createElement('div'); element.id = 'egl_campaignlists_6f6f478bd919142be0a3'; var child = document.getElementById('ewl_embed_script_6f6f478bd919142be0a3'); var parent = child.parentNode; parent.insertBefore(element, child); } var divWidth = parseInt(document.getElementsByTagName("div")["egl_campaignlists_6f6f478bd919142be0a3"].offsetWidth); var leftRightWidth = parseInt(0); divWidth = (divWidth - leftRightWidth); document.getElementById("egl_campaignlists_6f6f478bd919142be0a3").innerHTML = "";}; if (window.addEventListener) { window.addEventListener("load", addFun); } else if (window.attachEvent) { window.attachEvent("onload", addFun); } function receiveSize(e){ eOrigin = e.origin; var strRegExPattern = "\\b"+eOrigin+"\\b"; if (originUrl.match(new RegExp(strRegExPattern,"g"))) { var frame = document.getElementById("egl_giving_frame_6f6f478bd919142be0a3"); if (frame) { var message = e.data.toString(); ; if (message.match(/offset/)) { var parts = message.split("_"); var addToTop = frame.offsetParent.offsetTop + frame.offsetTop; window.scrollTo(parts[1], parseInt(parts[2]) + addToTop); } else { frame.style.height = e.data + "px"; } } } } if (window.addEventListener){ window.addEventListener("message", receiveSize,false); } else { window.attachEvent("onmessage", receiveSize); }