
Ext.onReady(function(){Ext.QuickTips.init();Ext.form.Field.prototype.msgTarget='side';var postSub=0;var evtsSub=0;var locsSub=0;var autsSub=0;var persSub=0;var partSub=0;hp=Math.min(4,hp);switch(hp){case 0:postSub=Math.min(3,sp);break;case 1:evtsSub=Math.min(3,sp);break;case 2:locsSub=Math.min(2,sp);break;case 3:autsSub=Math.min(1,sp);break;case 4:persSub=Math.min(2,sp);break;case 5:partSub=Math.min(0,sp);break;}
var frmPers=new Ext.FormPanel({id:'persform',title:'Contactformulier',border:false,monitorValid:true,labelWidth:120,width:300,border:false,hideBorders:true,bodyStyle:'padding:30px;padding-right:100px;background-color:#111;',border:false,finishAlert:function(action){var _title,_icon;if(action.result.success){_title='Bericht verzonden';_icon=Ext.MessageBox.INFO;}
else{_title='Fout bij verzending';_icon=Ext.MessageBox.ERROR;}
Ext.Msg.show({title:_title,msg:action.result.reason,buttons:Ext.Msg.OK,icon:_icon,minWidth:300});},defaults:frmItemdefs,items:[mediumnaam,gender,naam,email,tel,tekstverplicht,cc,antispam],buttons:[{text:'Verzenden',formBind:true,handler:function(){frmPers.form.submit({url:'hndlr.contact.pers.php?cmd=post',method:'post',failure:function(form,action){frmPers.finishAlert(action);},success:function(form,action){frmPers.finishAlert(action);form.reset();}});}}]});var frmCont1=new Ext.FormPanel({id:'contform1',title:'Ik wil wat kwijt',border:false,monitorValid:true,labelWidth:120,width:300,border:false,hideBorders:true,bodyStyle:'padding:30px;padding-right:100px;background-color:#111;color:white;',border:false,finishAlert:function(action){var _title,_icon;if(action.result.success){_title='Bericht verzonden';_icon=Ext.MessageBox.INFO;}
else{_title='Fout bij verzending';_icon=Ext.MessageBox.ERROR;}
Ext.Msg.show({title:_title,msg:action.result.reason,buttons:Ext.Msg.OK,icon:_icon,minWidth:300});},defaults:frmItemdefs,items:[gender,naam,email,tel,tekstverplicht,cc,antispam],buttons:[{text:'Verzenden',formBind:true,handler:function(){frmCont1.form.submit({url:'hndlr.contact.php?cmd=post',method:'post',failure:function(form,action){frmCont1.finishAlert(action);},success:function(form,action){frmCont1.finishAlert(action);form.reset();}});}}]});var frmCont2=new Ext.FormPanel({id:'contform2',title:'Ik wil wat kwijt',border:false,monitorValid:true,labelWidth:120,width:300,border:false,hideBorders:true,bodyStyle:'padding:30px;padding-right:100px;background-color:#111;',border:false,finishAlert:function(action){var _title,_icon;if(action.result.success){_title='Bericht verzonden';_icon=Ext.MessageBox.INFO;}
else{_title='Fout bij verzending';_icon=Ext.MessageBox.ERROR;}
Ext.Msg.show({title:_title,msg:action.result.reason,buttons:Ext.Msg.OK,icon:_icon,minWidth:300});},defaults:frmItemdefs,items:[gender,naam,email,tel,tekstverplicht,cc,antispam],buttons:[{text:'Verzenden',formBind:true,handler:function(){frmCont2.form.submit({url:'hndlr.contact.php?cmd=post',method:'post',failure:function(form,action){frmCont2.finishAlert(action);},success:function(form,action){frmCont2.finishAlert(action);form.reset();}});}}]});var frmCont3=new Ext.FormPanel({id:'contform3',title:'Ik wil wat kwijt',border:false,monitorValid:true,labelWidth:120,width:300,border:false,hideBorders:true,bodyStyle:'padding:30px;padding-right:100px;background-color:#111;',border:false,finishAlert:function(action){var _title,_icon;if(action.result.success){_title='Bericht verzonden';_icon=Ext.MessageBox.INFO;}
else{_title='Fout bij verzending';_icon=Ext.MessageBox.ERROR;}
Ext.Msg.show({title:_title,msg:action.result.reason,buttons:Ext.Msg.OK,icon:_icon,minWidth:300});},defaults:frmItemdefs,items:[gender,naam,email,tel,tekstverplicht,cc,antispam],buttons:[{text:'Verzenden',formBind:true,handler:function(){frmCont3.form.submit({url:'hndlr.contact.php?cmd=post',method:'post',failure:function(form,action){frmCont3.finishAlert(action);},success:function(form,action){frmCont3.finishAlert(action);form.reset();}});}}]});var frmCont4=new Ext.FormPanel({id:'contform3',title:'Ik wil wat kwijt',border:false,monitorValid:true,labelWidth:120,width:300,border:false,hideBorders:true,bodyStyle:'padding:30px;padding-right:100px;background-color:#111;',border:false,finishAlert:function(action){var _title,_icon;if(action.result.success){_title='Bericht verzonden';_icon=Ext.MessageBox.INFO;}
else{_title='Fout bij verzending';_icon=Ext.MessageBox.ERROR;}
Ext.Msg.show({title:_title,msg:action.result.reason,buttons:Ext.Msg.OK,icon:_icon,minWidth:300});},defaults:frmItemdefs,items:[gender,naam,email,tel,tekstverplicht,cc,antispam],buttons:[{text:'Verzenden',formBind:true,handler:function(){frmCont4.form.submit({url:'hndlr.contact.php?cmd=post',method:'post',failure:function(form,action){frmCont4.finishAlert(action);},success:function(form,action){frmCont4.finishAlert(action);form.reset();}});}}]});var postevent=new Ext.TabPanel({title:'Zo was het',tabTip:'Terugkijken: foto\'s, commentaren en berichten in de pers',activeTab:postSub,border:false,defaults:itemdefs,items:[{title:'De foto\'s',autoLoad:'post1.php'},{title:'De video',autoLoad:'post4.php'},{title:'De commentaren',autoLoad:'post2.php'},{title:'De pers',autoLoad:'post3.php'},frmCont4]});var event=new Ext.TabPanel({title:'Evenement',tabTip:'Info over de Dag van de Misdaad, het programma en praktische zaken',activeTab:evtsSub,border:false,defaults:itemdefs,items:[{title:'Info',autoLoad:'evnt1.php'},{title:'Programma',autoLoad:'evnt2.php'},{title:'Praktisch',autoLoad:'evnt3.php'},frmCont1]});var locats=new Ext.TabPanel({title:'Locaties',tabTip:'Alle interessante locaties van deze dag',activeTab:locsSub,border:false,defaults:itemdefs,items:[{title:'Activiteiten',autoLoad:'loca1.php'},{title:'Locatiekaart',autoLoad:'loca2.php'},{title:'Achtergronden',autoLoad:'loca3.php'},frmCont2]});var auts=new Ext.TabPanel({title:'Auteurs',tabTip:'Welke auteurs doen mee en waar zitten ze',activeTab:autsSub,border:false,defaults:itemdefs,items:[{title:'Wie zijn ze',autoLoad:'auts1.php'},{title:'Waar zijn ze',autoLoad:'auts2.php'},frmCont3]});var pers=new Ext.TabPanel({title:'Pers',tabTip:'Alle persinformatie',activeTab:persSub,border:false,defaults:itemdefs,items:[{title:'Informatie',autoLoad:'pers1.php'},{title:'Documenten',autoLoad:'pers2.php'},frmPers]});var part={title:'Partners',tabTip:'De partners van de Dag van de Misdaad',autoScroll:true,cls:'contentArea',bodyStyle:'padding:30px;background-color:#111;color:white;',autoLoad:'part1.php'};var tabs=new Ext.TabPanel({id:'tpanel',activeTab:hp,renderTo:'content',height:490,plain:true,border:false,bodyStyle:'background-color:transparent',defaults:{bodyStyle:'background-color:#111;color:white;',border:false},items:[postevent,event,locats,auts,pers,part]});if(Ext.isIE6){var w=document.body.clientWidth;var h=document.body.clientHeight;if(h<680||w<1000){Ext.Msg.show({title:'Attentie',msg:'<div>Uw browser is Internet Explorer 6 en uw <br />'+'schermresolutie is te laag om deze website <br />'+'goed te kunnen tonen.<br />'+'Druk op F11 om het scherm te vergroten <br />'+'of verhoog uw beeldschermresolutie.</div>',buttons:Ext.Msg.OK,icon:Ext.MessageBox.WARNING,minWidth:300});}}});