
//------ Required JavaScript ------\\
function unicaFunctions(command, args) {
    if (null == args) {
        return;
    }
    var tmpargs = args.split(",");
    if (command == "ntptEventTag") {
        (0 == tmpargs[0].length) ? ntptEventTag() : ntptEventTag(tmpargs[0]);
    }
    else if (command == "ntptAddPair") {
        if ( 2 != tmpargs.length ) {
            return;
        }
        else {
            ntptAddPair(tmpargs[0], tmpargs[1]);
        }
    }
    else if (command == "ntptDropPair") {
        if ( 1 != tmpargs.length ) {
            return;
        }
        else {
            ntptDropPair(tmpargs[0]);
        }
    }
}

/*
//------ Required ActionScript ------\\
function UnicaTracking(func, args) {
	ExternalInterface.call("unicaFunctions", func, args);
}

//------ ActionScript Usage ------\\
the.UnicaTracking("ntptAddPair", "key,value"); //spool "key=value" for next ntptEventTag() call
the.UnicaTracking("ntptAddPair", "key1,value1"); //spool "key1=value1" for next ntptEventTag() call
the.UnicaTracking("ntptDropPair", "key1"); //remove "key1=value1" from next ntptEventTag() call
the.UnicaTracking("ntptEventTag", "foo=bar&ev=flashtracking"); //call ntptEventTag(), send spooled key/value pairs, additional data (foo=bar), and Event named "flashtracking"

*/