function emptyVars(){
s.events="";
s.linkTrackVars="";
s.linkTrackEvents="";
s.purchaseID="";
s.products="";
s.transactionID="";
s.zip="";
s.state="";
for(var i=0;i<50;i++){
s["prop"+i]="";
s["eVar"+i]="";
}
};
var arrEventSC={page:[{state:"contact",substate:false,event:"event3",description:"Contact request to Allsecur",other:"o"},{state:"contact",substate:"contact",event:"event3",description:"Contact request to Allsecur",other:"o"},{state:"callback",substate:false,event:"event2",description:"Call request to Allsecur",other:"o"},{state:"callback",substate:"callback",event:"event2",description:"Call request to Allsecur",other:"o"},{state:"myaccount",substate:"malogin",event:"event4",description:"booking",other:"o"},{state:"quickquote",substate:"premieNLStart",event:"event5",description:"Counts number of times the test is started",other:"o"},{state:"quickquote",substate:"premieNLFinish",event:"event7",description:"Counts number of times the test is finished",other:"o"},{state:"quickquote",substate:"plateNumber",event:"event1",description:"counts the number of numberplate requests",other:"o"},{state:"quickquote",substate:"quickSave",event:"event8",description:"Premium saved",other:"o"},{state:"quickquote",substate:"goToStep1",event:"event12",description:"Bereken mijn premie",other:"o"},{state:"quickquote",substate:"calculate",event:"event11",description:"Verzekering aanvragen",other:"o"}]};
var arrStateSubstateSC={page:[{state:"home",substate:"",substitutionSubState:"AllSecur Homepage",substitutionState:"Home",concat:"Y"},{state:"home",substate:"home",substitutionSubState:"AllSecur Homepage",substitutionState:"Home",concat:"Y"},{state:"quickquote",substate:"qqrequired",substitutionSubState:"Kenteken bekend",substitutionState:"Premieberekening",concat:"Y"},{state:"quickquote",substate:"qqlicenseunknown",substitutionSubState:"Kenteken onbekend",substitutionState:"Premieberekening",concat:"Y"},{state:"quickquote",substate:"qqcalculate",substitutionSubState:"Afgerond",substitutionState:"Premieberekening",concat:"Y",autoCall:"N"},{state:"quickquote",substate:"rpstep1",substitutionSubState:"Step 1",substitutionState:"Polis",concat:"Y"},{state:"quickquote",substate:"rpstep2",substitutionSubState:"Step 2",substitutionState:"Polis",concat:"Y"},{state:"quickquote",substate:"rpcheck",substitutionSubState:"",substitutionState:"Fish check",concat:"Y"},{state:"quickquote",substate:"rpstep3",substitutionSubState:"Step 3",substitutionState:"Polis",concat:"Y"},{state:"quickquote",substate:"rpstep4",substitutionSubState:"Step 4",substitutionState:"Polis",concat:"Y"},{state:"quickquote",substate:"rpcompleted",substitutionSubState:"Afgerond",page:"processcar012",substitutionState:"Polis",concat:"Y"},{state:"quickquote",substate:"rpcompleted",substitutionSubState:"Afgerond",page:"processcar050",substitutionState:"Polis",concat:"Y"},{state:"quickquote",substate:"qqPremieCalculate",substitutionSubState:"Premievergelijking",substitutionState:"Premie",concat:"Y"},{state:"quickquote",substate:"qqcreateaccount",substitutionSubState:"Aanmaken",substitutionState:"Account",concat:"Y"},{state:"myaccount",substate:"maoverview",substitutionSubState:"Overview",substitutionState:"Account",concat:"Y"},{state:"myaccount",substate:"",substitutionSubState:"Formulier",substitutionState:"Account",concat:"Y"},{state:"myaccount",substate:"malogin",substitutionSubState:"Inloggen",substitutionState:"Account",concat:"Y"},{state:"myaccount",substate:"madetailinsurance",substitutionSubState:"Detailinfo",substitutionState:"Account",concat:"Y"},{state:"myaccount",substate:"mastep1",substitutionSubState:"Stap 1",substitutionState:"Account",concat:"Y"},{state:"myaccount",substate:"mastep2",substitutionSubState:"Stap 2",substitutionState:"Account",concat:"Y"},{state:"quickquote",substate:"macheck",substitutionSubState:"",substitutionState:"Fish check",concat:"Y"},{state:"myaccount",substate:"mastep3",substitutionSubState:"Stap 3",substitutionState:"Account",concat:"Y"},{state:"myaccount",substate:"mastep4",substitutionSubState:"Stap 4",substitutionState:"Account",concat:"Y"},{state:"myaccount",substate:"mastep5",substitutionSubState:"Stap 5",substitutionState:"Account",concat:"Y"},{state:"myaccount",substate:"macompleted",substitutionSubState:"Afgerond",substitutionState:"Account",concat:"Y"},{state:"myaccount",substate:"error",substitutionSubState:"Foutmelding",substitutionState:"Account",concat:"Y"},{state:"myaccount",substate:"machangeemail",substitutionSubState:"Emailadres wijzigen",substitutionState:"Account",concat:"Y"},{state:"myaccount",substate:"machangeaccount",substitutionSubState:"Account wijzigen",substitutionState:"Account",concat:"Y"},{state:"myaccount",substate:"machangepassword",substitutionSubState:"Wachtwoord wijzigen",substitutionState:"Account",concat:"Y"},{state:"myaccount",substate:"malostpassword",substitutionSubState:"Wachtwoord vergeten",substitutionState:"Account",concat:"Y"},{state:"about",substate:"",substitutionSubState:"Over Allsecur",substitutionState:"Overig",concat:"Y"},{state:"terms",substate:"",substitutionSubState:"Voorwaarden",substitutionState:"Overig",concat:"Y"},{state:"juridischeinformatie",substate:"",substitutionSubState:"Juridische informatie",substitutionState:"Overig",concat:"Y"},{state:"privacybeleid",substate:"",substitutionSubState:"Privacy beleid",substitutionState:"Overig",concat:"Y"},{state:"contact",substate:"",substitutionSubState:"Formulier",substitutionState:"Contact",concat:"Y"},{state:"contact",substate:"bedankt",substitutionSubState:"Bedankt",substitutionState:"Contact",concat:"Y"},{state:"callback",substate:"",substitutionSubState:"Formulier",substitutionState:"Bel me",concat:"Y"},{state:"callback",substate:"bedankt",substitutionSubState:"Bedankt",substitutionState:"Bel me",concat:"Y"},{state:"schade",substate:"schadelogin",substitutionSubState:"Meldformulier",substitutionState:"Schade",concat:"Y"},{state:"schade",substate:"",substitutionSubState:"Overzicht",substitutionState:"Schade",concat:"Y"}]};
function SC_searchStateSubstateInArray(_2,_3,_4){
var _5="";
var i=0;
arrStateSubstateSC.page.each(function(_7,_8){
if(_7.state==_2&&_7.substate==_3){
if(_7.page){
if(_4.indexOf(_7.page)!=-1){
_5=_7;
}
}else{
_5=_7;
}
}
});
return _5;
};
function SC_findPageAndGroup(_9,_a){
var _b=_9;
if(_9==_a){
_9="";
}
pageTemp=SC_searchStateSubstateInArray(_a,_9,"");
if(pageTemp==""){
_9=_b;
}else{
_9=pageTemp.substitutionSubState;
_a=pageTemp.substitutionState;
}
return {"pageName":_9,"groupName":_a,"autoCall":pageTemp.autoCall};
};
function searchEventInArray(_c,_d){
var _e=null;
arrEventSC.page.each(function(_f){
if(_f.state==_c&&(_f.substate==_d)){
_e=_f;
}
});
return _e;
};
function SC_CleanString(_10){
var _11="abcdefghijklmnopqrstuvwxyz0123456789()+,-./:;?= _{}|<> ";
var i=1;
var _13="";
var n=_10.length;
while(i<=n){
if(_11.indexOf(_10.substring(i-1,i).toLowerCase())!=-1){
_13=_13+_10.substring(i-1,i);
}
i++;
}
return _13;
};
function SC_Event(_15,_16){
try{
var s=s_gi(s_account);
var _18=_15||AA.Director.currentState;
var _19=_16||AA.Director.currentSubState;
var obj=searchEventInArray(_18,_19);
if(!obj){
return false;
}
s.linkTrackVars="events";
s.linkTrackEvents=obj.event;
s.events=obj.event;
s.tl(true,obj.other,obj.description);
emptyVars();
return true;
}
catch(ex){
}
};
function SC_EventPlateNumber(_1b){
try{
var s=s_gi(s_account);
var obj=searchEventInArray("quickquote","plateNumber");
if(!obj){
return false;
}
s.linkTrackVars="eVar26,events";
s.linkTrackEvents=obj.event;
s.eVar26=_1b;
s.events=obj.event;
s.tl(true,obj.other,obj.description);
emptyVars();
return true;
}
catch(ex){
}
};
function SC_RequestPremium(_1e,_1f){
window.siteCatalystInfo.createInfoUser(""+"{"+"plateNumber:'"+_1e+"',"+"postCode:'"+_1f+"',"+"}");
SC_IRequestAndCalculationPremium("goToStep1");
};
function SC_PremiumCalculation(){
SC_IRequestAndCalculationPremium("calculate");
};
function SC_IRequestAndCalculationPremium(_20){
var s=s_gi(s_account);
var obj=searchEventInArray("quickquote",_20);
if(!obj){
return false;
}
s.linkTrackEvents="events,eVar26,eVar39,eVar40,prop18";
s.linkTrackEvents=obj.event;
s.events=obj.event;
s.prop18="D=s_vi";
s.eVar26=window.siteCatalystInfo.plateNumber;
s.eVar39=window.siteCatalystInfo.zip;
s.eVar40=window.siteCatalystInfo.plateNumber+"_"+window.siteCatalystInfo.zip;
s.tl(true,obj.other,obj.description);
emptyVars();
return true;
};
function getTimeStamp(){
var _23="";
var now=new Date();
_23=now.getUTCFullYear().toString()+completedString(now.getUTCMonth()+1)+completedString(now.getUTCDate())+completedString(now.getHours())+completedString(now.getMinutes())+completedString(now.getSeconds());
return _23;
};
function completedString(el){
if(el<10){
return "0"+el.toString();
}else{
return el.toString();
}
};
function SC_EventStartPremiumComparator(){
try{
var s=s_gi(s_account);
var obj=searchEventInArray("quickquote","premieNLStart");
if(!obj){
return false;
}
s.linkTrackVars="events";
s.linkTrackEvents=obj.event;
s.events=obj.event;
s.tl(true,obj.other,obj.description);
emptyVars();
return true;
}
catch(ex){
}
};
function SC_EventFinishPremiumComparator(_28){
try{
var s=s_gi(s_account);
var obj=searchEventInArray("quickquote","premieNLFinish");
if(!obj){
return false;
}
s.linkTrackVars="eVar34,eVar35,events";
s.linkTrackEvents=obj.event;
if(_28>5){
s.eVar35="5+";
}else{
s.eVar35=""+_28;
}
s.events=obj.event;
s.tl(true,obj.other,obj.description);
emptyVars();
return true;
}
catch(ex){
}
};
function SC_PageView(_2b,_2c,_2d,_2e){
try{
if(!_2e){
_2e=s_account;
}
var s=s_gi(_2e);
var _30=_2b||AA.Director.currentState;
var _31=_2c||AA.Director.currentSubState||_30;
if(_2d!="order"&&_31.indexOf("completed")!=-1){
return;
}
if((AA.Director.oldState!=_30)||(AA.Director.oldSubState&&AA.Director.oldSubState!=_31)){
var _32=SC_findPageAndGroup(_31,_30);
if(_32.autoCall!=null&&_32.autoCall=="N"){
return;
}
if(_32.concat==null||_32.concat=="Y"){
s.pageName=_32.groupName+":"+_32.pageName;
s.prop11=null;
}else{
s.pageName=_32.groupName;
s.prop11=_32.pageName;
}
s=SC_GetUserInfo(s);
s=SC_GetOrderInfo(s,_2e);
s.channel=_32.groupName;
s.prop1="Auto";
s.t();
emptyVars();
}
}
catch(ex){
}
};
function SC_PageViewDirect(_33,_34){
try{
var s=s_gi(s_account);
var _36=_33||AA.Director.currentState;
var _37=_34||AA.Director.currentSubState||_36;
s=SC_GetUserInfo(s);
s=SC_GetOrderInfo(s);
s.pageName=_36;
s.prop11=SC_CleanString(_37);
s.channel=_36;
s.prop1="Auto";
s.t();
emptyVars();
}
catch(ex){
}
};
function SC_GetUserInfo(s){
try{
if(window.siteCatalystInfo.userInfo){
s.eVar8=window.siteCatalystInfo.gender||"";
s.eVar21=window.siteCatalystInfo.age||"";
}
}
catch(ex){
}
return s;
};
function SC_GetOrderInfo(s,_3a){
try{
if(window.siteCatalystInfo.orderInfo){
s.purchaseID=window.siteCatalystInfo.contractNumber||"";
s.eVar10=window.siteCatalystInfo.visitorID||"";
s.eVar17=window.siteCatalystInfo.progDossierID||"";
s.state=window.siteCatalystInfo.city||"";
s.zip=window.siteCatalystInfo.zip||"";
s.products=window.siteCatalystInfo.products||"";
s.eVar6=window.siteCatalystInfo.damageFreeYears||"";
s.eVar7=window.siteCatalystInfo.km||"";
s.eVar21=window.siteCatalystInfo.age||"";
s.eVar22=window.siteCatalystInfo.carAge||"";
s.eVar23=window.siteCatalystInfo.carBrand||"";
s.eVar24=window.siteCatalystInfo.carType||"";
s.eVar25=window.siteCatalystInfo.carPrice||"";
s.eVar26=window.siteCatalystInfo.plateNumber||"";
s.eVar27=window.siteCatalystInfo.fuel||"";
s.eVar30=window.siteCatalystInfo.paymentPeriod||"";
s.eVar43=window.siteCatalystInfo.cancellationPolicy||"";
s.prop18="D=s_vi";
s.eVar39=window.siteCatalystInfo.zip||"";
s.eVar40=window.siteCatalystInfo.plateNumber+"_"+window.siteCatalystInfo.zip;
s.eVar41=getTimeStamp();
s.eVar42="Online";
if(_3a!=null){
s.transactionID=window.siteCatalystInfo.plateNumber+"_"+window.siteCatalystInfo.zip+"_"+window.siteCatalystInfo.progDossierID;
}
s.events="purchase";
}
}
catch(ex){
}
return s;
};
window.siteCatalystAnalytics=new Class({damageFreeYears:"",km:"",gender:"",city:"",zip:"",products:"",progDossierID:"",visitorID:"",isUpdated:false,contractNumber:"",plateNumber:"",age:"",carAge:"",carBrand:"",carType:"",carPrice:"",fuel:"",url:"",cancellationPolicy:"",paymentPeriod:"",initialize:function(){
this.damageFreeYears="";
this.km="";
this.gender="";
this.city="";
this.zip="";
this.products="";
this.progDossierID="";
this.visitorID="";
this.userInfo=false;
this.orderInfo=false;
this.contractNumber="";
this.plateNumber="";
this.age="";
this.carAge="";
this.carBrand="";
this.carType="";
this.carPrice="";
this.fuel="";
this.paymentPeriod="";
this.cancellationPolicy="";
this.url=contextPath_js+"/snippets/process/processSiteCatalystAjax.jsp?";
},getCompleteUrl:function(_3b){
return this.url+"method="+_3b;
},createInfoUser:function(_3c){
if(_3c==null){
var _3d=function(_3e){
this.gender=_3e.gender;
this.plateNumber=_3e.plateNumber||"";
this.zip=_3e.postCode||"";
this.age=_3e.age||"";
this.userInfo=true;
if(this.plateNumber){
this.plateNumber=this.plateNumber.replaceAll("-","").replaceAll(" ","").toLowerCase();
}
if(this.zip){
this.zip=this.zip.replaceAll("-","").replaceAll(" ","").toLowerCase();
}
ISC_QuickQuote(s_account+","+s_accGlobal);
};
var url=this.getCompleteUrl("userInfo");
new Json.Remote(url,{method:"post",onComplete:_3d.bind(this)}).send();
}else{
_3c=Json.evaluate(_3c);
this.gender=_3c.gender;
this.plateNumber=_3c.plateNumber||"";
this.zip=_3c.postCode||"";
}
if(this.plateNumber){
this.plateNumber=this.plateNumber.replaceAll("-","").replaceAll(" ","").toLowerCase();
}
if(this.zip){
this.zip=this.zip.replaceAll("-","").replaceAll(" ","").toLowerCase();
}
},product:function(){
var _40=function(_41){
this.city=_41.city;
this.zip=_41.postCode;
this.km=_41.coverage;
this.damageFreeYears=_41.age_category;
this.products=_41.product;
this.paymentPeriod=_41.paymentPeriod;
this.cancellationPolicy=_41.cancellationPolicy;
this.plateNumber=_41.plateNumber;
this.age=_41.age;
this.carAge=_41.carAge;
this.carBrand=_41.carBrand;
this.carType=_41.carType;
this.carPrice=_41.carPrice;
this.fuel=_41.fuel;
};
var url=this.getCompleteUrl("productInfo");
new Json.Remote(url,{method:"post",onComplete:_40.bind(this)}).send();
},order:function(_43){
var _44=function(_45){
this.progDossierID=_45.oi;
this.visitorID=_45.ci;
this.contractNumber=_45.cn;
this.orderInfo=true;
if(_43=="rpcompleted"){
SC_PageView("Polis","Afgerond",null,s_account+","+s_accGlobal);
}else{
SC_PageView("Account","Afgerond",null,s_account+","+s_accGlobal);
}
this.orderInfo=false;
};
var url=this.getCompleteUrl("orderInfo");
new Json.Remote(url,{method:"post",onComplete:_44.bind(this)}).send();
}});
window.siteCatalystInfo=new window.siteCatalystAnalytics();
function SC_QuickQuote(){
window.siteCatalystInfo.createInfoUser();
return true;
};
function ISC_QuickQuote(_47){
try{
var s=null;
s=s_gi(_47);
s.prop18="D=s_vi";
s.eVar26=window.siteCatalystInfo.plateNumber;
s.eVar39=window.siteCatalystInfo.zip;
s.eVar40=window.siteCatalystInfo.plateNumber+"_"+window.siteCatalystInfo.zip;
s.eVar21=window.siteCatalystInfo.age||"";
s.eVar41=getTimeStamp();
s.eVar42="Online";
s.events="scAdd";
s.eVar32=s.c_r("s_ds");
s.pageName="Premieberekening:Afgerond";
s.t();
emptyVars(s);
}
catch(e){
}
};
