// omniture.js

function setToolsOmnitureParams (param) {				
	
	var toolsFrame = window.frames["emailFrame"];
	if (param != "email") toolsFrame = window.frames["testdriveFrame"];
	
	
	s.pageName ="";// toolsFrame.s.pageName;
	s.pageType = toolsFrame.s.pageType;
	
	s=s_gi(s_account);
	s.linkTrackVars='channel,eVar4,eVar12,eVar45,eVar15,eVar16,prop5,prop12,prop14,prop15,prop16'; 
	s.linkTrackEvents=''; 
	s.events = toolsFrame.s.events;
	
	s.channel = toolsFrame.s.channel;
	s.eVar4 = toolsFrame.s.eVar4;
	s.eVar12 = toolsFrame.s.eVar12;
	s.eVar14 = toolsFrame.s.eVar14;
	s.eVar15 = toolsFrame.s.eVar15;
	s.eVar16 = toolsFrame.s.eVar16;
	
	s.prop5 = param;	
	s.prop12 = toolsFrame.s.prop12;
	s.prop14 = toolsFrame.s.prop14;
	s.prop15 = toolsFrame.s.prop15;
	s.prop16 = toolsFrame.s.prop16;	
	
	//s.tl(this,'o',param);


}


function setTD1OmnitureParams () {		
	
	toolsFrame = window.frames["testdriveFrame"];
	s.pageName = toolsFrame.s.pageName;
	s.pageType = toolsFrame.s.pageType;
	
	
	s.events = toolsFrame.s.events;
	
	s.channel = toolsFrame.s.channel;
	s.eVar4 = toolsFrame.s.eVar4;
	s.eVar12 = toolsFrame.s.eVar12;
	s.eVar14 = toolsFrame.s.eVar14;
	s.eVar15 = toolsFrame.s.eVar15;
	s.eVar16 = toolsFrame.s.eVar16;
	
	s.prop5 = '';	
	s.prop12 = toolsFrame.s.prop12;
	s.prop14 = toolsFrame.s.prop14;
	s.prop15 = toolsFrame.s.prop15;
	s.prop16 = toolsFrame.s.prop16;	
		
	var s_code=s.t();if(s_code)	document.write(s_code);

}

function setQuoteOmnitureParams () {		
	
	toolsFrame = window.frames["dealerQuoteFrame"];
	
	s.pageName = toolsFrame.s.pageName;
	s.pageType = toolsFrame.s.pageType;	
	
	s.events = toolsFrame.s.events;
	
	s.channel = toolsFrame.s.channel;
	s.eVar4 = toolsFrame.s.eVar4;
	s.eVar12 = toolsFrame.s.eVar12;
	s.eVar14 = toolsFrame.s.eVar14;
	s.eVar15 = toolsFrame.s.eVar15;
	s.eVar16 = toolsFrame.s.eVar16;
	
	s.prop5 = '';	
	s.prop12 = toolsFrame.s.prop12;
	s.prop14 = toolsFrame.s.prop14;
	s.prop15 = toolsFrame.s.prop15;
	s.prop16 = toolsFrame.s.prop16;		
	
	try {
		var s_code= s.t();if(s_code)	document.write(s_code);
		//var s_code= toolsFrame.s.t();if(s_code)	document.write(s_code);
	}
	catch (e) {	
		//s.pageName = "vcus: rfq: step 1";
		//var s_code= s.t();if(s_code)	document.write(s_code);
		var s_code= toolsFrame.s.t();if(s_code)	document.write(s_code);
	}
	
}

function setQuote2OmnitureParams () {
	
	s.pageName = "vcus: rfq: step2";	
	//parent.s = s;
	var s_code= s.t();if(s_code)	document.write(s_code);
}

function setTDOmnitureParams () {	
	s.pageName = "vcus: b&p: test drive step2";	
	var s_code=s.t();if(s_code)	document.write(s_code);
}

function setPrintSummaryOmnitureParams(pageName, param, obj) {


	s.pageName="";
	s.eVar18 = ""; s.eVar19 = ""; s.eVar20 = ""; s.eVar21 = ""; s.eVar23 = ""; 
	s.eVar25 = "";	s.eVar28 = "";	s.prop18 = ""; s.prop20 = "";	
	s=s_gi(s_account);
	s.linkTrackVars='channel,eVar4,eVar12,eVar14,eVar15,eVar16,prop5,prop12,prop14,prop15,prop16'; 
	s.linkTrackEvents=''; 
	
	s.events = "";

	s.prop5 = param;
	
	
	s.tl(obj,'o',param);
}

function setToolsFrameOmnitureParams (param) {
	
	s.pageName = s.pageName;
	s.server = s.server;
	s.channel = s.channel;
	s.eVar4 = s.eVar4;
	s.eVar14 = s.eVar14;
	s.eVar15 = s.eVar15;
	s.prop14 = s.prop14;
	s.prop15 = s.prop15;
	
	s.pageType = s.pageType;
	s.prop12 = s.prop12;
	s.prop16 = s.prop16;
	
	s.events = s.events;
	s.eVar12 = s.eVar12;
	s.eVar16 = s.eVar16;
	
	//if (toolsForm.eVar18 && toolsForm.eVar18 != null) parent.s.eVar18 = toolsForm.eVar18.value;
	//if (toolsForm.prop18 && toolsForm.prop18 != null) parent.s.prop18 = toolsForm.prop18.value;
	
	
	var s_code=s.t(); if(s_code) document.write(s_code);
}
function setEmailOmnitureParams () {
	s.pageName = "vcus: b&p: email config step1";
	s.eVar10="";
	s.events="";
	s.eVar18="";
	s.eVar19="";
	s.eVar20="";
	s.eVar21="";
	s.eVar23="";
	s.eVar25="";
	s.prop20="";
	s.prop18="";
	s.eVar28 ="";
	s.channel="b&p";
	
	var s_code=s.t(); if(s_code) document.write(s_code);
}

function setSummaryEmailOmnitureParams () {
	s.pageName = "vcus: b&p: email config step1";
	s.eVar10="";
	s.events="";
	s.eVar18="";
	s.eVar19="";
	s.eVar20="";
	s.eVar21="";
	s.eVar23="";
	s.eVar25="";
	s.prop20="";
	s.channel="b&p";
	
	var s_code=s.t(); if(s_code) document.write(s_code);
}
function setTestDriveOmnitureParams () {
	s.pageName = "vcus: b&p: test drive step1";
	s.eVar18 = "";
	s.prop18 = "";
	var s_code=s.t(); if(s_code) document.write(s_code);
}

function setDlrSearchOmnitureParams(param, obj) {
	s=s_gi(s_account);
	s.linkTrackVars='channel,eVar4,eVar12,eVar14,eVar15,eVar16,prop5,prop12,prop14,prop15,prop16'; 
	s.linkTrackEvents=''; 
	s.events = document.forms["omniture"].events.value;
	
	s.channel = document.forms["omniture"].channel.value;
	s.prop5 = param;
	s.prop14 = document.forms["omniture"].prop14.value;
	s.prop15 = document.forms["omniture"].prop15.value;
	s.prop12 = document.forms["omniture"].prop12.value;
	s.prop16 = document.forms["omniture"].prop16.value;
	s.eVar4 = document.forms["omniture"].eVar4.value;
	s.eVar12 = document.forms["omniture"].eVar12.value;
	s.eVar14 = document.forms["omniture"].eVar14.value;
	s.eVar15 = document.forms["omniture"].eVar15.value;
	s.eVar16 = document.forms["omniture"].eVar16.value;
	s.tl(obj,'o',param);
	
	
}

function setOmnitureParams (pageName, param, obj) {

	window.onunload=null;
	s.pageName="";		
	s=s_gi(s_account);	
	
	if (param.indexOf("find dealer") >= 0){	
		s.linkTrackVars='events,channel,eVar4,eVar12,eVar14,eVar15,eVar16,prop5,prop12,prop14,prop15,prop16'; 				
		s.linkTrackEvents='event1';
		s.evar18=""; s.eVar19=""; s.eVar20=""; s.eVar21=""; s.eVar23="";
		s.events = 'event1';
	}
	else {
		s.linkTrackVars='channel,eVar4,eVar12,eVar14,eVar15,eVar16,prop5,prop12,prop14,prop15,prop16'; 	
		s.linkTrackEvents=''; 
		s.events = document.forms["omniture"].events.value;
	}	
	
	
	s.channel = document.forms["omniture"].channel.value;
	s.prop5 = param;
	s.prop14 = document.forms["omniture"].prop14.value;
	s.prop15 = document.forms["omniture"].prop15.value;
	s.prop12 = document.forms["omniture"].prop12.value;
	s.prop16 = document.forms["omniture"].prop16.value;
	s.eVar4 = document.forms["omniture"].eVar4.value;
	s.eVar12 = document.forms["omniture"].eVar12.value;
	s.eVar14 = document.forms["omniture"].eVar14.value;
	s.eVar15 = document.forms["omniture"].eVar15.value;
	s.eVar16 = document.forms["omniture"].eVar16.value;
	
	s.tl(obj,'o',param);
	
}

function setPrintOmnitureParams(param,obj) {
	
	s.pageName = "";
	s=s_gi(s_account);
	s.linkTrackVars='channel,eVar4,eVar12,eVar14,eVar15,eVar16,prop5,prop12,prop14,prop15,prop16'; 
	s.linkTrackEvents=''; 
	
	s.channel = document.forms["printomniture"].channel.value;
	s.eVar4 = document.forms["printomniture"].eVar4.value;
	s.eVar12 = document.forms["printomniture"].eVar12.value;
	s.eVar14 = document.forms["printomniture"].eVar14.value;
	s.eVar15 = document.forms["printomniture"].eVar15.value;
	s.eVar16 = document.forms["printomniture"].eVar16.value;
	s.prop5 = param;
	s.prop12 = document.forms["printomniture"].prop12.value;
	s.prop14 = document.forms["printomniture"].prop14.value;
	s.prop15 = document.forms["printomniture"].prop15.value;
	s.prop16 = document.forms["printomniture"].prop16.value;

	
	s.tl(obj,'o','b&p: summary print');
	
	}
