Inking over misconceptions
22.05.12
Function getAdCookie(name) {
var regex = new RegExp(name + "=(.*?)(; |&|$)", "gi");
var value = regex.exec(document.cookie);
if (value && value.length == 3) {
value = value[1];
} else {
value = "";
}
return value;
}
function getFrameDocument(fr) {
var doc = fr.contentWindow || fr.contentDocument;
if (doc && doc.document) {
doc = doc.document;
}
return doc;
}
function closeDoc(doc) {
doc.close();
}
function closeOpenDocuments(openDocs) {
for (var i=0;i < openDocs.length; i++) {
closeDoc(getFrameDocument(document.getElementById(openDocs[i])))
}
}
function isIE()
{
return /msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent);
}
function setHash (element, hash) {
if(element.hash) {
element.hash = element.hash + "," + hash;
} else {
element.hash = hash;
}
}
function renderIFAd(holderID, adID, srcUrl, width, height, hash) {
setHash(document.getElementById(holderID), hash);
document.dcdAdsR.push(adID);
if (ie) {
var sizePart = srcUrl.substring(srcUrl.indexOf("sz=")+3);
sizePart = sizePart.substring(0, sizePart.indexOf(";"));
var multiSizes = sizePart.split(",");
var minSize = multiSizes[0];
if (multiSizes.length >
Source: Sydney Morning Herald