var s_pageName=""
var s_server=""
var s_channel=""
var s_pageType=""
var s_prop1=""
var s_prop2=""
var s_prop3=""
var s_prop4=""
var s_prop5=""
var s_prop6=""
var s_prop7=""
var s_prop8=""
var s_prop9=""
var s_prop10=""
/* E-commerce Variables */
var s_campaign=""
var s_state=""
var s_zip=""
var s_events=""
var s_products=""
var s_purchaseID=""
var s_eVar1=""
var s_eVar2=""
var s_eVar3=""
var s_eVar4=""
var s_eVar5=""
var s_eVar6=""
var s_eVar7=""
var s_eVar8=""
var s_eVar9=""
var s_eVar10=""
var s_account=""

var url = document.location.href;

// 2008/06/25 Alka:: Omniture Tracking
// If the sort param is used, the value is captured in s_prop7 variable that appears in custom insight-7 report in omniture
if(typeof sortParam!="undefined" && typeof page!= "undefined" && typeof sessSortParamValue!="undefined")
{
	// If the sesssort value and current are same, there is no change in sort drop down
	// Hence, we capture value only when previous sort and current sort differ
	if(sessSortParamValue.value!=sortParam.value)
	{
		if(sortParam.value=="")
		{
			s_prop7 = "SortSelect-->pubtype";
		}
		else
		{
			s_prop7 = "SortSelect-->"+sortParam.value;
		}
	}
}

// 2008/06/25 Alka:: Omniture Tracking
// If the sort param is used, the value is captured in s_prop8 variable that appears in custom insight-8 report in omniture
if(typeof resultType!="undefined" && typeof page!= "undefined" && typeof sessResultypeValue!="undefined")
{
	// If the prevresulttype select value and current are same, there is no change in type select drop down on result page
	// Hence, we capture value only when previous prevresulttype select and current prevresulttype select differ
	if(sessResultypeValue.value!=resultType.value)
	{
		if(resultType.value=="")
		{
			s_prop8 = "TypeSelect-->All";
		}
		else
		{
			s_prop8 = "TypeSelect-->"+resultType.value;
		}
	}
}

function setToGEIndustrialAccount()
{
	// 2008/06/25 Alka:: Omniture Tracking
	// Set the page name depending on the url so that the page name appears in omniture accordingly
	if( (url.indexOf("/pubLibResult.jsp?src=treeSearch&famId=0&keyword=whatsnewsearch")!= -1) )
	{
		s_pageName= "WhatsnewSearch";
		s_eVar1= "WhatsnewSearch";
	}
	if (url.indexOf("/pubLibResult.jsp?type=pubType&search=Renewal%20Parts&src=leftnav")!= -1) 
	{
		s_pageName= "Renewal Parts Publications";
		s_eVar1= "Renewal Parts Publications";
	}
	if (url.indexOf("/pubLibResult.jsp?src=treeSearch&famId=p9999&prdTypeId=p9999")!= -1) 
	{
		s_pageName= "Program and Promotional Publications";
		s_eVar1= "Program and Promotional Publications";
	}

	// Set the account so that depending on dev/staging or prd url, tracking in omniture is in their respective suites
	if ((url.indexOf("teamsite-cwc-review.indsys.ge.com") != -1) || (url.indexOf("www-test.geindustrial.com") != -1))
	{ 
		  s_account = "devge"; 
	}
	else
	{
		s_account="geindustrial";
	}
}

// 2008/06/25 Alka:: Omniture Tracking
// If a search is performed, then capture the searchtext and search type in omniture
// s_prop10 will capture the value to the Custom insight-10 and s_prop9 will capture to custom insight-9
// s_prop10 is captured as all those search values for which no results were found 
// s_prop9 is captured as all those search values for which some results were found 

if(typeof searchtext!= "undefined" && typeof page!= "undefined" && typeof captureSearch!= "undefined")
{
	var searchtypeValue = searchtype.value;
	// capturesearch will check if the search is captured as many times as Go clicks and not when the result page is navigated.
	if(captureSearch.value=="Clicked")
	{
		// The tracking is to be done only for the pub,catalog,pubtype and keyword searches
		if(searchtypeValue=="pub" || searchtypeValue=="catalog" || searchtypeValue =="keyword" || searchtype.value == "pubType")
		{
			if(typeof noresultsfound!= "undefined")
			{
				s_prop10=searchtypeValue+"search-->"+noresultsfound.value; // noresults found search value in s_prop10 variable
			}
			else
			{
				s_prop9= searchtypeValue+"search-->"+searchtext.value; // results found
			}
		}
	}
}