// (c) RTL Nederland Interactief
this.name='hmg';if(window.moveBy){function moveBy(dX,dY){}}if(window.moveTo){function moveTo(dX,dY){}}var imageArrGroot=[];var imageArrCaption=[];var flash_objects=[];var overlaySlides={};function pushItem(slideshow_id,path,caption){if(!overlaySlides.hasOwnProperty(slideshow_id)){overlaySlides[slideshow_id]=[]}overlaySlides[slideshow_id].push({path:path,caption:caption})}var overlaySlideshow={activeID:null,activeSlides:null,relatedSlideshow:null,currentPic:-1,largeImage:null,caption:null,thumbsContainer:null,thumbs:[],activeThumb:-1,show:function(id){if(!overlaySlides.hasOwnProperty(id)||typeof window[id+'_object']=='undefined'||!(window[id+'_object'] instanceof SlideshowObject))return;var object_els=document.getElementsByTagName('object');flash_objects.length=0;for(var i=0;i<object_els.length;i++){var w=(object_els[i].offsetWidth)?object_els[i].offsetWidth:0;if(w>0){flash_objects.push(object_els[i]);object_els[i].style.visibility='hidden'}}this.activeID=id;this.activeSlides=overlaySlides[id];this.relatedSlideshow=window[id+'_object'];this.currentPic=(this.relatedSlideshow.current_pic-1<this.activeSlides.length)?this.relatedSlideshow.current_pic-1:0;var element_overlay=this.gid('pic_view_overlay');var element_overlay_pic=this.gid('pic_view_container');var pic_top_container=this.createElement('div','pic_top_container');var pic_title_container=this.createElement('div','pic_title_container');pic_title_container.innerHTML=this.gid('layer_title_'+id).innerHTML;var pic_sluit_container=this.createElement('div','pic_sluit_container');var pic_sluit_img=this.createElement('img',null,{src:'/actueel/rtlnieuws/components/vaste_componenten_2008/layer_sluit.gif',width:14,height:13,border:0},{position:'relative',top:'2px'});this.appendChildren(pic_sluit_container,[document.createTextNode('Sluit venster '),pic_sluit_img]);pic_sluit_container.onclick=hide_pic_large;this.appendChildren(pic_top_container,[pic_title_container,pic_sluit_container]);var imagelarge_and_caption_container=this.createElement('div','element_pic');imagelarge_and_caption_container.onclick=hide_pic_large;this.largeImage=this.createElement('img',null,{src:this.activeSlides[this.currentPic].path,border:0});this.caption=this.createElement('p',null,{align:'center'},{'margin-top':'6px','font-family':'Arial','font-size':'11px'});this.caption.innerHTML=this.activeSlides[this.currentPic].caption;this.appendChildren(imagelarge_and_caption_container,[this.largeImage,this.caption]);var thumbs_and_buttons_container=this.createElement('div','pic_view_thumbs');this.thumbsContainer=this.createElement('div','thumb_overflow');var thumb_control_left=this.createElement('div','thumb_control_left',{title:'Vorige'});thumb_control_left.onclick=function(){overlaySlideshow.gotoSlide(-1)};var thumb_control_right=this.createElement('div','thumb_control_right',{title:'Volgende'});thumb_control_right.onclick=function(){overlaySlideshow.gotoSlide(1)};this.appendChildren(thumbs_and_buttons_container,[thumb_control_left,thumb_control_right,this.thumbsContainer]);this.createThumbs();element_overlay_pic.innerHTML='';this.appendChildren(element_overlay_pic,[pic_top_container,imagelarge_and_caption_container,thumbs_and_buttons_container]);element_overlay.style.height=determinePageHeight().y+"px";element_overlay.style.width=determinePageHeight().x+"px";element_overlay.onclick=hide_pic_large;element_overlay_pic.style.top=(100+document.body.scrollTop)+'px';element_overlay.className="pic_view_overlay";element_overlay_pic.className="pic_view_container"},createThumbs:function(){this.thumbs.length=0;var number_of_thumbs=(this.activeSlides.length>10)?10:this.activeSlides.length;this.activeThumb=Math.floor((number_of_thumbs-1)/2);var start_left=Math.round(330-((number_of_thumbs*66)/2));var thumb_holder,thumb,offset_to_active_thumb,pos_in_strip;for(var i=0;i<number_of_thumbs;i++){offset_to_active_thumb=(i-this.activeThumb);pos_in_strip=(this.currentPic+offset_to_active_thumb);pos_in_strip=(pos_in_strip<0?pos_in_strip+this.activeSlides.length:pos_in_strip);pos_in_strip=(pos_in_strip>=this.activeSlides.length?pos_in_strip-this.activeSlides.length:pos_in_strip);thumb_holder=this.createElement('div',(i==this.activeThumb?'thumb_holder_active':'thumb_holder'),null,{width:'55px',height:'30px',overflow:'hidden'});thumb_holder.style.left=(start_left+(i*66))+'px';thumb=this.createElement('img',null,{border:0,src:imageThumbs},{position:'relative',cursor:'pointer',_cursor:'hand'});thumb.style.left=-(pos_in_strip*55)+'px';thumb.onclick=function(){var offset=offset_to_active_thumb;return function(){overlaySlideshow.gotoSlide(offset)}}();thumb_holder.appendChild(thumb);this.thumbsContainer.appendChild(thumb_holder);this.thumbs.push(thumb_holder)}},gotoSlide:function(diff){var new_current_pic=this.currentPic+diff;new_current_pic=(new_current_pic>=this.activeSlides.length?this.currentPic-this.activeSlides.length+diff:new_current_pic);new_current_pic=(new_current_pic<0?this.activeSlides.length+this.currentPic+diff:new_current_pic);var new_large_image=this.createElement('img',null,{src:this.activeSlides[new_current_pic].path,border:0});this.largeImage.parentNode.replaceChild(new_large_image,this.largeImage);this.largeImage=new_large_image;this.caption.innerHTML=this.activeSlides[new_current_pic].caption;var offset_to_active_thumb,pos_in_strip;for(var i=0;i<this.thumbs.length;i++){offset_to_active_thumb=(i-this.activeThumb);pos_in_strip=(new_current_pic+offset_to_active_thumb);pos_in_strip=(pos_in_strip<0?pos_in_strip+this.activeSlides.length:pos_in_strip);pos_in_strip=(pos_in_strip>=this.activeSlides.length?pos_in_strip-this.activeSlides.length:pos_in_strip);this.thumbs[i].firstChild.style.left=-(pos_in_strip*55)+'px'}this.currentPic=new_current_pic},gid:function(id){return document.getElementById(id)},createElement:function(node_name,class_name,html_attributes,css_attributes){var new_node=document.createElement(node_name);if(class_name)new_node.className=class_name;this.createAttributes(new_node,html_attributes,'HTML');this.createAttributes(new_node,css_attributes,'CSS');return new_node},createAttributes:function(node,attributes,type){if(!attributes)return;for(var i in attributes){if(!attributes.hasOwnProperty(i))continue;(type=='CSS')?node.style[i]=attributes[i]:node.setAttribute(i,attributes[i])}},appendChildren:function(node,children){for(var i=0;i<children.length;i++){node.appendChild(children[i])}}};function show_pic_large(array_to_select,id,location_id){var object_els=document.getElementsByTagName('object');flash_objects.length=0;for(var i=0;i<object_els.length;i++){var w=(object_els[i].offsetWidth)?object_els[i].offsetWidth:0;if(w>0){flash_objects.push(object_els[i]);object_els[i].style.visibility='hidden'}}var local_array_id=0;var imgSrcGroot=[];var captionSrc=[];for(i=0;i<array_to_select.length;i++){if(array_to_select[i][0]==location_id){imgSrcGroot.push(array_to_select[i][1]);captionSrc.push(array_to_select[i][2])}}var element_overlay=document.getElementById('pic_view_overlay');var element_overlay_pic=document.getElementById('pic_view_container');var newScrollTop=document.body.scrollTop;var overlay_pic_pos=100;element_overlay_pic.innerHTML='<div class="pic_top_container"><div class="pic_title_container">'+document.getElementById('layer_title_'+location_id).innerHTML+'<\/div><div class="pic_sluit_container" onclick="hide_pic_large()">Sluit venster '+'<img style="position:relative;top:2px;" width="14" alt="sluit" border="0" height="13" src="/_internal/anyfile_cache!0/hxycejktbrre4br2mtzxqf4wxqt5b5f.gif">'+'<\/div><\/div><div class="element_pic"><img sr'+'c="'+imgSrcGroot[id-1]+'" onclick="hide_pic_large();" id="element_pic_large" rel="'+id+'" border="0" /><p align="center" style="margin-top:6px;font-family:Arial;font-size:11px;">'+captionSrc[id-1]+'<\/p><\/div>';element_overlay_pic.style.margin="0 0 0 100px";element_overlay.style.height=determinePageHeight().y+"px";element_overlay.onclick=hide_pic_large;element_overlay_pic.style.top=newScrollTop+overlay_pic_pos;element_overlay.className="pic_view_overlay";element_overlay_pic.className="pic_view_container"}function hide_pic_large(){for(var i=0;i<flash_objects.length;i++){try{flash_objects[i].style.visibility='visible'}catch(e){}}var element_overlay=document.getElementById('pic_view_overlay');var element_overlay_pic=document.getElementById('pic_view_container');element_overlay_pic.className="hidden";element_overlay.className="hidden";element_overlay_pic.innerHTML=''}///////////////
function RTLUploadFoto(id,mp_channel,formaction,fotoupload_id){this.fotoupload_id=fotoupload_id;this.jsID=id;this.objectID=id+'_object';this.embedID=id+'_embed';var mpstatus=this.getCookie('mediapaspoort_loggedin');this.mpname=this.getCookie('mediapaspoort_loginid');this.mpkey=this.getCookie('mediapaspoort_rtlid');if(mpname){this.userEmail=mpname.trim()}else{this.userEmail="not_logged_in"}this.loggedIn=(mpstatus=='yes');this.formaction=formaction;this.mpChannel=mp_channel;this.server='';this.GUID='';this.GUIDAttempts=0;this.stage=0;this.stages={flashTest:1,readyForGUID:2,getGUID:3,receivedGUID:4,readyForUploading:5,uploading:6,encoding:7,uploadingEncodingError:8,thumbsReceived:9,sendMetadata:10,completed:11};this.interfaceStage=1;this.thumbnails=null;this.thumbnailsImg=null;this.thumbnailsLoaded=null;this.thumbnailsInterval=null;this.startThumb=0;this.errorState=false;this.IE55=(window.createPopup&&window.ActiveXObject);this.fields=['name','title','location','date','file','description']};RTLUploadFoto.prototype={start:function(){(this.loggedIn)?this.getObj('rtlupload_foto_'+this.fotoupload_id+'_starter_button').style.display='block':this.getObj('rtlupload_foto_'+this.fotoupload_id+'_login_button').style.display='block'},restart:function(){var mpstatus=this.getCookie('mediapaspoort_loggedin');var mpname=this.getCookie('mediapaspoort_loginid');var logged_in=(mpstatus=='yes');var user_email=mpname.trim();if(logged_in!=this.loggedIn||user_email!=this.userEmail){this.showUI(this.getObj('rtlupload_foto_starter_button'))}},showMP:function(source){show_mp_iframe(false,'close_and_notify',this.mpChannel,true)},showUI:function(source){if(source.className.indexOf('disabled')!=-1){return}if(!document.createElement||window.opera||(window.ActiveXObject&&!window.createPopup)){alert('Deze toepassing werkt niet in de door u gebruikte webbrowser.');return}source.className='rtlupload_foto_starter_disabled';var object_els=document.getElementsByTagName('object');var flash_objects=[];for(var i=0;i<object_els.length;i++){var w=(object_els[i].offsetWidth)?object_els[i].offsetWidth:0;flash_objects.push(object_els[i]);object_els[i].style.visibility='hidden'}this.flashObjects=flash_objects;var top_container=this.getObj('rtlupload_foto_'+this.fotoupload_id+'_topcontainer');var overlay=this.getObj('pic_view_overlay');document.body.appendChild(top_container);top_container.style.display='block';this.placeOverlay();this.addEvent(window,'resize',function(){rtluploadfoto.placeOverlay()});if(this.IE55&&false){var fake_container=this.getObj('rtlupload_foto_'+this.fotoupload_id+'_fake_file_container');var real_file_form=this.getObj('rtlupload_foto_'+this.fotoupload_id+'_file_form');var real_file_input=this.getObj('rtlupload_foto_'+this.fotoupload_id+'_step1_file');fake_container.style.top=fake_container.parentNode.offsetHeight-real_file_input.offsetHeight;fake_container.style.display='block';real_file_form.style.position='relative';real_file_form.style.zIndex=2;real_file_input.style.filter='alpha(opacity=0)';real_file_input.onmousemove=function(){rtluploadfoto.fileInputMouseOver(true)};real_file_input.onmouseout=function(){rtluploadfoto.fileInputMouseOver(false)};real_file_input.onkeydown=function(){return false};real_file_input.onpaste=function(){return false};real_file_input.oncontextmenu=function(){return false}}this.getObj('rtlupload_foto_'+this.fotoupload_id+'_step1_form').action=this.formaction;this.getObj('rtlIDKey').value=this.mpkey;this.getObj('rtlIDLogin').value=this.mpname},closeUI:function(source){if(source.className.indexOf('disabled')!=-1){return}if(source.getAttribute('id')=='rtlupload_foto_closebutton'&&(this.interfaceStage>2&&this.interfaceStage<8)&&!this.errorState){if(!confirm('Het opslaan van de gegevens is niet voltooid.\nWeet je zeker dat je wilt afsluiten?')){return}}this.getObj('rtlupload_foto_'+this.fotoupload_id+'_topcontainer').style.display='none';this.getObj('pic_view_overlay').style.display='none';this.getObj('pic_view_overlay').className='hidden';location.replace(location.href)},goToStep:function(nr){if(nr==this.interfaceStage){return}switch(nr){case 1:this.getObj('rtlupload_foto_'+this.fotoupload_id+'_step1_logo').style.display='block';this.getObj('rtlupload_foto_'+this.fotoupload_id+'_step1_intro').style.display='block';this.getObj('rtlupload_foto_'+this.fotoupload_id+'_step2_logo').style.display='none';this.getObj('rtlupload_foto_'+this.fotoupload_id+'_step2_intro').style.display='none';this.getObj('rtlupload_foto_'+this.fotoupload_id+'_step2_upload').className='rtlupload_foto_upload_button_disabled';this.interfaceStage=1;break;case 2:this.getObj('rtlupload_foto_'+this.fotoupload_id+'_step1_logo').style.display='none';this.getObj('rtlupload_foto_'+this.fotoupload_id+'_step1_intro').style.display='none';this.getObj('rtlupload_foto_'+this.fotoupload_id+'_step2_logo').style.display='block';this.getObj('rtlupload_foto_'+this.fotoupload_id+'_step2_intro').style.display='block';this.getObj('rtlupload_foto_'+this.fotoupload_id+'_step2_upload').className='rtlupload_foto_upload_button';this.interfaceStage=2;break;case 8:this.getObj('rtlupload_foto_'+this.fotoupload_id+'_step8_intro').innerHTML=this.getObj('rtlupload_foto_'+this.fotoupload_id+'_thankyou_text').innerHTML;this.getObj('rtlupload_foto_'+this.fotoupload_id+'_topcontainer').style.height='200px';this.getObj('rtlupload_foto_'+this.fotoupload_id+'_body').style.height='152px';this.getObj('rtlupload_foto_'+this.fotoupload_id+'_step1_container').style.display='none';this.getObj('rtlupload_foto_'+this.fotoupload_id+'_step8_container').style.visibility='visible';this.interfaceStage=8;break}},showMessage:function(type,message_string,error_state){if(type=='html'){var elC=this.getObj('rtlupload_foto_'+this.fotoupload_id+'_body').childNodes;for(var i=0;i<elC.length;i++){if(elC[i].nodeType==1){elC[i].style.visibility='hidden'}}this.getObj('rtlupload_foto_'+this.fotoupload_id+'_error_subcontainer').innerHTML=message_string;this.getObj('rtlupload_foto_'+this.fotoupload_id+'_topcontainer').style.height='158px';this.getObj('rtlupload_foto_'+this.fotoupload_id+'_body').style.height='111px';this.getObj('rtlupload_foto_'+this.fotoupload_id+'_error_container').style.visibility='visible'}else{alert(message_string)}if(error_state){this.errorState=true}},handleKeyUp:function(current_step,step_non_valid,step_valid){this.goToStep((this.validateFields(current_step).length==0?step_valid:step_non_valid))},handleSubmit:function(frm){return false},handleClick:function(evt){var source=(window.event)?event.srcElement:evt.target;source=(source.nodeType==3)?source.parentNode:source;if(source.className.indexOf('disabled')!=-1){return}var rel=source.getAttribute('rel');if(!rel||rel.indexOf('click:')!=0){return}this[rel.split(':')[1]](source)},startUpload:function(source){if(this.validateFields(1).length>0){this.showMessage('html','Vul eerst alle verplichte velden op correcte wijze in.',false)}else{this.getObj('rtlupload_foto_'+this.fotoupload_id+'_step1_form').submit()}},resetForms:function(){this.getObj('rtlupload_foto_'+this.fotoupload_id+'_step1_form').reset();this.getObj('rtlupload_foto_'+this.fotoupload_id+'_file_form').reset();this.getObj('rtlupload_foto_'+this.fotoupload_id+'_step2_upload').className='rtlupload_upload_button_disabled';this.goToStep(1)},fileInputMouseOver:function(over){if(!this.IE55){return}var real_file_input=this.getObj('rtlupload_foto_'+this.fotoupload_id+'_step1_file');if(!over){real_file_input.style.cursor='default'}else{real_file_input.style.cursor=over_button?'hand':'default'}},validateFields:function(current_step){var invalid_fields=[];for(var i=0;i<this.fields.length;i++){var input=this.getObj('rtlupload_foto_'+this.fotoupload_id+'_step'+current_step+'_'+this.fields[i]);if(!input){continue}var rel=input.getAttribute('rel');var val=input.value;if(rel&&rel.indexOf('req')==0){var function_name=rel.split(':')[1];if(!this[function_name](val)){invalid_fields.push(this.fields[i])}}}return invalid_fields},parsePostResult:function(ifr){var iframe_content;try{iframe_content=(window.ActiveXObject)?ifr.contentWindow.document.body.innerHTML:serializeXML(ifr.contentWindow.document.documentElement)}catch(e){iframe_content=''}if(iframe_content.indexOf('ok')!=-1){this.goToStep(8)}if(iframe_content.indexOf('error')!=-1){this.getObj('rtlupload_foto_'+this.fotoupload_id+'_step2_upload').className='rtlupload_foto_upload_button_disabled';this.showMessage('html','Er is een fout opgetreden bij de upload. <br />Probeer het later nogmaals.',false)}},validDate:function(string){var input=string.trim();if(!/^\d{1,2}\-\d{1,2}\-\d{4}$/.test(input)){return false}var list=string.split('-');list.walk(Number);if(list[2]<1896||list[2]>(new Date()).getFullYear()){return false}if(list[1]>12){return false}if(list[0]>[31,(list[2] % 4==0?29:28),31,30,31,30,31,31,30,31,30,31][list[1]-1]){return false}return true},notEmpty:function(string){return(string.trim()!='')},placeOverlay:function(){var overlay_el=this.getObj('pic_view_overlay');overlay_el.style.display='none';//doet de andere class all
var page_size=this.determinePageDimensions();overlay_el.className='pic_view_overlay';with(overlay_el.style){width=page_size.x+'px';height=page_size.y+'px';display='block';zIndex=599}document.body.scrollTop=0},determinePageDimensions:function(){var test1=document.body.scrollHeight;var test2=document.body.offsetHeight
return(test1>test2)?{x:document.body.scrollWidth,y:document.body.scrollHeight}:{x:document.body.offsetWidth,y:document.body.offsetHeight}},determineWindowDimensions:function(){return{x:(window.innerWidth?window.innerWidth-15:document.body.clientWidth),y:(window.innerHeight?window.innerHeight-15:document.body.clientHeight)}},getCookie:function(name){var rx=new RegExp(name+"=([^;]+)");var value=rx.exec(document.cookie);return(value!=null)?unescape(value[1]):''},getObj:function(id){return document.getElementById(id)},addEvent:function(object,eventstring,func){if(typeof window.addEventListener=='function'){object.addEventListener(eventstring,func,false)}else{object.attachEvent('on'+eventstring,func)}}};function serializeXML(node){if(window.ActiveXObject){return node.xml}else{return(new XMLSerializer()).serializeToString(node)}}String.prototype.insertSpaces=function(code_point,max_length){var words=this.split(/\s| /);for(var i=0;i<words.length;i++){if(words[i].length>max_length){words[i]=words[i].chunkSplit(max_length).join(String.fromCharCode(code_point))}}return words.join(' ')};String.prototype.chunkSplit=function(nr){var return_array=[];for(var i=0;i<this.length;i+=nr){return_array[return_array.length]=this.substring(i,i+nr)}return return_array};String.prototype.truncate=function(max_length,add_string){return(this.length>max_length)?this.substr(0,max_length-add_string.length)+add_string:this};Array.prototype.walk=function(func){for(var i=0;i<this.length;i++){this[i]=func(this[i])}};Array.prototype.indexOf=Array.prototype.indexOf||function(val){for(var i=0;i<this.length;i++){if(this[i]===val){return i}}return-1};String.prototype.trim=function(){return this.replace(/^\s+/g,'').replace(/\s+$/g,'')};///////////////
function RTLUpload(id,pollHandler,metadataHandler,uploadHandler,guidServer,profile,mp_channel){this.jsID=id;this.objectID=id+'_object';this.embedID=id+'_embed';var mpstatus=this.getCookie('mediapaspoort_loggedin');var mpname=this.getCookie('mediapaspoort_loginid');this.userEmail=mpname.trim();this.loggedIn=(mpstatus=='yes');this.pollHandler=pollHandler;this.metadataHandler=metadataHandler;this.uploadHandler=uploadHandler;this.guidServer=guidServer;this.profile=profile;this.mpChannel=mp_channel;this.server='';this.GUID='';this.GUIDAttempts=0;this.stage=0;this.stages={flashTest:1,readyForGUID:2,getGUID:3,receivedGUID:4,readyForUploading:5,uploading:6,encoding:7,uploadingEncodingError:8,thumbsReceived:9,sendMetadata:10,completed:11};this.interfaceStage=1;this.thumbnails=null;this.thumbnailsImg=null;this.thumbnailsLoaded=null;this.thumbnailsInterval=null;this.startThumb=0;this.errorState=false;this.IE55=(window.createPopup&&window.ActiveXObject);this.fields=['title','description','keywords','location','videodate','videocategory','file']};RTLUpload.prototype={start:function(){(this.loggedIn)?this.getObj('rtlupload_starter_button').style.display='block':this.getObj('rtlupload_login_button').style.display='block'},restart:function(){var mpstatus=this.getCookie('mediapaspoort_loggedin');var mpname=this.getCookie('mediapaspoort_loginid');var logged_in=(mpstatus=='yes');var user_email=mpname.trim();if(logged_in!=this.loggedIn||user_email!=this.userEmail){this.showUI(this.getObj('rtlupload_starter_button'))}},pollMP:function(){var mpstatus=this.getCookie('mediapaspoort_loggedin');var mpname=this.getCookie('mediapaspoort_loginid');var logged_in=(mpstatus=='yes');var user_email=mpname.trim();if(logged_in!=this.loggedIn||user_email!=this.userEmail){location.replace(location.href)}},flashDetect:function(){var flash_version=-1;if(typeof window.ActiveXObject!='undefined'&&navigator.platform.indexOf('Win')!=-1){try{var flash_obj=new ActiveXObject('ShockwaveFlash.ShockwaveFlash.8');flash_version=8}catch(e){flash_version=-1}flash_obj=null}else if(navigator.plugins){var flash_obj=navigator.plugins['Shockwave Flash'];if(flash_obj&&typeof flash_obj.description=='string'){var version_nr=flash_obj.description.match(/\d+\.\d/);flash_version=version_nr?parseInt(version_nr[0]):flash_version}}return flash_version},testInterfacePassive:function(string){if(string!='CallFromFlash'){this.handleUI({stage:this.stages.flashTest,errorString:'flash-javascript communicatie niet mogelijk'})}else{var id=this.jsID;setTimeout(function(){window[id].testInterfaceActive()},500);return'ResponseFromJS'}},testInterfaceActive:function(){var result=this.flashCall('testInterfacePassive');if(result!='ResponseFromFlash'){this.handleUI({stage:this.stages.flashTest,errorString:'flash-js communicatie niet mogelijk'})}else{this.stage=this.stages.readyForGUID;this.handleUI({stage:this.stages.readyForGUID,errorString:''})}},getGUID:function(){this.GUIDAttempts++;this.stage=this.stages.getGUID;var result=this.flashCall('getGUID');if(result=='Error'){this.handleUI({stage:this.stages.getGUID,errorString:'geen guid ontvangen'})}},receiveGUID:function(string){if(string=='Error'){if(this.GUIDAttempts<2){this.getGUID()}else{this.handleUI({stage:this.stages.getGUID,errorString:'geen guid ontvangen'})}}else{var list=string.split('<|>');this.server=list[0];this.GUID=list[1];this.stage=this.stage.readyForUploading;this.handleUI({stage:this.stages.receivedGUID,errorString:''})}},startPolling:function(){this.stage=this.stages.uploading;this.flashCall('startPolling')},receivePollResult:function(obj){var errorstrings={n1:'geen video bestand',n2:'slechts 1 frame aangetroffen',n3:'verzoek geannuleerd',n4:'speelduur te lang',n6:'speelduur te kort',n7:'bestand te groot',n99:'niet nader gespecificeerd'};if(obj.errorCode!=0){var description_text=(errorstrings['n'+obj.errorCode]||'niet nader gespecificeerd');this.stage=this.stages.readyForGUID;this.handleUI({stage:this.stages.uploadingEncodingError,errorString:description_text})}else if(typeof obj.thumbnails!='undefined'){this.stage=this.stages.thumbsReceived;this.handleUI({stage:this.stages.thumbsReceived,errorString:'',thumbnails:obj.thumbnails})}else if(obj.stage=='uploading'){this.stage=this.stages.uploading;this.handleUI({stage:this.stage,uploadperc:obj.uploadperc,errorString:''})}else if(obj.stage=='encoding'){this.stage=this.stages.encoding;this.handleUI({stage:this.stage,encodingperc:obj.encodingperc,errorString:''})}},sendMetaData:function(string){this.stage=this.stages.sendMetadata;var result=this.flashCall('sendMetaData',string);if(result=='Error'){this.handleUI({stage:this.stages.sendingMetadata,errorString:'fout bij js-flash communicatie'})}},receiveMetaDataResult:function(string){if(string=='Error'){this.handleUI({stage:this.stages.sendMetadata,errorString:'fout bij opslaan metadata'})}else{this.handleUI({stage:this.stages.completed});this.stage=this.stages.readyForGUID}},showMP:function(source){show_mp_iframe(false,'close_and_notify',this.mpChannel,true)},showUI:function(source){if(source.className.indexOf('disabled')!=-1){return}if(!document.createElement||window.opera||(window.ActiveXObject&&!window.createPopup)){alert('Deze toepassing werkt niet in de door u gebruikte webbrowser.');return}source.className='rtlupload_starter_disabled';var object_els=document.getElementsByTagName('object');var flash_objects=[];for(var i=0;i<object_els.length;i++){var w=(object_els[i].offsetWidth)?object_els[i].offsetWidth:0;flash_objects.push(object_els[i]);object_els[i].style.visibility='hidden'}this.flashObjects=flash_objects;var top_container=this.getObj('rtlupload_topcontainer');var overlay=this.getObj('pic_view_overlay');document.body.appendChild(top_container);top_container.style.display='block';this.placeOverlay();this.addEvent(window,'resize',function(){rtlupload.placeOverlay()});if(this.IE55){var fake_container=this.getObj('rtlupload_fake_file_container');var real_file_form=this.getObj('rtlupload_file_form');var real_file_input=this.getObj('rtlupload_step1_file');fake_container.style.top=fake_container.parentNode.offsetHeight-real_file_input.offsetHeight;fake_container.style.display='block';real_file_form.style.position='relative';real_file_form.style.zIndex=2;real_file_input.style.filter='alpha(opacity=0)';real_file_input.onmousemove=function(){rtlupload.fileInputMouseOver(true)};real_file_input.onmouseout=function(){rtlupload.fileInputMouseOver(false)};real_file_input.onkeydown=function(){return false};real_file_input.onpaste=function(){return false};real_file_input.oncontextmenu=function(){return false}}this.stage=this.stages.flashTest;if(this.flashDetect()>=8){this.writeFlash()}else{this.handleUI({stage:this.stages.flashTest,errorString:'er is geen flash 8 ondersteuning aangetroffen'})}},closeUI:function(source){if(source.className.indexOf('disabled')!=-1){return}if(source.getAttribute('id')=='rtlupload_closebutton'&&(this.interfaceStage>2&&this.interfaceStage<8)&&!this.errorState){if(!confirm('Het opslaan van de gegevens is niet voltooid.\nWeet je zeker dat je wilt afsluiten?')){return}}this.getObj('pic_view_overlay').style.display='none';this.getObj('pic_view_overlay').className='hidden';this.getObj('rtlupload_topcontainer').style.display='none';location.replace(location.href)},handleUI:function(obj){var stages=this.stages;var error_txt='Er is een fout opgetreden.';switch(obj.stage){case stages.flashTest:this.showMessage('html',error_txt+'<br />('+obj.errorString+')',true);break;case stages.readyForGUID:this.getGUID();break;case stages.getGUID:this.showMessage('html',error_txt+'<br />('+obj.errorString+')',true);break;case stages.receivedGUID:this.getObj('rtlupload_file_form').action=this.server+this.uploadHandler+'?PostID='+this.GUID+'&profile='+this.profile;for(var i=0;i<this.fields.length;i++){var field=this.getObj('rtlupload_step1_'+this.fields[i]);field.disabled=false}this.getObj('rtlupload_step1_'+this.fields[0]).focus();break;case stages.readyForUploading:break;case stages.uploading:this.getObj('rtlupload_upload_perclabel').firstChild.nodeValue=Math.round(obj.uploadperc)+'%';this.getObj('rtlupload_upload_bar').style.width=Math.round(obj.uploadperc)+'%';break;case stages.encoding:if(this.interfaceStage==3){this.goToStep(4)}this.getObj('rtlupload_encoding_perclabel').firstChild.nodeValue=Math.round(obj.encodingperc)+'%';this.getObj('rtlupload_encoding_bar').style.width=Math.round(obj.encodingperc)+'%';break;case stages.uploadingEncodingError:this.showMessage('html',error_txt+'<br />('+obj.errorString+')',true);break;case stages.thumbsReceived:this.thumbnails=obj.thumbnails;this.goToStep(5);break;case stages.sendMetadata:this.showMessage('html',error_txt+'<br />('+obj.errorString+')',true);break;case stages.completed:this.goToStep(8);break}},goToStep:function(nr){if(nr==this.interfaceStage){return}switch(nr){case 1:this.getObj('rtlupload_step1_logo').style.display='block';this.getObj('rtlupload_step1_intro').style.display='block';this.getObj('rtlupload_step2_logo').style.display='none';this.getObj('rtlupload_step2_intro').style.display='none';this.getObj('rtlupload_step2_upload').className='rtlupload_upload_button_disabled';this.interfaceStage=1;break;case 2:this.getObj('rtlupload_step1_logo').style.display='none';this.getObj('rtlupload_step1_intro').style.display='none';this.getObj('rtlupload_step2_logo').style.display='block';this.getObj('rtlupload_step2_intro').style.display='block';this.getObj('rtlupload_step2_upload').className='rtlupload_upload_button';this.interfaceStage=2;break;case 3:for(var i=0;i<this.fields.length;i++){var max_length=(this.fields[i]=='description'?250:50);this.getObj('rtlupload_step3_'+this.fields[i]).firstChild.nodeValue=this.getObj('rtlupload_step1_'+this.fields[i]).value.insertSpaces(32,30).truncate(max_length,' ..')}this.getObj('rtlupload_step1_container').style.visibility='hidden';this.getObj('rtlupload_pb_step4_container').style.visibility='hidden';this.getObj('rtlupload_step3_container').style.visibility='visible';var h=this.getObj('rtlupload_step3_container').offsetHeight+110;this.getObj('rtlupload_topcontainer').style.height='450px';this.getObj('rtlupload_body').style.height='403px';this.getObj('rtlupload_closebutton').className='rtlupload_sluitknop_disabled';this.getObj('rtlupload_upload_bar').style.width='1%';this.getObj('rtlupload_encoding_bar').style.width='1%';this.interfaceStage=3;break;case 4:this.getObj('rtlupload_step3_logo').style.display='none';this.getObj('rtlupload_step4_logo').style.display='block';this.getObj('rtlupload_step3_intro').style.display='none';this.getObj('rtlupload_step4_intro').style.display='block';this.getObj('rtlupload_upload_perclabel').firstChild.nodeValue='100%';this.getObj('rtlupload_upload_bar').style.width='100%';this.getObj('rtlupload_pb_step4_container').style.visibility='visible';this.interfaceStage=4;break;case 5:this.getObj('rtlupload_encoding_perclabel').firstChild.nodeValue='100%';this.getObj('rtlupload_encoding_bar').style.width='100%';this.getObj('rtlupload_topcontainer').style.height='577px';this.getObj('rtlupload_body').style.height='530px';this.thumbnailsImg=[];this.thumbnailsLoaded=[];var instance=this;for(var i=0;i<this.thumbnails.length;i++){var img=document.createElement('img');img.setAttribute('rel',i+':'+this.thumbnails[i]);img.onload=function(){this.setAttribute('width',this.width);this.setAttribute('height',this.height);instance.thumbnailsLoaded[Number(this.getAttribute('rel').split(':')[0])]=1;this.onload=null;this.onerror=null};img.onerror=function(){instance.thumbnailsLoaded[Number(this.getAttribute('rel').split(':')[0])]=-1;this.onload=null;this.onerror=null};this.getObj('carrousel_thumbs_container').appendChild(img);img.setAttribute('src',this.server+this.thumbnails[i]);this.thumbnailsImg.push(img);this.thumbnailsLoaded.push(0)}this.thumbnailsInterval=setInterval(function(){instance.checkThumbsLoading()},1000);for(var i=0;i<this.fields.length;i++){var field_5=this.getObj('rtlupload_step5_'+this.fields[i]);var field_6=this.getObj('rtlupload_step6_'+this.fields[i]);var max_length=(this.fields[i]=='description'?250:50);if(field_5){field_5.firstChild.nodeValue=this.getObj('rtlupload_step1_'+this.fields[i]).value.insertSpaces(32,30).truncate(max_length,' ..')}if(field_6){if(field_6.nodeName.toLowerCase()!='select'){field_6.value=this.getObj('rtlupload_step1_'+this.fields[i]).value}else{var val=this.getObj('rtlupload_step1_'+this.fields[i]).value;for(var j=0;j<field_6.options.length;j++){if(field_6.options[j].value==val){field_6.selectedIndex=j;break}}}}}this.interfaceStage=5;break;case 6:if(this.interfaceStage==5){this.getObj('rtlupload_step5_intro').style.display='none';this.getObj('rtlupload_step6_intro').style.display='block';this.getObj('rtlupload_step5_meta_container').style.visibility='hidden';this.getObj('rtlupload_step6_meta_container').style.visibility='visible'}else{this.getObj('rtlupload_step6_send').className='rtlupload_send_button'}this.interfaceStage=6;break;case 7:this.getObj('rtlupload_step6_send').className='rtlupload_send_button_disabled';this.interfaceStage=7;break;case 8:this.getObj('rtlupload_step8_intro').innerHTML=this.getObj('rtlupload_thankyou_text').innerHTML;var els=['rtlupload_step5_headercontainer','carrousel_top_container','rtlupload_step5_meta_container','rtlupload_step6_meta_container'];for(var i=0;i<els.length;i++){this.getObj(els[i]).style.display='none'}this.getObj('rtlupload_step8_container').style.visibility='visible';this.getObj('rtlupload_body').style.height='130';this.getObj('rtlupload_topcontainer').style.height='177';this.interfaceStage=8;break}},checkThumbsLoading:function(){if(this.thumbnailsLoaded.indexOf(0)!=-1){return}clearInterval(this.thumbnailsInterval);var top_container=this.getObj('rtlupload_topcontainer');var header_container=this.getObj('rtlupload_step5_headercontainer');var thumbs_container=this.getObj('carrousel_top_container');var meta_container=this.getObj('rtlupload_step5_meta_container');var meta6_container=this.getObj('rtlupload_step6_meta_container');var thumbs=[];for(var i=0;i<this.thumbnailsLoaded.length;i++){if(this.thumbnailsLoaded[i]==1){thumbs.push(this.thumbnailsImg[i])}}if(thumbs.length==0){this.showMessage('html','Er is een fout opgetreden<br />(geen thumbs ingeladen).',true);return}rtlcarrousel.start(thumbs,this.startThumb);thumbs_container.style.top=(parseInt(header_container.style.height)+35)+'px';meta_container.style.top=meta6_container.style.top=(parseInt(thumbs_container.style.height)+parseInt(thumbs_container.style.top))+'px';var meta_height=(meta_container.offsetHeight>meta6_container.offsetHeight)?meta_container.offsetHeight:meta6_container.offsetHeight;var total_height=(parseInt(meta_container.style.top)+meta_height+40);total_height=(total_height>600?total_height:600);header_container.style.visibility='visible';thumbs_container.style.visibility='visible';meta_container.style.visibility='visible';this.getObj('rtlupload_step3_container').style.display='none';this.getObj('rtlupload_closebutton').className='rtlupload_sluitknop'},showMessage:function(type,message_string,error_state){if(type=='html'){this.getObj('rtlupload_error_subcontainer').innerHTML=message_string;this.getObj('rtlupload_invalid_closebutton').style.display=(error_state)?'none':'block';this.getObj('rtlupload_error_closebutton').style.display=(error_state)?'block':'none';this.getObj('rtlupload_error_container').style.visibility='visible'}else{alert(message_string)}if(error_state){this.errorState=true}},handleKeyUp:function(current_step,step_non_valid,step_valid){this.goToStep((this.validateFields(current_step).length==0?step_valid:step_non_valid));if(this.IE55&&event.type=='change'){this.getObj('rtlupload_fake_file_input').value=this.getObj('rtlupload_step1_file').value}},handleSubmit:function(frm){return false},handleClick:function(evt){var source=(window.event)?event.srcElement:evt.target;source=(source.nodeType==3)?source.parentNode:source;if(source.className.indexOf('disabled')!=-1){return}var rel=source.getAttribute('rel');if(!rel||rel.indexOf('click:')!=0){return}this[rel.split(':')[1]](source)},startUpload:function(source){if(this.validateFields(1).length>0){this.showMessage('html','Vul eerst alle verplichte<br /> velden op correcte wijze in.',false)}else{document.getElementById('rtlupload_file_form').submit();this.goToStep(3);this.startPolling()}},editMetaData:function(source){this.goToStep(6)},prepareMetaData:function(source){var fields=[
rtlcarrousel.activeThumb.getAttribute('rel').replace(/^\d+:/,''),this.getObj('rtlupload_step6_title').value.trim(),this.getObj('rtlupload_step6_description').value.trim(),this.getObj('rtlupload_step6_keywords').value.trim(),this.getObj('rtlupload_step6_location').value.trim(),this.getObj('rtlupload_step6_videodate').value.trim(),this.getObj('rtlupload_step6_videocategory').value
];if(fields.indexOf('')!=-1){this.showMessage('html','Vul eerst alle verplichte<br /> velden op correcte wijze in.',false);return}else{source.className='rtlupload_send_button_disabled';this.getObj('rtlupload_step5_edit').className='rtlupload_edit_button_disabled'}var xml_string='<fi'+'elds>\n';xml_string+='<ima'+'ge>'+fields[0].escapeXML(127)+'<\/im'+'age>\n';xml_string+='<ti'+'tle>'+fields[1].escapeXML(127)+'<\/ti'+'tle>\n';xml_string+='<descr'+'iption>'+fields[2].escapeXML(127)+'<\/descri'+'ption>\n';xml_string+='<key'+'words>'+fields[3].escapeXML(127)+'<\/keywords>\n';xml_string+='<cus'+'tom>\n';xml_string+='<loca'+'tion>'+fields[4].escapeXML(127)+'<\/loca'+'tion>\n';xml_string+='<vide'+'odate>'+fields[5].escapeXML(127)+'<\/vide'+'odate>\n';xml_string+='<rubr'+'iek>'+fields[6].escapeXML(127)+'<\/rubr'+'iek>\n';xml_string+='<\/cu'+'stom>\n';xml_string+='<\/fi'+'elds>';this.sendMetaData(xml_string)},resetForms:function(){this.getObj('rtlupload_step1_form').reset();this.getObj('rtlupload_file_form').reset();this.getObj('rtlupload_step2_upload').className='rtlupload_upload_button_disabled';this.goToStep(1);this.getObj('rtlupload_fake_file_input').value=''},fileInputMouseOver:function(over){if(!this.IE55){return}var fake_button=this.getObj('rtlupload_fake_file_button');var real_file_input=this.getObj('rtlupload_step1_file');if(!over){fake_button.className='rtlupload_fake_file';real_file_input.style.cursor='default'}else{var el=rtlcarrousel.getXY(fake_button);var mouse=rtlcarrousel.getMouseXY(event);var over_button=((mouse.x>el.x&&mouse.x<el.x+el.w)&&(mouse.y>el.y&&mouse.y<el.y+el.h));if(over_button){if(fake_button.className=='rtlupload_fake_file'){fake_button.className='rtlupload_fake_file_on'}}else{if(fake_button.className=='rtlupload_fake_file_on'){fake_button.className='rtlupload_fake_file'}}real_file_input.style.cursor=over_button?'hand':'default'}},validateFields:function(current_step){var invalid_fields=[];for(var i=0;i<this.fields.length;i++){var input=this.getObj('rtlupload_step'+current_step+'_'+this.fields[i]);if(!input){continue}var rel=input.getAttribute('rel');var val=input.value;if(rel&&rel.indexOf('req')==0){var function_name=rel.split(':')[1];if(!this[function_name](val)){invalid_fields.push(this.fields[i])}}}return invalid_fields},validDate:function(string){var input=string.trim();if(!/^\d{1,2}\-\d{1,2}\-\d{4}$/.test(input)){return false}var list=string.split('-');list.walk(Number);if(list[2]<1896||list[2]>(new Date()).getFullYear()){return false}if(list[1]>12){return false}if(list[0]>[31,(list[2] % 4==0?29:28),31,30,31,30,31,31,30,31,30,31][list[1]-1]){return false}return true},notEmpty:function(string){return(string.trim()!='')},preloadImages:function(urls){for(var i=0;i<urls.length;i++){var img=new Image();img.src=urls[i]}},placeOverlay:function(){var overlay_el=this.getObj('pic_view_overlay');overlay_el.style.display='none';var page_size=this.determinePageDimensions();overlay_el.className='pic_view_overlay';with(overlay_el.style){width=page_size.x+'px';height=page_size.y+'px';display='block';zIndex=599}document.body.scrollTop=0},determinePageDimensions:function(){var test1=document.body.scrollHeight;var test2=document.body.offsetHeight
return(test1>test2)?{x:document.body.scrollWidth,y:document.body.scrollHeight}:{x:document.body.offsetWidth,y:document.body.offsetHeight}},determineWindowDimensions:function(){return{x:(window.innerWidth?window.innerWidth-15:document.body.clientWidth),y:(window.innerHeight?window.innerHeight-15:document.body.clientHeight)}},flashCall:function(method_name,arg){var embs=document.embeds;var flash_el=(embs&&embs[this.embedID]&&embs[this.embedID][method_name])?embs[this.embedID]:document.getElementById(this.objectID);var result;try{result=(typeof arg=='undefined')?flash_el[method_name]():flash_el[method_name](arg)}catch(e){result='Error'}return result},getCookie:function(name){var rx=new RegExp(name+"=([^;]+)");var value=rx.exec(document.cookie);return(value!=null)?unescape(value[1]):''},getObj:function(id){return document.getElementById(id)},addEvent:function(object,eventstring,func){if(typeof window.addEventListener=='function'){object.addEventListener(eventstring,func,false)}else{object.attachEvent('on'+eventstring,func)}}};function RTLCarrousel(id,topContainer,maxThumbWidth,thumbMargin,showBorder){this.id=id;this.topContainer=topContainer;this.maxThumbWidth=maxThumbWidth;this.thumbMargin=thumbMargin;this.showBorder=showBorder;this.thumbs=null;this.activeThumb=null;this.thumbWidth=0;this.thumbHeight=0;this.firstStart=true;this.dragging=false;this.dragOffset=0;this.IE=(typeof ActiveXObject=='function');this.noPNG=(typeof ActiveXObject=='function'&&typeof XMLHttpRequest=='undefined')};RTLCarrousel.prototype={start:function(thumbs,start_at){if(this.firstStart){var els=['carrousel_top_container','carrousel_thumbs_container','carrousel_prev_button','carrousel_next_button','carrousel_number','carrousel_overlay_left','carrousel_overlay_right','carrousel_border','carrousel_border_white','carrousel_slider_top_container','carrousel_slider_container','carrousel_slider_button'];for(var i=0;i<els.length;i++){this[els[i]]=document.getElementById(els[i])}var instance=this;this.addEvent(document,'mousemove',function(evt){instance.handleMouseMove(evt)});this.addEvent(document,'mouseup',function(evt){instance.stopDrag(evt)});this.firstStart=false}if(this.noPNG){this.carrousel_overlay_left.style.backgroundImage='none';this.carrousel_overlay_left.style.backgroundColor='#FFFFFF';this.carrousel_overlay_left.style.filter='alpha(opacity=60)';this.carrousel_overlay_right.style.backgroundImage='none';this.carrousel_overlay_right.style.backgroundColor='#FFFFFF';this.carrousel_overlay_right.style.filter='alpha(opacity=60)'}this.thumbs=thumbs;while(this.carrousel_thumbs_container.hasChildNodes()){this.carrousel_thumbs_container.removeChild(this.carrousel_thumbs_container.lastChild)}for(var i=0;i<this.thumbs.length;i++){this.thumbs[i].style.visibility='hidden';this.carrousel_thumbs_container.appendChild(this.thumbs[i])}var startpos=(start_at>thumbs.length-1)?thumbs.length-1:start_at;var w=Number(this.thumbs[0].getAttribute('width'));var h=Number(this.thumbs[0].getAttribute('height'));var thumb_w=this.maxThumbWidth;var thumb_h=(thumb_w/w)*h;var container_w=(3*this.maxThumbWidth)+(2*this.thumbMargin);var container_h=thumb_h;this.thumbPositions=[0,this.maxThumbWidth+this.thumbMargin,2*(this.maxThumbWidth+this.thumbMargin)];this.thumbWidth=thumb_w;this.thumbHeight=thumb_h;with(this.carrousel_border.style){left=(this.thumbPositions[1]-6)+'px';top='-4px';width=(this.thumbWidth+10)+'px';height=(this.thumbHeight+28)+'px';visibility=(this.showBorder)?'visible':'hidden'}with(this.carrousel_border_white.style){left=(this.thumbPositions[1]-1)+'px';top='18px';width=(this.thumbWidth+2)+'px';height=(this.thumbHeight+1)+'px';visibility=(this.showBorder)?'visible':'hidden'}with(this.carrousel_thumbs_container.style){width=container_w+'px';height=container_h+'px'}with(this.carrousel_top_container.style){width=container_w+'px';height=(this.thumbHeight+4+38)+'px'}with(this.carrousel_number.style){left=((container_w/2)-(this.carrousel_number.offsetWidth/2))+'px'}this.carrousel_prev_button.style.top=(this.thumbHeight+10+19)+'px';this.carrousel_next_button.style.top=(this.thumbHeight+10+19)+'px';with(this.carrousel_slider_top_container.style){left='44px';top=(this.thumbHeight+4+19)+'px';width=(container_w-88)+'px'}this.carrousel_slider_container.style.width=(container_w-92)+'px';this.scrollSpace=(this.carrousel_slider_container.offsetWidth-this.carrousel_slider_button.offsetWidth);this.sliderStep=this.scrollSpace/(this.thumbs.length-1);this.placeThumbs(startpos);this.placeSliderButton(startpos)},placeThumbs:function(startpos){for(var i=0;i<this.thumbs.length;i++){this.thumbs[i].style.visibility='hidden'}var left_img=(startpos>0)?this.thumbs[startpos-1]:null;var center_img=this.thumbs[startpos];var right_img=(startpos<this.thumbs.length-1)?this.thumbs[startpos+1]:null;if(left_img!=null){left_img.setAttribute('width',this.thumbWidth);left_img.setAttribute('height',this.thumbHeight);with(left_img.style){left=this.thumbPositions[0]+'px';top='0px';visibility='visible'}with(this.carrousel_overlay_left.style){left=this.thumbPositions[0]+'px';width=this.thumbWidth+'px';height=this.thumbHeight+'px';visibility='visible'}}else{this.carrousel_overlay_left.style.visibility='hidden'}center_img.setAttribute('width',this.thumbWidth);center_img.setAttribute('height',this.thumbHeight);with(center_img.style){left=this.thumbPositions[1]+'px';top='0px';visibility='visible'}if(right_img!=null){right_img.setAttribute('width',this.thumbWidth);right_img.setAttribute('height',this.thumbHeight);with(right_img.style){left=this.thumbPositions[2]+'px';top='0px';visibility='visible'}with(this.carrousel_overlay_right.style){left=this.thumbPositions[2]+'px';width=this.thumbWidth+'px';height=this.thumbHeight+'px';visibility='visible'}}else{this.carrousel_overlay_right.style.visibility='hidden'}var prev_class=this.carrousel_prev_button.className;var next_class=this.carrousel_next_button.className;if(startpos==0&&prev_class.indexOf('disabled')==-1){this.carrousel_prev_button.className='carrousel_prev_disabled'}else if(prev_class.indexOf('disabled')!=-1){this.carrousel_prev_button.className='carrousel_prev'}if(startpos==this.thumbs.length-1&&next_class.indexOf('disabled')==-1){this.carrousel_next_button.className='carrousel_next_disabled'}else if(next_class.indexOf('disabled')!=-1){this.carrousel_next_button.className='carrousel_next'}this.carrousel_number.firstChild.nodeValue='Screenshot '+(startpos+1)+' van '+this.thumbs.length;this.activePos=startpos;this.activeThumb=center_img},placeSliderButton:function(new_pos){var pos=(new_pos*this.sliderStep);pos=(pos<2)?2:pos;pos=(pos>this.scrollSpace-2)?this.scrollSpace-2:pos;this.carrousel_slider_button.style.left=pos+'px'},handleMouseMove:function(evt){if(!this.dragging){return}var source=(window.event)?event.srcElement:evt.target;source=(source.nodeType==3)?source.parentNode:source;var el=source;var in_top_container=false;while(el){if(el==this.topContainer){in_top_container=true;break}el=el.parentNode}(!in_top_container)?this.stopDrag(evt):this.doDrag(evt)},handlePrevNextClick:function(dir){var new_pos=this.activePos+dir;if(new_pos<0||new_pos>this.thumbs.length-1){return}this.placeThumbs(new_pos);this.placeSliderButton(new_pos)},handlePrevNextMouse:function(obj,inside){if(obj.className.indexOf('disabled')!=-1){return}var which=obj.getAttribute('rel').split(':')[1];obj.className='carrousel_'+which+(inside?'_on':'')},startDrag:function(evt){var mouse_xy=this.getMouseXY(evt);var button_xy=this.getXY(this.carrousel_slider_button);this.dragOffset=mouse_xy.x-button_xy.x;this.dragging=true;return false},doDrag:function(evt){var mouse_xy=this.getMouseXY(evt);var container_xy=this.getXY(this.carrousel_slider_container);var button_width=this.carrousel_slider_button.offsetWidth;var x_pos=mouse_xy.x-container_xy.x-this.dragOffset;x_pos=(x_pos<2)?2:x_pos;x_pos=(x_pos>container_xy.w-button_width-2)?container_xy.w-button_width-2:x_pos;this.carrousel_slider_button.style.left=x_pos+'px';var startpos=Math.round(x_pos/this.sliderStep);if(startpos!=this.activePos){this.placeThumbs(startpos)}},stopDrag:function(evt){this.dragging=false},addEvent:function(object,eventstring,func){if(typeof window.addEventListener=='function'){object.addEventListener(eventstring,func,false)}else{object.attachEvent('on'+eventstring,func)}},getXY:function(element){var el=element;var x_offset=0;var y_offset=0;while(el.offsetParent){x_offset+=el.offsetLeft;y_offset+=el.offsetTop;el=el.offsetParent}var w=(element.offsetWidth)?element.offsetWidth:0;var h=(element.offsetHeight)?element.offsetHeight:0;return{x:x_offset,y:y_offset,w:w,h:h}},getMouseXY:function(e){if(window.event){mouse_x=(window.ActiveXObject||window.opera)?event.clientX+document.body.scrollLeft:event.clientX;mouse_y=(window.ActiveXObject||window.opera)?event.clientY+document.body.scrollTop:event.clientY}else{mouse_x=e.pageX;mouse_y=e.pageY}return{x:mouse_x,y:mouse_y}}};String.prototype.insertSpaces=function(code_point,max_length){var words=this.split(/\s| /);for(var i=0;i<words.length;i++){if(words[i].length>max_length){words[i]=words[i].chunkSplit(max_length).join(String.fromCharCode(code_point))}}return words.join(' ')};String.prototype.chunkSplit=function(nr){var return_array=[];for(var i=0;i<this.length;i+=nr){return_array[return_array.length]=this.substring(i,i+nr)}return return_array};String.prototype.truncate=function(max_length,add_string){return(this.length>max_length)?this.substr(0,max_length-add_string.length)+add_string:this};Array.prototype.walk=function(func){for(var i=0;i<this.length;i++){this[i]=func(this[i])}};Array.prototype.indexOf=Array.prototype.indexOf||function(val){for(var i=0;i<this.length;i++){if(this[i]===val){return i}}return-1};String.prototype.trim=function(){return this.replace(/^\s+/g,'').replace(/\s+$/g,'')};String.prototype.escapeXML=function(encode_above){var xml_special='<>\'"&';var tmp='';var i=0;var c,cc,c2,cc2;while(i<this.length){c=this.charAt(i);cc=c.charCodeAt(0);if(xml_special.indexOf(c)!=-1||cc>encode_above){if(cc<0xD800||cc>0xDFFF){tmp+='&#'+cc+';';i++}else{c2=this.charAt(i+1);cc2=(c2!='')?c2.charCodeAt(0):NaN;if(cc>=0xD800&&cc<=0xDBFF&&!isNaN(cc2)&&cc2>=0xDC00&&cc2<=0xDFFF){cc=(((cc & 1023)<<10)|(cc2 & 1023))+0x10000;tmp+='&#'+cc+';';i+=2}else{i++}}}else{tmp+=c;i++}}return tmp};RTLUpload.prototype.writeFlash=function(){var flashvars='jsID='+this.jsID+'&guidServer='+this.guidServer+'&pollHandler='+this.pollHandler+'&metadataHandler='+this.metadataHandler;var html_string='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="1" height="1" id="'+this.objectID+'" align="middle">'+'<param name="flashvars" value="'+flashvars+'" />'+'<param name="wmode" value="transparent" />'+'<param name="allowScriptAccess" value="sameDomain" />'+'<param name="movie" value="/system/videoupload/videoupload2.swf" />'+'<param name="quality" value="high" />'+'<param name="bgcolor" value="#ffffff" />'+'<embed src="/system/videoupload/videoupload2.swf" wmode="transparent" flashvars="'+flashvars+'"quality="high" bgcolor="#ffffff" width="1" height="1" name="'+this.embedID+'" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';'<\/object>';this.getObj('rtlupload_flash_container').innerHTML=html_string};function preserveString(el){window.location.href=el.getAttribute('href')}function flashDetect(versienummer){var ver=(typeof versienummer=='undefined')?9:versienummer;var flashversie=-1;if(typeof window.ActiveXObject!='undefined'&&navigator.platform.indexOf('Win')!=-1){try{var flash_obj=new ActiveXObject('ShockwaveFlash.ShockwaveFlash.'+ver);flashversie=ver}catch(e){flashversie=-1}flash_obj=null}else if(navigator.plugins){var flash_obj=navigator.plugins['Shockwave Flash'];if(flash_obj&&typeof flash_obj.description=='string'){var versienummer=flash_obj.description.match(/([0-9]+)/);flashversie=versienummer?parseInt(versienummer[0]):flashversie}}return flashversie}function schrijfObject(movie_name,flash_width,flash_height,flashcontainer,flash_vars,versienummer){var ver=(typeof versienummer=='undefined')?9:versienummer;if(flashDetect(ver)>=ver){document.getElementById(flashcontainer).innerHTML='<obj'+'ect classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+flash_width+'" height="'+flash_height+'" name="flash_app'+Math.round(Math.random()*100000)+'" id="flash_app'+Math.round(Math.random()*100000)+'" align="middle" >'+'<par'+'am name="allowScriptAccess" value="always" />'+'<par'+'am name="movie" value="'+movie_name+'" />'+'<par'+'am name="quality" value="high" />'+'<par'+'am name="wmode" value="transparent" />'+'<par'+'am name="src" value="'+movie_name+'" />'+'<par'+'am name="flashvars" value="'+flash_vars+'" />'+'<emb'+'ed sr'+'c="'+movie_name+'" quality="high" flashvars="'+flash_vars+'" width="'+flash_width+'" height="'+flash_height+'" name="flash_app'+Math.round(Math.random()*100000)+'" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" id="flash_app'+Math.round(Math.random()*100000)+'" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent" />'+'<\/obj'+'ect>'}else{if(flash_width>200){document.getElementById(flashcontainer).innerHTML='<div'+' style="background:#333333;border:2px solid #333333;-moz-border-radius: 10px;-webkit-border-radius: 10px;">'+'<p'+' style="font-family: Verdana, Arial; font-weight: bold; color: #FFFFFF; margin: 5px;">Wij hebben niet kunnen detecteren of u over de Flash 8 player beschikt.<\/p>'+'<p'+' style="font-family: Verdana, Arial; font-weight: bold; font-size: 11px; color: #FFFFFF; margin: 5px; margin-top: 8px;">'+'U kunt de nieuwste Flash player downloaden bij <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank" style="color: #FFFFFF; font-weight:bold;text-decoration:underline;">Adobe<\/a>.'+'<\/p>'+'<\/div>'}else{document.getElementById(flashcontainer).innerHTML='<div'+' style="background:#333333;border:2px solid #333333;-moz-border-radius: 10px;-webkit-border-radius: 10px;">'+'<p'+' style="font-family: Verdana, Arial; font-weight: bold; font-size: 11px; color: #FFFFFF; margin: 5px; margin-top: 8px;">'+'Geen Flash-plugin gevonden'+'<\/p>'+'<\/div>'}}}function tell_a_friend_layer(){var taf_layer=document.getElementById('tell_a_friend_container');if(taf_layer.getAttribute('rel')!='active'){window.scroll(0,0);taf_layer.style.display='block';taf_layer.setAttribute('rel','active');var element_overlay=document.getElementById('pic_view_overlay');element_overlay.style.height=determinePageHeight().y+"px";element_overlay.onclick=tell_a_friend_layer;element_overlay.className="pic_view_overlay"}else{taf_layer.style.display='none';taf_layer.setAttribute('rel','');var element_overlay=document.getElementById('pic_view_overlay');element_overlay.className="hidden"}}function show_tdr_form(){var element_overlay_pic=document.getElementById('pic_view_container');var element_overlay=document.getElementById('pic_view_overlay');if(element_overlay_pic.getAttribute('rel')!='active'){window.scroll(0,0);var newScrollTop=document.body.scrollTop;element_overlay_pic.setAttribute('rel','active');element_overlay_pic.innerHTML='<iframe sr'+'c="/actueel/rtlnieuws/tipderedactie_popup/mailform.xml" width="482" height="442" scrolling="no" frameborder="no"><\/iframe>';element_overlay.style.height=determinePageHeight().y+"px";element_overlay.onclick=show_tdr_form;element_overlay.className="pic_view_overlay";element_overlay_pic.className="pic_view_container";element_overlay_pic.style.padding='0px 10px 20px 0px'}else{element_overlay_pic.setAttribute('rel','');element_overlay_pic.className="hidden";element_overlay.className="hidden";element_overlay_pic.innerHTML=''}}function show_voorwaarden(){var element_overlay_pic=document.getElementById('pic_view_container');var element_overlay=document.getElementById('pic_view_overlay');if(element_overlay_pic.getAttribute('rel')!='active'){window.scroll(0,0);var newScrollTop=document.body.scrollTop;element_overlay_pic.setAttribute('rel','active');element_overlay_pic.innerHTML='<iframe sr'+'c="/actueel/rtlnieuws/algemene_voorwaarden/voorwaarden.xml" width="482" height="442" scrolling="no" frameborder="no"><\/iframe>';element_overlay.style.height=determinePageHeight().y+"px";element_overlay.onclick=show_tdr_form;element_overlay.className="pic_view_overlay";element_overlay_pic.className="pic_view_container";element_overlay_pic.style.padding='0px 10px 20px 0px'}else{element_overlay_pic.setAttribute('rel','');element_overlay_pic.className="hidden";element_overlay.className="hidden";element_overlay_pic.innerHTML=''}}function lastUpdate(currentDate,documentDate,artikel){var docDag=documentDate.substring(0,2);var docMaand=documentDate.substring(3,5);var curDag=currentDate.substring(0,2);var curMaand=currentDate.substring(3,5);var result=curDag-docDag;if(curMaand=docMaand){if(result==1){artikel.innerHTML='gisteren'}else if(result>1){artikel.innerHTML=documentDate}}}function teken_bars(el){var currentWidth=el.width;var newWidth=currentWidth*1.9;el.width=newWidth}function check(el){if(el.value=='zoek!')el.value='';return true}function searchcheck(name){var ws=' \t\r\n';var q=document[name].q.value;while(q.length>1&&ws.indexOf(q.charAt(0))>-1){q=q.substring(1)}while(q.length>1&&ws.indexOf(q.charAt(q.length-1))>-1){q=q.substring(0,q.length-1)}if(q!=''&&q!=' '){document[name].q.value=q;document[name].submit()}return 1}function balloon_left(el){if(el.getAttribute('rel')!='active'){document.getElementById('roll_balloon_left').style.display='block';el.setAttribute('rel','active')}else{document.getElementById('roll_balloon_left').style.display='none';el.setAttribute('rel','')}}function balloon_left_mid(el){if(el.getAttribute('rel')!='active'){document.getElementById('roll_balloon_left_mid').style.display='block';el.setAttribute('rel','active')}else{document.getElementById('roll_balloon_left_mid').style.display='none';el.setAttribute('rel','')}}function balloon_mid(el){var balloons=el.getElementsByTagName('div');var balloon_text='';for(i=0;i<balloons.length;i++){if(balloons.className='roll_balloon_mid'){if(el.getAttribute('rel')!='active'){balloons[i].style.display='block';el.setAttribute('rel','active')}else{balloons[i].style.display='none';el.setAttribute('rel','')}}}}function videoIconGroot(el){var divCont=el.getElementsByTagName('div');for(j=0;j<divCont.length;j++){if(divCont[j].className=="video_cont"){divCont[j].className="video_cont_hover"}else if(divCont[j].className=="video_cont_hover"){divCont[j].className="video_cont"}}}function videoIcon(el){var imgCont=el.getElementsByTagName('img');for(i=0;i<imgCont.length;i++){if(imgCont[i].className=="videolead_play_icon"){imgCont[i].className="videolead_play_icon_hover"}else{imgCont[i].className="videolead_play_icon"}}var divCont=el.getElementsByTagName('div');for(j=0;j<divCont.length;j++){if(divCont[j].className=="videolead_title_2"){divCont[j].className="videolead_title_2_active"}else if(divCont[j].className=="videolead_title_2_active"){divCont[j].className="videolead_title_2"}}}function videoIconVerrijking(el){var imgCont=el.getElementsByTagName('img');for(i=0;i<imgCont.length;i++){if(imgCont[i].className=="videolead_play_icon"){imgCont[i].className="videolead_play_icon_hover"}else{imgCont[i].className="videolead_play_icon"}}}function establishClass(el){var archive_items=document.getElementById(el).getElementsByTagName('li');for(i=0;i<archive_items.length;i++){if(archive_items[i].offsetHeight>24){archive_items[i].className='archive_item_groot'}}}var today_date=new Date();var yesterday_date=new Date();yesterday_date.setDate(yesterday_date.getDate()-1);function makeDateFull(date_object){var aDay=(date_object.getDate()<10)?'0'+date_object.getDate()+'-':date_object.getDate()+'-';var aMonth=(date_object.getMonth()<9)?'0'+(date_object.getMonth()+1)+'-':(date_object.getMonth()+1)+'-';var aDate=aDay+aMonth+date_object.getFullYear();return aDate}function makeDate(date_object){var aDay=(date_object.getDate()<10)?'0'+date_object.getDate()+' ':date_object.getDate()+' ';var aMonth=(date_object.getMonth()<9)?'0'+(date_object.getMonth()+1):(date_object.getMonth()+1);if(aMonth=='01'){aMonth='jan -'}else if(aMonth=='02'){aMonth='feb -'}else if(aMonth=='03'){aMonth='mrt -'}else if(aMonth=='04'){aMonth='apr -'}else if(aMonth=='05'){aMonth='mei -'}else if(aMonth=='06'){aMonth='juni -'}else if(aMonth=='07'){aMonth='july -'}else if(aMonth=='08'){aMonth='aug -'}else if(aMonth=='09'){aMonth='sept -'}else if(aMonth=='10'){aMonth='okt -'}else if(aMonth=='11'){aMonth='nov -'}else if(aMonth=='12'){aMonth='dec -'}var aDate=aDay+aMonth;return aDate}var t_date=makeDateFull(today_date);var y_date=makeDate(yesterday_date);var span_date;var span_time;var temp_date;function jump_to_marker(markername){location.href="#"+markername}function set_values(a){for(var b in a){switch(a[b].name){case"TradePrice":var trade_price=a[b].value.replace(/\/financien\/rtlz\/koersen\/images\/stijgen.gif/,'\/internal-roxen-unit');trade_price=trade_price.replace(/\/financien\/rtlz\/koersen\/images\/dalen.gif/,'\/internal-roxen-unit');document.getElementById('TradePrice').innerHTML=trade_price.replace(/width='10'height='10'/,"width='1' height='8' sty'+'le='margin-right:4px'");break}}}var browserName=navigator.appName;function browserCheck(){if(browserName=="Netscape"){xml_targets=doc_total[i].parentNode.id}else{if(browserName=="Microsoft Internet Explorer"){xml_targets=doc_total[i].parentElement.id}else{xml_targets=doc_total[i].parentNode.id}}}function setHomepage(el){if(browserName=="Microsoft Internet Explorer"){el.style.behavior='url(#default#homepage)';el.setHomePage('http://www.rtlnieuws.nl')}else{alert('Deze functie is alleen beschikbaar als U gebruikt maakt van Internet Explorer')}}function addBookmark(el){if(browserName=="Microsoft Internet Explorer"){external.AddFavorite('http://www.rtlnieuws.nl/','RTL Nieuws')}else{alert('Deze functie is alleen beschikbaar als U gebruik maakt van Internet Explorer.')}}