﻿var pageTracker;
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
function setTracker() {
    var gaCode = getElement('GA_Code');
    if (gaCode != null) {
        pageTracker = _gat._getTracker(gaCode.value);
        pageTracker._trackPageview();
    }
}
function addTrans(orderID, affiliation, total, tax, shipping, city, state, country) {
    pageTracker._addTrans(orderID, affiliation, total, tax, shipping, city, state, country);
}
function addItem(orderID, SKU, productName, category, price, quantity) {
    pageTracker._addItem(orderID, SKU, productName, category, price, quantity);
}
function classifyVisitors(state) {
    var visitor = getElement('Visitor');
    if (visitor != null){
        if (state == 'undefined' || state == null)
            pageTracker._setVar(visitor.value);
        else
            pageTracker._setVar(visitor.value + '_' + state);
    }
}