String.prototype.Contains=function(a){return(this.toLowerCase().indexOf(a.toLowerCase())>-1)};function removeSys(b){var a=/_sys_[0-9]+_[0-9]+_/i;b=b.replace(a,"");return b}function killEvent(a){if(!a){var a=window.event}if(a){a.cancelBubble=true;if(a.stopPropagation){a.stopPropagation()}}}var s=navigator.userAgent.toLowerCase();var VWABrowserInfo={IsIE:s.Contains("msie"),IsIE7:s.Contains("msie 7"),IsGecko:s.Contains("gecko"),IsSafari:s.Contains("safari"),IsOpera:s.Contains("opera"),IsMac:s.Contains("macintosh"),IsWin:navigator.appVersion.toLowerCase().Contains("win")};function cloneObject(a){for(i in a){this[i]=a[i]}}function VWA_ScrollIntoView(a){if(a){if(VWABrowserInfo.IsSafari||VWABrowserInfo.IsOpera){a.scrollIntoView(true)}else{try{a.focus();a.blur()}catch(b){a.scrollIntoView(true)}}}}function getElementStyle(c,b){if(c.currentStyle){return c.currentStyle[b]}else{if(window.getComputedStyle){var a=window.getComputedStyle(c,"");return a.getPropertyValue(b)}}return""}var _sID;var _FuncOnChange="";function selectFile(b,a,e,d){if(!e){e=""}if(!d){d=""}_FuncOnChange=e;_sID=b;var c="pop_fileManager.aspx";c+="?BaseSubDir="+a;if($get(b)){c+="&file="+$get(b).value}c+="&Type="+d;top.OpenPopup(window,"fileResult",c,"File",750,520,"Afbeelding kiezen",true)}function fileResult(ReturnValue){if(ReturnValue){$get(_sID).value=ReturnValue}eval(_FuncOnChange+'("'+ReturnValue+'")')}var oHolder=null;var oPopup=null;var oPopupStruct=function(c,a,e,b,g,h,d,f){this.sPopupID=c;this.iWidth=a||300;this.iHeight=e||400;this.sHTML=b;this.sOkId=g||"btnOk";this.sCancelId=h||"btnCancel";this.sOpenerId="divOpener"+c;this.oHolder=null;this.onCloseHandler=null;this.args=null;this.bIframe=(d?true:false);this.oContent=null;this.bRoundedCurves=(f?true:false)};var iTryOpenPopupCount=0;function ModalPopupOpen(e,x,d,w,p,m,y,q){if(!oPopup){oPopup=new oPopupStruct(e,x,d,w,p,m,y,q)}else{if(!e){x=oPopup.iWidth;d=oPopup.iHeight;w=oPopup.sHTML;p=oPopup.sOkId;m=oPopup.sCancelId;y=oPopup.bIframe;q=oPopup.bRoundedCurves;e=oPopup.sPopupID}}if(document.readyState&&document.readyState!="complete"&&iTryOpenPopupCount<50){iTryOpenPopupCount+=1;window.setTimeout("ModalPopupOpen();",50);return}iTryOpenPopupCount=0;var u=$get(e);var h=null;h=$get(oPopup.sOpenerId);if(!h){h=document.createElement("div");h.id=oPopup.sOpenerId;h.className="modalForeGround";h.style.position="absolute";h.style.overflow="visible";if(oPopup.bRoundedCurves){var t=document.createElement("table");t.cellPadding=0;t.cellSpacing=0;t.style.width="100%";t.style.height="100%";t.className="pop";h.appendChild(t);var n=t.insertRow(0);var l=t.insertRow(1);var k=t.insertRow(2);var j=n.insertCell(0);j.className="popTL";var v=n.insertCell(1);v.className="popT";var g=n.insertCell(2);g.className="popTR";var r=l.insertCell(0);r.className="popCL";var a=l.insertCell(1);a.className="popC";var o=l.insertCell(2);o.className="popCR";var f=k.insertCell(0);f.className="popBL";var b=k.insertCell(1);b.className="popB";var c=k.insertCell(2);c.className="popBR";oPopup.oContent=a}else{oPopup.oContent=h}}else{oPopup.ReFill=true}if(u){if(!x){oPopup.iWidth=parseInt(u.style.width)}if(!d){oPopup.iHeight=parseInt(u.style.height)+(oPopup.bRoundedCurves?26:0)}}if(oPopup.bIframe){if(!oPopup.ReFill){oPopup.oContent.innerHTML='<iframe name="'+oPopup.sPopupID+'Ifrm" id="'+oPopup.sPopupID+'Ifrm" src="javascript:void(document.write(\'\'))" style="width:100%; height:100%;" ALLOWTRANSPARENCY vspace="0" scrolling="no" frameborder="0" border="0"></iframe>'}}else{if(w&&w.length!=0){oPopup.oContent.innerHTML=w;oPopup.oHolder=null}else{if(u){oPopup.oHolder=VWABrowserInfo.IsGecko?u.parentNode:u.parentElement;oPopup.oHolder.removeChild(u);oPopup.oContent.appendChild(u)}}}if(oPopup.bIframe){setTimeout(popupSetURL,5)}if(!oPopup.ReFill){CreateModalMask(oPopup.sPopupID,"modalBackground");document.body.appendChild(h);SetPosition(h,oPopup.iWidth,oPopup.iHeight);$addHandler(document,"keydown",popupKeyPressed)}else{SetPosition(h,oPopup.iWidth,oPopup.iHeight)}}function popupSetURL(){iframe=document.getElementById(oPopup.sPopupID+"Ifrm").contentWindow;var a=oPopup.sHTML;var b=new Date();a+=(a.Contains("?")?"&":"?")+"t="+b.format("hms");iframe.location=a}function popupKeyPressed(a){if(a.keyCode==13){var c=$get(oPopup.sOkId);if(c&&c.onclick){c.onclick()}}if(a.keyCode==27){var b=$get(oPopup.sCancelId);if(b&&b.onclick){b.onclick()}}}function ModalPopupClose(d){if(!d){window.setTimeout("ModalPopupClose(true)",100);return false}var c=$find("BoxAnimation");if(c){c._onClick.stop()}var b=$get(oPopup.sOpenerId);if(b){var a=null;if(oPopup.oHolder){a=oPopup.oContent.childNodes[0];if(a){oPopup.oHolder.appendChild(a)}}}b.innerHTML="";document.body.removeChild(b);b.id="";b=null;document.body.removeChild($get("tblOpener"+oPopup.sPopupID));$removeHandler(document,"keydown",popupKeyPressed);if(oPopup.onCloseHandler){oPopup.onCloseHandler(oPopup.args)}oPopup=null}function CreateModalMask(b,a){var c=document.createElement("div");if(a){c.className=a}c.id="tblOpener"+b;c.style.cssText="z-index:1000;position: absolute; top: 0px; width: 100%; height:100%;";document.body.appendChild(c);var d=document.body.scrollHeight;if(typeof(iDivsetHeight)!="undefined"){d=(iDivsetHeight>d)?iDivsetHeight:d}c.style.height=d+"px";var e=$find("FadeAnimation");if(e){e._onClick._animation.set_target(c);e._onClick._animation.play()}}function CheckPosition(b){GetScreenSize();if(!b.MarginWidth){b.MarginWidth=0}if(!b.MarginHeight){b.MarginHeight=0}var c=b.InnerWidth.toString().lastIndexOf("%");if(c>0){b.InnerWidth=b.InnerWidth.substring(0,c);b.InnerWidth=(iWindowWidth*(b.InnerWidth/100))-b.MarginWidth}c=b.InnerHeight.toString().lastIndexOf("%");if(c>0){b.InnerHeight=b.InnerHeight.substring(0,c);b.InnerHeight=(iWindowHeight*(b.InnerHeight/100))-b.MarginHeight}if(b.InnerWidth<=0){b.InnerWidth=515}if(b.InnerHeight<=0){b.InnerHeight=360}b.PopupWidth=b.InnerWidth+b.MarginWidth;b.PopupHeight=b.InnerHeight+b.MarginHeight;b.offsetY=0;var a=$get("DivSet");if(a&&!bUpdate){b.offsetY=Sys.UI.DomElement.getBounds($get("DivSet")).y}return b}function SetPosition(d,c,b,a,g,f){var e=null;if(!d||Object.getTypeName(d)==="Sys.UI.DomEvent"){d=$get(oPopup.sOpenerId);if(d&&d._bounds){if(c&&c>0&&b&&b>0){d._bounds.InnerWidth=c;d._bounds.InnerHeight=b}e=CheckPosition(d._bounds)}}else{e=CheckPosition({PopupWidth:0,PopupHeight:0,MarginWidth:a,MarginHeight:g,InnerHeight:b,InnerWidth:c})}if(!d){return false}if(!d._PositionSet){d.style.position="absolute";d.style.zIndex=1001;d.style.display="block"}if(f){f.play()}else{d.style.width=e.PopupWidth+"px";d.style.height=e.PopupHeight+"px";d.style.left=(iWindowWidth/2)-(e.PopupWidth/2)+"px";d.style.top=((iWindowHeight/2)-(e.PopupHeight/2)-e.offsetY)+"px"}d._left=(iWindowWidth/2)-(e.PopupWidth/2);d._top=((iWindowHeight/2)-(e.PopupHeight/2)-e.offsetY);d._PositionSet=true;d._bounds=e;window.setTimeout(SetPositionMask,200)}function SetPositionMask(){if(!oPopup){return false}var a=$get("tblOpener"+oPopup.sPopupID);if(a){var b=document.body.scrollHeight;if(typeof(iDivsetHeight)!="undefined"){b=(iDivsetHeight>b)?iDivsetHeight:b}a.style.height=b+"px";a.style.width=document.body.scrollWidth+"px"}}function isNumber(a){if((typeof(a)=="undefined")||(a==null)){a=""}else{if(typeof(a)=="object"){a=GetValue(a)}}if(a.length==0){return false}else{a=replaceString(a,",",".");return !isNaN(a)}}function toNumber(b){var a=0;if(typeof(b)==="number"&&!isNaN(b)){return b}if(typeof(b)==="string"){a=Number.parseInvariant(replaceString(b,",","."))}if(!isNumber(a)){a=0}return a}function Val(a){if((a.length==0)||(isNaN(a))){return 0}return parseFloat(a)}function isImage(a){if(!a){return false}return a.toLowerCase().match("^.+.((jpg)|(gif)|(png)|(jpeg))$")}function VWA_FormatNumber(a){var b=a.toString();if(Sys.CultureInfo.CurrentCulture.numberFormat.NumberDecimalSeparator!="."){b=replaceString(b,".",Sys.CultureInfo.CurrentCulture.numberFormat.NumberDecimalSeparator)}return b}function VWA_FormatNumberRound(a,e,d){if(e>=0){a=round(a,e)}var c=a.toString();if(e>=0){var b=c.lastIndexOf(".");if(b>=0){b=c.length-b-1}else{b=0;c+="."}for(iCnt=b;iCnt<e;iCnt++){c+="0"}}if(Sys.CultureInfo.CurrentCulture.numberFormat.NumberDecimalSeparator!="."){c=replaceString(c,".",Sys.CultureInfo.CurrentCulture.numberFormat.NumberDecimalSeparator)}return c}function SetFocus(a){if(!a){return false}if(a.type=="hidden"){return false}try{a.focus();if(a.type=="text"||a.type=="password"){a.select()}}catch(b){return false}return true}function error(a,c){if((a)&&(a.type!="hidden")){try{a.focus();if(a.type=="text"||a.type=="password"){a.select()}}catch(b){}}alert(c);if((!document.all)&&(a)&&(a.type!="hidden")){try{if(a.type=="text"||a.type=="password"){a.value=""}}catch(b){}}return true}function GetValue(a){if(!a){return false}var b="";switch(a.type){case"select-one":if(a.selectedIndex>=0){b=a.options[a.selectedIndex].value;if(b=="_XXX_"){b=""}}break;case"checkbox":if(a.checked){b=1}else{b=0}break;default:switch(a.tagName){case"DIV":case"LABEL":b=a.innerHTML;break;default:b=a.value;break}break}return b}function SetValue(f,j){if(!f||(!j&&j!=0)){return false}var a="";var b=false;if(f.type){a=f.type}else{if(f.length){a=f[0].type}}switch(a){case"select-one":var h=false;for(var k=0;k<f.options.length;k++){if(j.toString().toLowerCase()==f.options[k].value.toString().toLowerCase()){f.options[k].selected=true;h=true;b=true;break}}if((!h)&&(f.options.length>0)){f.options[0].selected=true}break;case"checkbox":if(isNumber(j)){f.checked=(toNumber(j)!=0)}else{if(j){f.checked=true;b=true}else{f.checked=false}}break;case"radio":for(var k=0;k<f.length;k++){if(f[k].value==j){f[k].checked=true;return true}}break;default:switch(f.tagName){case"DIV":case"LABEL":f.innerHTML=j;break;case"SELECT":var l=f.getElementsByTagName("OPTION");for(var c=0;c<l.length;c++){var d=l[c];if(d.value==j){d.selected=true}}break;default:try{f.value=j}catch(g){}break}}return b}function GetTable(b){var a=$get(b);if(a.getElementsByTagName("TBODY")&&a.getElementsByTagName("TBODY")[0]){a=a.getElementsByTagName("TBODY")[0]}return a}function GetInnerText(d){var b=/<\/?[^>]+>/gi;var a="";if(d.innerText){a=d.innerText}else{var c=d.innerHTML;c=replaceString(c,"<br>","\n");a=c.replace(b,"")}return a}function CheckLen(b,c){var a=GetValue(b);if(a.length>c){b.value=a.substring(0,c)}return true}function InitCap(a){if(a.length>0){a=a.substr(0,1).toUpperCase()+a.substr(1).toLowerCase()}else{a=""}return a}function trim(a,b){if(!b){b=" "}while(a.length>0&&a.substr(0,1)==b){a=a.substr(1)}while(a.length>0&&a.substr(a.length-1,1)==b){a=a.substr(0,a.length-1)}return a}function round(b,c,a){if(a){if(c>0){return Math.ceil(b*Math.pow(10,c))/Math.pow(10,c)}else{return Math.ceil(b)}}else{if(c>0){return Math.round(b*Math.pow(10,c))/Math.pow(10,c)}else{return Math.round(b)}}}function replaceString(b,f,e){var a,d,c;a=0;b=b.toString();f=f.toLowerCase();while(a>=0){a=b.toLowerCase().indexOf(f,a);if(a<0){if(f=="\n"){b=replaceString(b,"\r","")}return b}d=b.substring(0,a);c=b.substring(a+f.length,b.length);b=d+e+c;a+=f.length+1}return b}function ListOptionRemove(b,a){if(VWABrowserInfo.IsIE){b.options.remove(a)}else{b.options[a]=null}}function ListOptionAdd(a,b){if(VWABrowserInfo.IsIE){a.options.add(b,a.options.length)}else{a.options[a.options.length]=b}delete (b)}function ButtonHigh(a){a.className="butHigh"}function ButtonNorm(a){a.className="butNorm"}function ButtonEnable(b){var a=document.getElementById(b);a.disabled=false;a.className="butNorm"}function ButtonDisable(b){var a=document.getElementById(b);a.disabled=true;a.className="butDisable"}var iWindowWidth=0,iWindowHeight=0;function GetScreenSize(){if(window.innerWidth){iWindowWidth=window.innerWidth}else{if(document.body.offsetWidth){iWindowWidth=document.body.offsetWidth}else{if(window.screen){try{iWindowWidth=window.screen.width}catch(a){}}}}if(window.innerHeight){iWindowHeight=window.innerHeight}else{if(document.body.offsetHeight){iWindowHeight=document.body.offsetHeight}else{if(window.screen){try{iWindowHeight=window.screen.height}catch(a){}}}}}function GetScrollPosition(){var b=0;var c=0;if(typeof(window.pageYOffset)=="number"){b=window.pageXOffset;c=window.pageYOffset}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){b=document.documentElement.scrollLeft;c=document.documentElement.scrollTop}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){b=document.body.scrollLeft;c=document.body.scrollTop}}}var a={x:b,y:c};return a}var Countries=null;var CountrySettings={CountryControlId:"",StateControlId:"",Street2Id:"",iCountryId:"",bRequesting:false};var CacheCountries=[];var MsgSelectState="";function SetCountryID(d,c,a,b){if((typeof(c)=="undefined")||(c==null)){c=""}if((typeof(a)=="undefined")||(a==null)){a=""}if(CountrySettings.bRequesting){setTimeout('SetCountryID("'+d+'","'+c+'","'+a+'",'+b+")",200);return false}if((typeof(b)=="undefined")||(b==null)){b=toNumber(GetValue($get(d)))}CountrySettings.CountryControlId=d;CountrySettings.StateControlId=c;CountrySettings.Street2Id=a;CountrySettings.iCountryId=b;if(CacheCountries[b]==null){if(!CountrySettings.bRequesting){VWA.FrontService.GetCountryState(b,MsgSelectState,setCountrySucces,setCountryFailure);CountrySettings.bRequesting=true}}else{setCountrySucces(CacheCountries[b],true)}}function setCountrySucces(g,c){CountrySettings.bRequesting=false;if((typeof(g)!="undefined")&&(g!=null)){if((CountrySettings.Street2Id.length>0)&&($get(CountrySettings.Street2Id))&&($get(CountrySettings.Street2Id).style)){$get(CountrySettings.Street2Id).style.display=(g.ShowStreetNr2)?"":"none"}if((CountrySettings.StateControlId.length>0)&&($get(CountrySettings.StateControlId))){var d=$get(CountrySettings.StateControlId);var a=GetValue(d);while(d.options.length>0){ListOptionRemove(d,0)}for(var f=0;f<g.States.length;f++){var b=g.States[f];var e=new Option();e.value=b.StateID;e.text=b.Name;e.selected=(b.StateID==a);ListOptionAdd(d,e)}}if(!c){CacheCountries[g.CountryID]=g}}else{if((CountrySettings.Street2Id.length>0)&&($get(CountrySettings.Street2Id))&&($get(CountrySettings.Street2Id).style)){$get(CountrySettings.Street2Id).style.display="none"}if((CountrySettings.StateControlId.length>0)&&($get(CountrySettings.StateControlId))){var d=$get(CountrySettings.StateControlId);while(d.options.length>0){ListOptionRemove(d,0)}}}}function setCountryFailure(a){CountrySettings.bRequesting=false;alert(a._ResultText)}var timerHourglass=null;function HourGlassShow(b){if((typeof(b)=="undefined")||(b==null)){b=""}var a=$get("tableHourglass");if(a.style.display=="none"){setHourGlassText(b)}a.style.display="";a.style.height=(bUpdate?iWindowHeight:(iWindowHeight-5>iDivsetHeight?iWindowHeight-5:iDivsetHeight))+"px";timerHourglass=setTimeout(HourGlassShowT,tHourGlassShow);a=null}var _sHourglassText="";function setHourGlassText(a){if(a&&a.length>0){$get("tdHourglass").innerHTML=a;_sHourglassText=a}}function HourGlassHide(){if($get("tblHglassTxt")){$get("tblHglassTxt").style.display="none"}$get("tableHourglass").style.display="none";setHourGlassText("&nbsp;");if(timerHourglass){clearTimeout(timerHourglass)}timerHourglass=null}function HourGlassShowT(){var b=$get("tblHglassTxt");if(b){b.style.position="absolute";var a=GetScrollPosition();b.style.display="block";height=parseInt(b.style.height+0,10);width=parseInt(b.style.width+0,10);b.style.top=((iWindowHeight/2-(height/2))+a.y)+"px";b.style.left=((iWindowWidth/2-(width/2))+a.x)+"px"}setHourGlassText(_sHourglassText)}function getOrCreateHidden(c,b){var a=theForm[c];if(!a){a=FormElement(theForm,c,"",b)}return a}function FormElement(d,c,e,b){var a=document.createElement("INPUT");a.setAttribute("name",c);if(b){a.setAttribute("id",c)}a.setAttribute("type","hidden");if(!((typeof(e)=="undefined")||(e==null))){a.setAttribute("value",e)}d.appendChild(a);return a}function ImgCenter(d,a){var b="GalleryThumb"+d;var e="GalleryImg"+d;var f=document.getElementById(b);var c=document.getElementById(e);var g=Math.round((f.offsetHeight-a)/2);c.style.marginTop=(g)+"px"}var iFCKSetHTMLTry=0;function FCKSetHTML(c,h,b){if(!c){return false}var g=null;var a=false;if(typeof(FCKeditorAPI)!="undefined"){g=FCKeditorAPI.GetInstance(c);if(g){try{var f=g.EditorDocument.body;a=true}catch(d){a=false}}}if(!a||g.Status==FCK_STATUS_NOTLOADED){iFCKSetHTMLTry++;if(iFCKSetHTMLTry>=10){return false}if(!b){h=escape(h)}setTimeout("FCKSetHTML('"+c+"','"+h+"',true);",200)}else{iFCKSetHTMLTry=0;if(b){h=unescape(h)}g.SetHTML(h);window.setTimeout("FCKFocus('"+c+"');",500)}}function FCKFocus(b){if(!b){return false}var f=FCKeditorAPI.GetInstance(b);if(!f){return false}var a=true;try{var d=f.EditorDocument.body}catch(c){a=false}if(f.Status==FCK_STATUS_NOTLOADED||!a){window.setTimeout("FCKFocus('"+b+"');",200)}else{f.Focus()}}function FCKGetHTML(a){if(!a){return""}var d=FCKeditorAPI.GetInstance(a);if(!d){return""}try{var c=d.EditorDocument.body}catch(b){d.EditorWindow=d.EditingArea.Window;d.EditorDocument=d.EditingArea.Document}try{return d.GetHTML()}catch(b){d.EditorWindow=d.EditingArea.Window;d.EditorDocument=d.EditingArea.Document}return d.GetHTML()}if(typeof(Sys)!=="undefined"){Sys.Application.notifyScriptLoaded()};