/*  Filename:     AdMetrics.js
    Author:       Sixten Otto <sixten@resultsdirect.com>
    Date Created: 08/18/06

    Intent:
      Script code used by the ad space display.

    Revision History:

  =================================================================== */

if (typeof(RDCMS) == 'undefined') {
  RDCMS = {};
}

if (typeof(RDCMS.AdMetrics) == 'undefined') {
  RDCMS.AdMetrics = {};
}

RDCMS.AdMetrics.click = function( theLink )
{
  // use this opportunity to invoke any other onclick handling
  
  // open the banner destination in a new window
  window.open(theLink.href,theLink.id);
  
  // cancel the normal click
  return false;
};

RDCMS.AdMetrics.loadFlash = function( src, adId, clickTag, width, height )
{
  var so = new SWFObject(src, "RDCMSadFlash"+adId, width, height, "7", "");
  so.addVariable("clickTAG",clickTag);
  so.write("RDCMSad"+adId);
};


