function Base(aa,ba){this.aLoadedImages=new Array();this.oPath=aa;this.lang=ba;this.ua=null;this.init();}
Base.prototype.init=function(){this.ua={sUserAgent:navigator.userAgent.toLowerCase()};this.ua.bIsOpera=this.ua.sUserAgent.indexOf('opera')>-1;this.ua.bIsSafari=this.ua.sUserAgent.indexOf('safari')>-1;this.ua.bIsGecko=!this.ua.bIsOpera&&!this.ua.bIsSafari&&this.ua.sUserAgent.indexOf('gecko')>-1;this.ua.bIsIE=!this.ua.bIsOpera&&this.ua.sUserAgent.indexOf('msie')>-1;this.ua.bIsIE6=this.ua.bIsIE&&(this.ua.sUserAgent.indexOf('msie 5')>-1||this.ua.sUserAgent.indexOf('msie 6')>-1);if(!window.XMLHttpRequest&&window.ActiveXObject)window.XMLHttpRequest=function(){return new ActiveXObject(oBase.ua.sUserAgent.indexOf('MSIE 5')>-1?'Microsoft.XMLHTTP':'MSXML2.XMLHTTP');};if(this.supportsXMLHTTP()&&document.cookie.indexOf('xmlhttp=')==-1)document.cookie='xmlhttp=1; path=/; domain='+this.oPath.cookieURL;};Base.prototype.supportsXMLHTTP=function(){if(!window.XMLHttpRequest)return false;if(typeof(window.opera)!="undefined"){var ca=new XMLHttpRequest();if(typeof(ca.setRequestHeader)!="function")return false;}
return true;}
Base.prototype.confirmRedirect=function(da,ea){var fa=confirm(ea);if(fa)document.location=da;return false;};Base.prototype.loadImage=function(ga){if(!this.aLoadedImages[ga]){this.aLoadedImages[ga]=new Image;this.aLoadedImages[ga].src=ga;}
return this.aLoadedImages[ga];};Base.prototype.copyAddress=function(ha,ia){document.getElementById(ia+'Address').value=document.getElementById(ha+'Address').value;document.getElementById(ia+'Zipcode').value=document.getElementById(ha+'Zipcode').value;document.getElementById(ia+'City').value=document.getElementById(ha+'City').value;document.getElementById(ia+'Country').value=document.getElementById(ha+'Country').value;};Base.prototype.redirect=function(ja){document.location=ja;return false;};Base.prototype.setInnerHTML=function(ka,la){if(typeof(ka.innerHTML)!='undefined')ka.innerHTML=la;else{var ma=document.createRange();ma.selectNodeContents(ka);ma.deleteContents();element.appendChild(ma.createContextualFragment(la));}};Base.prototype.getStyle=function(na,oa){if(document.defaultView&&document.defaultView.getComputedStyle){var pa=null;var qa=document.defaultView.getComputedStyle(na,'');if(qa)pa=qa[oa];return na.style[oa]||pa;}
else if(document.documentElement.currentStyle&&oBase.ua.bIsIE){if(oa=='opacity'){var ra=100;try{ra=na.filters['DXImageTransform.Microsoft.Alpha'].opacity;}
catch(e){try{ra=na.filters('alpha').opacity;}
catch(e){}}
return ra/100;}
else{var sa=na.currentStyle?na.currentStyle[oa]:null;return na.style[oa]||sa;}}
else return na.style[oa];};Base.prototype.setStyle=function(ta,va,wa){if(oBase.ua.bIsIE){if(va=='opacity'){if(typeof(ta.style.filter)=='string'){ta.style.filter='alpha(opacity='+wa*100+')';if(!ta.currentStyle||!ta.currentStyle.hasLayout)ta.style.zoom=1;}}
else ta.style[va]=wa;}
else ta.style[va]=wa;};Base.prototype.isAncestor=function(xa,ya){if(xa.contains&&!oBase.ua.bIsSafari)return xa.contains(ya);else if(xa.compareDocumentPosition)return!!(xa.compareDocumentPosition(ya)&16);else{var za=ya.parentNode;while(za){if(za==xa)return true;else if(!za.tagName||za.tagName.toUpperCase()=='HTML')return false;za=za.parentNode;}
return false;}};Base.prototype.getPos=function(Aa){if(Aa.parentNode==null||Aa.offsetParent==null||oBase.getStyle(Aa,'display')=='none')return false;var Ba=null;var Ca={x:0,y:0};var Da;if(Aa.getBoundingClientRect){Da=Aa.getBoundingClientRect();var Ea=document;if(!oBase.isAncestor(document.documentElement,Aa)&&parent.document!=document){Ea=parent.document;if(!oBase.isAncestor(Ea.documentElement,Aa))return false;}
var Fa=Math.max(Ea.documentElement.scrollTop,Ea.body.scrollTop);var Ga=Math.max(Ea.documentElement.scrollLeft,Ea.body.scrollLeft);Ca.x=Math.ceil(Da.left)+Ga;Ca.y=Math.ceil(Da.top)+Fa;return Ca;}
else{Ca.x=Aa.offsetLeft;Ca.y=Aa.offsetTop;Ba=Aa.offsetParent;if(Ba!=Aa){while(Ba){Ca.x+=Ba.offsetLeft;Ca.y+=Ba.offsetTop;Ba=Ba.offsetParent;}}
if(oBase.ua.bIsSafari&&oBase.getStyle(Aa,'position')=='absolute'){Ca.x-=document.body.offsetLeft;Ca.y-=document.body.offsetTop;}}
if(Aa.parentNode)Ba=Aa.parentNode;else Ba=null;while(Ba&&Ba.tagName.toUpperCase()!='BODY'&&Ba.tagName.toUpperCase()!='HTML'){if(oBase.getStyle(Ba,'display')!='inline'){Ca.x-=Ba.scrollLeft;Ca.y-=Ba.scrollTop;}
if(Ba.parentNode)Ba=Ba.parentNode;else Ba=null;}
return Ca;};Base.prototype.setPos=function(Ha,Ia){var Ja=oBase.getStyle(Ha,'position');if(Ja=='static'){this.setStyle(Ha,'position','relative');Ja='relative';}
var Ka=oBase.getPos(Ha);if(Ka==false)return false;var La={x:parseInt(oBase.getStyle(Ha,'left'),10),y:parseInt(oBase.getStyle(Ha,'top'),10)};if(isNaN(La.x))La.x=(Ja=='relative')?0:Ha.offsetLeft;if(isNaN(La.y))La.y=(Ja=='relative')?0:Ha.offsetTop;if(Ia.x!==null)Ha.style.left=Ia.x-Ka.x+La.x+'px';if(Ia.y!==null)Ha.style.top=Ia.y-Ka.y+La.y+'px';return true;};Base.prototype.getXMLDocument=function(Ma,Na){if(!window.XMLHttpRequest)return null;var Oa=new XMLHttpRequest();var Pa=typeof(Na)!='undefined';var Qa=this;if(Pa){Oa.onreadystatechange=function(){if(Oa.readyState!=4)return;if(Na.call){Na.call(Qa,Oa.responseXML!=null&&Oa.status==200?Oa.responseXML:false);}
else{Qa.tmpMethod=Na;Qa.tmpMethod(Oa.responseXML!=null&&Oa.status==200?Oa.responseXML:false);delete Qa.tmpMethod;}};}
Oa.open('GET',Ma+'&rand='+parseInt(Math.random()*99999999),Pa);Oa.send(null);return Oa;};Base.prototype.sendXMLDocument=function(Ra,Sa,Ta,Ua){if(!window.XMLHttpRequest)return false;var Va=new window.XMLHttpRequest();if(typeof(Ta)!='undefined'&&Ta!=null){Va.onreadystatechange=function(){if(Va.readyState!=4)return;if(Va.responseXML!=null&&Va.status==200)Ta(Va.responseXML);else Ta(false);};}
Va.open('POST',Ra,typeof(Ua)=='undefined'?true:Ua);if(typeof(Va.setRequestHeader)!='undefined')Va.setRequestHeader('Content-Type','application/x-www-form-urlencoded');Va.send(Sa);return true;};Base.prototype.in_array=function(Wa,Xa){for(var i=0,n=Xa.length;i<n;i++){if(Wa==Xa[i])return true;}
return false;}
Base.prototype.addClass=function(Ya,Za){if(typeof(Ya.className)=='undefined')return false;if(Ya.className.indexOf(Za)==-1){Ya.className+=' '+Za;return true;}
var $a=Ya.className==''?[]:Ya.className.split(/ /g);for(var i=0,n=$a.length;i<n;i++)if($a[i]==Za)return true;$a[$a.length]=Za;Ya.className=$a.join(' ');return true;}
Base.prototype.removeClass=function(ab,bb){if(typeof(ab.className)=='undefined'||ab.className==''||ab.className.indexOf(bb)==-1)return false;var cb=ab.className.split(/ /g);for(var i=0,n=cb.length;i<n;i++)if(cb[i]==bb)delete(cb[i]);ab.className=cb.join(' ');return true;}
Base.prototype.confirmAndGo=function(db,eb,fb){this.sConfirmRedirect=db;this.oCommonDialog=new CommonDialog({sSelf:'oBase.oCommonDialog',sConfirmation:eb.replace(/\\n/g,'<br />').replace(/\\r/g,''),sTitle:typeof(fb)=='undefined'?(document.title.indexOf(' - ')==-1?document.title:document.title.substr(0,document.title.indexOf(' - '))):fb,sType:'confirm',fCallback:'oBase.confirmAndGoDone'});return false;}
Base.prototype.confirmAndGoDone=function(gb){if(gb==true)location.href=this.sConfirmRedirect;}
var EventClass=new function(){};EventClass.addEventHandler=function(hb,ib,jb){if(hb.addEventListener)hb.addEventListener(ib,jb,false);else if(hb.attachEvent)hb.attachEvent('on'+ib,jb);else hb['on'+ib]=jb;};EventClass.removeEventHandler=function(kb,lb,mb){if(kb.removeEventListener)kb.removeEventListener(lb,mb,false);else if(kb.detachEvent)kb.detachEvent('on'+lb,mb);else kb['on'+lb]=null;};EventClass.getEvent=function(){return window.event?window.event:EventClass.getEvent.caller.arguments[0];};function Overlay(nb){this.oOverlay=null;this.opt=nb;this.fnResizeEvent=null;this.init();}
Overlay.prototype.init=function(){this.oOverlay=document.createElement('div');this.oOverlay.style.display='none';this.oOverlay.style.backgroundColor='black';this.oOverlay.style.left='0px';this.oOverlay.style.top='0px';if(oBase.ua.bIsIE6){this.oOverlay.style.position='absolute';this.oOverlay.style.width=document.body.scrollWidth+'px';this.oOverlay.style.height=document.body.scrollHeight+'px';}
else{this.oOverlay.style.position='fixed';this.oOverlay.style.width='100%';this.oOverlay.style.height='100%';}
this.oOverlay.style.zIndex=99;document.body.appendChild(this.oOverlay);};Overlay.prototype.show=function(ob){oBase.setStyle(this.oOverlay,'opacity',ob);this.oOverlay.style.display='inline';if(oBase.ua.bIsIE6){window.oOverlayInstanceRef=this;this.fnResizeEvent=function(){this.oOverlayInstanceRef.handleWindowResize();};EventClass.addEventHandler(window,'resize',this.fnResizeEvent);}};Overlay.prototype.handleWindowResize=function(){this.oOverlay.style.position='absolute';this.oOverlay.style.width=document.body.scrollWidth+'px';this.oOverlay.style.height=document.body.scrollHeight+'px';};Overlay.prototype.moveTo=function(pb,qb,rb){var sb=oBase.getStyle(this.oOverlay,'opacity');if(Math.abs(sb-pb)>=qb){oBase.setStyle(this.oOverlay,'opacity',sb>pb?parseFloat(sb)-parseFloat(qb):parseFloat(sb)+parseFloat(qb));setTimeout(this.opt.sSelf+'.moveTo('+pb+', '+qb+', '+rb+');',rb);}};Overlay.prototype.hide=function(){this.oOverlay.style.display='none';};Overlay.prototype.destroy=function(){if(oBase.ua.bIsIE6)EventClass.removeEventHandler(window,'resize',this.fnResizeEvent);this.oOverlay.parentNode.removeChild(this.oOverlay);};function Dialog(tb){this.opt=tb;this.oOverlay=null;this.oDialogDiv=null;this.oHeaderDiv=null;this.iRelMouseTop=0;this.iRelMouseLeft=0;this.oKeyEventObject=null;this.init();}
Dialog.prototype.init=function(){this.oKeyEventObject=oBase.ua.bIsIE||oBase.ua.bIsOpera?document.body:window;this.oKeyEventObject.dialogRef=this;}
Dialog.prototype.show=function(){if(oBase.ua.bIsIE6){var ub=document.getElementsByTagName('select');for(i=0,n=ub.length;i<n;i++)ub[i].style.visibility='hidden';}
this.oOverlay=new Overlay({sSelf:this.opt.sSelf+'.oOverlay'});this.oOverlay.show(0.30);this.oDialogDiv=document.createElement('div');this.oDialogDiv.className='dialog';if(typeof(this.opt.sId)!='undefined')this.oDialogDiv.id=this.opt.sId;this.oDialogDiv.instanceRef=this;oBase.setInnerHTML(this.oDialogDiv,'<div class="dialog-header" id="dialog-header"><div class="button"><div class="close" onclick="'+this.opt.sSelf+'.close();" onmouseover="this.className=\'close-hover\';" onmouseout="this.className=\'close\';"></div></div>'+this.opt.sTitle+'</div><div class="dialog-content">'+this.opt.sContent+'</div><div class="dialog-buttons" id="dialog-buttons">'+this.opt.sButtons+'</div><div class="dialog-footer"></div>');document.body.appendChild(this.oDialogDiv);var vb,iCurHeight;if(typeof(window.innerWidth)=='number'){vb=window.innerWidth;iCurHeight=window.innerHeight;}
else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){vb=document.documentElement.clientWidth;iCurHeight=document.documentElement.clientHeight;}
else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){vb=document.body.clientWidth;iCurHeight=document.body.clientHeight;}
oBase.setPos(this.oDialogDiv,{x:parseInt((vb / 2) - (this.oDialogDiv.clientWidth / 2)),y:parseInt(iCurHeight / 2 - (this.oDialogDiv.clientHeight + 47) / 2)});this.oHeaderDiv=document.getElementById('dialog-header');this.oHeaderDiv.style.cursor='move';this.oHeaderDiv.onmousedown=function(){var wb=EventClass.getEvent();var xb=this.parentNode.instanceRef;if(typeof(xb.oDialogDiv.focus)!='undefined')xb.oDialogDiv.focus();document.onselectstart=new Function('return false');document.body.draggedDialog=xb;EventClass.addEventHandler(document.body,'mousemove',eval(xb.opt.sSelf+'.handleMouseMove'));EventClass.addEventHandler(document.body,'mouseup',eval(xb.opt.sSelf+'.handleMouseUp'));var yb=oBase.getPos(xb.oDialogDiv);xb.iRelMouseTop=wb.clientY-yb.y;xb.iRelMouseLeft=wb.clientX-yb.x;}
this.oKeyEventObject.onkeydown=function(){var zb=EventClass.getEvent();return this.dialogRef.handleKey(zb);}
var Ab=document.getElementById('dialog-buttons').getElementsByTagName('input');if(Ab.length>0)Ab[0].focus();};Dialog.prototype.handleMouseMove=function(){var Bb=EventClass.getEvent();var Cb=document.body.draggedDialog;Cb.oDialogDiv.style.left=(Bb.clientX-Cb.iRelMouseLeft)+'px';Cb.oDialogDiv.style.top=(Bb.clientY-Cb.iRelMouseTop)+'px';if(typeof(Cb.oDialogDiv.focus)!='undefined')Cb.oDialogDiv.focus();};Dialog.prototype.handleMouseUp=function(){var Db=EventClass.getEvent();var Eb=document.body.draggedDialog;EventClass.removeEventHandler(document.body,'mousemove',eval(Eb.opt.sSelf+'.handleMouseMove'));EventClass.removeEventHandler(document.body,'mouseup',eval(Eb.opt.sSelf+'.handleMouseUp'));document.body.draggedDialog=null;document.onselectstart=null;};Dialog.prototype.handleKey=function(Fb){var Gb=Fb.keyCode;if(typeof(this.opt.fOnEnter)!='undefined'&&Gb==13)eval(this.opt.fOnEnter+'();');if(Gb==27)this.destroy();};Dialog.prototype.hide=function(){this.oOverlay.hide();};Dialog.prototype.destroy=function(){if(oBase.ua.bIsIE6){var Hb=document.getElementsByTagName('select');for(i=0,n=Hb.length;i<n;i++)Hb[i].style.visibility='visible';}
this.oKeyEventObject.onkeydown=null;document.body.removeChild(this.oDialogDiv);this.oOverlay.destroy();this.oOverlay=null;if(typeof(this.opt.fOnDestroy)!='undefined')eval(this.opt.fOnDestroy+'();');};Dialog.prototype.close=function(){this.destroy();};function CommonDialog(Ib){this.opt=Ib;this.oDialog=null;this.returnValue=null;this.sInputId=null;this.init();}
CommonDialog.prototype.init=function(){var Jb='';var Kb='';this.sInputId='my-input-'+Math.floor(Math.random()*100000);switch(this.opt.sType){case 'prompt':Jb='<div class="common-dialog-content"><p>'+this.opt.sQuestion+'</p></div><div class="common-dialog-content" id="'+this.sInputId+'-container"></div>';Kb='<input type="button" value="'+oBase.lang.buttonOk+'" onclick="return '+this.opt.sSelf+'.handleSubmit();" /><input type="button" value="'+oBase.lang.buttonCancel+'" onclick="return '+this.opt.sSelf+'.cancel();" />';break;case 'confirm':Jb='<div class="common-dialog-content">'+this.opt.sConfirmation+'</div>';Kb='<input type="button" value="'+oBase.lang.buttonYes+'" onclick="return '+this.opt.sSelf+'.handleConfirm(true);" /><input type="button" value="'+oBase.lang.buttonNo+'" onclick="return '+this.opt.sSelf+'.handleConfirm(false);" />';break;case 'alert':Jb='<div class="common-dialog-content">'+this.opt.sAlert+'</div>';Kb='<input type="button" value="'+oBase.lang.buttonOk+'" onclick="return '+this.opt.sSelf+'.handleConfirm(true);" />';break;}
this.oDialog=new Dialog({sSelf:this.opt.sSelf+'.oDialog',sTitle:this.opt.sTitle,sId:'common-dialog',sContent:Jb,sButtons:Kb,fOnDestroy:this.opt.sSelf+'.handleDestroy',fOnEnter:this.opt.sSelf+'.handleSubmit'});this.oDialog.show();if(this.opt.sType=='prompt'){oBase.setInnerHTML(document.getElementById(this.sInputId+'-container'),'<input type="text" style="width: 280px;" id="'+this.sInputId+'" />');if(oBase.ua.bIsGecko)document.getElementById('common-dialog').style.position='fixed';document.getElementById(this.sInputId).focus();}}
CommonDialog.prototype.handleDestroy=function(){if(this.returnValue==null)this.returnValue=false;eval(this.opt.fCallback+'(this.returnValue);');}
CommonDialog.prototype.handleSubmit=function(){this.returnValue=document.getElementById(this.sInputId).value;this.oDialog.close();}
CommonDialog.prototype.handleConfirm=function(Lb){this.returnValue=Lb;this.oDialog.close();}
CommonDialog.prototype.cancel=function(){this.returnValue=false;this.oDialog.close();}
function ExtendedSelection(Mb){this.opt=Mb;this.oDialog=null;this.iCurCompany=0;this.init();}
ExtendedSelection.prototype.init=function(){oBase.setInnerHTML(document.getElementById(this.opt.sId),'<a href="#" onclick="'+this.opt.sSelf+'.clickHandler();">'+this.opt.sLabel+'</a>');};ExtendedSelection.prototype.clickHandler=function(){var Nb='';if(this.opt.aCompanies.length>1){var Ob='';for(var i=0,n=this.opt.aCompanies.length;i<n;i++){Ob+='<option value="'+this.opt.aCompanies[i].sId+'"'+(this.opt.sCurCompany==this.opt.aCompanies[i].sId?' selected="selected"':'')+'>'+this.opt.aCompanies[i].sName+'</option>';if(this.opt.sCurCompany==this.opt.aCompanies[i].sId)this.iCurCompany=i;}
Nb+=this.opt.sCompanyTemplate.replace(/%companies%/,Ob);}
Nb+=this.opt.sTemplate.replace(/%customerSites%/,this._getCustomerSiteChecks(true));this.oDialog=new Dialog({sSelf:this.opt.sSelf+'.oDialog',sTitle:this.opt.sDialogTitle,sContent:Nb,sButtons:this.opt.sButtonTemplate});this.oDialog.show();};ExtendedSelection.prototype.checkAll=function(){var Pb=document.getElementById('checkAll').checked;for(var i=0,n=this.opt.aCompanies[this.iCurCompany].aCustomerSites.length;i<n;i++)document.getElementById('customerSite_'+this.opt.aCompanies[this.iCurCompany].aCustomerSites[i].sId).checked=Pb;};ExtendedSelection.prototype.checkItem=function(){var Qb=true;for(var i=0,n=this.opt.aCompanies[this.iCurCompany].aCustomerSites.length;i<n;i++)Qb=Qb&&document.getElementById('customerSite_'+this.opt.aCompanies[this.iCurCompany].aCustomerSites[i].sId).checked;document.getElementById('checkAll').checked=Qb;};ExtendedSelection.prototype.changeCompany=function(Rb){this.iCurCompany=Rb.selectedIndex;oBase.setInnerHTML(document.getElementById('customerSiteList'),this._getCustomerSiteChecks());document.getElementById('checkAll').checked=false;};ExtendedSelection.prototype.cancel=function(){this.oDialog.close();};ExtendedSelection.prototype.doSelection=function(){var Sb=new Array();for(var i=0,n=this.opt.aCompanies[this.iCurCompany].aCustomerSites.length;i<n;i++){if(document.getElementById('customerSite_'+this.opt.aCompanies[this.iCurCompany].aCustomerSites[i].sId).checked)Sb[Sb.length]=this.opt.aCompanies[this.iCurCompany].aCustomerSites[i].sId;}
if(Sb.length>0)location.href=location.pathname+'?setCustomerSiteIDs='+Sb.join(',')+'&setCompanyID='+this.opt.aCompanies[this.iCurCompany].sId;else this.oDialog.close();};ExtendedSelection.prototype._getCustomerSiteChecks=function(Tb){var Ub=this.opt.aCompanies[this.iCurCompany].aCustomerSites;var Vb='';for(var i=0,n=Ub.length;i<n;i++)Vb+='<input type="checkbox" value="1" id="customerSite_'+Ub[i].sId+'" onclick="'+this.opt.sSelf+'.checkItem();"'+(Tb&&Ub[i].bChecked?' checked="checked"':'')+' class="checkbox"> <label for="customerSite_'+Ub[i].sId+'">'+Ub[i].sName+'</label><br />';return Vb;};function HelpDialog(Wb){this.opt=Wb;this.oDialog=null;this.init();}
HelpDialog.prototype.init=function(){var Xb=document.getElementById(this.opt.sHelpButtonId);Xb.style.display='block';document.getElementById(this.opt.sSeparatorId).style.display=document.getElementById(this.opt.sAddComponentsId).style.display;Xb.oHelpDialogRef=this;Xb.onclick=function(){this.oHelpDialogRef.show();};};HelpDialog.prototype.show=function(){this.oDialog=new Dialog({sSelf:this.opt.sSelf+'.oDialog',sTitle:this.opt.sTitle,sContent:this.opt.sContents,sButtons:this.opt.sButton});this.oDialog.show();};HelpDialog.prototype.close=function(){this.oDialog.close();};function ListView(Yb){this.opt=Yb;this.oForm=null;this.oAllCheck=null;this.oColumnPickerDialog=null;this.bMyReportCollapsed=true;this.iCurReport=null;this.oSaveButton=null;this.oRemoveButton=null;this.oSelect=null;this.init();};ListView.prototype.init=function(){var Zb=document.getElementById(this.opt.sTableId);var $b=Zb.getElementsByTagName('tr');for(var i=0,n=$b.length;i<n;i++){if($b[i].childNodes==null||$b[i].childNodes.length<=1||$b[i].childNodes[1].nodeName.toLowerCase()=='th')continue;$b[i].instanceRef=this;$b[i].sBaseClass=$b[i].className;$b[i].sMarkedClass='';$b[i].sHighlightClass='';$b[i].onmouseover=function(){this.instanceRef.highlight(this,true);}
$b[i].onmouseout=function(){this.instanceRef.delight(this,true);}
if(this.opt.bEnableClickSupport)$b[i].onclick=function(){this.instanceRef.handleClick(this,true);}}
if(this.opt.sAllCheck!=null){this.oAllCheck=document.getElementById(this.opt.sAllCheck);this.oAllCheck.style.display='block';this.oAllCheck.instanceRef=this;this.oAllCheck.onclick=function(){this.instanceRef.checkAll();};var ac=Zb.getElementsByTagName('input');for(var i=0,n=ac.length;i<n;i++){if(typeof(ac[i].type)!='undefined'&&ac[i].type=='checkbox'&&ac[i].name==this.opt.sCheckName){ac[i].instanceRef=this;ac[i].onclick=function(){this.instanceRef.checkItem();};}}}
if(typeof(this.opt.oColumnPicker)!='undefined'){var bc=document.getElementById(this.opt.oColumnPicker.sId);oBase.setInnerHTML(bc,'<img src="../Nieuwe map/'+oBase.oPath.imageURL+'/shared/icons/columnPicker.png" style="" alt="" />');bc.instanceRef=this;bc.onclick=function(){this.instanceRef.columnPickerShow();}}
if(typeof(this.opt.oMyReport)!='undefined'){oBase.setInnerHTML(document.getElementById(this.opt.oMyReport.sContainerId),this.opt.oMyReport.sTemplate);if(!this.opt.oMyReport.bCollapsed)this.myReportToggle();this.oSelect=document.getElementById(this.opt.oMyReport.sSelectId);this.oSelect.instanceRef=this;this.oSelect.onchange=function(){this.instanceRef.myReportChange();}
for(var i=0,n=this.opt.oMyReport.aReports.length;i<n;i++)this.myReportAddOption(i);this.oSaveButton=document.getElementById(this.opt.oMyReport.sSaveId);this.oRemoveButton=document.getElementById(this.opt.oMyReport.sRemoveId);this.myReportUpdateButtonStatus();}};ListView.prototype.myReportAddOption=function(cc){oOption=document.createElement('option');oBase.setInnerHTML(oOption,this.opt.oMyReport.aReports[cc].sName+(this.opt.oMyReport.aReports[cc].bIsModified?' *':''));oOption.value=this.opt.oMyReport.aReports[cc].sId;this.oSelect.appendChild(oOption);if(this.opt.oMyReport.aReports[cc].bSelected){this.oSelect.selectedIndex=this.oSelect.options.length-1;this.iCurReport=cc;}};ListView.prototype.myReportChange=function(){var dc=this.oSelect.options[this.oSelect.selectedIndex].value;switch(dc){case '-1':location.href=this.opt.oMyReport.sBaseURL;break;case '0':this.iCurReport=null;this.myReportUpdateButtonStatus();return;break;default:for(var i=0,n=this.opt.oMyReport.aReports.length;i<n;i++)if(this.opt.oMyReport.aReports[i].sId==dc)location.href=this.opt.oMyReport.aReports[i].sURL+(this.opt.oMyReport.aReports[i].sURL.indexOf('?')==-1?'?':'&')+'r='+dc;break;}};ListView.prototype.myReportUpdateButtonStatus=function(){var ec=this.oSelect.options[this.oSelect.selectedIndex].value;var fc=ec=='0'||(this.iCurReport!=null&&this.opt.oMyReport.aReports[this.iCurReport].bIsModified);this.oSaveButton.src=this.oSaveButton.src.replace(/[a-zA-Z_]+\.png/,fc?'save.png':'save_off.png');this.oSaveButton.style.cursor=fc?'pointer':'auto';if(fc){this.oSaveButton.instanceRef=this;this.oSaveButton.onclick=function(){this.instanceRef.myReportSave();}}
else this.oSaveButton.onclick=null;var gc=this.iCurReport!=null;this.oRemoveButton.src=this.oRemoveButton.src.replace(/[a-zA-Z_]+\.png/,gc?'delete.png':'delete_off.png');this.oRemoveButton.style.cursor=gc?'pointer':'auto';if(gc){this.oRemoveButton.instanceRef=this;this.oRemoveButton.onclick=function(){this.instanceRef.myReportRemove();}}
else this.oRemoveButton.onclick=null;};ListView.prototype.myReportToggle=function(){var hc=document.getElementById(this.opt.oMyReport.sToggleId);var ic=document.getElementById(this.opt.oMyReport.sPanelId);if(this.bMyReportCollapsed){hc.src=hc.src.replace(/maximize/,'minimize');ic.style.display='block';oBase.getXMLDocument('/XMLHTTP/setMyReportToggle?collapse=0&listview='+this.opt.sId);}
else{hc.src=hc.src.replace(/minimize/,'maximize');ic.style.display='none';oBase.getXMLDocument('/XMLHTTP/setMyReportToggle?collapse=1&listview='+this.opt.sId);}
this.bMyReportCollapsed=!this.bMyReportCollapsed;};ListView.prototype.myReportAdd=function(){this.oCommonDialog=new CommonDialog({sSelf:this.opt.sSelf+'.oCommonDialog',sQuestion:this.opt.oMyReport.oLang.sAddReportQuestion,sTitle:this.opt.oMyReport.oLang.sAddReportTitle,sType:'prompt',fCallback:this.opt.sSelf+'.myReportAddDone'});};ListView.prototype.myReportAddDone=function(jc){if(jc!=false){var kc=oBase.getXMLDocument(this.opt.oMyReport.sReportURL+'&saveReport='+escape(jc));var lc=kc.responseText.substr(1);location.href=this.opt.oMyReport.sReportURL+'&r='+lc;}};ListView.prototype.myReportSave=function(){if(this.iCurReport==null)return this.myReportAdd();oBase.getXMLDocument(this.opt.oMyReport.sReportURL+'&updateReport='+this.opt.oMyReport.aReports[this.iCurReport].sId);this.opt.oMyReport.aReports[this.iCurReport].bIsModified=false;oBase.setInnerHTML(this.oSelect.options[this.oSelect.selectedIndex],this.opt.oMyReport.aReports[this.iCurReport].sName);this.myReportUpdateButtonStatus();return null;};ListView.prototype.myReportRemove=function(){if(this.iCurReport!=null){this.oCommonDialog=new CommonDialog({sSelf:this.opt.sSelf+'.oCommonDialog',sConfirmation:this.opt.oMyReport.oLang.sConfirmDelete,sTitle:this.opt.oMyReport.oLang.sConfirmDeleteTitle,sType:'confirm',fCallback:this.opt.sSelf+'.myReportRemoveDone'});}};ListView.prototype.myReportRemoveDone=function(mc){if(mc!=false){oBase.getXMLDocument(this.opt.oMyReport.sReportURL+'&removeReport='+this.opt.oMyReport.aReports[this.iCurReport].sId);this.oSelect.removeChild(this.oSelect.options[this.oSelect.selectedIndex]);if(this.oSelect.options.length==1||this.oSelect.options[1].value!=0){var nc=document.createElement('option');nc.value='0';oBase.setInnerHTML(nc,this.opt.oMyReport.oLang.sCustomOption);if(this.oSelect.options.length==1)this.oSelect.appendChild(nc);else this.oSelect.insertBefore(nc,this.oSelect.options[1]);}
this.oSelect.selectedIndex=1;this.iCurReport=null;this.myReportUpdateButtonStatus();}};ListView.prototype.columnPickerShow=function(){var oc='';var pc=[];for(var i=0,n=this.opt.oColumnPicker.aColumnGroups.length;i<n;i++){if(this.opt.oColumnPicker.aColumnGroups[i].sName!=null)oc+='<h4>'+this.opt.oColumnPicker.aColumnGroups[i].sName+'</h4>';oc+='<div style="clear: both; height:5px;"></div>';for(var j=0,m=this.opt.oColumnPicker.aColumnGroups[i].aColumns.length;j<m;j++){oc+='<div class="column-picker-column" id="option_'+this.opt.oColumnPicker.aColumnGroups[i].aColumns[j].sId+'"><input type="checkbox" name="c[]" id="column_'+this.opt.oColumnPicker.aColumnGroups[i].aColumns[j].sId+'" value="'+this.opt.oColumnPicker.aColumnGroups[i].aColumns[j].sId+'"'+(this.opt.oColumnPicker.aColumnGroups[i].aColumns[j].bSelected?' checked="checked"':'')+' /> <label for="column_'+this.opt.oColumnPicker.aColumnGroups[i].aColumns[j].sId+'" id="option-label-'+this.opt.oColumnPicker.aColumnGroups[i].aColumns[j].sId+'">'+this.opt.oColumnPicker.aColumnGroups[i].aColumns[j].sName+'</label></div>';if(this.opt.oColumnPicker.aColumnGroups[i].aColumns[j].sDescription!=null)pc[pc.length]={sId:'option-label-'+this.opt.oColumnPicker.aColumnGroups[i].aColumns[j].sId,sTitle:this.opt.oColumnPicker.aColumnGroups[i].aColumns[j].sTitle==null?this.opt.oColumnPicker.aColumnGroups[i].aColumns[j].sName:this.opt.oColumnPicker.aColumnGroups[i].aColumns[j].sTitle,sContent:this.opt.oColumnPicker.aColumnGroups[i].aColumns[j].sDescription};}
oc+='<div style="clear: both; height:5px;"></div>';}
this.oColumnPickerDialog=new Dialog({sSelf:this.opt.sSelf+'.oColumnPickerDialog',sTitle:this.opt.oColumnPicker.sTitle,sContent:oc,sButtons:this.opt.oColumnPicker.sButtonTemplate,fOnDestroy:this.opt.sSelf+'.columnPickerDestroy'});this.oColumnPickerDialog.show();if(pc.length>0)this.oColumnPickerDialog.oHint=new Hint({aTargets:pc});else this.oColumnPickerDialog.oHint=null;};ListView.prototype.columnPickerCancel=function(){this.oColumnPickerDialog.destroy();};ListView.prototype.columnPickerDestroy=function(){if(this.oColumnPickerDialog.oHint!=null)this.oColumnPickerDialog.oHint.destroy();};ListView.prototype.columnPickerSubmit=function(){var qc=[];for(var i=0,n=this.opt.oColumnPicker.aColumnGroups.length;i<n;i++){for(var j=0,m=this.opt.oColumnPicker.aColumnGroups[i].aColumns.length;j<m;j++){this.opt.oColumnPicker.aColumnGroups[i].aColumns[j].bSelected=document.getElementById('column_'+this.opt.oColumnPicker.aColumnGroups[i].aColumns[j].sId).checked;if(this.opt.oColumnPicker.aColumnGroups[i].aColumns[j].bSelected)qc[qc.length]=this.opt.oColumnPicker.aColumnGroups[i].aColumns[j].sId;}}
location.href=this.opt.oColumnPicker.sReportURL+'&c='+qc.join(':');};ListView.prototype.checkAll=function(){if(this.oForm==null)this.oForm=document.getElementById(this.opt.sFormId);for(var i=0;i<this.oForm.elements.length;i++){var rc=this.oForm.elements[i];if(rc.name==this.opt.sCheckName&&rc.type=='checkbox'&&rc.disabled==false)rc.checked=this.oAllCheck.checked;}};ListView.prototype.checkItem=function(){if(this.oForm==null)this.oForm=document.getElementById(this.opt.sFormId);var sc=0;var tc=0;for(var i=0;i<this.oForm.elements.length;i++){var uc=this.oForm.elements[i];if(uc.name==this.opt.sCheckName&&uc.type=='checkbox'&&uc.disabled==false){sc++;if(uc.checked)tc++;}}
if(tc==sc)this.oAllCheck.checked=true;else this.oAllCheck.checked=false;};ListView.prototype.highlight=function(vc,wc){vc.sHighlightClass=' highlight';vc.className=vc.sBaseClass+vc.sMarkedClass+vc.sHighlightClass;};ListView.prototype.delight=function(xc,yc){xc.sHighlightClass='';xc.className=xc.sBaseClass+xc.sMarkedClass+xc.sHighlightClass;};ListView.prototype.handleClick=function(zc,Ac){zc.sMarkedClass=zc.sMarkedClass==''?' marked':'';zc.className=zc.sBaseClass+zc.sMarkedClass+zc.sHighlightClass;}
ListView.prototype.changePeriodType=function(Bc){document.getElementById(this.opt.sViewDateOptionsId).style.display=Bc=='1'?'inline':'none';};function InlineListView(Cc){this.opt=Cc;this.init();};InlineListView.prototype.init=function(){this.tmpMethod=oBase.getXMLDocument;this.tmpMethod(this.opt.sUrl,this.handleInjectListView);delete this.tmpMethod;document.body.inlineListView_instanceRef=this;oBase.setInnerHTML(document.getElementById(this.opt.sTargetId),this.opt.sLoaderTemplate);}
InlineListView.prototype.handleInjectListView=function(Dc){if(typeof(Dc)=='boolean'&&Dc==false)return oBase.setInnerHTML(document.getElementById(this.opt.sTargetId),'<div class="loader">'+oBase.lang.errorLoadingData+'</div>');var Ec='';for(var i=0,n=Dc.getElementsByTagName('root')[0].childNodes.length;i<n;i++)Ec+=Dc.getElementsByTagName('root')[0].childNodes[i].nodeValue;oBase.setInnerHTML(document.getElementById(this.opt.sTargetId),Ec);window[this.opt.oListViewOptions.sSelf]=new ListView(this.opt.oListViewOptions);return null;}
function DateSelector(Fc){this.opt=Fc;this.oPeriodDiv=null;this.init();};DateSelector.prototype.init=function(){this.oPeriodDiv=document.getElementById(this.opt.sPeriodDivId);this.oPeriodDiv.name=this.opt.sField+'[t]';this.oPeriodDiv.style.display='inline';this.oPeriodDiv.form.instanceRef=this;this.oPeriodDiv.onchange=function(){this.form.instanceRef.selectPeriod(this.value);if(this.value!=1)this.form.submit();}
var Gc;for(var i=0,n=this.opt.aPeriods.length;i<n;i++){Gc=document.createElement('option');oBase.setInnerHTML(Gc,this.opt.aPeriods[i].sLabel);Gc.value=this.opt.aPeriods[i].sName;this.oPeriodDiv.appendChild(Gc);if(this.opt.aPeriods[i].bSelected){this.oPeriodDiv.selectedIndex=this.oPeriodDiv.options.length-1;this.selectPeriod(Gc.value);}}
this.oPeriodDiv.form[this.opt.sField+'[fd]'].onchange=function(){this.form.instanceRef.resetPredefinedPeriod();};this.oPeriodDiv.form[this.opt.sField+'[fm]'].onchange=function(){this.form.instanceRef.resetPredefinedPeriod();};this.oPeriodDiv.form[this.opt.sField+'[fy]'].onchange=function(){this.form.instanceRef.resetPredefinedPeriod();};this.oPeriodDiv.form[this.opt.sField+'[td]'].onchange=function(){this.form.instanceRef.resetPredefinedPeriod();};this.oPeriodDiv.form[this.opt.sField+'[tm]'].onchange=function(){this.form.instanceRef.resetPredefinedPeriod();};this.oPeriodDiv.form[this.opt.sField+'[ty]'].onchange=function(){this.form.instanceRef.resetPredefinedPeriod();};if(typeof(this.oPeriodDiv.form[this.opt.sSubmitButtonName])!='undefined')this.oPeriodDiv.form[this.opt.sSubmitButtonName].style.display='none';if(typeof(this.oPeriodDiv.form[this.opt.sField+'[gb]'])!='undefined'){this.oPeriodDiv.form[this.opt.sField+'[gb]'].onchange=function(){this.form.instanceRef.handleChangeGroupBy(true);}
this.handleChangeGroupBy(false);}};DateSelector.prototype.selectPeriod=function(Hc){for(var i=0,n=this.opt.aPeriods.length;i<n;i++){if(this.opt.aPeriods[i].sName==Hc){if(this.opt.aPeriods[i].sBeginDate!=''){this.oPeriodDiv.form[this.opt.sField+'[fd]'].selectedIndex=parseInt(this.opt.aPeriods[i].sBeginDate.substr(8,2).replace(/^0/,''))-1;this.oPeriodDiv.form[this.opt.sField+'[fm]'].selectedIndex=parseInt(this.opt.aPeriods[i].sBeginDate.substr(5,2).replace(/^0/,''))-1;this.oPeriodDiv.form[this.opt.sField+'[fy]'].selectedIndex=parseInt(this.opt.aPeriods[i].sBeginDate.substr(0,4).replace(/^0/,''))-2000;this.oPeriodDiv.form[this.opt.sField+'[td]'].selectedIndex=parseInt(this.opt.aPeriods[i].sEndDate.substr(8,2).replace(/^0/,''))-1;this.oPeriodDiv.form[this.opt.sField+'[tm]'].selectedIndex=parseInt(this.opt.aPeriods[i].sEndDate.substr(5,2).replace(/^0/,''))-1;this.oPeriodDiv.form[this.opt.sField+'[ty]'].selectedIndex=parseInt(this.opt.aPeriods[i].sEndDate.substr(0,4).replace(/^0/,''))-2000;}
break;}}};DateSelector.prototype.resetPredefinedPeriod=function(){this.oPeriodDiv.selectedIndex=0;};DateSelector.prototype.handleChangeGroupBy=function(Ic){switch(this.oPeriodDiv.form[this.opt.sField+'[gb]'].options[this.oPeriodDiv.form[this.opt.sField+'[gb]'].selectedIndex].value){case '1':var Jc=this.oPeriodDiv.options[this.oPeriodDiv.selectedIndex].value;this.oPeriodDiv.form[this.opt.sField+'[fd]'].style.display='none';this.oPeriodDiv.form[this.opt.sField+'[fm]'].style.display='none';this.oPeriodDiv.form[this.opt.sField+'[td]'].style.display='none';this.oPeriodDiv.form[this.opt.sField+'[tm]'].style.display='none';this.oPeriodDiv.options[1].style.display='none';this.oPeriodDiv.options[2].style.display='none';this.oPeriodDiv.options[3].style.display='none';this.oPeriodDiv.options[4].style.display='none';if(Jc=='2'||Jc=='3'||Jc=='4'||Jc=='5'){for(var i=0,n=this.oPeriodDiv.options.length;i<n;i++){if(this.oPeriodDiv.options[i].value=='6'){this.oPeriodDiv.selectedIndex=i;this.selectPeriod(this.oPeriodDiv.options[i].value);break;}}}
break;case '2':this.oPeriodDiv.form[this.opt.sField+'[fd]'].style.display='none';this.oPeriodDiv.form[this.opt.sField+'[fm]'].style.display='inline';this.oPeriodDiv.form[this.opt.sField+'[td]'].style.display='none';this.oPeriodDiv.form[this.opt.sField+'[tm]'].style.display='inline';this.oPeriodDiv.options[1].style.display='none';this.oPeriodDiv.options[2].style.display='none';this.oPeriodDiv.options[3].style.display='block';this.oPeriodDiv.options[4].style.display='block';if(Jc=='2'||Jc=='3'){for(var i=0,n=this.oPeriodDiv.options.length;i<n;i++){if(this.oPeriodDiv.options[i].value=='4'){this.oPeriodDiv.selectedIndex=i;this.selectPeriod(this.oPeriodDiv.options[i].value);break;}}}
break;case '0':case '3':default:this.oPeriodDiv.form[this.opt.sField+'[fd]'].style.display='inline';this.oPeriodDiv.form[this.opt.sField+'[fm]'].style.display='inline';this.oPeriodDiv.form[this.opt.sField+'[td]'].style.display='inline';this.oPeriodDiv.form[this.opt.sField+'[tm]'].style.display='inline';this.oPeriodDiv.options[1].style.display='block';this.oPeriodDiv.options[2].style.display='block';this.oPeriodDiv.options[3].style.display='block';this.oPeriodDiv.options[4].style.display='block';break;}
if(Ic)this.oPeriodDiv.form.submit();}
function Flash(Kc){this.opt=Kc;this.init();}
Flash.prototype.init=function(){document.write('<object type="application/x-shockwave-flash" data="../Nieuwe map/'+oBase.oPath.imageURL+'/'+this.opt.sFile+'" width="'+this.opt.sWidth+'" height="'+this.opt.sHeight+'">');document.write('<param name="movie" value="../Nieuwe map/'+oBase.oPath.imageURL+'/'+this.opt.sFile+'" />');if(typeof(this.opt.sFlashVars)!='undefined')document.write('<param name="flashvars" value="'+this.opt.sFlashVars+'" />');document.write('<param name="quality" value="high" />');document.write('<param name="wmode" value="transparent" />');document.write('<param name="menu" value="false" />');document.write('<param name="loop" value="false" />');document.write('<param name="scale" value="noscale" />');document.write('<param name="allowScriptAccess" value="sameDomain" />');document.write('<img src="../Nieuwe map/'+oBase.oPath.imageURL+'/'+this.opt.sAltImage+'" alt="" />');document.write('</object>');};function NavigationButtons(Lc){this.opt=Lc;this.init();}
NavigationButtons.prototype.init=function(){var Mc=document.getElementById(this.opt.sListContainerId).getElementsByTagName('li');for(var i=0,n=Mc.length;i<n;i++){if(typeof(Mc[i].className)=='undefined'||Mc[i].className==null||Mc[i].className.indexOf('selected')==-1){Mc[i].instanceRef=this;Mc[i].onmouseover=function(){this.instanceRef.handleMouseOverButton(this,true);}
Mc[i].onmouseout=function(){this.instanceRef.handleMouseOverButton(this,false);}}}}
NavigationButtons.prototype.handleMouseOverButton=function(Nc,Oc){var Pc=typeof(Nc.className)=='undefined'||Nc.className==null?'':Nc.className;if(Oc){if(Pc.indexOf('selected')!=-1)return;Nc.className=Pc.indexOf('first')!=-1?'first selected':'selected';}
else Nc.className=Pc.indexOf('first')!=-1?'first':'';}
function Hint(Qc){this.opt=Qc;this.oContainer=null;this.oBox=null;this.oTitleDiv=null;this.oContentDiv=null;this.oTarget=null;this.iTimeoutId=null;this.init();}
Hint.prototype.init=function(){for(var i=0,n=this.opt.aTargets.length;i<n;i++){var Rc=document.getElementById(this.opt.aTargets[i].sId);Rc.instanceRef=this;Rc.sHintTitle=this.opt.aTargets[i].sTitle;Rc.sHintContent=this.opt.aTargets[i].sContent;Rc.style.cursor='pointer';Rc.bTransparent=typeof(this.opt.aTargets[i].bTransparent)=='boolean'&&this.opt.aTargets[i].bTransparent;Rc.onmouseover=function(){this.instanceRef.showHint(this.sHintTitle,this.sHintContent,this.bTransparent);};Rc.onmouseout=function(){this.instanceRef.hideHint();};}}
Hint.prototype.showHint=function(Sc,Tc,Uc){if(this.iTimeoutId!=null){window.clearTimeout(this.iTimeoutId);this.iTimeoutId=null;}
if(this.oTitleDiv!=null&&this.oTitleDiv.innerHTML==Sc&&this.oContentDiv.innerHTML==Tc){return;}
if(this.oBox==null){this.oBox=document.createElement('div');document.body.appendChild(this.oBox);this.oContainer=document.createElement('div');this.oContainer.className='hint-container';this.oBox.appendChild(this.oContainer);this.oTitleDiv=document.createElement('div');this.oTitleDiv.style.display='none';this.oTitleDiv.style.fontWeight='bold';this.oTitleDiv.style.padding='2px';this.oTitleDiv.style.backgroundColor='#f6eeaa';this.oTitleDiv.style.borderBottom='1px solid #212121';this.oContainer.appendChild(this.oTitleDiv);this.oContentDiv=document.createElement('div');this.oContentDiv.style.padding='2px';this.oContainer.appendChild(this.oContentDiv);}
if(Uc){this.oTitleDiv.style.display='none';this.oContentDiv.style.display='block';this.oBox.className='hint-transparent';}
else{this.oBox.className='hint-shade';oBase.setInnerHTML(this.oTitleDiv,Sc);this.oTitleDiv.style.display='block';this.oContentDiv.style.display=Tc==''?'none':'block';this.oTitleDiv.style.borderBottom=Tc==''?'0px solid black':'1px solid black';}
oBase.setInnerHTML(this.oContentDiv,Tc);this.oBox.style.visibility='visible';document.MouseOver_instanceRef=this;document.onmousemove=function(Vc){document.MouseOver_instanceRef.mouseMove(Vc?Vc:window.event);};}
Hint.prototype.hideHint=function(){if(this.iTimeoutId==null)this.iTimeoutId=setTimeout(this.opt.sSelf+'.hideHint2()',5);}
Hint.prototype.hideHint2=function(){this.oBox.style.visibility='hidden';document.onmousemove=null;this.iTimeoutId=null;}
Hint.prototype.mouseMove=function(Wc){if(Wc.pageX){this.oBox.style.left=(Wc.pageX+20)+'px';this.oBox.style.top=(Wc.pageY+20)+'px';}
else{this.oBox.style.left=Wc.clientX+(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft)+10;this.oBox.style.top=Wc.clientY+(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop)+10;}}
Hint.prototype.destroy=function(){document.onmousemove=null;this.oBox.parentNode.removeChild(this.oBox);}
function MaterialPreview(Xc){this.opt=Xc;this.oHint=null;this.oMaterialDone={};this.init();}
MaterialPreview.prototype.init=function(){this.oHint=new Hint({aTargets:[],sSelf:this.opt.sSelf+'.oHint'});}
MaterialPreview.prototype.initMaterial=function(Yc,Zc){if(typeof(this.oMaterialDone[Yc.sMaterialId])=='boolean')return;Zc.instanceRef=this.oHint;switch(Yc.iType){case 1:Zc.sHintTitle='';Zc.sHintContent='<div style="background-color: white; border: 1px solid black; width: '+Yc.sWidth+'px; height: '+Yc.sHeight+'px;"><img src="../Nieuwe map/'+oBase.oPath.currentURL+'/affiliateMaterial/getFile/materialID/'+Yc.sMaterialId+'" alt="" width="'+Yc.sWidth+'" height="'+Yc.sHeight+'" /></div>';Zc.bTransparent=true;break;case 2:Zc.sHintTitle=Yc.sLinkText;Zc.sHintContent=Yc.sLinkTextAdditional;Zc.bTransparent=false;break;case 3:Zc.sHintTitle='';Zc.sHintContent='<div style="background-color: white; border: 1px solid black; width: '+Yc.sWidth+'px; height: '+Yc.sHeight+'px; position: absolute;"><object type="application/x-shockwave-flash" data="../Nieuwe map/'+oBase.oPath.currentURL+'/affiliateMaterial/getFile/materialID/'+Yc.sMaterialId+'" width="'+Yc.sWidth+'" height="'+Yc.sHeight+'"><param name="movie" value="../Nieuwe map/'+oBase.oPath.currentURL+'/affiliateMaterial/getFile/materialID/'+Yc.sMaterialId+'" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="menu" value="false" /><param name="loop" value="true" /><param name="flashvars" value="campaignID=0&amp;materialID='+Yc.sMaterialId+'&amp;affiliateID=0&amp;clickTAG=&amp;clickTag=" /></object></div>';Zc.bTransparent=true;break;case 4:Zc.sHintTitle='';Zc.sHintContent='<div style="background-color: white; border: 1px solid black; width: '+Yc.sWidth+'px; height: '+Yc.sHeight+'px;"><img src="../Nieuwe map/'+oBase.oPath.currentURL+'/affiliateMaterial/getFile/materialID/'+Yc.sMaterialId+'" alt="" width="'+Yc.sWidth+'" height="'+Yc.sHeight+'" /></div>';Zc.bTransparent=true;break;}
var $c=Zc.getElementsByTagName('span');for(var i=0,n=$c.length;i<n;i++)if(typeof($c[i].title)=='string')$c[i].title='';Zc.style.cursor='pointer';Zc.onmouseover=function(){this.instanceRef.showHint(this.sHintTitle,this.sHintContent,this.bTransparent);};Zc.onmouseout=function(){this.instanceRef.hideHint();};this.oHint.showHint(Zc.sHintTitle,Zc.sHintContent,Zc.bTransparent);this.oMaterialDone[Yc.sMaterialId]=true;}
MaterialPreview.handleMouseOver=function(ad,bd){if(ad.sMaterialId=='0')return;if(typeof(window['oMaterialPreview'])=='undefined')window['oMaterialPreview']=new MaterialPreview({sSelf:'oMaterialPreview'});window['oMaterialPreview'].initMaterial(ad,bd);}
