	// Requires  s_code*.js and eval-latency.js
var scvki_bver = 'b1.2.1';
var strURLHostName = unescape(document.location.hostname);			// 20100526
var strURLPathName = unescape(document.location.pathname);
var strURLQuery = unescape(document.location.search);
var strFullurl = unescape(document.location.href);
var objPathing = {};
var errorCollection = {}; //new Array;
var DELIMITER = ':';
var HIER_DELIMITER = ';'; // must always be a SEMI-COLON (per SC's Admin configuration) even if different DELIMITER 
var gstrFormName; // for login form and form tracking
var JOIN_FORM_NAME = 'signupForm';	// Must be updated if the join form name changes in the application
var isFromJoin = false;	// 100705 - set flag instead of checking for event1 following changes to form success event handling

	// See scvki_faSuccessfulSubmit. List of forms and events not catered for by the scenarios in scope:
	// Syntax ON_CUSTOM_FORM_EVENTS = '<formName>;<eventN>[[,<formName>;<eventN>]...]'
	// ON_CUSTOM_FORM_EVENTS is used by the scvki_fa* functions
var ON_CUSTOM_FORM_EVENTS = 'contactUsForm;event6,casinoCouponRedemption;event7';
_scvki_setCustomForms();

function scvki_onEveryPage(strCity, strStateProvRegion, strCountry,
                        strPlayerType, strLoginStage, strLineGroup,
                        strBMCG,  strHostName,
                        strFormName, strCustomPageName, strChannel, strBettingLinesHier1) {

		
			// Login Success difficult to determine because landing page could be any. 
			// So, see scvki_onLoginClick() 
		var strLIC;
		if (strLIC = _scvki_getSetLoginCookie('', true)) {
			scvki_faSuccessfulSubmit(strLIC);
			strPlayerType = 'player';
			strLoginStage = 'loggedin';
			//_scvki_setLoginCookie('', true);
		}
		
		   // ***MANDATORY*** Values for the location must be provided - needs to be called early on since other values use these GEO values
	   scvki_setGeoFromIp(strCity, strStateProvRegion, strCountry);

		   // ***OPTIONAL*** Only use to manually specify a custom page name for this page
		   // otherwise we don’t need to call this as the scvki_sendPage() function does it
		   // internally.
	   scvki_setPageName(strCustomPageName);

		   // ***OPTIONAL*** Only use to manually specify the channel associated with this page
		   // otherwise we don’t need
		   // to call this as the scvki_sendPage() function does it internally.
	   scvki_setChannel(strChannel);

		   // Set on every page where strPlayerType is either ‘player’ or ‘non-player’
		   // and strLoginStage can be either 'loggedout' (default), 'loggedin','successful login'
		   // or 'joining'.  Also uses strLoginStage as 'joined' to send dedicated successful join event
		   // 100705 After changing logic to set player on strLoginStage ==  joined, became critical that scvki_setPTS preceds scvki_setPNP, so call was moved here
		   // 100705 Also need to persist non-player status immediately after a join by one
	   strPlayerType = scvki_setPTS(strPlayerType, strLoginStage); // 100705 

		   // ***MANDATORY*** To set the status of this pages’s visitor.
		   // Values are either 'player' or 'non-player'
		   scvki_setPNP(strPlayerType);

		   // ***MANDATORY*** To set the player line group, either “s” for sharp
		   // or “r” for retail
	   scvki_setPLG(strLineGroup);

		   // ***MANDATORY*** This sets the Player Group
		   // (and replaces the manual setting of s.prop7)
	   scvki_setBMCG(strBMCG);

		   // ***OPTIONAL*** Only use to manually specify the server associated
		   // with this page otherwise we don’t need to call this as the
		   // scvki_sendPage() function does it internally.
	   scvki_setServer(strHostName);

		   // ***OPTIONAL*** Only use to manually set hier1 on every page if a hier is being set at all.
		   // otherwise we don’t need to call scvki_setCustomHier.
	   if (strBettingLinesHier1) scvki_setCustomHier(strBettingLinesHier1, 'hier1'); 
	   
		   // ***MANDATORY*** Always the last function to call - not called on on-page events.
		   // Parameters are optional, strCustomPage name and strFormName only need to be
		   // provided if we need to set a custom page name and track the form we came from.
		   // 100705 - If strFormName is not passed eVar28 will be set to 'Pages without forms' to prevent events from being attributed to submitted forms 
       scvki_sendPage(strCustomPageName, strFormName);

}

/*	Sets s.pageName to either an explicit name (eg 'Poker Home Page') or to a cleansed URL
	Issues:
		- change from existing pageNaming and break historic comparison
		- drop certain query parameters for not identifying the page and resulting in identical pages being reported multiple times
		- drop lower casing (currently seems to be inconsistently applied.  Server is case sensitive so case should not be changed
		- could s.pageName have been set before
	Only time s.pageName is set outside this function is in scvki_send404ErrorPage()
*/
function scvki_setPageName(strPageName) {
	if (strPageName && (s.pageName !== strPageName)) {
		s.pageName = strPageName;
	} else if (s.pageName) { 
		return;
	} else {
			// Strip known, unwanted params and report unknown params
		var strCleanedQuery = _scvki_cleanQueryString();
		s.pageName = 'http://' + strURLHostName + strURLPathName + (strCleanedQuery ?  '?' : '') + strCleanedQuery;	// 20100526 Added 'http://' + strURLHostName
	}
}	

function _scvki_cleanQueryString() {

	var aryQuery;
		// string must start and end with a ,
	var removeParams = ',JSESSIONID,_flowExecutionKey,_flowId,_ult_url_params,acct,action,couponCode,DAY,eml,eventid,EXTERNAL_,handcount,height,id,igintlnk,IGNetwork,INSTRUMENT_NUMBER,LEDGER_CODE,lineID,logout,m,machID,mid,nextPage,paymentId,PHPSESSID,pxp,realBalanceTag,referer,referrer,requestedURL,srp,sso,ticket,token,';
	var toRemove;
	var aryQueryNew = new Array;
	var strUnknowns = '';
	var knownParams = _scvki_knownParams().toLowerCase();

	aryQuery = strURLQuery.substring(1).split('&');
	removeParams = removeParams.toLowerCase();
	
	for (key in aryQuery) {
		if (typeof(aryQuery[key]) == 'string') {
			elmArray = aryQuery[key].split('=');
			strParam = elmArray[0].toLowerCase();
								// params names that are URLs http & https
				toRemove  = (strParam.search(/^[?&]?https?:\/\//i) !== -1) 
							||
							(removeParams.indexOf(',' + strParam + ',') !== -1);
					
				if (!toRemove && strParam) {
					aryQueryNew.push(strParam + '=' + (elmArray[1] ? elmArray[1] : ''));
					if (knownParams.indexOf(',' + strParam + ',') == -1) strUnknowns += (strUnknowns ? ',' : '') + strParam;
				}
		}
	}
	
	if (strUnknowns) s.prop24 = strUnknowns;
	
	return aryQueryNew.join('&');
}

function _scvki_knownParams() {
		// for ease, string must start and end with a ,
return ',add,addbonus,adds,ae,amount,ap,backtoRaces,bodoglive,bonus,box,breakdown,cashout,channel,confId,date,denom,Exact,exitURL,filter,forReal,from,fromClient,gameDefCode,gameID,I,intbnr,j,jb,l,loc,message,METHOD,noMenu,num,out,p,roundRobinType,timePeriod,title,tld,type,wagerType,';
}

/*	Sets s.channel based on the sub-domain.
	Issues:
		- www should also be identified and tracked as a channel for complete numbers
	strChannel override is provided mainly for the download client so 
	function will be called as scvki_setChannel('Download Client')
	s.prop2 is being retained for historic purposes and set in the same manner as before
*/
function scvki_setChannel(strChannel) {
	if (strChannel && (s.channel !== strChannel)) {
		s.channel = strChannel;
		s.prop2 = strChannel;
	} else if (s.channel) { 
		return;
	} else {
		if (strFullurl.search(/\/(account|casinoacct|sportsbook\/app)\//)  !== -1) {
			s.channel = 'account';
		} else {
			 var ptnGetChannel = /^[^.]*/
			 var foundChannel = document.location.hostname.match(ptnGetChannel)[0];
			 // look for a match in the list of supported channels (as per WPD-643), if not matching, default to 'www'
			 if (foundChannel.search(/account|cashier|casino|friends|horses|live|poker|sports|sportsbook/) !== -1) {
				 s.channel = foundChannel;
			 }
			 else {
			     s.channel = 'www';
			 }
		}
	}
		// Override for consistency
	if (s.channel == 'sports') {
		s.channel = 'sportsbook';
		s.prop2 = 'sportsbook';
	}
	
	_scvki_setEvarOnce('eVar1', s.channel);
		
		// Save the channel for _scvki_ChannelJoins if it's neither  www or account or if it's not been recorded in this visit yet
	if (s.channel.search(/www|account/) !== -1 || !s.c_r('scvki_prevchan')) s.c_w('scvki_prevchan', s.channel, dt30Mins); // 100505 // 100705 Changed expiry to dt30Mins and added account so Joins not associated with it's own channel (account)
}	

function scvki_setServer(strHostName) {
	// note the dependancy on scvki_getDomainName in thin latency script
	s.server = scvki_getDomainName(strHostName);
	return s.server;
}


	/*	Records Player Status as being 'player' or 'non-player'
	*	Was scvki_setPlayerNonPlayer(strPlayerStatus (!)
	*/
function scvki_setPNP(strPS) {
	s.prop3=strPS || 'Unspecified'; 
	_scvki_setEvarOnce('eVar6', s.prop3);	// Sets s.eVar6 = s.prop3
	if (s.eVar6) {
		s.eVar5 = _scvki_join(s.eVar6, s.eVar13);			// Geo-Country + Player/Non-Players  100507
		s.eVar7 = s.eVar6;									// 20100526 - Player / Non-Players (attributes to value at start of visit)
	} else {
		s.eVar5 = '';				// 100705 Need to clear eVar5 and eVar7 in case events are sent while they are still active if call is from scvki_PTS()
		s.eVar7 = '';				
	} 
	
	objPathing.prop4 = 's.prop3'; // 20100526 was strPS;
}

	/*	Records PlayerLineGroup
	*	Was scvki_setPlayerLineGroup(strLineGroup) (!)
	*	strLG is either 's' or 'r'
	*/
function scvki_setPLG(strLG) {
	if (strLG.search(/[sr]/) == -1) strLG = 'Unknown PLG:' + strLG;
	s.prop5 = strLG
	objPathing.prop6 = 's.prop5'; // 20100526 was strLG
}

	/*	Records Book Manager Client Group
	*	Was scvki_setBookManagerClientGroup (!)
	*/
function scvki_setBMCG(strBMCG) {
	s.prop7=strBMCG
	objPathing.prop8 = 's.prop7'; // 20100526 was strBMCG;
}


	/* 	scvki_faFormStart(strFormName)
	 *	// 100705 Limits the life-time of eVar28 to the the visitor's use of the form 
	 *		so is cleared when the user submits successfully or is expired (in SC config) when visitor abandons the form
	 * 	Must be called when the form when the form is loaded and can be called repeatedly while the form is current (eg on Submit, on Error, on ValidationComplete
	 * 	Called from within scvki_sendPage() but this function is exposed in the case that the form is instantiated after 
	 * 		the page loads e.g. in a light box or unhidden div
	*/	
function scvki_faFormStart(strFormName) {
	var strCookieName = 'eVar28_special';

		// 100705 Must set event8 (join start) on initial form start here in faFormStart
	if (JOIN_FORM_NAME == strFormName) _scvki_getSetEventOnce('event8'); // Join Start only to be fired once per session
			
		// 100705 Must clear strFormName from eVar28 cookie so it can be resent when form is re-entered (eg. multiple Deposits or Contact Us in the same visit)
		// 100705 Must also set eVar28 to a value such as 'Pages without forms' so that events such as PageViews (event9) etc do not get attributed to forms already submitted.
	strFormName = strFormName || 'Pages without forms';	
	if (gstrFormName !== strFormName) {
		gstrFormName = strFormName;
		s.eVar28 = gstrFormName;	
		s.eVar28 = _scvki_setEvarOnce('eVar28', s.eVar28, flt30Mins, strCookieName)	// 100705 eVar28 now set for 30 mins	
	}
}


	/* 	The following function is called from within the error handling code 
	 * 		or in code generated by server side validation.
	 * 	The function is called once for each error message 
	 * 		scvki_faValidationError('frmDeposit', 'Credit Card', 'Invalid');	
	*/	
function scvki_faValidationError(strFormName, strFieldName, strErrorKeyWord) {	

	scvki_faFormStart(strFormName);
	errorCollection[strFieldName] = s.apl(errorCollection[strFieldName], strErrorKeyWord, ',', 2);
	s.sendFormEvent('e', '', strFormName, strFieldName + ': ' + strErrorKeyWord);
}


		/* scvki_faOnValidationComplete() - called once upon validation completing (successfully or not) or where validation would have completed if no validation performed
		* 		- if both client and server side validation occurs, scvki_faOnValidationComplete() is called only when all validation is completed
		*		- never called before form is submitted
		*	strFormIdOrObject	-	(string/object) Either the HTML form id as a string or the form object.
		*	strFormName			-	(string) HTML  form name
		*/
function scvki_faOnValidationComplete(strFormIdOrObject, strFormName) {	// 100705 , stop_faSubmit no longer required
	var al = 0;
	var strError = '';

	scvki_faFormStart(strFormName);
	
	for (key in errorCollection) {
		strError = s.apl(strError, key + ': ' + errorCollection[key], '|', 2);
		al++;
	}
	s.eVar30 = strFormName + '(' +  strError + ')';														// 100705
	s.eVar29 = strFormName + ': ' + al;	// even if 0 so report will show context
	
	if (al) s.events = s.apl(s.events, 'event14', ',', 2);	
	
		// Login success could occur on any page so uses Login Cookie to track.
		// On form error, could be a login error and so must delete the cookie in case it exists
	if (al) _scvki_getSetLoginCookie('', true);
	
	scvki_faOnAllSubmitAttempts(strFormIdOrObject, strFormName, strFormName + ' Submit Attempts');

		// 100705 - must clear eVar29 or instance counts will be wrong - was already sent in scvki_faOnAllSubmitAttempts and must not be resent on further data sends (eg onEveryPage)
	s.eVar29 = '';
}
		/*	Reports each submit attempt by the visitor
		// Calling scvki_faOnAllSubmitAttempts:
		//	- must be called only once per submit 
		//	- problem is where there is both client and server side and client side passes
		//	So it's called only from scvki_faOnValidationComplete() which is always called once upon validation complete
		// 		- if both client and server side validation occurs, scvki_faOnValidationComplete() is called only when all validation is completed
		*	
		*	strFormIdOrObject	-	(string/object) Either the HTML form id as a string or the form object.
		*	strFormName			-	(string) HTML  form name
		*	strDescription		- 	(string) optional description of the attempt.  Defaults to strFormName + ' Submit Attempts'
		* 	// 100705 - no longer required due to _scvki_REsetLinkTrackVars() str_eVars	-	(string) optional comma delimited list of eVars to be sent with the Submit Attempt event
		*/
var aryTSs = [];	
function scvki_faOnAllSubmitAttempts(strFormIdOrObject, strFormName, strDescription) {
	var strFormIdOrObject = _scvki_getElementByIdOrName(strFormIdOrObject, strFormName);
	var d = new Date;

	var al;
	aryTSs.push(d.getTime());
	al = aryTSs.length;
	
	if (1 == al || aryTSs[al-1] - aryTSs[al-2] > 350) {					// 100705 - prevent multiple fires from the same form instance
		s.events = s.apl(s.events, 'event20', ',', 2);	
		
		strDescription = strDescription || (strFormName + ' Submit Attempts');
		_scvki_s_tl(strFormIdOrObject, s.events, '', 'o', strDescription);
	}
	
}

/*
	Reports the number of form submit attempts, both Failed and Successful.
	
	 Client-Side Validation:
	 		Call scvki_faSuccessfulSubmit just before the form submits after all JS validation has passed.
	 Server-Side Validation:
	 		Do not call Call scvki_faSuccessfulSubmit until the successful response is received from the server
			In the Mar 2010 phase, no distinction is made between JS type form validation errors received from
			the server and true back-end errors (eg account already exists, declines) 
	// 100705 stop_faSubmit - no longer used because scvki_faOnAllSubmitAttempts now only called from scvki_faOnValidationComplete()
*/	
function scvki_faSuccessfulSubmit(strFormName, strFormIdOrObject) {	// 100705 , stop_faSubmit no longer required

	s.sendFormEvent('s', '', strFormName);
	
	strFormIdOrObject = _scvki_getElementByIdOrName(strFormIdOrObject, strFormName);
	
		// to cater for forms that are not for the scenarios in scope, set ON_CUSTOM_FORM_EVENTS
	var rePattern = new RegExp(strFormName + ';(event\\d+)');
	var strEvent = rePattern.exec(ON_CUSTOM_FORM_EVENTS);

	if (strEvent) {
		strEvent = strEvent[1];
		s.events = s.apl(s.events, strEvent, ',', 2);
		_scvki_s_tl(strFormIdOrObject, s.events, '', 'o', strFormName) // 100705 eVar29 (errors) removed - not relevant on successful submit
	}

	// 100705  scvki_faOnAllSubmitAttempts(strFormIdOrObject, strFormName, ('Successful Submits of ' + strFormName)); //  no longer called from here scvki_faSuccessfulSubmit
	
}

function _scvki_setCustomForms() {
	var strForms = ON_CUSTOM_FORM_EVENTS.replace(/;event\d+,?/g, ',');
	s.formList = strForms + s.formList;
}


	/*	Called in the onclick event of the submit button of the login form
	*	
	*/
function scvki_onLoginClick(strFormName) {
	_scvki_getSetLoginCookie(strFormName || gstrFormName);
}

function _scvki_getSetLoginCookie(strFormName, isErrorOrDelete) {
	var expiry = 0;
	
	if (isErrorOrDelete) {
		expiry = (new Date(1));
	}
	if (!strFormName) strFormName = s.c_r('scvki_lic');
		// write or delete the cookie:
	s.c_w( 'scvki_lic', strFormName, expiry);
	return strFormName;
}

	/*	Records Player's True Status
	*	Was scvki_setPlayersTrueStatus(strPriorPlayerStatus, strLoginStage) (!)
	*	
	*/
function scvki_setPTS(strPriorPS, strLoginStage) {
	s.prop12 = 'Unknown PTS'
	
		// Immediately after a join, strPriorPS == 'player' but we want the join to be attributed to 'non-player' 20100526
		// 100705 We also need to delay changing eVar6 from 'non-player' so will return strPriorPS to change the value before calling setPNP()
	if ('player' == strPriorPS && 'joined' == strLoginStage) {
		strPriorPS = s.c_r('scvki_eVar6') || 'non-player';
	}
	
	if ('player' == strPriorPS) {
		switch (strLoginStage) {
			case 'loggedin':			// player is logged in
				s.prop12='True Player';
				break;
			case 'loggedout':			// player is logged out
				s.prop12='True Player';
				break;
			case 'successful login':	// previously identified player logs in successfully 
				s.prop12='True Player';
				break;
			case 'joined':
				s.prop12='Joined Player';
				break;
			case 'joining':				// previously identified player Joins or attempts to Join (function called after join page submit) 
				s.prop12='False Player (joining)';
				break;
			default :
				s.prop12='Login Stage Unknown'; // player or non-player
		}
	}
	else if ('non-player' == strPriorPS) {
		switch (strLoginStage) {
			case 'loggedin':			// non-player is logged in - should not be possible
				s.prop12='Status Error: Non-Player has logged in';  //~
				break;
			case 'successful login':	// visitor logs in successfully and was identified as a NON-player before logging in
				s.prop12='False Non-Player';
				s.events = s.apl(s.events, 'event11', ',', 2)	// append Non-player login event to ,list event if not already there 2=ci
				break;
			case 'joining':				// player Joins successfully or attempts to Join (on submitting a join page)
				s.prop12='True Non-Player';
				break;
			case 'joined':
				s.prop12='Non-Player Joined';
				break;
			default :
				s.prop12='Apparent Non-Player'; // player or non-player
		}
	}
	// 100705 Must set event8 on initial form start so moved following to scvki_faFormStart() if ('joining' == strLoginStage) _scvki_getSetEventOnce('event8'); 
		
		// 100705
	if ('joined' == strLoginStage) {
		_scvki_getSetEventOnce('event1');	// Should be impossible to join twice but .... although one player can log out and allow a buddy to join but atypical
		_scvki_ChannelJoins();
		scvki_setPNP(strPriorPS);			// 100705 Need to call scvki_setPNP now so events can be attributed to eVar5, eVar6, eVar7.  Will be cleared in next call to scvki_setPNP 		
			// 100705 - need to fire the event now because not fired by FormAnalysis Plugin as it should			
		_scvki_s_tl(JOIN_FORM_NAME, s.events, '', 'o', 'Successful Join');
		isFromJoin = true; // 100705 	replaces checking for event1 in gavki_TrackGA()
		_scvki_getSetEventOnce('event8', -1);	// 100705 - In order to keep joins as accurate as possible, allow Join Starts and Joins to refire after a successful join
		_scvki_getSetEventOnce('event1', -1);
	}
		
		/* 
		Set eVar16 only if its value has changed so  eVar16 instances = number of times the status changed
		if no _scvki_setEvarOnce, count would be meaningless
		However, if the visitor has just joined, we want to retain that value throughout the visit
		*/
	var strPreviousPTS = s.c_r('scvki_eVar16_PTS');
	if (strPreviousPTS.search(/Joined Player|Non-Player Joined/) == -1)  	// 100705 previously just matched 'Joined Player' 
		s.eVar16 = _scvki_setEvarOnce('eVar16', s.prop12, flt30Mins, 'scvki_eVar16_PTS');
	else
		s.c_w('scvki_eVar16_PTS', strPreviousPTS, dt30Mins);				// Refresh cookie 2010526 100705 Was 'Joined Player', now strPreviousPTS

		// 	s.prop13 pathing
	objPathing.prop13 = 's.prop12';	//  concat value for pathing 
	
	return strPriorPS;
}

	/*	Records the channel from which a visitor joins
	*	e.g. sportsbook, horses, etc
	*	Was _scvki_JoinedFromChannels (!)
	*/ 
function _scvki_ChannelJoins() {
	var strPrevChan = s.c_r('scvki_prevchan');
	if (strPrevChan) s.eVar9 = strPrevChan;
}


function scvki_setDepositorStatus(strAction) {

		// Terminology	- props count the values eg how many 'Deposit Starts'
		//				- eVars record facts and accumulate other event counts for the rest of the visit (or for n months) until the value changes
		//					- so, eVars can describe the visitor and track the behaviour of, say, people who tried but could not submit a valid credit card
		//					- and separate their behaviour from that of 'Sucessful Depositors'
		//				- SC also tracks the number of times a value was submitted in an eVar (as Instances)
		//	Using _scvki_setEvarOnce at the end of the function because we want to count the number of people that started rather than 
		//	the number of times a depositor started (we have that from a count of the s.prop14)
	switch (strAction) {
		case 'start':		// Upon a Player beginning a Deposit - Deposit Landing Page
			if (document.referrer.search(/\/deposit\//) == -1) {
				s.prop14='Deposit Starts';
				s.eVar17='Deposit Starters';
				s.events = s.apl(s.events, 'event2', ',', 2);
			}
			break;
		case 'validation_error':		// After JavaScript validation failure without a page refresh or upon server returning errors
			s.prop14='Invalid Depositor Submits';
			s.eVar17='Invalid Deposit Submitters';
			_scvki_s_tl(true, s.events, '', 'o', 'Deposit Validation Error')
			break;
		case 'validation_pass':		// Upon a Player submitting a deposit form sucessfully. 
			s.prop14='Depositors Submits';	
			s.eVar17='Deposit Submitters';
			break;
		case 'deposit_declined': // Upon a Player completing a deposit unsucessfully - Payment does not go through
			s.prop14='Depositor Declines';
			s.eVar17='Failed Deposit Submitters';
			s.events = s.apl(s.events, 'event19', ',', 2);
			break;
		case 'deposit_success':		// Upon a Player completing a deposit sucessfully
			s.prop14='Sucessful Deposits';
			s.eVar17='Sucessful Depositors';
			s.events = s.apl(s.events, 'event18', ',', 2);
			break;
		case 'deposit_pending':		// Upon a Player completing a deposit but Gateway does not provide an answer now
			s.prop14='Pending Deposits';
			s.eVar17='Depositors in Waiting';
			break;
		default:		// None is having Transactions credited to it which may result from an unknown Action // 100507
			s.prop14='Unknown Deposit Action:' + strAction;
			s.eVar17='Unknown Depositor Action:' + strAction;
			break;
	}
	s.eVar17 = _scvki_setEvarOnce('eVar17', s.eVar17, flt30Mins);	// Only set if changed 

}

/*	
	Sets State and Zip for eCommerce Transactions (Deposits)
	Must be called on each page of the eCommerce process except	on the page that 
	records the transaction, since this function is called from within scvki_RecordTransaction()
	Values for strState, strZip:	1) use Depositors Shipping State and Zip or 
									2) use account state and zip if not part of transaction data or 
									3) use GEO IP if no other values available
*/
function scvki_setStateZip(strState, strZip) {
		// Was to be done via SAINT but needs to be done via custom on-page code
		// Alternate fields can be created via Saint
	if (!strState)
		s.state = strState;
	else
		if (strZip) s.zip = strZip;
}

	// this list was obtained from ga.js.  Although it can change, it does not change often.
	// The most important/popular search engines are already in the list
var searchEnginesGA= "images.google:q,google:q,yahoo:p,msn:q,bing:q,aol:query,aol:encquery,lycos:query,ask:q,altavista:q,netscape:query,cnn:query,looksmart:qt,about:terms,mamma:query,alltheweb:q,gigablast:q,voila:rdata,virgilio:qs,live:q,baidu:wd,alice:qs,yandex:text,najdi:q,aol:q,club-internet:query,mama:query,seznam:q,search:q,wp:szukaj,onet:qt,netsprint:q,google.interia:q,szukacz:q,yam:k,pchome:q,kvasir:q,sesam:q,ozu:q,terra:query,nostrum:query,mynet:q,ekolay:q,search.ilse:search_for,rambler:words";

function scvki_getSEngineAndKeywords (strReferrer) {
	strReferrer = strReferrer || document.referrer;
	
	var rd = scvki_getDomainName(strReferrer);	// func in eval-latency.js
	rd = rd.substring(rd.indexOf('.'), rd.lastIndexOf('.')-rd.indexOf('.'));

	if (searchEnginesGA.indexOf(rd) !== -1) {
		searchEnginesGA = searchEnginesGA.replace(/:/g, ',');
		searchEnginesGA = searchEnginesGA.split(',');
		
		var l = searchEnginesGA.length;
		for (var i=0 ; i < l ; i+=2) {
			if (searchEnginesGA[i] == rd) {
				var strEngine = searchEnginesGA[i];
				var strKeyWords = s.getQueryParam(searchEnginesGA[i+1], '', strReferrer);
				return [strEngine, strKeyWords];
			}
		}
	}
}


var arySEngineAndKeywords = scvki_getSEngineAndKeywords();
function scvki_setKeyWords() {
	if (arySEngineAndKeywords) {
		s.prop16 = arySEngineAndKeywords[1];
		s.prop17 = (s.prop16.toLowerCase().indexOf('dog') !== -1) ? 'Branded' : 'Non-Branded';
		s.prop18 = _scvki_join(s.prop17, s.prop16);				// Concat branded with keywords - not for pathing
		objPathing.prop19 = _scvki_join(s.prop17, s.prop16);	// concatted value stored for pathing 
		
		s.eVar22 = _scvki_D('s.prop16');	// record all instances - no getValOnce() 20100526 Added _scvki_D()
		s.eVar23 = _scvki_D('s.prop17');	// 20100526 Added _scvki_D()
		s.eVar24 = _scvki_D('s.prop18');	// 20100526 Added _scvki_D()
	}
}

function scvki_send404ErrorPage() {
		// NOTE: Only called on 404 error pages
		// The only function called on a 404 error Page
	s.pageType = 'errorPage';
	s.pageName = '';
	
	var strPageName = '/error404' + document.location.pathname + document.location.search;
	gavki_TrackGA(strPageName);
	
		// Since  scvki_sendPage()  is not called on error pages, this function must transmit
		// Transmit "macro" page info (includes pageName) (s.tl() for "micro" transmit without pageName)
	var s_code=s.t();
	if(s_code)document.write(s_code);
	s_code='';
	s.pageType = '';
	s.events = '';
}

function scvki_onReferredAfriend() {
	s.events = s.apl(s.events, 'event5', ',', 2); 
}
function scvki_setCustomHier(val, strHierVar) {
		// For all occasions where Hier needs to be set to a custom value, must be done via this method
		// WARNING: Function must not be called if val is empty.
		//			Assumes that if it is called, a value must be set so an empty val is an error
		// strHierVar defaults to 'hier1'
		// Hier elements must be delimited with HIER_DELIMITER (SEMI-COLON)
		// (per SC's Admin configuration) even if DELIMITER is different
	strHierVar = strHierVar || 'hier1';
	val = val || 'Hierarchy value missing on ' + strURLHostName + strURLPathName;
	s[strHierVar] = val;
}


function scvki_onBettingAction(strAction, strBetType, strBettingLinesHier1) {

	var strEvent = '';
	
	if (!(strAction && strBetType && strBettingLinesHier1)) return;
	
	switch (strAction) {
		case 'create':
			strEvent = 'scAdd'; break;
		case 'place':
			strEvent = 'purchase'; break;
		case 'update':
			strEvent = 'scCheckout'; break;
	}
	
	s.events = s.apl(s.events, strEvent, ',', 2); 
	s.products=';' + strBetType + ';1;0.01';

	scvki_setCustomHier(_scvki_makeHierarchy('sportsbook', 'wager', strAction, strBetType, strBettingLinesHier1),
						'hier1'
						);
}


	// the last function call on page load
	// NOTE: Not called on 404 error pages
	// This sets the last of the variables and sends the gif request to Omniture
	// strPageName is, optionally, the name given to the page. Left blank if the page is not explicitly named.
	// Pass the name of a form to strFormName if page contains a tracked form 
	// but only when the form is first loaded, meaning:
	// NOTE: strFormName is NOT passed a value when the form is returned with server-side errors.  
	// NOTE: strFormName IS passed if the visitor reloads the page containing the form.  
	// On unnamed pages when passing false, pass '' to strPageName
function scvki_sendPage(strPageName, strFormName)  {

	scvki_setKeyWords();
	      //WPD-269: Site Catalyst original referrer override if we come from a redirection (see eval-latency.js for variable ini).
	    if(strOriginalReferrer) {
        	s.referrer = strOriginalReferrer;
        } else {
         	s.referrer=s.getQueryParam('screferrer');
         	if (!s.referrer) s.referrer = s.c_r('screferrer');
        }
	
	scvki_setServer();
	scvki_setChannel();
	
		// 100705 Changed scvki_eVar38rcy to scvki_DSLVrcy - needs to be different cookie and added s.prop28
	s.prop28 = s.getDaysSinceLastVisit('scvki_DSLVrcy');
	s.eVar38 = _scvki_setEvarOnce('eVar38', s.prop28, flt30Mins, 'scvki_eVar38rcy'); // 100705  from 0 to flt30Mins		& from s.getValOnce

	s.prop25 = s.getNewRepeat();					 				 // 100705  added prop25 
	s.eVar25 = _scvki_setEvarOnce('eVar25', s.prop25, flt30Mins, 'scvki_eVar25_nr'); // 100705  from 0 to flt30Mins		& from s.getValOnce
	
	_scvki_setCampaign();
	
		// hier1 reserved for 'Betting Lines'
	s.hier2 = _scvki_D(_scvki_makeHierarchy('s.channel', 's.prop3', 's.prop5'));

	s.prop27 = 'D=g'; //strFullurl; 20100526
	s.hier3 = _scvki_makeHierarchy(s.channel, _scvki_getFolderN(1), _scvki_getFolderN(2), s.pageName);  
	s.hier4 = _scvki_D(_scvki_makeHierarchy('s.prop26', 's.channel', 's.pageName')); // Entry page ; channel ; page
	s.hier5 = _scvki_D(_scvki_makeHierarchy('s.prop17', 's.prop16', 's.prop26', 's.channel', 's.pageName')); // (non)branded;Keyword; Entry page ; channel ; page
	
		// last thing before we send the data is to remove serialization if s.purchaseID has been set
	if (s.purchaseID)
		s.events = s.events.replace(/:[^,]*/g, '');
		
	scvki_setPageName(strPageName);	
	// if (strFormName) 	// 100705 Call scvki_faFormStart even if strFormName is not passed - see why in scvki_faFormStart()
	scvki_faFormStart(strFormName);
	
	
	_scvki_Pathing();		// Set all pathing variables now that s.pageName is definitely final
	
	// There is probably a better way of detecting flash version, particularly in IE
	s.maxFlashVersion=9; 
	s.prop10 = s.detectFlash('s_fv');
	
	sc_reportReferrers();
	
		// s.events will already have been set
		// Transmit "macro" page info (includes pageName)
	_scvki_setEvarOnce('eVar50', scvki_elver + '/' + scvki_scver +  '/' + scvki_bver);
	
	var s_code=s.t();
	if(s_code) document.write(s_code);

}

	/*	Hook for future implementation
	* 	Can be called from JS generated by the backend when it's able to identify V's without a change to this code.
	*/
function scvki_setV() {
 	s.prop15 = 'V';
	s.eVar18 = _scvki_setEvarOnce('eVar18', s.prop15, flt30Mins, 'scvki_eVar18');
}


function scvki_setGeoFromIp(strCity, strStateProvRegion, strCountry) {
	if (strCountry) {
		s.prop20 = strCity;
		s.prop21 = strStateProvRegion;
		s.prop22 = strCountry;
		
		var strGEO = strCity + ',' + strStateProvRegion + ',' + strCountry;
	} else {
		strGEO = s.c_r('scvki_eVar131415');
	}
	
	if (strGEO) {
		var setEvars = _scvki_setEvarOnce('strGEO', strGEO, flt30Mins, 'scvki_eVar131415'); // 100705  s.getValOnce to _scvki_setEvarOnce and  from 0 to flt30Mins
		
		strGEO = strGEO.split(',');
		s.prop20 = strGEO[0];
		s.prop21 = strGEO[1];
		s.prop22 = strGEO[2];
		objPathing.prop23 = 's.prop22';
		
		if (setEvars) {
			s.eVar13 = strGEO[0];
			s.eVar14 = strGEO[1];
			s.eVar15 = strGEO[2];
			
			if (s.eVar6) s.eVar5 = _scvki_join(s.eVar6, s.eVar13);
		}
	}
}

/*
	Called on Thankyou page or receipt page when transaction is complete and user is shown the details of the transaction
	Transactions currently only include deposits
	Parameters:
		strTransactionID        		- a unique id that refers to the transaction  - 
		strForm                 		-  'Deposit' ???
		strPayGw			- Name of the Gateway provider/ Deposit Method
							- Sample values are:
							Moneybookers, Click2Pay, eWallet, NetTeller, Bank Wire, Paysafe, Rapid Transfer
							or if only generic types are known use:
							Debit Card, Credit Card, Money Transfer or 'Generic'
						
		strDepType			- The Credit Card Type (m/c, visa, etc) or other payment type (eCheck, etc) used in the transaction

		curRev 				- the gross amount in dollars and cents of the transaction
		strState, strZip	- 1) use Depositors Shipping State and Zip or 
							- 2) use account state and zip if not part of transaction data or 
							- 3) use GEO IP if no other values available
		isRepeat			Has this player deposited before
*/
function scvki_RecordTransaction(strTransactionID, strForm, strPayGw, strDepType, 
								 curRev, curName, strState, strZip, isRepeat
								) {

	var str_events = '';
	curRev = curRev ? curRev : '0.01';
	if (curName) s.currencyCode = curName;
	
		// Set Payment Provider
	_scvki_setPayGw(strPayGw, strDepType);
	
		// Omniture's Conversion Variable Syntax is used:
		// 'Category' product channel
		// 'Product' = Deposit or ???
		// Designated eVars also used to identify To and From Partners and Retailers
		// This allows for Viewing products in revenue and shopping cart based reports while also allowing metrics to be viewed by in custom reports
		// to show the relationsihps between From and To programs

		// syntax: s.products=category;product;qty;price;event_inc
	var strPurchasedProducts =  ';'  + strForm +  ';' + 1 +  ';' + curRev;//  +  ';' + str_events; 
	s.products = s.apl(s.products, strPurchasedProducts, ',', 2); 

	if (strState || strZip) scvki_setStateZip(strState, strZip);
	
	// Not decided if required but this is completely internal to this wrapper:
	// _scvki_fireSerializedEvent(strForm, 'event ', true); 
	s.events = s.apl(s.events, 'purchase', ',', 2);		// purchase doesn't need Id because serialized by s.purchaseID ...
	s.purchaseID = strTransactionID + '';
	
	if (typeof(isRepeat)== 'boolean') s.eVar3 = (isRepeat ? 'Repeat' : 'First') + ' Deposits';
		// Seems like this is not always being called upon successful deposit because some units are being credited to None  100507
	scvki_setDepositorStatus('deposit_success');
}

	// ******************
	// The following functions are all "internal", general utility functions.  
	// ******************
function _scvki_persistProp(strProp, value, days, strCookieName) {
	strCookieName =  strCookieName || 'scvki_' + strProp;
	days = (days || days === 0) ? days : flt30Mins;		// 100705 - changed default from 0 (session) to flt30Mins
	
	s[strProp] = s.getAndPersistValue(value, strCookieName, days);
	
	return s[strProp];
};

	// For consistent concatenating with delimiter 
function _scvki_join(v1, v2) {
	return (v1 ? v1 : '') + 
			DELIMITER + 
		   (v2 ? v2 : '');
}

function _scvki_Pathing() {
	for( key in objPathing ) {
		s[key] = _scvki_D(_scvki_join(objPathing[key], 's.pageName'), DELIMITER);	// 20100526
		if (!s[key]) s[key] = _scvki_join(objPathing[key], s.pageName);
	}
}

/*
 * Plugin: getFolderN v0.1 - parse URL and return folder n
 * 0 returns root ("").  Out of range n's return blank.
 * replaces SC's which returns "undefined" which appears in reports and freaks out non-technical users
 */
function _scvki_getFolderN (n, strPathName) {
	var p = strPathName || document.location.pathname; 
	return p.substring(0, p.lastIndexOf('/')).split('/')[n]||'';
}

function _scvki_makeHierarchy(v1, v2) {
	var args = Array.prototype.slice.call(arguments);
	return args.join(HIER_DELIMITER);
};

function _scvki_D(strVars, strD) {
	strD = strD || HIER_DELIMITER;

		// Do the vars qualify for D=?  String may only contain variable names and delimiters
	var strTest = strVars.replace(/s\.(prop\d+|eVar\d+|channel|pageName|campaign)/g, '');
	var rePattern = new RegExp(strD, 'g');
	strTest = strTest.replace(rePattern, '');
	
		// If all variable names and delimiters are removed, the string should be empty or it does not qualify
	if (!strTest) {
	
			// Replace the basic variables first s.propN, s.eVarN, etc
		strVars = strVars.replace(/s\.prop(\d+)/g, 'c$1');
		strVars = strVars.replace(/s\.eVar(\d+)/g, 'v$1');
		strVars = strVars.replace(/s\.channel/g, 'ch');
		strVars = strVars.replace(/s\.pageName/g, 'pageName');
		strVars = strVars.replace(/s\.campaign/g, 'v0');
	}
		
		// Now construct the strings so that the delimiters are included as expressions - "  + ';' + "
	rePattern = new RegExp('(' + strD + ')(c\\d+|v\\d+|ch|pageName)', 'g');
	strVars = strVars.replace(rePattern, '+"' + strD +'"+$2' );

	rePattern = new RegExp('(c\\d+|v\\d+|ch|pageName)(' + strD + ')', 'g');
	strVars = strVars.replace(rePattern, '$1+"' + strD +'"+' );
	
	if (strTest)  return '';
	else return 'D=' + strVars;
}

function _scvki_s_tl(obj, strEvents, str_eVars, strType, strDescription) {
		// 100705 _scvki_s_tl no longer requires str_eVars to be passed
	s.events = strEvents || s.events;
	
	_scvki_REsetLinkTrackVars();	// 100705 instead of str_eVars we need to build/manage all the eVars via s.linkTrackVars
	
	if (s.events) {
		s.linkTrackVars = s.linkTrackVars == 'None' ? '' : s.linkTrackVars;
		s.linkTrackVars = s.apl(s.linkTrackVars, 'events', ',', 2);
	}
	
	/*
	if (str_eVars) {
		s.linkTrackVars = s.linkTrackVars == 'None' ? '' : s.linkTrackVars;
		s.linkTrackVars = s.apl(s.linkTrackVars, str_eVars, ',', 2);
	}
	*/
	
	s.linkTrackEvents = strEvents;
	
		// Not decided if required but this is completely internal to this wrapper:
	// _scvki_fireSerializedEvent(strEvents);
	
	strType = strType ? strType : 'o';		//o =  other aka custom
	strDescription = strDescription ? strDescription : '';
	
		// Send event
	obj = obj || true;
	s.tl(obj, strType, strDescription);
	
	_scvki_REsetAlleVarsValues();	// 100705 Managing all eVars build/manage in _scvki_REsetLinkTrackVars() requires clearing the values so they are not resent
	
	s.linkTrackVars = 'None';
	s.linkTrackEvents = 'None';
	
	s.events = '';
	
	
}

function scvki_onFileDownload(link) {
	try {
		s.eVar26 = link.href;
	} catch (e) {
		s.eVar26 = 'Link Object not passed to scvki_onFileDownload()';
	}
	var strChannel = s.channel || 'Site Section not set';
	
	s.events = 'event10';
	_scvki_s_tl(link, s.events, '', 'd',  strChannel + ' - File Download');
}

		/*	Supports firing an event once per session.
		* 	Not the same as event serialization which limits event with id forever
		* 	@strEvent (string) Event to send (required for sending) or to determine if it had been sent before else returns all events sent
		* 	@intMode (integer)	0 = send the event & add to cookie; 
		*						-1 = remove event from the list to allow it be refired or to act as changing a flag
								any other value - test strEvent or get whole cookie value (if strEvent is passed)
		*/
function _scvki_getSetEventOnce(strEvent, intMode) {
	var str_fEO = s.c_r('scvki_fievo');
	var strGet = (strEvent ? (str_fEO.indexOf(strEvent + ',') !== -1) : str_fEO);	// 100705: + ',' added to strEvent in indexOf()
	
	intMode = intMode || 0;
 	
	if (0 == intMode && str_fEO.indexOf(strEvent + ',') == -1) {
		s.events = s.apl(s.events, strEvent, ',', 2);
		s.c_w('scvki_fievo', str_fEO + strEvent + ',', dt30Mins);	// 100705 dt30Mins was 0
	} else if (-1 == intMode) {	// remove
		s.c_w('scvki_fievo', str_fEO.replace(strEvent + ',', ''), 0);	// always add training ,
		var rePattern = new RegExp(strEvent + ',|,' + strEvent + '$')
		s.events = s.events.replace(rePattern,'');
	}
		// return whether strEvent had been set already or, if strEvent is blank, the original list of send once events
	return strGet;
}

function _scvki_fireSerializedEvent(strEvent) {
		// This function has not had to support serializing multiple events.
		// If required, split the strEvent(s) variable and serialize individually

	strEvent += (':' + _scvki_getSessionID());
	s.events = s.apl(s.events, strEvent, ',', 2);
}

	/*	Returns a unique number for serializing events  
	*	Uses JSESSIONID if it exists, else a GA Visitor and Session ID if that exists or a random number
	*/
function _scvki_getSessionID() {
	var strSessionID = s.c_r('scvki_session');
	if (strSessionID) return strSessionID;
	strSessionID = s.c_r('JSESSIONID');
	if (!strSessionID) {
		strSessionID = s.c_r('__utma').split('.');
		if (strSessionID.length == 6) { 
			strSessionID = strSessionID[1] + '' + strSessionID[4] + _scvki_getRandomString(3);
		} else  {
			strSessionID = _scvki_getRandomString();
			strSessionID += _scvki_getRandomString();
		}
	}
		// 32 characters are too many -- compress to 17 with little chance of losing uniqueness
	var hexNumber1 = '0x' + strSessionID.substring(0, 11);
	hexNumber1 = parseInt(hexNumber1,16);
	var hexNumber2 = '0x' + strSessionID.substring(13, 23);
	hexNumber2 = parseInt(hexNumber2,16);
	
	var strNewNum = hexNumber1.toString(36) + hexNumber2.toString(36);
	strNewNum = strNewNum.replace(/[.()]|e\+\d+/g, ''); 
	var intLength = 
	s.c_w('scvki_session', strNewNum, 0);
	return strNewNum;
}	

function _scvki_getRandomString(intLength) {
	intLength = Math.min(intLength,6) || 6;
	var str = Math.ceil(Math.random()*Math.pow(10,10)).toString(36);
	str = str.replace(/[.()]|e\+\d+/g, '');
	return str.substring(0, intLength);
}

function _scvki_setPayGw(strPayGw, strDepType) {
		// Called from scvki_RecordTransaction() 
	if (strDepType) s.eVar2 = _scvki_join(strPayGw, strDepType);
	else s.eVar2 = strPayGw;
}

		/*	Reports the external campaign source for the visit or for any internal campaigns 
		*	
		*	Code retained from earlier version other than as specified
		*	
		* 	Added 'sct' (per Dino) and retained 'ietqyefh' for transition
		*	sct and ietqyefh will take precedence over NetbookReferral because if they are set, they should override		
		* 	referrals from previous visits		*/
function _scvki_setCampaign() {
		// cookie expiry was set to 14 days 
		// but that means it will only report it once in 14 days, 
		// not that it will remember it for 14 - that must be set in SC Admin
		// Now the cookie length is set to 0 (0 = session) 
	s.campaign = s.c_r('NetbookReferral');
	s.campaign = _scvki_setEvarOnce('campaign', s.campaign, 14, 'scvki_nbr'); // 100519 - changed to 14 days
	
		// Supporting Tracking Code - Attribution:First(initiating) Same value but configured as "First" in SC admin
	s.eVar12 = s.campaign;
	
		// External Connextra Banners eVar40, eVar41 (Configured in SC Admin to 'Most Recent' and 'First' respectively)
		// Added 'sct' (per Dino) and retained 'ietqyefh' for transition
	s.eVar40 = s.getQueryParam('ietqyefh') || s.getQueryParam('extscadid') || s.getQueryParam('scadid'); // 20100526 removed s.getQueryParam('sct') and added s.getQueryParam('scadid')
	s.eVar41 = _scvki_setEvarOnce('eVar40', s.eVar40);

	 _scvki_setEvarOnce('eVar10', s.getQueryParam('ppc'));
	 _scvki_setEvarOnce('eVar11', s.getQueryParam('eml'));
	// s.referrer = eml;  // ?!?! removed by  VKI 
	 
		// External Connextra Banners eVar40, eVar41 (Configured in SC Admin to 'Most Recent' and 'First' respectively)
		// was s.eVar19 = s.getQueryParam('intbnr')
		// But seems like intbnr is being lost in a redirection
	s.eVar19 = s.getQueryParam('intbnr');
	s.eVar19 = _scvki_setEvarOnce('eVar19', s.eVar19);
	s.eVar20 = s.eVar19;
	s.eVar21 = s.eVar19;														// 100705
}


function _scvki_getElementByIdOrName(strIdORobj, strName) {
	if (typeof(strIdORobj) == 'object') return strIdORobj;
		strIdORobj = document.getElementById(strIdORobj);
		if (!strIdORobj) {
			strIdORobj = document.getElementsByName(strName);
			if (strIdORobj) strIdORobj = strIdORobj[0];
		} 
		
		if (strIdORobj) 
			return strIdORobj;
		else
			return true;	// Alternative 1st argument for s.tl() via _scvki_s_tl()
}

function _scvki_setEvarOnce(str_eVar, value, days, strCookieName) {
	strCookieName =  strCookieName || 'scvki_' + str_eVar;
	days = (days || days === 0) ? days : flt30Mins;		// 100705 - changed default from 0 (session) to flt30Mins
	
	var strValOnce = s.getValOnce(value, strCookieName, days);
		
		//	100705 - extended to allow func to accept JS variables as well as SC variables - eg strCountry or _country (not just eVarN) for streVar
	if (str_eVar.search(/^(str|_)/) == -1 || str_eVar !== '')  s[str_eVar] = strValOnce;
	
	return strValOnce;
}


function _scvki_REsetLinkTrackVars() {
	s.linkTrackVars = '';
	for (var e = 1; e <= 50 ; e++) {
		if (s['eVar' + e]) {
			s.linkTrackVars = s.apl(s.linkTrackVars, 'eVar' + e, ',', 2);
		}
	}
	if (!s.linkTrackVars) s.linkTrackVars = 'None';
	
}

function _scvki_REsetAlleVarsValues() { // 100705
	var aryEVars = s.linkTrackVars.split(',');
	var key;
	var str = '';
	for( key in aryEVars ) {
	// for (var e = 1; e <= 50 ; e++) {
		str += s[aryEVars[key]] + '/';
		s[aryEVars[key]] = '';
		str += s[aryEVars[key]] + '|';
	}
}

_scvki_consoleLog = function (s) { if(console.log) console.log(s); } // 100705

	  /* _scvki_refreshCookie
	  *	 use to ensure that eVar and other cookies that are seldom written to are refreshed
	  */
_scvki_refreshCookie = function (strCookieName, dtExpriry) { // 100705 
	dtExpriry = dtExpriry || dt30Mins;
	var strValue = s.c_r(strCookieName);
	
	if (strValue) s.c_w(strCookieName, strValue, dtExpriry); 
	
	return strValue
}

