function assignOnClickForPDF() {
    linkDiv = document.getElementById("secondaryIntroCopy");
    if (linkDiv) {
        aLinks = linkDiv.getElementsByTagName("A");
        for (var i=0; i<aLinks.length; i++) {
            webtrendsOnclickForPDF(aLinks[i]);
        }
    }
}

function webtrendsOnclickForPDF(a) {
    var domain = "http://imagesoftdev.fiserv.com";
    var u = a.href;
    u = u.replace(domain,"");
    var ti = a.title;
    if ((u.indexOf(".pdf") != -1) && (u.indexOf("http") == -1)) { // if it is a relative URL and it references a PDF
        newhref = "/RegisterDownload.aspx?name=" + ti + "&path=" + u;
        a.href = newhref;
    }
}

function setMetaTagValue(name, value) {
   var found = 0;
   var metas = document.getElementsByTagName('meta');
   for (i = 0; i < metas.length; i++) {
     if (metas[i].getAttribute('name') == name) {
        metas[i].setAttribute('content',value);
        found = 1;
     }
   }
   if (found == 0) {
     var heads = document.getElementsByTagName('head');
     if (heads.length > 0) {
        var myMeta = document.createElement("meta");
        myMeta.setAttribute('name', name);
        myMeta.setAttribute('content',value);
        heads[0].appendChild(myMeta);
     }
   }
}
function getMetaTagValue(name) {
   var metas = document.getElementsByTagName('meta')
   for (i = 0; i < metas.length; i++) {
     if (metas[i].getAttribute('name') == name) {
        return metas[i].getAttribute('content');
     }
   }
return "";
}

function addMetaTagValue(name,value) {
    oldvalue=getMetaTagValue(name);
    if (oldvalue != "") {
        newvalue = oldvalue + ";" + value;
        setMetaTagValue(name,newvalue);
    } else {
        setMetaTagValue(name,value);
    }
}

function EventUtils() {
    throw 'RuntimeException: EventUtils is a static utility class';
}
EventUtils.addEventListener = function(target,type,callback,captures) {
    if (target.addEventListener) {
        target.addEventListener(type,callback,captures);
    } else if (target.attachEvent) {
        target.attachEvent('on'+type,callback);
    } else {
        target['on'+type]=callback;
    }
}