/*******************************************************************************
____________________________ API DOCUMENTATION BEGIN ___________________________
````````````````````````````````````````````````````````````````````````````````
Variables and functions used throughout website.

````````````````````````````````````````````````````````````````````````````````
_____________________________ API DOCUMENTATION END ____________________________
*******************************************************************************/

//------------------------------------------------------------------------------
// VARIABLES BEGIN
//------------------------------------------------------------------------------

//------------------------------------------------------------------------------
// VARIABLES END
//------------------------------------------------------------------------------

//------------------------------------------------------------------------------
// METRICS BEGIN
//------------------------------------------------------------------------------

//FUNCTION-- metrics logic
function metricsManager(argAction) {
 switch(parseInt(argAction))
 {
  case 1: 
    //tracks yaz_website_coupon.pdf
    tagAction("http://switch.atdmt.com/action/denbxs_YasminPatientPrescribingInfoPDF_9/");
    break;
  case 2:    
    //tracks submit clicks on tools_support/e_reminders.jsp
    tagAction("http://switch.atdmt.com/action/denbxs_YasminPhysicianPrescribingInfoPDF_9/");
    break;
  default:
    alert("metricsManager: NO MATCHES FOUND");
 }
}

metricsArr = new Array(); //create array to hold image objects

//FUNCTION-- tags action
function tagAction(argSrc) {
 var dateObj = Date().replace(/\:/g, ""); //create date and remove colons
 dateObj = dateObj.replace(/\s/g, ""); //remove white space from date
 var imageObj = new Image(); //create image object
 imageObj.src = argSrc + "&date=" + dateObj; //append time stamp to image src as parameter to avoid image caching
 metricsArr.push(imageObj); //store the image object in an array
}

//------------------------------------------------------------------------------
// METRICS END
//------------------------------------------------------------------------------