/* javascript for Omniture */
/* SiteCatalyst code version: H.19.3. Copyright 1997-2009 Omniture, Inc. More info available at http://www.omniture.com *//* You may give each page an identifying name, server, and channel on the next lines. */
s.server = "www.arbys.com";

if (s.getQueryParam("transaction") == "search"){//for search result page
	s.prop12 = s.getQueryParam('city')=="" ? "no value" : s.getQueryParam('city');
	s.prop13 = s.getQueryParam('stateProvince')=="" ? "no value" : s.getQueryParam('stateProvince');
	s.prop14 = s.getQueryParam('postalCode')=="" ? "no value" : s.getQueryParam('postalCode');
	s.prop15 = s.getQueryParam('recordId')=="" ? "no value" : s.getQueryParam('recordId');
	if (s.prop15 != "no value"){
		s.prop16 = "store#";
	}else if (s.prop14 != "no value"){
		s.prop16 = "postal code";
	}else if (s.prop13 != "no value"){
		s.prop16 = "city/state";
	}

	if (s.getQueryParam('search3')=='1'){
		s.prop17 = "breakfast";
	}else{
		s.prop17= "none";
	}

	s.prop18=Math.floor((document.getElementById('resultsTbl').getElementsByTagName('tr').length+1)/2).toString();
	s.prop18 = s.prop18=="0" ? "zero" : s.prop18;
}else if (s.getQueryParam("transaction") == "route"){// for driving directions page
	function padLeft(str,lenght){   
	  if(str.length >= lenght)   
	   return str;   
	  else  
	   return padLeft("0" +str,lenght);   
	} 
	s.events = "event8";
	s.eVar19 = "driving directions";
	s.eVar20 = "Unit #" + padLeft(s.getQueryParam("destrecordId"),5);
}else if (s.getQueryParam("transaction") == "locmap"){// for map detail page
	s.events = "event8";
	s.eVar19 = "map";
	s.eVar20 = s.getQueryParam("name");
}

/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/
var s_code=s.t();if(s_code)document.write(s_code)
/* End SiteCatalyst code version: H.19.3. */

