// Crohns & Me js call
// by Allistar D. Peters for HBD inspired by n8g
// 

//STARTING CIMZIA Tab
function popUp1Item1()	
{
	//replace with correct link when ready to deployed
	return '/crohns-disease/cimzia-crohns-disease/cimzia-medication-guide.aspx';  
	
	//tracking URL can be implemented here
}

function popUp1Item2()	
{
	//replace with correct link when ready to deployed
	return '/crohns-disease/cimzia-crohns-disease/cimzia-dosing-information/';  
	
	//tracking URL can be implemented here
}

function popUp1Item3()	
{
	//replace with correct link when ready to deployed
	return '/crohns-disease/treatment-of-crohns-disease/crohns-biologic-treatments/';  
	
	//tracking URL can be implemented here
}

function popUp1Item4()	
{
	//replace with correct link when ready to deployed
	return '/crohns-disease/crohns-symptoms/treatment-for-crohns-disease.aspx';  
	
	//tracking URL can be implemented here
}

//NOT GETTING THE RELIEF YOU NEED? Tab
function popUp2Item1()	
{
	//replace with correct link when ready to deployed
	return '/crohns-disease/crohns-symptoms/';  
	
	//tracking URL can be implemented here
}

function popUp2Item2()	
{
	//replace with correct link when ready to deployed
	return '/crohns-disease/crohns-symptoms/default.aspx#flexadmin';  
	
	//tracking URL can be implemented here
}

function popUp2Item3()	
{
	//replace with correct link when ready to deployed
	return '/crohns-disease/cimzia-crohns-disease/cimzia-dosing-information/';  
	
	//tracking URL can be implemented here
}

function popUp2Item4()	
{
	//replace with correct link when ready to deployed
	return '/cimplicity';  
	
	//tracking URL can be implemented here
}

function popUp2Item5()	
{
	//Low Rate Injection
	return '/crohns-disease/crohns-symptoms/default.aspx#lowrate';  
	
	//tracking URL can be implemented here
}

//Cimpay Barker
function barker1()	
{
	//replace with correct link when ready to deployed
	return '/cimplicity';  
	
	//tracking URL can be implemented here
}

//Crohns Advocate Barker
function barker2()	
{
	//replace with correct link when ready to deployed
	return '/crohns-disease/crohns-disease-support/';  
	
	//tracking URL can be implemented here
}

//Trust My Gut Kit Barker
function barker3()	
{
	//replace with correct link when ready to deployed
	return '/crohns-disease/registration/crohns-relief.aspx';  
	
	//tracking URL can be implemented here
}

function trackModule(linkName, vidstate) {

	//if (window.writeDivs) {
		/* Create Output Variable and pass to "output_text" */
		//var outputParams = [linkName, vidstate];
		//var output_text = outputParams;
		//writeDivs(output_text);
	//} else {
		//alert("function does not exist");
	if (vidstate == undefined) {
	    _gaq.push(['_setAccount', 'UA-8847764-2'], ['_trackEvent', 'Cimzia CD - Video', linkName, vidstate]);
	     //_gaq.push(['_trackEvent', 'flash', 'linkName']);
	     var thelink = '/crohns-disease/flash/' + linkName + '.htm';
	} else {
	    _gaq.push(['_setAccount', 'UA-8847764-2'], ['_trackEvent', 'Cimzia CD - Video', linkName, vidstate]);
	      //_gaq.push(['_trackEvent', 'flash', 'vidstate', 'linkName']);
	      var thelink = '/crohns-disease/flash/' + linkName + '/' + vidstate + '.htm';
	}
	
	dcsMultiTrack('DCS.dcsuri', thelink, 'WT.ti', 'cdhomepagemodule', 'WT.si_n', 'cdhomepagemodule');
}

function trackVidstate(vidName, vidstate)
{
	var thelink = "";
	if(vidName == "") {
	    _gaq.push(['_setAccount', 'UA-8847764-2'], ['_trackEvent', 'Cimzia CD - Video', vidName, vidstate]);
		//_gaq.push(['_setAccount', 'UA-8847764-2'], ['_trackEvent', 'cdhomepagemod', vidstate]);
	    thelink = '/crohns-disease/flash/' + vidstate + '.htm';
	} else if (vidstate == null || vidstate == "") {
	    _gaq.push(['_setAccount', 'UA-8847764-2'], ['_trackEvent', 'Cimzia CD - Video', vidName, vidstate]);
		//_gaq.push(['_setAccount', 'UA-8847764-2'],['_trackEvent', 'cdhomepagemod', vidName]);
	    thelink = '/crohns-disease/flash/' + vidName + '.htm';
	} else {
	    console.log("vidName=" + vidName + ",vidstate=" + vidstate);
	    _gaq.push(['_setAccount', 'UA-8847764-2'], ['_trackEvent', 'Cimzia CD - Video', vidName, vidstate]);
		//_gaq.push(['_setAccount', 'UA-8847764-2'],['_trackEvent', 'cdhomepagemod', vidstate, vidName]);
		thelink = '/crohns-disease/flash/' + vidName + '/' + vidstate + '.htm';
	}
	dcsMultiTrack('DCS.dcsuri', thelink, 'WT.ti', 'cdhomepagemodule', 'WT.si_n', 'cdhomepagemodule');
}


