(function () { var isMSIE = /*@cc_on!@*/false; var config = { widgetId: 203, widgetWidth: 296, widgetHeight: 180, locale: "en_GB", widgetType: "HTML", linksThrough: false, fileName: "gridLivePricePoll", websiteUrl: "www.igmarkets.co.uk", sourceUrl: "http://www.igmarketspartners.com:80/opp", basePath: "/widget/images/pairs/", siteId: "igm", lastUpdateTime: Math.random() } var accessDenied = function() { var message = document.createElement('div'); message.innerHTML = "

Permission denied

You can't stream prices into this domain

"; document.body.appendChild(message); }; var formatters = { image : function() { var imageFile = config.sourceUrl + config.basePath + config.fileName; var image = document.createElement('IMG'); if (container.firstChild.tagName == 'A') { lnStyle = container.firstChild.style; lnStyle.textIndent = "-5000px"; lnStyle.display = "block"; lnStyle.position = "absolute"; lnStyle.top = "0"; lnStyle.left = "0"; lnStyle.width = config.widgetWidth + 'px'; lnStyle.height = config.widgetHeight + 'px'; lnStyle.background = "url(" + config.sourceUrl + "/widget/images/spacer.gif)"; } image.src = imageFile; container.parentNode.insertBefore(image, container); }, html : function() { var pdStyle = container.style, lnStyle = container.firstChild.style, iframe, ifStyle; pdStyle.position = "relative"; pdStyle.width = config.widgetWidth+'px'; pdStyle.height = config.widgetHeight+'px'; if (container.firstChild.tagName == 'A') { container.firstChild.style.display = 'none'; } iframe = document.createElement('IFRAME'); iframe.scrolling = "no"; iframe.height = config.widgetHeight + 'px'; iframe.width = config.widgetWidth + 'px'; iframe.frameBorder = 0; iframe.border = 0; iframe.src = config.sourceUrl + '/widgets/' + config.widgetId + '?rnd=' + config.lastUpdateTime; if (isMSIE) { iframe.style.filter = "Chroma(Color = #FFFFFE)"; iframe.setAttribute('allowTransparency', true) ; } else { iframe.setAttribute('allowtransparency', true) ; } ifStyle = iframe.style; ifStyle.border = "none"; container.appendChild(iframe); }, flash : function() { if (container.firstChild.tagName == 'A') { lnStyle = container.firstChild.style; lnStyle.textIndent = "-5000px"; lnStyle.display = "block"; lnStyle.position = "absolute"; lnStyle.top = "0"; lnStyle.left = "0"; lnStyle.width = config.widgetWidth + 'px'; lnStyle.height = config.widgetHeight + 'px'; lnStyle.background = "url(" + config.sourceUrl + "/widget/images/spacer.gif)"; } var urlConstant = "http://igindex.vo.llnwd.net/o28/limelight-ftp/onlinemarketdata/"; var filePath = urlConstant + config.siteId + "/" + config.locale + "/" + config.fileName; var fileBase = urlConstant + config.siteId + "/" + config.locale + "/"; if (isMSIE) { var ieHtmlStr = ''; ieHtmlStr += ''; ieHtmlStr += ''; ieHtmlStr += ''; var spanObj = document.createElement("SPAN"); spanObj.innerHTML = ieHtmlStr; container.parentNode.insertBefore(spanObj, container); } else { var flashObj = document.createElement("OBJECT"); flashObj.type = "application/x-shockwave-flash"; flashObj.width = config.widgetWidth; flashObj.height = config.widgetHeight; flashObj.data = filePath + ".swf"; var param = document.createElement("param"); param.name = "movie"; param.value = filePath + ".swf"; flashObj.appendChild(param); param = document.createElement("param"); param.name = "wmode"; param.value = "transparent"; flashObj.appendChild(param); param = document.createElement("param"); param.name = "base"; param.value = fileBase; flashObj.appendChild(param); var imgObject = document.createElement("IMG"); imgObject.src = filePath + ".gif"; imgObject.width = config.widgetWidth; imgObject.height = config.widgetHeight; flashObj.appendChild(imgObject); container.parentNode.insertBefore(flashObj, container); } } }; var container = document.getElementById("realTimePrices"); if (!container) { try { IG.warn("Cannot load real time prices"); } catch (e) { } return; } var inProviderDomain; try { var dummy = top.document.location; inProviderDomain = true; } catch(e) { inProviderDomain = false; } if (!inProviderDomain && config.linksThrough) { var firstChildHref = (container.firstChild.href).replace(/http:\/\//, '' ); firstChildHref = firstChildHref.replace(/https:\/\//, '' ); firstChildHref = firstChildHref.replace(/\//, '' ); if ((container.firstChild.tagName != 'A') || (firstChildHref != (config.websiteUrl))) { accessDenied(); return; } } formatters[config.widgetType.toLowerCase()](); if (window.ig_widget_loading) { window.ig_widget_loading = false; } })();