var logStack=new function logStack(){
var _1=this;
this.stack=new Array();
var _2=250;
this.size=0;
this.getInstance=function(){
return _1;
};
this.push=function(_3){
var _4=false;
if(_3 instanceof snLogMessage){
this.stack.push(_3.getMessage());
this.size=this.size+_3.toString().length;
_4=true;
}
if(this.size>_2){
this.sendStackNow();
}
return _4;
};
this.sendStackNow=function(){
sc.submitLog(dojo.toJson(this.stack));
this.stack=new Array();
this.size=0;
};
this.size=function(){
return this.size;
};
this.length=function(){
return this.stack.length;
};
this.reset=function(){
this.stack=new Array();
this.size=0;
};
return this;
};
function snLogMessage(){
var _5;
var _6;
var _7;
var _8;
this.session;
this.tour;
var _9;
var _a;
var _b;
var _c="";
var _d=null;
var _e=0;
var _f=0;
var _10="";
this.setData=function(_11){
switch(dataformat){
case "time":
_f=""+_11;
break;
case "float":
_e=_11;
break;
case "bool":
_d=_11;
break;
case "string":
_10=""+_11;
break;
case "object":
default:
_c=_11;
break;
}
this.getMessage=function(){
message={"method":logtype,"params":[_5,_6,_7,_8,this.session,_9,parseInt(this.tour),_a,_b]};
switch(dataformat){
case "time":
message.params.push(_f);
break;
case "float":
message.params.push(_e);
break;
case "bool":
message.params.push(_d);
break;
case "string":
message.params.push(_10);
break;
case "object":
default:
for(i=0;i<_c.length;i++){
message.params.push(_c[i]);
}
break;
}
return message;
};
this.sendMessage=function(){
if(!logStack.getInstance().push(this)){
if(!this instanceof snErrorLog){
error=new snErrorLog(this.session,this.tour,"could not add Message to logStack:"+this.getMessage);
error.sendMessage();
}
}
};
var _12=function(_13){
};
this.setStarttime=function(_14){
};
this.setEndtime=function(_15){
};
this.setTimezone=function(_16){
};
};
this.appendData=function(_17){
switch(dataformat){
case "time":
break;
case "float":
_e=_e+_17;
break;
case "bool":
break;
case "string":
_10=_10+_17;
break;
case "object":
default:
_c=_c+_17;
break;
}
};
this.getData=function(){
switch(dataformat){
case "time":
return _f;
break;
case "float":
return _e;
break;
case "bool":
return _d;
break;
case "string":
return _10;
break;
case "object":
default:
return _c;
break;
}
};
var _18=function(){
logtype="baseclass";
dataformat="dataobject";
var ld=new Date();
_5=ld.getTime();
_6=ld.getTime();
_7=ld.getTime();
_8=ld.getTimezoneOffset();
_a=navigator.platform;
_b=navigator.userAgent;
};
_18();
};
snLogMessage.prototype.logtype;
snLogMessage.prototype.dataformat;
snLogMessage.prototype.getLogType=function(){
return this.logtype;
};
snErrorLog.prototype=new snLogMessage();
snErrorLog.prototype.constructor=snErrorLog;
function snErrorLog(_1a,_1b,_1c){
logtype="error";
dataformat="string";
this.setData(_1c);
this.session=_1a;
this.tour=_1b;
};
snPluginLog.prototype=new snLogMessage();
snPluginLog.prototype.constructor=snPluginLog;
function snPluginLog(_1d,_1e,_1f,_20,_21){
logtype="logPlugin";
dataformat="object";
this.setData([_1f,_20,_21]);
this.session=_1d;
this.tour=_1e;
};
snTransactionLog.prototype=new snLogMessage();
snTransactionLog.prototype.constructor=snTransactionLog;
function snTransactionLog(_22,_23,_24){
logtype="logTransaction";
dataformat="string";
this.setData([_24]);
this.session=_22;
this.tour=_23;
};
snPlaytimeLog.prototype=new snLogMessage();
snPlaytimeLog.prototype.constructor=snPlaytimeLog;
snPlaytimeLog.prototype.timer=0;
function snPlaytimeLog(_25,_26){
logtype="logPlaytime";
dataformat="float";
this.session=_25;
this.tour=_26;
this.setData(0);
};
snPlaytimeLog.prototype.pause=function(){
if(this.timer>0){
var _27=new Date();
now=_27.getTime();
var hi=now-this.timer;
this.appendData(hi);
this.timer=0;
}
};
snPlaytimeLog.prototype.play=function(){
if(this.timer==0){
var _29=new Date();
this.timer=_29.getTime();
}
};
snPlaytimeLog.prototype.stop=function(){
if(this.timer>0){
var _2a=new Date();
now=_2a.getTime();
this.appendData(now-this.timer);
this.timer=0;
}
if(this.getData()>0){
this.sendMessage();
}
};


