﻿//For click tags that are set up only once
//Copy the flowing and fill the empty spaces 
/*
NON-PDF LINKS: UNIQUE
onclick="dcsMultiTrack('DCS.dcsuri','','WT.ti','','WT.cg_n','','WT.si_p','','WT.cg_s','');"

NON-PDF LINKS: SAME URL/MULTIPLE TIMES
onclick="setTimeout('wtMultiClick(\'EVENTNAME\')');" target="_blank"

PDF LINKS: UNIQUE
onclick="setTimeout('dctsMultiTrack('DCS.dcsuri','','WT.ti','','WT.cg_n','','WT.si_p','','WT.cg_s','')', 500);"

PDF LINKS: SAME URL/MULTIPLE TIMES
onclick="setTimeout('wtMultiClick(\'EVENTNAME\')', 500);" target="_blank"
*/

//For Clicktags that are coded multiple times 
function wtMultiClick(eventName) {
    
    /*Note: Add variables using names and identifiers from first 2 rows of 
    WebTrends tagging.XLS provided by SA or SEO
    */
    var destinationUrl = "";    //DCS.dcsuri
    var eventName = "";         //WT.ti
    var contentGroup = "";      //WT.cg_n
    var contentSubGroup1 = "";  //WT.si_p
    var contentSubGroup2 = "";  //WT.cg_s
    
    /*Note: For pdf downloads Set time out for the tracking code execution..
    This allows for the pdf to open in a NEW WINDOW, but the tracking code is executed        after the setTimeOut limit is reached.
    EX: setTimeout('webtrendsTracking(\'pdf_pi\')', 500);
    */ 
    switch (eventName) {
        //Prescribing Info Link
        case eventName:
            destinationUrl = "http://pi.shirecontent.com/?product=Vyvanse&country=usa&language=eng";
            eventName =  "PDF_PI";
            contentGroup = "Shirecontent";
            contentSubGroup1 = "PDF";
            contentSubGroup2 = "PDF";
        break;
        //Medication Guide
        case eventName:
            destinationUrl = "http://pi.shirecontent.com/?product=Vyvanse&country=usa&language=eng";
            eventName =  "PDF_MedicationGuide";
            contentGroup = "Shirecontent";
            contentSubGroup1 = "PDF";
            contentSubGroup2 = "";
        break;
        //Shire Corporate Site
        case eventName:
            destinationUrl = "http://www.shire.com/";
            eventName =  "Offsite_Shire";
            contentGroup = "Shirecontent";
            contentSubGroup1 = "Shire";
            contentSubGroup2 = "Shire";
        break;
        
            
            
        default:
            //do nothing;
            break;
    }//end of switch
    
    //Passes info to webtrends function for click tags
    _tag.dcsMultiTrack( 
    'DCS.dcsuri', destinationUrl, 'WT.ti', eventName, 'WT.cg_n', contentGroup, 'WT.si_p', contentSubGroup1, 'WT.cg_s', contentSubGroup2
    );
    
}//end of function

