//Need to do this here instead of locator_config to accomodate global use
var Locator = Locator || {};
Locator.Config = Locator.Config || {};
Locator.Config.AGNProduct = "JuvedermFR";

	  
    function scAjaxEvent(evt, sVar, sEvalue){ //can take more than these 3 arguments
        s.events = evt;
        s.eVar1 = Locator.Config.AGNProduct;
        
        if(typeof sVar!== 'undefined' && sVar!== null && sVar!== ''){ //track evar if passed in
        	s[sVar] = sEvalue;
        	if(arguments.length > 3){ //loop through remaining variables, passed in as key-value pairs
        		for(var i = 3, arg_len = arguments.length; i < arg_len; i++){
        			if(i%2 != 0){ //only set if i is an odd #, as evens store values
	        			var tmpCntr = i;
		        		s[arguments[i]] = arguments[tmpCntr+1];
	        		}
	        	}
        	}
        }
        void(s.t());
        //Clear variables
        s.events = "";  
        s[sVar] = "";
        if(arguments.length > 3){
        	for(var i = 3, arg_len = arguments.length; i < arg_len; i++){
    			if(i%2 != 0){ //only set if i is an odd #, as evens store values
	        		s[arguments[i]] = "";
        		}
        	}
        }
    }
    
    var scAjaxVariable = function(variable, value){
    	s[variable] = value;
    	void(s.t());
    };
    
    /*function SPOnError_handleErrors(msg,url,line){ //override sp error handler
    	if(typeof(console) !== 'undefined'){
    		console.log('message: ' + msg);
    		console.log('url: ' + url);
    		console.log('line: ' + line);
    	}
    }*/
    
    